since images stored in an image database are encoded , they must be decoded to detect their features . for this reason , when the number of test images is large or each image size is large , the search speed lowers . to solve this problem , a shape information generation unit generates query data on the basis of an image shape input by a shape input unit . a comparison unit compares the query data with encoded data of an image read out from an image database . if similarity between these two data is high , the comparison unit makes a decoder decode the encoded data of the image ; if the similarity is low , it requests the input unit to input encoded data of the next image .