Apparatus and method for detecting englarging ratio or reducing ratio of image data

Abstract: An enlarging ratio or reducing ratio detecting apparatus for detecting an enlarging ratio or reducing ratio of a digital image data in which the enlarging ratio or reducing ratio of an image is unknown, includes: section means for sectioning the digital image data, in which the enlarging ratio or reducing ratio of an image is unknown, by predetermined horizontal or perpendicular block sizes; conversion means for frequency-converting sectioned blocks into a two-dimension; addition means for adding frequencies of the blocks every the same frequency over an entire block and obtaining a sum of the frequencies every the same frequency; retrieval means for retrieving frequencies at which energy is collecting using an added result; calculation means for calculating an enlarging ratio or reducing ratio based on a retrieved result; and restoration means for restoring an image of an image data to an image having the calculated enlarging ratio or reducing ratio.

Description: The present invention relates to a technology for detecting an enlarging ratio or a reducing ratio, in other words a scaling ratio, of a digital image data in which the enlarging ratio or reducing ratio of an image is unknown. Conventionally, in such a kind of an image enlarging or reducing ratio detecting circuit, it is necessary to previously provide an enlarging or reducing ratio of an image which will be an objective, as an additional data of the image in a some data form, like technology described in JP 4 051 294, JP 7 295 545 and JP 8 129 356. However, in the above-described technology, there is a task that the additional data is easily destroyed by a disturbance and the reducing or enlarging ratio of an original image is lost. Accordingly, in order to solve this task, it is required to add a circuit to an apparatus, which has means for restoring the additional data by adding a complicated error correcting circuit or by attaching the additional data over several times together with the image data, and so forth. However, there is still a defect that the apparatus becomes to be complicated and large-sized. Also, in the conventional technology, the reducing or enlarging ratio is detected by putting a reference signal (referred to as a synchronizing signal) in the image itself, and repeating it until the image itself is reduced or enlarged and the synchronizing signal can be detected with the largest amplitude. However, to put the synchronizing signal in the image itself is to insert a data or noise which has some influence on the image itself, and thereby, quality of the image itself is lost. Moreover, since the reduction and enlargement is repeatedly conducted over an entire image plane, an amount of processing and memories for storing the image are needed a great deal, and accordingly, there is a defect that the circuit becomes to be large-sized. SUMMARY OF THE INVENTION Therefore, the objective of the present invention is to solve the above-described tasks. Also, the objective of the present invention is to provide a detection apparatus and a detection method for detecting an appropriate image reducing or enlarging ratio with simple circuit size without affecting quality of an image. The present invention is defined in the independant claims. The dependent claims define particular embodiments of the invention. The above-described objective of the present invention is achieved according to one embodiment by an enlarging ratio detecting apparatus for detecting an enlarging ratio of a digital image data in which the enlarging ratio of an image is unknown. The enlarging ratio detecting apparatus includes a section unit for sectioning the digital image data, in which the enlarging ratio of an image is unknown, by predetermined horizontal or perpendicular block sizes, a conversion unit for frequency-converting sectioned blocks into a two-dimension, an addition unit for adding frequencies of the blocks every the same frequency over an entire block and obtaining a sum of the frequencies every the same frequency, a retrieval unit for retrieving frequencies at which energy is collecting using an added result, a calculation unit for calculating an enlarging ratio based on a retrieved result, and a restoration unit for restoring an image of an image data to an image having the calculated enlarging ratio. Also, the above-described objective of the present invention is achieved according to one embodiment by a reducing ratio detecting apparatus for detecting a reducing ratio of a digital image data in which the reducing ratio of an image is unknown. The reducing ratio detecting apparatus includes a section unit for sectioning the digital image data, in which the reducing ratio of an image is unknown, by predetermined horizontal or perpendicular block sizes, a conversion unit for frequency-converting sectioned blocks into a two-dimension, an addition unit for adding frequencies of the blocks every the same frequency over an entire block and obtaining a sum of the frequencies every the same frequency, a retrieval unit for retrieving frequencies at which energy is collecting using an added result, a calculation unit for calculating a reducing ratio based on a retrieved result, and a restoration means for restoring an image of an image data to an image having the calculated reducing ratio. It is preferable that the above-described retrieval unit is constructed so as to select n signals which have frequencies in order of the highest energy, and to obtain a frequency-energy distribution in which energy is collecting. Moreover, the above-described calculation unit determines a set of frequencies from the frequency-energy distribution obtained by the retrieval unit, at which energy is collecting, and calculates an enlarging ratio or reducing ratio that corresponds to this set. Also, if a loop circuit for returning an output from the above-described restoration unit to the above-described section unit again, even though a correct enlarging ratio or reducing ratio cannot be obtained one time, processing can be conducted again based on a rough enlarging ratio or reducing ratio obtained at the first time. In addition, of course, it is possible to construct one apparatus, an enlarging ratio or reducing detecting apparatus, by combining the above-described enlarging ratio detecting apparatus and the above-described reducing ratio detecting apparatus. Also, the above-described objective of the present invention is achieved according to one embodiment by an image data enlarging ratio detecting method of detecting an enlarging ratio of a digital image data in which the enlarging ratio of an image is unknown. The image data enlarging ratio detecting method includes steps of: a) sectioning the digital image data, in which the enlarging ratio of an image is unknown, by predetermined horizontal or perpendicular block sizes; b) frequency-converting sectioned blocks into a two-dimension; c) adding frequencies of the above-described blocks every the same frequency over an entire block and obtaining a sum of the frequencies every the same frequency; d) obtaining a set of frequencies at which energy is collecting using a result of the above-described sum; and e) calculating an enlarging ratio of an image based on the above-described set of frequencies at which energy is collecting. Furthermore, the above-described objective of the present invention is achieved according to one embodiment by an image data reducing ratio detecting method of detecting a reducing ratio of a digital image data in which the reducing ratio of an image is unknown. The image data reducing ratio detecting method includes steps of: a) sectioning the digital image data, in which the reducing ratio of an image is unknown, by predetermined horizontal or perpendicular block sizes; b) frequency-converting sectioned blocks into a two-dimension; c) adding frequencies of the above-described blocks every the same frequency over an entire block and obtaining a sum of the frequencies every the same frequency; d) obtaining a set of frequencies at which energy is collecting using a result of the above-described sum; and e) calculating a reducing ratio of an image based on the above-described set of frequencies at which energy is collecting. In the above-described step d), n frequencies in order of the highest energy are selected, and a frequency-energy distribution in which energy is collecting is obtained, and in the above-described step e), a set of frequencies at which energy is collecting is determined based on the obtained frequency-energy distribution, and an enlarging ratio or reducing ratio that corresponds to this set is calculated. In addition, even though a correct enlarging ratio or reducing ratio cannot be obtained one time, it is possible to obtain a more correct enlarging ratio or reducing ratio by repeating the above-described steps again. In accordance with the present invention as constructed above, an enlarging ratio or reducing ratio of an image is not affected by a disturbance. The reason thereof is that it is not necessary to attach the reducing or enlarging ratio to the image as a data in a form of adding the ratio to the image, and that the data of the enlarging ratio or reducing ratio is not lost. Also, in accordance with the present invention, it is possible to prevent deterioration of an image. The reason thereof is that it is not necessary to insert an image reference signal for finding original size of an image into the image. BRIEF DESCRIPTION OF THE DRAWINGS This and other objects, features and advantages of the present invention will become more apparent upon a reading of the following detailed description and drawings, in which: Fig. 1 is a block diagram showing construction of an embodiment of an image reducing or enlarging ratio detecting circuit of the present invention; Fig. 2 is an energy distribution of an original image; Fig. 3 is an energy distribution in case of being enlarged twofold; and Fig. 4 is an energy distribution in case that a reducing ratio is 1/2. DESCRIPTION OF THE EMBODIMENTS Embodiments of the present invention will be explained by referring to drawings. Fig. 1 is a block diagram of an enlarging ratio or reducing ratio detecting apparatus in this embodiment. In Fig. 1, a reference numeral 100 is a block sectioning device. This block sectioning device 100 sections an image data, in which an enlarging ratio or reducing ratio of an image is unknown, by predetermined horizontal or perpendicular block size (horizontal n pixels x perpendicular n lines). In this embodiment, an image data 700 is to be sectioned by horizontal eight pixels and perpendicular eight lines as one block. In addition, the case in which the block size is not 8 × 8 is handled in the same manner, and basically, it can be realized by having a memory corresponding to the number of perpendicular lines to be sectioned. A reference numeral 200 is a pixel frequency converter. This pixel frequency converter 200 converts a sectioned block with respect to pixel frequency into a two-dimension. In this embodiment, a pixel data 110 formed of blocks is DCT-converted, and one set of frequencies is obtained for one block. In addition, with regard to a method of the frequency conversion, general frequency conversion, such as FFT, can be adopted. A reference numeral 300 is an adder. This adder 300 calculates a sum of the same frequency components every the same frequency component for the frequency components of the block over an entire image plane. For example, for a frequency f 1 , the adder 300 calculates a sum of the frequency f 1 over the entire image plane by adding the frequency f 1 of each block. The calculation for all frequencies, such as a frequency f 2 , a frequency f 3 , ......, is conducted in the same manner. A reference numeral 400 is an energy retrieving device. This energy retrieving device 400 retrieves frequency components in which energy is collecting, using an added result. In this embodiment, n signals of frequency summing signals 310, which have frequencies in order of the highest energy, are selected. In other words, a set of frequencies at which energy is collecting is obtained. A reference numeral 500 is an enlarging ratio or reducing ratio calculator. This enlarging ratio or reducing ratio calculator 500 calculates an enlarging ratio or a reducing ratio based on a retrieved result. Particularly, the enlarging ratio or reducing ratio calculator 500 previously stores sets of frequencies at which high energy corresponding to several kinds of enlarging ratios or reducing ratios is collecting, determines from energy retrieving signals 410 a set of frequencies at which energy is collecting, and calculates the enlarging ratio or reducing ratio by making the determined set correspond to the previously stored sets. A reference numeral 600 is an image memory, and stores the image data 700 and restores an image to an image having the obtained enlarging ratio or reducing ratio. Moreover, the apparatus has a loop circuit 800 for returning an image, which is restored to an image having an obtained rough enlarging ratio or reducing ratio, to the block sectioning device again, in case that a correct enlarging ratio or reducing ratio cannot be obtained at one processing. In accordance with this apparatus constructed above, it is possible to detect the enlarging ratio or reducing ratio without depending on an additional data indicating an enlarging ratio or reducing ratio. Next, operation of this apparatus will be explained. The block size sectioning device 100 sections the image data 700 by blocks of predetermined horizontal or perpendicular sizes. Here, for simplicity of the explanation, the explanation will be made under an assumption of horizontal eight pixels and perpendicular eight lines. In case of 8 x 8 sizes, the block size sectioning circuit generally has a memory corresponding to eight lines, re-conducts addressing every line and every pixel, and sequentially stores pixel data in a memory 102. When data corresponding to 8 × 8 pixels is stored in the memory, the data is transferred to the pixel frequency converter 200. The pixel frequency converter 200 receives the image data 110 formed of blocks and frequency-converts data pixels of 8 x 8 sizes. For simplicity of the explanation, DCT conversion is used here. The data to which the frequency conversion is applied shows a frequency energy distribution that represents characteristic of the sectioned block. This distribution is output as two-dimensional frequency signals 210. The adder 300 obtains a sum of energies of the same frequency every the same frequency over an entire image plane from the two-dimensional frequency signals 210. While the frequency energy distribution of each sectioned block shows individual characteristic thereof, the distribution obtained by the sum over the entire image plane becomes to describe an energy distribution over the entire image plane. This is input to the energy retrieving device 400 as frequency summing signals 310. The energy retrieving device 400 can determine unbalance of the entire image plane by selecting n signals of the frequency summing signals 310, which have frequencies in order of the highest energy. For example, in case that the image plane is enlarged two times, in the frequency summing signals 310, energy of the highest frequency is extremely low, and energy of a frequency that is a next high frequency is high. Accordingly, a group of frequencies that have high energy is retrieved by the energy retrieving device 400, and a result of the retrieval is output as energy retrieving signals 410. The enlarging ratio or reducing ratio calculator 500 finds a set of frequencies from an energy distribution of a frequency having high energy, which is shown by the energy retrieving signals 410. And, the calculator 500 calculates an enlarging ratio or a reducing ratio from the sets of frequencies of an energy distribution corresponding to the previously stored enlarging ratio or reducing ratio and the set of frequencies of an energy distribution determined from the energy retrieving signals 410. For example, in case of the DCT conversion, in a distribution of an original image, energy usually collects at highest frequencies as shown in Fig. 2. On the other hand, in case that an image enlarging ratio is twofold, as shown in Fig. 3, an energy distribution (a set of frequencies having high energy) causes offset by one frequency. Also, in case of a reducing ratio of 1/2, as shown in Fig. 4, energy collects at high frequencies. Such information is previously stored in the enlarging ratio or reducing ratio calculator 500, and the enlarging ratio or reducing ratio is calculated from the set of frequencies having high energy that was output from the energy retrieving signals 410. For example, if an energy distribution (a set of frequencies having high energy) that was output from the energy retrieving signals 410 is a distribution shown in Fig. 3, the enlarging ratio or reducing ratio calculator 500 can determined that an enlarging ratio of an image data is two, and if an energy distribution (a set of frequencies having high energy) that was output from the energy retrieving signals 410 is a distribution shown in Fig. 4, the enlarging ratio or reducing ratio calculator 500 can determine that a reducing ratio of an image data is 1/2. The reducing or enlarging ratio of an image is calculated in this manner and the enlarging ratio is output to the image memory 600, and it is possible to restore the image to an image having an original image ratio. In addition, in case that a correct enlarging ratio or reducing ratio cannot be obtained at one processing, an image, which is restored to an image having an obtained rough enlarging ratio or reducing ratio, is returned to the block sectioning device 100 again by the loop circuit 800, and the same operation mentioned above is repeated. According to one aspect or embodiment of the present invention, an image reduction/enlargement ratio is obtained based on a frequency distribution which is obtained from said image, for example by a FFT or a DCT, preferably in two dimensions. The frequency distribution itself may be obtained from the addition of frequency distributions which were obtained for individual blocks of said image, e.g. by adding up corresponding frequency data. Based on the frequency distribution the image reduction/enlargement ratio may be obtained by determining one or more frequencies where the energy is collecting or concentrating. This frequency (or frequencies) may be compared with previously stored frequencies representative of a certain reduction/enlargement ratio to thereby obtain the ratio which is characteristic of the image to be evaluated.

