Image retrieving method and apparatus

Abstract: An image-retrieving system for retrieving a desired image from a data base. A storage device in the data base stores a plurality of images, additional information for identifying each of the plurality of images and calculated feature data for identifying each of the images. A first input means inputs additional-information data for identifying a desired image stored in the data base. An additional-information selection means selects a first set of candidates as the desired image by comparing the input additional-information with the stored additional-information for each of the stored plurality of images. A second input device inputs an illustrative image, which is illustrative of the desired image, and a generation device generates feature data from the input illustrative image. A selection device selects as the desired image a one of the candidates whose stored feature data is most similar to the generated feature data of the input illustrative image.

Description: BACKGROUND OF THE INVENTION Field of the Invention This invention relates to an image retrieving method and apparatus for retrieving an image from an image data base. Description of the Related Art In a conventional method of retrieving a desired image from an image data base, additional information, comprising, for example, the title and the type of image, is retrieved using keywords. However, in retrieval using additional information, it is extremely difficult to systematically provide keywords for all of the stored images when the size of the image data base is large and the shape of each image is complicated, so that it is often impossible to retrieve a desired image by only using keywords. SUMMARY OF THE INVENTION The present invention has been made in consideration of the above described problems. It is a concern of the present invention to provide an image retrieving method and apparatus which can perform very precise image retrieval to meet a user's requirements. An article entitled "A Similarity Retrieval Method for Image Database using Simple Graphics", in "IEEE Workshop on languages for automation: Symbiotic and intelligent robotics, 29 August 1988, Institute of Electrical and Electronics Engineers, pages 149-154, XP000118740 by Hamano T, another article entitled "Querying Image Databases using Computed Texture Features" in IBM Technical Disclosure Bulletin, vol 36, No 6b, June 1993, NY US pages 207-208 and Japanese Patent Abstract No JP-A-04348475 all disclose methods of retrieving feature data in which comparisons are carried out between stored data and input data. An article entitled "Extraction of Object Features and Its Application to Image Retrieval" by Yamamoto Akio and Takagi Mikio in "Transactions of the Institute of Electronics, Information and Communication Engineers, Vol E72, No 6 June 1989 discloses an image retrieving system in which non-image and structural information associated with images in an image data base. Such information can be used together to retrieve images from the data base. However none of the above methods provides a totally satisfactory method of retrieving data. According to one aspect, the present invention provides an image retrieving apparatus as set out in claim 1. According to another aspect the present invention relates to an image retrieving method set out in claim 9. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram illustrating the configuration of a retrieving apparatus according to an embodiment of the present invention; FIG. 2 is a diagram illustrating the concept of retrieval using an illustrative image; FIG. 3 is a flowchart illustrating retrieval processing using additional information; FIG. 4 is a diagram illustrating retrieval processing of the present embodiment; and FIG. 5 is a flowchart illustrating retrieval processing using characteristic-amounts. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT FIG. 1 is a block diagram illustrating the configuration of an image retrieving apparatus according to an embodiment of the present invention. In FIG. 1, a data input unit 1 comprises, for example, a scanner or the like for inputting data to be stored in a data base. A feature calculation unit 2 comprises, for example, a RAM (Random Access Memory), which stores, for example, a software program for extracting various kinds of characteristic-amounts for an input image. A control unit 6 extracts various kinds of features for an input image by reading and executing the software program. A data storage unit 3 comprises, for example, a hard disk, which stores input data. A retrieval-condition input unit 4 comprises, for example, a keyboard, a mouse or the like for inputting retrieval conditions for retrieving desired data. A candidate determination unit 5 comprises a RAM, which stores a software program for selecting candidate images from images stored in the data storage unit 3 based on the retrieval conditions input from the retrieval-condition input unit 4. A display unit 7 comprises, for example, a CRT display for displaying image data, an input command, processed data and the like. The control unit 6 comprises a central processing unit for controlling the entirety of the above-described blocks, and realizes the functions of the respective blocks by reading and executing the software program. The function of each of the above-described blocks will now be described in detail. The data input unit 1 includes an image input unit 11, such as a scanner or the like, for inputting image data, and an additional-information input unit 12 for inputting information relating to an image, such as the name of the image, the date, and other necessary information. The data storage unit 3 includes an image-data storage unit 31 for storing image data input through the data input unit 1, an additional-information storage unit 32 for storing additional information of image data stored in the image-data storage unit 31 so as to correspond to the image data, and a feature storage unit 33 for storing a feature calculated by the feature calculation unit 2 so as to correspond to each image data. Image data is retrieved by the above-described configuration. The candidate determination unit 5 stores the software program, and includes a retrieval unit 51 using additional information, a similarity calculation unit 52 for calculating similarity using features, and a candidate-order determination unit 53 for sorting feature data of a plurality of candidates in the order of higher similarity. FIG. 3 is a flowchart illustrating procedures for forming a data base, i.e., processing procedures from inputting of a group of image data to be retrieved until storing of the input data in the data storage unit 3. A description will now be provided for each of the steps. In step S1, additional information relating to an image to be input, comprising the name of the image, the date, and other necessary information, is input through the additional-information input unit 12. In step S2, image data corresponding to the additional information input in step S1 is input through the image input unit 11, comprising the scanner. In step S3, the feature calculation unit 2 extracts a plurality of features indicating characteristics of the corresponding image from the image data input in step S2. The feature may comprise the number of black pixels in each of a plurality of blocks obtained by dividing an image region, the number of black pixels on each line, the number of black/white reversal portions on each line, or a combination of at least one of the above-described numbers. In step S4, the additional information input in step S1 is stored in the additional-information storage unit 32. The additional information further comprises positional information relating to a position where the image data is to be stored in step S5, and positional information relating to a position where the extracted features are to be stored in step S6. In step S5, the input image data is stored in the image data storage unit 31 of the data storage unit 3. In step S6, the extracted features are stored in the feature storage unit 33. The data relating to the input image data can be easily stored so as to correlate with each other, for example, by using a data base management system comprising a correlated data base or the like. Next, a description will be provided for a method of inputting retrieval conditions and retrieving necessary image data from a group of stored image data, with reference to the flowchart shown in FIG. 4. This flow chart shows three separate methods of retrieving a desired image which are described below. In a known first method, a desired image is retrieved by additional information in a series of steps starting from step S11. In a known second method, a similar image is obtained from an illustrative image in a series of steps starting from step S12. In the third method and in accordance with the present invention, the first and second methods are combined with retrieval being performed using additional information and a plurality of illustrative images. First, the first method will be described. In the first retrieval method using additional information, previously known additional information relating to a desired image, comprising the name of the image, whether the image comprises a color image or a monochromatic image, the date of registration of the image, the type of image, or the like, is input through a retrieving-additional-information input unit 43, and adapted additional information is retrieved from additional information stored in the additional-information storage unit 32. The retrieval by additional information can easily be executed using a correlated-data-base operation language such as SQL or the like. Next, the second method will be described. In the second retrieval method using illustrative images, the user inputs a plurality of illustrative images, which are illustrative of the desired image, through an illustrative-image input unit 41, and an image which resembles one of the illustrative images is retrieved. Image data stored in the data base may be used as the illustrative images. In this case, since the selected illustrative image completely coincides with one of the stored image data, the coincident image data is selected as a first candidate. Thereafter, remaining image data is sequentially selected as candidates starting from a second candidate in the order of similarity. FIG. 2 is a schematic diagram illustrating the method of retrieving image data from a data base using an illustrative image. FIG. 5 is a flowchart illustrating the processing procesures of the method. First, in step S30, a plurality of features are calculated by the feature calculation unit 2 using an illustrative image 20 input through the illustrative-image input unit 41. For example, a feature calculation by calculation unit 2 of the illustrative image 20 shown in FIG. 2 is performed, whereby a feature p0 is obtained. In step S31, one feature is read from the disk of the feature storage unit 33 of the data base into a RAM 8 for operation. For example, in FIG. 2, a feature p1 is read from the feature storage unit 33 of the data base. Although in the case of FIG. 2, only one feature is read at one time, a plurality of features may, of course, be read if the capacity of the RAM 8 for operation is large. In step S32, the distance between each of the features of the data base stored in the RAM 8 for operation and the feature of the illustrative image is calculated (see FIG. 2). Image data which has the smallest distance value is determined to be most similar to the illustrative image. This processing is performed by the similarity calculation unit 52. In step S33, it is determined if all features stored in the data base have been read and retrieved. If the result of the determination is negative, the process returns to step S31 in order to repeat the calculation of the distance for the next data to be retrieved. If the result of the determination is affirmative, the process proceeds to step S34. In step S34, features of the data base having distance values smaller than a predetermined threshold are sorted in the order of smallest distance values. A result of retrieval 21 shown in FIG. 2 illustrates an example of such processing. This processing is performed by the candidate-order determination unit 53. A description has been provided of the retrieval method by features using a single illustrative image. When using at least two illustrative images in accordance with the claimed invention, the above-described distance is calculated for each of the illustrative images, the average of obtained distance values is made a final distance value, sorting is performed based on the average, and the order of candidates is determined. The selection of the feature to be used can be assigned by an input operation by the user through a keyboard or the like. When the feature to be used is not assigned, the calculation of the distance is performed using a predetermined feature. In the present embodiment, similarity between images is obtained by calculating the distance between the features of the respective images. Next, a description will be provided of the entire retrieval processing of the present embodiment with reference to the flowchart shown in FIG. 4. Whilst the present invention is particularly concerned with the third method, which has been described previously, the present embodiment is capable of carrying out the first and second methods independently. In step S10, one of the following three methods is selected through the keyboard, serving as the retrieval-condition input unit 4. 1. Image retrieval is performed using additional information as a retrieval key. 2. Image retrieval is performed using features as a retrieval key. 3. Image retrieval is performed using both additional information and features as a retrieval key. In step S11 and steps which follow step S11, image retrieval processing is performed using additional information as a retrieval key. First, in step S11, matching processing between additional information input through the retrieving-additional-information input unit 43 and additional information stored in the additional-information storage unit 32 of the data base are used in order to retrieve an image having adapted additional information. In step S14, it is determined if an image having adapted additional information is present. If the result of the determination is negative, the process proceeds to step S20. If the result of the determination is affirmative, the image is determined to be a candidate image, and the process proceeds to step S19. In step S12 and steps which follow step S12, image retrieval processing is performed using features as a retrieval key. First, in step S12, the processing conforming to the flow of image retrieval by features, which has already been described with reference to FIG. 5, is performed. Candidate images are sorted in the order of higher similarity in terms of features. In step S15, it is determined if the similarity of an image is greater than a predetermined threshold. If the result of the determination is negative, the process proceeds to step S20. If the result of the determination is affirmative, the image is determined to be a candidate image, and the process proceeds to step S19. In step S13 and steps which follow step S13, image retrieval processing is performed using both additional information and features as a retrieval key. First, in step S13, retrieval by additional information, which has already been described in step S11, is performed. In step S16, it is determined if adapted additional information is present. In step S17, only images retrieved by using additional information as a key are retrieved by the features of respective images. This processing is equivalent to the processing described with reference to FIG. 5, and images retrieved by features are sorted in the order of higher similarity. In step S18, it is determined if the similarity of a retrieved image is greater than a predetermined threshold. If the result of the determination is negative, the process proceeds to step S20. If the result of the determination is affirmative, the image is detemined to be a candidate image, and the process proceeds to step S19. In step S19, retrieved candidate images are displayed on the picture surface of the display unit 7, and the process is terminated. In step S20, information indicating the absence of candidate images is displayed on the display unit 7. By performing retrieval by combining illustrative images and additional information in the above-described manner, previously known additional information can be added to similarity retrieval by illustrative images, so that it is possible to perform retrieval which is most suited to the user's requirements. In another method of performing similarity retrieval using a plurality of illustrative images, similarity retrieval can be performed by individually assigning a feature used for calculating similarity for each illustrative image by the feature selection unit 42. For example, similarity retrieval is performed by calculating similarity using features a and b for an illustrative image X, and using features c, d and e for an illustrative image Y. According to this method, since important features of each illustrative image can be individually assigned, accuracy in entire retrieval can be further improved. The present invention may be applied to a system which comprises a plurality of apparatuses, or to an apparatus which comprises a single unit. The present invention may, of course, be applied when the object of the invention is achieved by supplying a system or an apparatus with a program. As described above, the following effects are obtained according to the above-described embodiment. That is, in an operation of retrieving a desired image from an image data base, by retrieving similar images from a plurality of illustrative images and additional information, accuracy in retrieval is improved, and efficient similarity retrieval can be realized. Additional information alone, features alone, or a combination of additional information and features can be selected as a retrieval key, so that flexible image retrieval which is most suitable to the user's requirements can be performed. The individual components shown in outline or designated by blocks in the drawings are all well known in the image retrieving method and apparatus arts and their specific construction and operation are not critical to the operation or the best mode for carrying out the invention. While the present invention has been described with respect to what is presently considered to be the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. To the contrary, the present invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

