Disclosure of Invention
the invention aims to overcome the problems in the prior art, and provides a class-based image retrieval method, which avoids repeated matching while ensuring the integrity of image information, gathers all areas in an image into a plurality of classes which can completely represent the image and have uniqueness, extracts features at class level and performs matching.
The technical scheme of the invention is as follows: the image retrieval method based on the comprehensive characteristic of the class and the complete class matching is a new image retrieval frame starting from the class level in the image, and comprises the following steps:
Step 1: extracting classes in an image
An Accelerated statistical region merging and affinity propagation (ASRM-AP) method is proposed to extract classes in the image: firstly, segmenting an image by an ASRM method, extracting color texture characteristics of regions obtained by segmentation, then carrying out AP clustering to find out regions with similar characteristics in the image, and marking to obtain classes in the image;
Step 2: comprehensive characteristics of extracted classes
Expressing the class by using an Integrated feature of category (IFOC) method, wherein in the IFOC, the color and texture features of the class are combined with the quantity and distribution features of the areas in the class to serve as the Integrated features of the class; the color and texture features of the class are respectively obtained by a color histogram and a Local Binary Pattern (LBP) method of an area in the class, the quantity feature of the class is obtained by counting the quantity of the area in the class and normalizing, and the distribution feature is a distribution histogram of the area in the class in the upper layer, the middle layer and the lower layer of the image;
And step 3: complete matching of classes
A class-oriented complete class matching (ICM) method is provided on the basis of an Integrated Region Matching (IRM) algorithm, and a centroid is used for replacing an area to allocate a weight to a class, so that the distance between images is obtained, and image retrieval is realized.
the method for accelerating statistical region merging and neighbor propagation (ASRM-AP) described in step 1 includes the following steps:
step 2.1: ASRM segmentation is performed on the image I. Firstly, the image is packaged, namely, the image is divided into 3 multiplied by 3 blocks, and the pixel mean value of the blocks is calculated as ISOne pixel value of (A) to obtain a graph ISThen to ISPerforming Statistical Region Merging (SRM) segmentation, and mapping a segmentation result to an original image I;
ASRM segmentation algorithm:
(1) dividing the image I into 3 x 3 blocks b, and packing each block as image ISthe value v of the pixel point is the pixel average value of the block b;
Wherein, R, G and B are three color channels in the image;
(2) For picture ISCarrying out SRM segmentation;
(3) Handle ISMapping the segmentation result to an image I to obtain a segmentation result of the image I;
step 2.2: and carrying out AP clustering on the region obtained by ASRM segmentation to obtain the class in the image. The AP clustering algorithm gradually determines a clustering center through a message transmission mode, namely an iterative update attraction matrix R (R (i, k)) and an attribution matrix A (a (i, k)) are used, and finally high-quality self-adaptive clustering is realized; the update rule is as follows:
1) Updating the attraction matrix R with the attribution matrix a and the similarity matrix S ═ S (i, k):
2) Updating the attribution degree matrix A by using the attraction degree matrix R:
Wherein i and k are any two regions in the ASRM segmented regions; r (i, k) represents the attraction of k to i; a (i, k) represents the degree of attribution of i to k; i 'is a certain region other than i, and k' is a certain region other than k; s (i, k) is the similarity of i to k:
s(i,k)=-||cri-crk||2-||tri-trk||2 (5)
cri,crkAnd tri,trkColor texture feature vectors respectively representing i and k are respectively obtained by color histogram statistics and a Local Binary Pattern (LBP) method, and are shown in a formula (6) and a formula (7); n (H, S, V) represents the number of pixels when the values of the H, S and V color channels in the region correspond to H, S and V; n is a radical oftotalThe number of pixels in the region; n (LBP) is the number of pixels with LBP value in the area; gc,grpixel values of the pixel mean and position r of the 3 × 3 block, respectively;
When i is equal to k, s is set by a bias parameter p, the larger p the more likely data k is to be selected as the cluster center:
s(k,k)=p*mean(s(k,:)) (10)
The function mean (s (k,:)) is the mean of the elements in s (k,:); s (k,: represents the similarity of region k to all other regions; the parameter p is taken to be 0.6.
After AP clustering, marking the regions according to the clustering result, setting all pixel points of the regions in the kth class as k, and finally obtaining a marking graph with pixels from 1 to n, thereby obtaining the class of the image.
Calculating the comprehensive characteristics of the class by using the comprehensive characteristics IFOC method of the class proposed in the step 2; the following method for extracting the number of the areas and the distribution characteristics of the areas of the classes in the IFOC comprises the following steps:
(a) Region number feature n of classi:
ni=g(N) (11)
Wherein, N represents the number of the i-th type area after passing through ASRM-AP, g (x) represents the normalization operation of the variable x, and the rule is as follows:
the number of areas of the same type is normalized to [0,1], and when the number is more than 5, the number of the areas is considered to be more, and the corresponding characteristic value is 1.
(b) regional distribution characteristics of classes:
because objects in the image often have a certain distribution rule in the vertical direction, for example, the sky is often located at the upper layer of the image, animals, trees and the like are often located at the middle layer of the image, the image is divided into the upper layer, the middle layer and the lower layer, the level to which the region centroid in each class belongs is counted, and the region distribution characteristic l of the class is obtainedi:
li=[Nh(i)/N,Nm(i)/N,Nl(i)/N] (13)
Wherein N represents the number of regions in the ith class in the image obtained by ASRM-AP algorithm, and Nh(i),Nm(i),Nl(i) Respectively representing the number of the ith type area in the upper layer, the middle layer and the lower layer of the image;
The overall characteristics of the class are f:
fi=[ci,ti,ni,li] (14)
Wherein c isi,ti,ni,liRespectively representing the color, texture, area number and area distribution characteristics of the ith class, wherein n is the number of areas in the ith class, akthe number of pixels in the region k is a proportion of the number of pixels in the class. c. Crk,trkthe color texture characteristics of the region k are given in formula (6) and formula (7);
In the ICM class matching method provided in the step 3, the centroid is used for replacing the area to distribute the weight value for the class, and the distance between the images is obtained; image I1And image I2Wherein each is C1=(ca1,ca2,…,cam),C2=(ca′1,ca′2,…,ca′n) That is, the distance between the two images is D (I)1,I2):
di,j=α1|ci-c′j|+α2|ti-t′j|+α3|ni-n′j|+α4|li-l′j| (18)
Wherein d isi,jRepresentation class caiAnd ca'jThe distance of (d); si,jindicating area caiand ca'jMatching interestingness, wherein an interestingness matrix S is as follows:
ci,ti,ni,liand c'j,t′j,n′j,l′jRespectively representing images I1Class I and image I in2The color, texture, number of regions in the class j and feature vectors of the distribution of the regions in the class j, the calculation methods are given in formulas (15), (16), (11) and (13), respectively; alpha is alpha1,α2,α3,α4being weighted by different characteristics, α1+α2+α3+α41 and α1,α2,α3,α4E (0,1), all set to 0.25 in the invention;
canny edge detection is carried out on the image I, and the centroid (x) of the obtained texture map is calculated by a formula (22)I,yI) Calculating the interest s of each class according to the mean value of the distance from the region to the centroidi,j:
si,j=max(si,sj) (20)
Wherein f (r) is a function of the centroid of region r; n is a radical ofiis ca-likeithe number of middle regions; x is the number ofkAnd ykRespectively the abscissa and ordinate of the pixel in the region r; m is the number of pixels in the region r; sjand siThe calculation method is similar.
the invention has the beneficial effects that: the invention provides a class-based image retrieval method, which avoids repeated matching while ensuring the integrity of image information, gathers all areas in an image into a plurality of classes which can completely represent the image and have uniqueness, extracts features at class level and performs matching. The advantages of the invention include:
1. and providing a Category-based Image Retrieval (CaBIR) framework, finding out all categories in the Image, and performing feature extraction and Category matching on the categories to obtain the distance of the Image. The problems of information loss and repeated matching in the RBIR system are solved.
2. An Accelerated statistical region merging and affinity propagation (ASRM-AP) method is proposed to obtain classes in an image. The SRM is a segmentation method based on region growth, can ensure the integrity of a region, and can accelerate the SRM to improve the system efficiency; similar areas are gathered and marked as different classes by using a self-adaptive AP clustering algorithm, and meanwhile, adjacent similar areas are combined to prevent over-segmentation.
3. an Integrated feature of category (IFOC) method is proposed, in which the IFOC combines visual information such as color and texture of regions in a category with information on the number and distribution of regions in the category as features of the category. The IFOC method enriches the information contained in the features and reduces the difference between the low-level features and the high-level semantics.
4. An Integrated Category Matching (ICM) method is proposed to assign different weights to each category and perform matching to obtain the image distance. Compared with the Integral Region Matching (IRM) which depends on the area proportion to distribute the weight value to the region, the ICM method distributes the weight value to the class through the mass center of the region in the class, and is more consistent with the visual perception of people.
the present invention will be described in further detail below with reference to the accompanying drawings.
Detailed Description
In the invention, a CaBIR retrieval framework is provided, classes in an image are extracted by an ASRM-AP method, the classes are subjected to feature extraction by using IFOC to reduce the difference between low-level features and high-level semantics, and an ICM method is used for distributing weight values for each class according to the importance of the class in the image and carrying out matching. By gathering all the areas in the image into a plurality of classes which can completely represent the image and have uniqueness, the features are extracted at the class level and matched, the information is ensured to be complete, and repeated matching is avoided, so that the retrieval quality is improved. The specific flow is given in fig. 1.
The invention comprises the following steps:
1. Extracting classes in an image
The class is the set of similar areas in the image, and in the invention, the class in the image is extracted by adopting a method of combining segmentation and clustering. Firstly, segmenting an image by an ASRM method, extracting color texture characteristics of the segmented region, then carrying out AP clustering to find out regions with similar characteristics in the image as the same class and marking. Because the AP algorithm is a self-adaptive clustering algorithm, the system can determine the number of classes in the image according to the image content.
The retrieval may be for large-scale image libraries, so the segmentation method should be simple and efficient. The SRM method is a segmentation method based on region growing, and aims to segment an image into regions with the following two characteristics, namely the difference between the value of all pixel points of each channel in any region and the mean value of the channel; the difference between the value of the pixel point of at least one channel in any area and the mean value of the channel in the neighborhood is not within a certain threshold value.
The specific flow of the SRM algorithm is as follows:
(1) finding all non-repeating four-connected pixel pairs [ (x) in the image I1,y1),(x2,y2)]Wherein (x)1,y1),(x2,y2) The coordinates of two pixel points in a pixel pair.
(2) the values f of the pixel pairs are calculated, and the pixel pairs are arranged in ascending order according to the values of f to form an area index matrix S (the coordinates of the pixel pairs of each row in S).
f=max(R(x1,y1)-R(x2,y2),G(x1,y1)-G(x2,y2),B(x1,y1)-B(x2,y2)) (1)
Wherein, R, G, B are three color channels in the image I.
(3) and judging whether the regions (initial regions are pixel points) to which the two pixel points in each row belong in the S meet the prediction function P or not.
Wherein R and R' represent the areas of two pixel points in a certain row of S,AndRepresents the average of the color channels a in the two regions R and R' to be determined. g is the value of the color channel resolution, and the parameter Q determines the complexity of the segmentation, with larger values increasing the number of segments. And | R | is the number of pixel points in the region R. δ is the maximum probability of P (R, R') ═ no, and is small by default. In the present invention, g is 256, Q is 20, δ is 1/(6| I |)2)。
(4) And traversing the index matrix S from top to bottom to judge whether the formula 2 is met, if so, combining the two areas, and if not, judging the next row.
Because the SRM algorithm needs to perform operations such as averaging, prediction function judgment and the like on two regions corresponding to each pixel pair in an image, the running time is long. The SRM is improved by performing a packing process on the image before the segmentation, i.e. dividing the image into 3 × 3 blocks, calculating the pixel mean of the blocks as the value of the packet, then performing SRM segmentation on the packed image, and mapping the segmentation result to the original image.
And (3) carrying out acceleration processing on the SRM algorithm:
(1) Dividing the image I into 3 x 3 blocks b, and packing each block as image ISAnd the value v of the pixel point is the pixel average value of the block b.
(2) For picture ISSRM segmentation is performed.
(3) handle ISThe segmentation result of (2) is mapped to the image I to obtain the segmentation result of I.
The SRM operand may be expressed as:
Wherein L (I), H (I) are the length and height of the image, respectively; τ is a constant and not greater than 1; accelerated processing of SRM ISIs L and is high1(I)=L(I)/3,H1(I) H (i)/3, the calculated amount cal after the acceleration process1Comprises the following steps:
It is known that the operation time after the acceleration processing is theoretically about 1/27.
The AP clustering algorithm gradually determines a clustering center through a message propagation mode, namely an attraction degree matrix R (R (i, k)) and an attribution degree matrix A (a (i, k)) are updated iteratively, and finally high-quality adaptive clustering is achieved. The update rule is as follows:
(1) Updating the attraction matrix R with the attribution matrix a and the similarity matrix S ═ S (i, k):
(2) Updating the attribution degree matrix A by using the attraction degree matrix R:
Wherein i and k are any two regions in the region obtained by ASRM division, and r (i, k) represents the attraction degree of k to i; a (i, k) represents the degree of attribution of i to k; i 'is a certain object which is not i, and k' is a certain object which is not k; s (i, k) is the similarity of i to k:
s(i,k)=-||cri-crk||2-||tri-trk||2 (10)
cri,crkAnd tri,trkColor texture feature vectors respectively representing i and k are respectively obtained by color histogram statistics and a Local Binary Pattern (LBP) method, and are shown in formula 11 and formula 12; n (H, S, V) represents the number of pixels when the values of the H, S and V color channels in the region correspond to H, S and V; n is a radical oftotalThe number of pixels in the region; n (LBP) is the number of pixels with LBP value in the area; gc,grThe values of the pixel mean and the position r of the 3 × 3 block, respectively;
When i is equal to k, s is set by a bias parameter p, the larger p the more likely data k is to be selected as the cluster center:
s(k,k)=p*mean(s(k,:)) (15)
the function mean (s (k,:)) is the mean of the elements in s (k,:); s (k,: represents the similarity of region k to all other regions; the parameter p is taken to be 0.6.
After AP clustering, marking the regions according to the clustering result, setting all pixel points of the regions in the kth class as k, and finally obtaining a marking graph with pixels from 1 to n, thereby obtaining the classes in the image. The specific flow is shown in fig. 2. FIG. 2 is a flow chart of class extraction in image I, packing 3X 3 blocks in image I to obtain IS2 to ISPerforming SRM segmentation, and cutting ISMapping the segmentation result to I, carrying out AP clustering on the SRM segmentation result and marking similar areas to obtain classes in the image, and combining the adjacent areas in the same class.
2. Comprehensive characteristics of extracted classes
the image retrieval method is a class-based method, and compared with the RBIR system which expresses a region by using visual characteristics such as region color, texture, shape and the like, an IFOC method is provided for expressing classes. In the IFOC, the color and texture characteristics of the class and the number and distribution characteristics of the areas in the class are combined to be used as the comprehensive characteristics of the class, and the multi-characteristic method reduces the difference between low-level characteristics and high-level semantics. The color and texture features of the class are represented by the mean value of the color texture features (obtained when clustering the area APs) of the areas in the class, and the extraction method of the area number and the area distribution features of the class is mainly described here.
(1) region number feature n of classi:
ni=g(N) (16)
wherein, N represents the number of the i-th type area after passing through ASRM-AP, g (x) represents the normalization operation of x, and the rule is as follows:
The number of areas of the same type is normalized to [0,1], and when the number is more than 5, the number of the areas is considered to be more, and the corresponding characteristic value is 1.
(2) regional distribution characteristics of classes:
Because objects in the image often have a certain distribution rule in the vertical direction, for example, the sky often is located at the upper layer of the image, and animals, trees, and the like often are located at the middle layer of the image. Therefore, the image is divided into an upper layer, a middle layer and a lower layer, and the level of the region centroid in each class is counted to obtain the region distribution characteristic l of the classi:
li=[Nh(i)/N,Nm(i)/N,Nl(i)/N] (18)
wherein N represents the number of regions in the ith class in the image obtained by ASRM-AP algorithm, and Nh(i),Nm(i),Nl(i) respectively showing the number of the i-th type area in the upper layer, the middle layer and the lower layer of the image.
the overall characteristics of the class are f:
fi=[ci,ti,ni,li] (19)
Wherein c isi,ti,ni,liRespectively representing the color, texture, area number and area distribution characteristics of the ith class, wherein n is the number of areas in the ith class, akThe number of pixels in the region k is a proportion of the number of pixels in the class. c. Crk,trkthe color texture characteristics of the region k are given in formula (11) and formula (12);
3. complete matching of classes
The IRM algorithm allows one region to be matched with a plurality of regions, reduces errors caused by inaccurate segmentation, and improves the robustness of the system. However, the weight of the region in the IRM is determined only by the area of the region, and the image including the background region with a larger area, such as sky, grass, etc., will generate a larger interference to the search. The invention provides a class-oriented ICM matching method based on IRM, wherein a centroid is used for replacing an area to distribute a weight for a class participating in matching, and the method is more in line with human visual perception. Image I1And image I2Class C in1=(ca1,ca2,…,cam),C2=(ca′1,ca′2,…,ca′n) That is, the distance between the two images is D (I)1,I2):
di,j=α1|ci-c′j|+α2|ti-t′j|+α3|ni-n′j|+α4|li-l′j| (23)
Wherein d isi,jrepresentation class caiAnd ca'jThe distance of (d); si,jIndicating area caiAnd ca'jMatching interestingness, wherein an interestingness matrix S is as follows:
ci,ti,ni,liAnd c'j,t′j,n′j,l′jRespectively representing images I1Class I and image I in2The color, texture, number of regions in the class j and the feature vector of the region distribution in the class j, the calculation methods are given in formulas 20, 21, 16 and 18, respectively; alpha is alpha1,α2,α3,α4being weighted by different characteristics, α1+α2+α3+α41 and α1,α2,α3,α4E (0,1), are set to 0.25 in the present invention.
article (XIA Dingyuan, FU Pian, LIU Liduan. "Improved image regression for integrated region matching" [ J ] A]CEA,2012,48(26):197-200.) proposes a center-based region interest level calculation method and obtains good effect. However, the closer to the center does not represent the more interesting the region, the more complex the texture in the image, and the region with large gradient tends to attract people more easily, so a centroid distance-based interestingness calculation method is proposed. Canny edge detection is performed on the image I, and the centroid (x) of the texture map is obtained by the formula 27I,yI) Calculating the interest s of each class according to the mean value of the distance from the region to the centroidi,j:
si,j=max(si,sj) (25)
wherein f (r) is a function of the centroid of region r; n isiIs ca-likeiThe number of middle regions; x is the number ofkAnd ykrespectively the abscissa and ordinate of the pixel in the region r; m is the number of pixels in the region r; sjAnd siThe calculation method is similar.
results and analysis of the experiments
1. Experimental environment and image library adopted by same
The system test environment of the experiment is as follows: kurui i5 CPU, 3.20GHz, 8.0GB RAM; windows 7 operating system; matlab R2014a developed software. The Core-1000 image library and the Caltech-256 image library, which are the most commonly used search image libraries in content-based image search experiments, are used. The former contains 10 types of images, respectively, original, beach, trail, bus, dinosaur, elephant, horse, flower, snow mountain, food, each containing 100 JPEG images of 256 × 384 and 384 × 256 in size. The latter includes 30607 images of 256 different objects, each including 80 to 827 images, 1299 images of 10 types including rifle, American flag, backpack, baseball glove, basket, bat, bathtub, beer mug, bat and motorboat were selected for retrieval.
2. performance evaluation method
The most common evaluation criteria in the content-based image retrieval system are precision ratio and recall ratio, wherein the precision ratio represents the ratio of the number of retrieved images related to the query example graph to the total number of retrieved images; the recall ratio represents the ratio of the number of the retrieved images related to the query example graph to the total number of the related images. The higher the values of the precision ratio and the recall ratio are, the better the effect of the algorithm is, namely the better the system performance is. But precision ratio and recall ratio are often contradictory relations. Reducing the returned image set in order to improve precision necessarily results in a reduction in recall; conversely, to increase the recall ratio, the number of returned images is increased, and more irrelevant image results are easily included, resulting in a decrease in precision ratio. Therefore, the invention only selects the precision ratio P to evaluate the search result.
P=nk/K, (25)
K is the number of search results, nkThe number of related images in the search result is shown. The average precision ratio of the algorithm is as follows:
PqRepresents the precision of the q-th query example graph, and i is the number of the query example graphs.
3. experiments on image segmentation and classification
in order to verify the feasibility of ASRM, 100 images are randomly selected from Corel-100 and Caltech-256 image libraries respectively, CaBIR retrieval by SRM and CaBIR retrieval by ASRM are carried out on the images respectively, and the average running time and precision ratio of the system are calculated. The results are shown in table 1, the average running time of the acceleration system of the SRM in the Corel-1000 image library is shortened by 26 times, and the precision ratio is reduced by 0.03 percentage point; the average running time of the system for accelerating the SRM in the Caltech-256 image library is shortened by 22 times, and the precision ratio is reduced by 0.04 percentage point. Therefore, the ASRM segmentation method can greatly shorten the running time of the system at the cost of extremely low precision.
TABLE 1 CaBIR System runtime and precision ratio comparison using SRM and ASRM
The result of the classification of the partial images is given in fig. 4. The image a is divided into three types of backgrounds, dinosaurs and land shown as a1, the image b is divided into three types of brown horses, white horses and grasslands shown as b1, the image c is divided into four types of vegetables, biscuits, white tablecloths and red cakes shown as c1, the image d is divided into three types of backgrounds, metal gun bodies and wood gun bodies shown as d1, and the image e is divided into four types of stars, backgrounds, white stripes and red stripes shown as e 1. It can be seen from the figure that the ASRM-AP algorithm can adaptively determine the number of classes contained in the image and accurately divide similar areas into the same class.
4. Experiments on IFOC characteristics
In IFOC, the system increases the ability to identify the distribution and quantity characteristics of regions in a class. And selecting partial images to perform comparison experiments on the traditional characteristics and the IFOC characteristics. In fig. 5, a1, b1, c1 and d1 are partial search results obtained by using the conventional visual feature, and a2, b2, c2 and d2 are partial search results obtained by using the IFOC feature. although the search results in a1 and a2 are all horses, a1 includes two images of one horse, and a2 includes one image of one horse and ranks back; b1, the fifth sixth image is wrongly retrieved because some classes which are similar to the query graph visually are contained; the same is true of the two groups c and d. By comparison, the distinguishing capability of the system to the classes can be effectively enhanced by introducing the regional distribution characteristics, and a lower matching distance can be obtained only when the classes simultaneously meet visual similarity and distribution similarity, so that the precision ratio is improved. Fig. 5 illustrates the change in precision when using IFOC and conventional visual features. a, b, c and d are query example graphs; a1, b1, c1 and d1 are the first 6 retrieval results when the traditional visual characteristics are adopted; a2, b2, c2 and d2 are the first 6 retrieval results when the IFOC characteristics are adopted.
5. Experiments on centroid-based interestingness calculation methods
in fig. 6, classes in the images of the snow mountain and the basket are obtained by the asmm-AP algorithm. Table 2 shows the interestingness versus subjective interestingness for each category obtained using different methods. The subjective interest degree is the average value of 10 people scoring different classes according to the interest degree. As can be seen from table 2, the centroid-based approach yields interestingness closest to subjective interestingness in snow mountain and basket images, followed by the center-based approach, where the area-based interestingness is the greatest difference from subjective interestingness. Therefore, the interest degree calculation method based on the centroid is more consistent with the visual characteristics of people.
TABLE 2 comparison of the three interestingness methods
FIG. 7 shows the average precision of the Corel-1000 and Caltech-256 image libraries by the three methods, and experiments show that the highest precision is obtained by adopting the centroid-based interest degree calculation method, so that the interest degrees of people in different classes can be better reflected.
Comparison of 6 CaBIR with other methods
The image retrieval method based on class provided by the invention is compared with five image retrieval methods based on regions, namely a simple entity method SRM-IRM method, a MN-MIN method, an SIS method and a MN-ARM method. Table 3 table 4 shows the precision of each system in the Corel-1000 and Caltech-256 image libraries when K is 20, respectively, and fig. 8 shows the variation trend of the average precision of each system at different K values.
In Table 3, the accuracy of CaBIR falls behind the MN-ARM method in three categories of Africa, architecture and mountain. The method is characterized in that objects such as native people, buildings and mountains are more complicated than objects such as horses, flowers, sand beaches, dinosaurs and buses, and are not beneficial to image segmentation, and therefore a complete class matching method is adopted to reduce the influence caused by segmentation errors. The CaBIR precision ratio in other images is higher than that of other methods, and the precision ratio is improved by about 5% particularly in images of horses and buses. In general, the average precision ratio of the method is 77.19 percent, which is higher than 76.60 percent of that of the MN-ARM method.
In table 4, the precision ratio of the method of the present invention is significantly improved in most images, especially in the american flag image, the precision ratio is 25% higher than the second; the precision ratio in the basket images is 0.37% behind the MN-ARM method, because in most basket images, the basket net is small and sparse, and the division is easy to be ignored, so that the class is lost. In the Caltech-256 image library, the average precision ratio of the method is 5.68% higher than that of MN-ARM, and is obviously improved. The advantage of the method in the Corel-1000 image library is not higher than that in the Caltech-256 image library, because the object in the Caltech-256 image library is less complex than the former and is easier to segment and classify, the method can better embody the advantage of class-based image retrieval.
TABLE 3 registration ratio comparison of the method of the present invention to other methods in the Corel-1000 image library at 20K ═ 20
TABLE 4 Caltech-256 image library with 20K-20 hours in which the precision ratio of the method of the present invention is compared with that of other methods
FIG. 8 is a line graph of the average precision for different methods, which shows the average precision for different methods at K values of 20, 40, 60, 80, and 100, respectively. It can be seen from the figure that the precision ratio is continuously decreased along with the increase of the K value, but the method of the present invention is always higher than other region-based retrieval methods, and the advantage of CaBIR is verified again, and fig. 9 shows the retrieval results of the partial images by the method of the present invention, which relate to the first twenty images in the retrieval results of six query examples, namely, flower (image 1), horse (image 2), bus (image 3), american flag (image 4), backpack (image 5), and bat (image 6).
and (4) conclusion: the invention provides a class-based image retrieval method. Firstly, classes in an image are obtained through an ASRM-AP method, then the classes are subjected to feature extraction by utilizing IFOC (information processing center) so as to reduce the difference between low-level features and high-level semantics, and an ICM (information processing center) method is used for distributing weight values for each class in the image according to the importance of each class in the image and carrying out matching to obtain the similarity of the image. By gathering all the areas in the image into a plurality of classes which can completely represent the image and have uniqueness, the features are extracted at the class level and matched, the information is ensured to be complete, and repeated matching is avoided, so that the retrieval quality is improved. The experimental result shows that the method has better effect than the existing image retrieval method based on the region. The next step is to further improve the accuracy of segmentation, how to make the method have better applicability in images with complex backgrounds, and improve the efficiency of the system as much as possible.
In conclusion, the invention avoids repeated matching while ensuring the integrity of image information, gathers all areas in the image into a plurality of classes which can completely represent the image and have uniqueness, extracts features at class level and matches the features.
The advantages of the invention include:
1. and providing a Category-based Image Retrieval (CaBIR) framework, finding out all categories in the Image, and performing feature extraction and Category matching on the categories to obtain the distance of the Image. The problems of information loss and repeated matching in the RBIR system are solved.
2. An Accelerated statistical region merging and affinity propagation (ASRM-AP) method is proposed to obtain classes in an image. The SRM is a segmentation method based on region growth, can ensure the integrity of a region, and can accelerate the SRM to improve the system efficiency; similar areas are gathered and marked as different classes by using a self-adaptive AP clustering algorithm, and meanwhile, adjacent similar areas are combined to prevent over-segmentation.
3. An Integrated feature of category (IFOC) method is proposed, in which the IFOC combines visual information such as color and texture of regions in a category with information on the number and distribution of regions in the category as features of the category. The IFOC method enriches the information contained in the features and reduces the difference between the low-level features and the high-level semantics.
4. An Integrated Category Matching (ICM) method is proposed to assign different weights to each category and perform matching to obtain the image distance. Compared with the Integral Region Matching (IRM) which depends on the area proportion to distribute the weight value to the region, the ICM method distributes the weight value to the class through the mass center of the region in the class, and is more consistent with the visual perception of people.
the parts of the present embodiment not described in detail are common means known in the art, and are not described here. The above examples are merely illustrative of the present invention and should not be construed as limiting the scope of the invention, which is intended to be covered by the claims and any design similar or equivalent to the scope of the invention.