Claims: An apparatus for detecting a scaling ratio being the ratio of an image reduction/enlargement, said apparatus comprising: conversion means (200) for two-dimensionally frequency-converting said image to obtain a frequency distribution; and means (500) for obtaining a scaling ratio of said image based on said frequency distribution. A scaling ratio detecting apparatus according to claim 1, further comprising: section means (100) for sectioning said digital image data, in which said scaling ratio of an image is unknown, by predetermined horizontal or perpendicular block sizes, said conversion means (200) for two-dimensionally frequency-converting said sectioned blocks; addition means (300) for adding frequencies of said blocks every the same frequency over an entire block and obtaining a sum of said frequencies every the same frequency; retrieval means (400) for retrieving frequencies at which energy is collecting using an added result; calculation means (500) for calculating a scaling ratio based on a retrieved result; and restoration means (600) for restoring an image of an image data to an image having said calculated scaling ratio. A scaling ratio detecting apparatus according to claim 2, wherein said retrieval means (400) includes means for selecting n signals out of said added result, which have frequencies in order of the highest energy, and obtaining an energy distribution. A scaling ratio detecting apparatus according to claim 2 or 3, wherein said calculation means (500) determines a set of frequencies from an energy distribution retrieved by said retrieval means (400), at which energy is collecting, and calculates said scaling ratio of an image. A scaling ratio detecting apparatus according to claim 2, 3 or 4, having a loop circuit (800) for returning an output from said restoration means to said section means again. A scaling ratio detecting apparatus according to any of claim 1 to 5, wherein said conversion means (200) includes means for applying a DCT conversion to data of said sectioned blocks. An apparatus according to claim 1, wherein said scaling ratio is either only an image enlargement ratio or an image reduction ratio. A method for detecting a scaling ratio being the ratio of an image reduction/enlargement, said method comprising: two-dimensionally frequency-converting said image to obtain a frequency distribution; and obtaining a scaling ratio of said image based on said frequency distribution. A scaling ratio detecting method according to claim 8, further comprising: a) sectioning said digital image data, in which said scaling ratio of an image is unknown, by predetermined horizontal or perpendicular block sizes; b) two-dimensionally frequency-converting said sectioned blocks; c) adding frequencies of said blocks every the same frequency over an entire block and obtaining a sum of said frequencies every the same frequency; d) obtaining a set of frequencies at which energy is collecting using a result of said sum; and e) calculating a scaling ratio of an image based on said set of frequencies at which energy is collecting. A method according to claim 9, wherein said method has a step of applying said steps a) to f) to said image data again, which is restored to said calculated scaling ratio of an image. A method according to one of claims 9 to 10, wherein, in said step b), frequency-conversion isa DCT conversion. A method according to any of claims 8 to 11, further comprising a step of f) restoring an image data to said calculated scalina ratio of an image. A method according to one of claims 8 to 12, wherein said scaling ratio is either only an image enlargement ratio or an image reduction ratio.

Inventors: TANAKA KAZUYOSHI, TANAKA, KAZUYOSHI, Tanaka, Kazuyoshi, c/o NEC Corporation
Applicants: NIPPON ELECTRIC CO, NEC CORPORATION
Application year: 1998
Main classification: G06T3
IPC codes: G09G5, G06T3, G06T7