This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2014-223640, filed on Oct. 31, 2014, the entire contents of which are incorporated herein by reference.
The embodiment discussed herein is related to motion search processing and so forth.
In image coding processing in which a moving image is compressed, a motion vector is obtained by performing block matching of previous and following frames of input image data. Discrete cosine transform (DCT) quantization and entropy coding are performed based on the motion vector which is obtained.
A related technique is disclosed in Japanese Laid-open Patent Publication No. 2014-42139, Japanese Laid-open Patent Publication No. 2010-41624, Japanese Laid-open Patent Publication No. 2011-4345, or Japanese Laid-open Patent Publication No. 9-322160.
According to an aspect of the embodiments, a motion search processing method includes: dividing, by a computer, first image data included in video data in accordance with a frequency band and generating a plurality of pieces of divided image data; performing compression processing on first divided image data among the plurality of pieces of divided image data and generating compressed divided image data, the first divided image data including a frequency component of which a frequency band is equal to or more than a value; performing first motion search processing on the video data by using second divided image data among the plurality of pieces of divided image data, the second divided image data including a frequency component of which a frequency band is less than the value; and generating second image data by using the plurality of pieces of divided image data and performing second motion search processing by using the second image data.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
When a motion vector is obtained, an arithmetic amount is reduced by multi-stage motion search. Reduced image data is generated from input image data, first motion search is performed with respect to the reduced image data and a motion search range is narrowed down. An image corresponding to the narrowed motion search range is acquired from the input image data and second motion search is performed with respect to the acquired image data.
For example, input image data and reduced image data are stored in the external memory 20, so that a memory capacity of the external memory 20 may increase and a transfer amount of data between the image coding processing unit 10 and the external memory 20 may increase. Therefore, it may take time for the image coding processing unit 10 to read data and thus, multi-stage motion search may not be executed efficiently.
The external memory 110 includes input image data 110a and a compressed high-frequency data storage region 110b. The input image data 110a is deleted from the external memory 110 after a generation unit 130a bandwidth-divides the input image data 110a into low-frequency data and high-frequency data. The external memory 110 may correspond to a storage device such as a semiconductor memory element which is a random access memory (RAM), a flash memory, or the like, for example.
The input image data 110a is image data which corresponds to one frame of a moving image. The input image data 110a is sequentially stored in the external memory 110 from an external device and is processed by the motion search processing device 100.
In the compressed high-frequency data storage region 110b, data obtained by compressing the high-frequency data of the input image data 110a is stored. The compressed high-frequency data storage region 110b is generated by a compression unit 130b and is stored in the external memory 110. In the following description, high-frequency data which is compressed may be expressed as compressed high-frequency data.
The image coding processing unit 115 executes motion search processing with respect to the input image data 110a which is sequentially stored in the external memory 110 and generates stream data. The image coding processing unit 115 outputs the generated stream data to an external device. The image coding processing unit 115 includes an internal memory 120 and a control unit 130.
The internal memory 120 includes low-frequency data 120a, a management table 125a, and search range image data 125b. For example, the internal memory 120 may correspond to a storage device such as a semiconductor memory element which is a RAM or the like.
The low-frequency data 120a may correspond to the low-frequency data of the input image data 110a.
The management table 125a is information for associating a position on the input image data 110a with an address on the compressed high-frequency data storage region 110b in which compressed high-frequency data corresponding to the position is held.
For example, in a record on the first row of
The search range image data 125b is image data of a search range which is specified when first motion search is performed. In the following description, a search range which is specified when first motion search is performed may be expressed as a motion search range. A motion search unit 130c generates the search range image data 125b based on the low-frequency data 120a and compressed high-frequency data which are included in a motion search range.
The control unit 130 includes the generation unit 130a, the compression unit 130b, and the motion search unit 130c. The control unit 130 may correspond to an integrated device such as an application specific integrated circuit (ASIC) and a field programmable gate array (FPGA), for example. The control unit 130 may correspond to an electric circuit such as a central processing unit (CPU) and a micro processing unit (MPU), for example.
The generation unit 130a reads the input image data 110a which is stored in the external memory 110, divides the input image data 110a in accordance with a frequency band and generates low-frequency data and high-frequency data. The generation unit 130a stores the low-frequency data 120a in the internal memory 120. The generation unit 130a outputs the high-frequency data to the compression unit 130b.
The high-frequency data 120b is image data of which a frequency band is equal to or higher than the frequency band A and is lower than a frequency band B. The high-frequency data 120c is image data of which a frequency band is equal to or higher than the frequency band B and is lower than a frequency band C. The high-frequency data 120d is image data of which a frequency band is equal to or higher than the frequency band C and is lower than a frequency band D. The magnitude relation of frequency bands may be “frequency band A<frequency band B<frequency band C<frequency band D”, for example.
In
The generation unit 130a deletes the input image data 110a which is stored in the external memory 110 after generating the low-frequency data and the high-frequency data from the input image data 110a on the external memory 110. Whenever new input image data 110a is stored in the external memory 110, the generation unit 130a repeatedly executes the above-described processing.
The compression unit 130b performs coding compression with respect to high-frequency data and generates compressed high-frequency data.
The compression unit 130b stores compressed high-frequency data in the compressed high-frequency data storage region 110b. The compression unit 130b registers position information of the input image data 110a which is a generation source of compressed high-frequency data, a size of the compressed high-frequency data, and an address on the compressed high-frequency data storage region 110b, in which the compressed high-frequency data is stored, in the management table 125a in such a manner that the position information, the size, and the address are associated with each other.
A low frequency band is not included in the high-frequency data 120b to 120d as described above, so that entropy of the data is low. Therefore, the data may be efficiently compressed through the entropy coding performed by the compression unit 130b and the size of the compressed high-frequency data may be reduced.
The motion search unit 130c performs motion search processing and obtains a motion vector. For example, the motion search unit 130c performs first motion search processing by using the low-frequency data 120a so as to specify a motion search range and generate the search range image data 125b. The motion search unit 130c performs second motion search processing with respect to the search range image data 125b and obtains a motion vector. The motion search unit 130c performs DCT quantization and entropy coding based on the motion vector and outputs a result of the entropy coding to an external device.
For example, the motion search unit 130c obtains a first motion vector. The motion search unit 130c compares a pixel value of low-frequency data 120a of a previous frame with a pixel value of low-frequency data 120a of a present frame, specifies a distance and a direction of motion of a shooting subject, and calculates a motion vector. The motion search unit 130c sets a region within a certain range around a coordinate of the motion vector as a motion search range.
The motion search unit 130c generates the search range image data 125b based on the motion search range.
For example, the motion search unit 130c compares position information of the motion search range 40 with the management table 125a and acquires addresses on which compressed high-frequency data of the regions 40b, 40c, and 40d are respectively stored. The motion search unit 130c accesses the compressed high-frequency data storage region 110b and acquires acquire compressed high-frequency data of the regions 40b, 40c, and 40d from regions corresponding to the addresses, respectively.
The motion search unit 130c decodes the compressed high-frequency data of the regions 40b, 40c, and 40d, integrates the decoded data with the data of the region 40a of the low-frequency data 120a and reconstructs image data of the motion search range 40. The image data of the motion search range 40 may correspond to the search range image data 125b. The motion search unit 130c compares a motion search range 40 of a previous frame with a motion search range 40 of a present frame, specifies a distance and a direction of motion of a shooting subject and specifies a motion vector. The motion search unit 130c performs DCT quantization and entropy coding based on the motion vector and outputs a result of the entropy coding to an external device.
The compression unit 130b of the motion search processing device 100 performs entropy coding with respect to the high-frequency data and generates compressed high-frequency data (operation S103). The compression unit 130b places the compressed high-frequency data in the external memory 110 (operation S104) and executes addressing with respect to the compressed high-frequency data so as to generate the management table 125a (operation S105).
The motion search unit 130c of the motion search processing device 100 executes motion search processing with respect to the low-frequency data 120a (operation S106). The motion search unit 130c acquires high-frequency data of a region corresponding to a motion search range based on a result of the motion search in the low-frequency data (operation S107).
The motion search unit 130c of the motion search processing device 100 reconstructs the search range image data 125b (operation S108). The motion search unit 130c executes motion search with respect to the search range image data which is reconstructed, and obtains a motion vector (operation S109). The motion search unit 130c executes DCT quantization (operation S110) and performs entropy coding (operation S111).
The motion search processing device 100 performs bandwidth division with respect to the input image data 110a, generates the low-frequency data 120a and the high-frequency data, and stores compressed high-frequency data in the external memory 110. The motion search processing device 100 executes motion search processing with respect to the low-frequency data 120a, specifies a motion search range, reads high-frequency data corresponding to the motion search range from the external memory 110, reconstructs the search range image data 125b, and executes the motion search processing. Therefore, the motion search processing device 100 may efficiently execute the motion search.
For example, compressed high-frequency data which is stored in the external memory 110 is obtained by performing entropy coding with respect to high-frequency data of small entropy, so that the data amount of the compressed high-frequency data may be small and thus, the motion search processing may be executed with a small data transfer amount. Data capacity of the external memory 110 may be reduced.
The motion search processing device 100 specifies a motion search range through first motion search processing, reads only high-frequency data corresponding to this motion search range from the external memory 110, reconstructs image data, and performs the motion search processing. Therefore, the motion search may be performed with minimum data and the data transfer amount may be reduced.
When the motion search processing device 100 stores compressed high-frequency data in the compressed high-frequency data storage region 110b, the motion search processing device 100 performs addressing with respect to the compressed high-frequency data and generates the management table 125a. Therefore, compressed image data within a motion search range may be efficiently acquired from the external memory 110.
The motion search unit 130c of the motion search processing device 100 may execute motion search processing of two stages, for example, and may execute motion search of n stages. Here, n is a natural number which is three or more. For example, when n is “3” in the processing, which is illustrated in
The motion search unit 130c acquires data corresponding to the second motion search range from the low-frequency data 120a and the high-frequency data 120b to 120d and reconstructs image data within the second motion search range. The motion search unit 130c calculates a motion vector with respect to the image data which is reconstructed.
As illustrated in
The hard disk device 207 includes a generation program 207a, a compression program 207b, and a motion search program 207c. The CPU 201 reads the generation program 207a, the compression program 207b, and the motion search program 207c and develops the generation program 207a, the compression program 207b, and the motion search program 207c on the RAM 206. The generation program 207a functions as a generation process 206a. The compression program 207b functions as a compression process 206b. The motion search program 207c functions as a motion search process 206c.
For example, processing of the generation process 206a may correspond to processing of the generation unit 130a. Processing of the compression process 206b may correspond to processing of the compression unit 130b. Processing of the motion search process 206c may correspond to processing of the motion search unit 130c.
The generation program 207a, the compression program 207b, and the motion search program 207c do not have to be stored in the hard disk device 207 from the beginning. For example, a “portable physical medium” such as a flexible disk (FD), a CD-ROM, a DVD disk, a magneto-optical disk, and an IC card which are inserted into the computer 200 stores each of the generation program 207a, the compression program 207b, and the motion search program 207c. The computer 200 may read each of the generation program 207a, the compression program 207b, and the motion search program 207c from the “portable physical medium” and executes each of the generation program 207a, the compression program 207b, and the motion search program 207c.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiment of the present invention has been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2014-223640 | Oct 2014 | JP | national |