Claims: An image retrieving apparatus for retrieving a desired image comprising: selection means (6, 52, step 11, step 13) for selecting image data by comparing newly input additional information with previously input additional information (32) of image data stored in a data base (31); input means (41) for inputting an illustrative image of the desired image; feature calculating means (2, 6, step 12, step 17, step 30) for calculating feature data of the illustrative image; distance calculating means (6, 52, step 12, step 17, steps 31-33) for calculating distance values between the values of the feature data of the illustrative image and values of feature data of the selected image data; characterised in that : said input means is adapted to input at least two illustrative images of the desired image (P11L15∼); said feature calculating means is adapted to calculate values of features of the at least two input illustrative images; said distance calculating means is adapted to calculate distance values between the respective values as calculated by said feature calculating means and values of the feature data of the selected image data (P11L16∼); and by means for calculating an average of the calculated distance values (P11L17∼); and display control means (6, 7, step 19) for displaying the image data of a retrieved image on the basis of the result of the calculated average. Apparatus according to claim 1, further comprising: means (53) for sorting the image data to be displayed in the order of smallest distance values based on the output of said means (52) for calculating average difference values; and means (7) for displaying the image data based on the result of sorting. Apparatus according to claim 1 or claim 2 comprising: means (31, 32, 33) for storing a plurality of images, additional-information for identifying each of the plurality of images, and calculated feature data identifying each of the stored images. Apparatus according to claim 3 and including means (6) selecting a set of candidates for the desired image by comparing newly input additional-information with the stored additional-information for each of the stored plurality of images. Apparatus according to claim 4 and including means (52) for calculating the similarity between the stored feature data of each of the set of candidates and the generated feature data of the input illustrative image; and means for selecting as the desired image one of the candidates whose stored feature data is most similar to the generated feature data of the input illustrative image. Apparatus according to claim 5, wherein the means for selecting the desired image operate on the basis of the smallest distance between the stored feature data of each of the set of candidates and the generated feature data of the illustrative image. Apparatus according to claim 6, wherein the means for selecting the desired image includes: means (53) for sorting the candidates based in the order of smallest distance between the stored feature data of the set of candidates and the generated feature data of the illustrative image. Apparatus according to any one of the preceding claims and having means (S10) for selecting between three modes of operation, namely a first mode consisting of selection of a candidate by additional information, a second mode of selection of a candidate by retrieval by features, and a third mode consisting of a combination of the first and second modes. An image retrieving method of retrieving a desired image comprising the steps of: selecting image data by comparing newly input additional information with previously input additional information (32) and image data stored in a data base (31) ; inputting an illustrative image of the desired image; calculating feature data of the illustrative image; calculating distance values between the values of the feature data of the illustrative image and values of feature data of the selected image data; characterised in that : said input step inputs at least two illustrative images of the desired image (P11L15∼); said feature calculating step calculates values of features of the at least two input illustrative images; said distance calculating step calculates distance values between the respective values as calculated by said feature calculating step and values of the feature data of the selected image data (P11L16∼); and by calculating an average of the calculated distance values (P11L17∼); and generating image data of a retrieved image on the basis of the result of the calculated average. A method according to claim 9, further comprising: sorting the image data in the order of smallest distance values based on calculated feature data (Step 34); and displaying the image data based on the result of sorting. A method according to claim 9 or claim 10 comprising the steps of: prior to selecting image data storing a plurality of images, storing additional-information for identifying each of the plurality of images and storing calculated feature data for identifying each of the images. A method according to claim 11 and including selecting a set of candidates for the desired image by comparing the newly input additional-information with the stored additional-information for each of the stored plurality of images. A method according to claim 12 and including calculating the similarity between the stored feature data of each of the set of candidates and the generated feature data of the input illustrative image; and selecting as the desired image one of the candidates whose stored feature data is most similar to the generated feature data of the input illustrative image. A method according to claim 13, wherein selecting the desired image is based on the smallest distance between the stored feature data of each of the set of candidates and the generated feature data of the illustrative image. A method according to claim 14, wherein the step of selecting the desired image includes the steps of: sorting the candidates based in the order of smallest distance between the stored feature data of the set of candidates and the generated feature data of the illustrative image; and displaying the sorted candidates so a user may select one of the candidates as the desired image. A method according to any one of claims 9 to 15 and including the step of selecting between three modes of operation, namely a first mode of selecting a candidate by additional information, a second mode by retrieval by features, and a third mode consisting of a combination of the first and second modes.

Inventors: BANNAI YUICHI, SHIMURA NORIO, BANNAI, YUICHI, SHIMURA, NORIO, BANNAI, YUICHI, C/O CANON KABUSHIKI KAISHA, SHIMURA, NORIO, C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1994
Main classification: G06F17
IPC codes: G06F17, G06T1