CN109308325A - Image search method and system - Google Patents
Image search method and system Download PDFInfo
- Publication number
- CN109308325A CN109308325A CN201810951203.7A CN201810951203A CN109308325A CN 109308325 A CN109308325 A CN 109308325A CN 201810951203 A CN201810951203 A CN 201810951203A CN 109308325 A CN109308325 A CN 109308325A
- Authority
- CN
- China
- Prior art keywords
- image
- feature
- compact
- son
- image set
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Probability & Statistics with Applications (AREA)
- Image Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of image search method and systems, comprising the following steps: target image set and first image are carried out curve segmentation by S1 respectively;S2 is by each compact son of extracted region feature after segmentation;S3 stores image information in image set;The compact son of the feature in each region and target image concentrate the Hamming distance between the compact son of the feature in each region in S4 Computing Meta image;S5 searches out result figure image set according to Hamming distance.The invention has the advantages that: the low bit, the feature coding technologies of low complex degree, high-accuracy that are directed to different characteristic type, the data volume of the Feature Descriptor in single image region is reduced into a few K bytes from several hundred K bytes, to substantially reduce its carrying cost and improve search precision.
Description
Technical field
The present invention relates to picture search fields, it particularly relates to a kind of image search method and system.
Background technique
Currently, in picture search field, firstly, mainly extracting the available spy of search using image-recognizing method
Sign, is then compared with sample database, then the matched result of output phase one by one.
Then existing some picture search algorithms are carried out according to image zooming-out characterization information by similarity algorithm
Search, can cause following drawback: the description sub-information of image is bigger, and search precision is inadequate, and single feature describes sub-information and accounts for
It is bigger with memory.
For the problems in the relevant technologies, currently no effective solution has been proposed.
Summary of the invention
For above-mentioned technical problem in the related technology, the present invention proposes a kind of image search method and system, can solve
Certainly iamge description subcharacter precision and the problems such as big single description sub-information amount.
To realize the above-mentioned technical purpose, the technical scheme of the present invention is realized as follows:
A kind of image search method, comprising the following steps:
Target image set and first image are carried out curve segmentation by S1 respectively;
S2 is by each compact son of extracted region feature after segmentation;
S3 stores image information in image set;
The compact son of the feature in each region and target image are concentrated between the compact son of the feature in each region in S4 Computing Meta image
Hamming distance;
S5 searches out result figure image set according to Hamming distance.
Further, target image set and first image are carried out curve segmentation respectively and specifically included in step S1:
S11 obtains the dimensional information of target image set and first image respectively, and calculates target image set and first image center
Coordinate;
S12 respectively calculates the width and height of target image set and first image, and calculates elliptical major radius and short by half
Diameter;Using central point as origin, drawn with major radius and short radius oval;Using central point as origin, X-axis and Y-axis are drawn;
S13 is respectively split as 5 regions target image set and first image with X-axis, Y-axis and elliptic curve.
Further, the compact son of feature is extracted in step S2 to specifically include:
S21 constructs GMM model;
S22 uses K-means algorithm training code book according to GMM model;
S23 obtains the compact son of feature by fisher vector & VLAD method.
Further, it needs to acquire target image set information before step S1 and searches for first Image Information Processing, wherein
The acquisition target image set information includes reading every picture in image set, and described search member Image Information Processing includes reading
First image converts hsv color space for image set and first image respectively.
Further, image information includes but is not limited to image ID, image tag and each region in the step S3
The compact son of feature.
Another aspect of the present invention provides a kind of image search system, comprising:
First segmentation module, for target image set and first image to be carried out curve segmentation respectively;
Extraction module, for each compact son of extracted region feature after dividing;
Memory module, for storing image information in image set;
First computing module, the compact son of feature for each region in Computing Meta image concentrate each region with target image
Hamming distance between the compact son of feature;
Search module, for searching out result figure image set according to Hamming distance.
Further, the first segmentation module includes:
First obtains module, for obtaining the dimensional information of target image set and first image respectively, and calculate target image set and
The coordinate of first image center;
Second computing module for respectively calculating the width and height of target image set and first image, and calculates ellipse
Major radius and short radius;Using central point as origin, drawn with major radius and short radius oval;Using central point as origin, draw X-axis and
Y-axis;
Second segmentation module, for being split respectively to target image set and first image with X-axis, Y-axis and elliptic curve as 5
Region.
Further, the compact son of feature is extracted in extraction module to specifically include:
Module is constructed, for constructing GMM model;
Training module, for using K-means algorithm training code book according to GMM model;
Second obtains module, for obtaining the compact son of feature by fisher vector & VLAD method.
Further, image information includes but is not limited to image ID, image tag and each region in the memory module
The compact son of feature.
Beneficial effects of the present invention: for the low bit of different characteristic type, low complex degree, high-accuracy feature coding
The data volume of the Feature Descriptor in single image region is reduced to a few K bytes from several hundred K bytes, to substantially reduce by technology
Its carrying cost and raising search precision.
Detailed description of the invention
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, below will be to institute in embodiment
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings
Obtain other attached drawings.
Fig. 1 is the flow chart of the image search method described according to embodiments of the present invention;
Fig. 2 is the flow chart of the compact son of extraction feature described according to embodiments of the present invention;
Fig. 3 is the schematic diagram of the image search system described according to embodiments of the present invention;
Fig. 4 is the schematic diagram of the first described according to embodiments of the present invention segmentation module;
Fig. 5 is the schematic diagram of the extraction module described according to embodiments of the present invention;
Fig. 6 is the picture of the image set described according to embodiments of the present invention;
Fig. 7 is the picture of the result figure image set described according to embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art's every other embodiment obtained belong to what the present invention protected
Range.
As shown in Figure 1, Figure 2, shown in Fig. 6 and Fig. 7, the image search method, including following step according to embodiments of the present invention
It is rapid:
Target image set and first image are carried out curve segmentation by S1 respectively;
Each compact son of extracted region feature after segmentation is stored in feature compact sub-information in list by S2;
S3 stores image information in image set;
Specifically, image tag is arranged and each provincial characteristics is compact according to image cloud service interface application unique images ID
The information such as sub-information list;
Nosql or database connection are opened, save image related information and close connection etc.;
The compact son of the feature in each region and target image are concentrated between the compact son of the feature in each region in S4 Computing Meta image
Hamming distance;
S5 searches out the result figure image set with same characteristic features or scene according to Hamming distance.
Specifically, carrying out descending arrangement according to Hamming distance, the image collection met the requirements is searched out.
In one particular embodiment of the present invention, target image set and first image are subjected to curve point respectively in step S1
It cuts and specifically includes:
S11 obtains the dimensional information of target image set and first image respectively, and calculates target image set and first image center
Coordinate;
S12 respectively calculates the width W and height H of target image set and first image, and calculates elliptical major radius and short
Radius;Using central point as origin, drawn with major radius and short radius oval;Using central point as origin, X-axis and Y-axis are drawn;
S13 is respectively split as 5 regions target image set and first image with X-axis, Y-axis and elliptic curve.
Specifically, reading the shape information of image according to image example;Read 0 and 1 two position of shape information data
The value set is height H and width W;The coordinate (X, Y) of image center, (cX, cY)=[int are calculated according to height H and width W
(W * 0.5), int(H * 0.5)];It region division is four quadrants, letter by X-axis and Y-axis using central point as origin
Breath indicates are as follows: [(0, cX, 0, cY), (cX, W, 0, cY), (cX, W, cY, H), (0, cX, cY, H)];It calculates real
Then object region rectangle calculates ellipse radii calculating ratio, calculate elliptical major radius be W* ellipse radii ratio, it is short by half
Diameter is H* ellipse radii ratio;Using central point as origin, drawn with major radius and short radius oval;Pass through first, second, third and fourth
Quadrant area and with elliptic curve image segmentation be 5 regions.
In one particular embodiment of the present invention, the compact son of feature is extracted in step S2 to specifically include:
S21 constructs GMM model;
A mixed Gauss model is established for each pixel of every piece image by the gmm algorithm in opencv, is mixed
Close the representative background that weight is big in Gauss model, the small representative prospect of weight;If it is corresponding that new pixel can match background
Mixed Gauss model, then new pixel is just treated as background;If matched is the lesser mixed Gauss model of weight
Or without matched mixed Gauss model, then this pixel is treated as prospect;
S22 uses K-means algorithm training code book according to GMM model;
A, the initial center of C class is suitably selected;
B, it in kth iteration, to any one sample, asks it to arrive the distance at each center C, which is grouped into apart from shortest
Class where center;
C, such central value is updated using the methods of mean value;
D, for C all cluster centres, if value remains unchanged after utilizing the iterative algorithm of (B) (C) to update, or
Reach certain the number of iterations, or less than one threshold value of variation of classification, then iteration terminates, and otherwise continues iteration;
S23 is by calling the fisher vector & VLAD method in opencv to obtain the compact son of feature.
In one particular embodiment of the present invention, need to acquire target image set information and search member before step S1
Image Information Processing, wherein the acquisition target image set information includes reading every picture in image set, described search member figure
Picture information processing includes reading first image, converts hsv color space for image set and member image respectively.
Acquiring target image set information includes reading every picture in image set, specifically, being sentenced according to os.path.isdir
Whether disconnected is file, if it is not, being just read out picture file by imread, is carried out curve segmentation;If it is text
Part folder, then continue to execute the image set in reading folder;
Described search member Image Information Processing includes reading first image, specifically, being read according to first image path by imread
First image information;
Hsv color space is converted by image set and first image respectively:
A, tone H is measured using angle, and value range is 0 °~360 °, is calculated counterclockwise since red, red is
0 °, green is 120 °, and blue is 240 °, their complementary color is: yellow is 60 °, and cyan is 180 °, and magenta is 300 °;
B, degree of the saturation degree S expression color close to spectrum colour;A kind of color can regard certain spectrum colour as and mix with white
Result;Wherein, ratio shared by spectrum colour is bigger, and the degree of color close to spectrum colour is just higher, and the saturation degree of color is also
Higher;Saturation degree is high, and color is then deep and gorgeous;The white light ingredient of spectrum colour is 0, and saturation degree reaches highest;Usual value range is
0%~100%, value is bigger, and color is more saturated;
C, lightness indicates bright degree, related with the brightness of illuminator for light source colour, brightness value;For object
The transmittance or reflectivity of color, this value and object are related, and usual value range is that 0%(is black) white to 100%();
D, 3D color histogram, 8 bin are logical for lightness for saturation degree channel, 3 bin for form and aspect channel, 12 bin
Road, feature vector in total have 8 × 12 × 3=288.
In one particular embodiment of the present invention, image information includes but is not limited to image ID, figure in the step S3
As the compact son of the feature of label and each region.
As shown in fig. 3 to 7, another aspect of the present invention provides a kind of image search system, comprising:
First segmentation module, for target image set and first image to be carried out curve segmentation respectively;
Extraction module, for each compact son of extracted region feature after dividing;
Memory module, for storing image information in image set;
First computing module, the compact son of feature for each region in Computing Meta image concentrate each region with target image
Hamming distance between the compact son of feature;
Search module, for searching out result figure image set according to Hamming distance.
In one particular embodiment of the present invention, the first segmentation module includes:
First obtains module, for obtaining the dimensional information of target image set and first image respectively, and calculate target image set and
The coordinate of first image center;
Second computing module for respectively calculating the width and height of target image set and first image, and calculates ellipse
Major radius and short radius;Using central point as origin, drawn with major radius and short radius oval;Using central point as origin, draw X-axis and
Y-axis;
Second segmentation module, for being split respectively to target image set and first image with X-axis, Y-axis and elliptic curve as 5
Region.
In one particular embodiment of the present invention, the compact son of feature is extracted in extraction module to specifically include:
Module is constructed, for constructing GMM model;
Training module, for using K-means algorithm training code book according to GMM model;
Second obtains module, for obtaining the compact son of feature by fisher vector & VLAD method.
In one particular embodiment of the present invention, in the memory module image information include but is not limited to image ID,
The compact son of the feature in image tag and each region.
In conclusion low bit, low complexity by means of above-mentioned technical proposal of the invention, for different characteristic type
The feature coding technology of degree, high-accuracy, the data volume of the Feature Descriptor in single image region is reduced to from several hundred K bytes
A few K bytes, to substantially reduce its carrying cost and improve search precision.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (9)
1. a kind of image search method, which comprises the following steps:
Target image set and first image are carried out curve segmentation by S1 respectively;
S2 is by each compact son of extracted region feature after segmentation;
S3 stores image information in image set;
The compact son of the feature in each region and target image are concentrated between the compact son of the feature in each region in S4 Computing Meta image
Hamming distance;
S5 searches out result figure image set according to Hamming distance.
2. image search method according to claim 1, which is characterized in that by target image set and first image in step S1
Curve segmentation is carried out respectively to specifically include:
S11 obtains the dimensional information of target image set and first image respectively, and calculates target image set and first image center
Coordinate;
S12 respectively calculates the width and height of target image set and first image, and calculates elliptical major radius and short by half
Diameter;Using central point as origin, drawn with major radius and short radius oval;Using central point as origin, X-axis and Y-axis are drawn;
S13 is respectively split as 5 regions target image set and first image with X-axis, Y-axis and elliptic curve.
3. image search method according to claim 1, which is characterized in that extract the specific packet of the compact son of feature in step S2
It includes:
S21 constructs GMM model;
S22 uses K-means algorithm training code book according to GMM model;
S23 obtains the compact son of feature by fisher vector & VLAD method.
4. image search method according to claim 1, which is characterized in that need to acquire target image before step S1
Collect information and search for first Image Information Processing, wherein the acquisition target image set information includes reading every figure in image set
Piece, described search member Image Information Processing include reading first image, convert hsv color sky for image set and first image respectively
Between.
5. image search method according to claim 1-4, which is characterized in that image information in the step S3
The compact son of the feature of including but not limited to image ID, image tag and each region.
6. a kind of image search system characterized by comprising
First segmentation module, for target image set and first image to be carried out curve segmentation respectively;
Extraction module, for each compact son of extracted region feature after dividing;
Memory module, for storing image information in image set;
First computing module, the compact son of feature for each region in Computing Meta image concentrate each region with target image
Hamming distance between the compact son of feature;
Search module, for searching out result figure image set according to Hamming distance.
7. image search system according to claim 6, which is characterized in that described first, which divides module, includes:
First obtains module, for obtaining the dimensional information of target image set and first image respectively, and calculate target image set and
The coordinate of first image center;
Second computing module for respectively calculating the width and height of target image set and first image, and calculates ellipse
Major radius and short radius;Using central point as origin, drawn with major radius and short radius oval;Using central point as origin, draw X-axis and
Y-axis;
Second segmentation module, for being split respectively to target image set and first image with X-axis, Y-axis and elliptic curve as 5
Region.
8. image search system according to claim 6, which is characterized in that extract the compact son of feature in the extraction module
It specifically includes:
Module is constructed, for constructing GMM model;
Training module, for using K-means algorithm training code book according to GMM model;
Second obtains module, for obtaining the compact son of feature by fisher vector & VLAD method.
9. according to the described in any item image search systems of claim 6-8, which is characterized in that image is believed in the memory module
Breath includes but is not limited to the compact son of feature of image ID, image tag and each region.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810951203.7A CN109308325B (en) | 2018-08-21 | 2018-08-21 | Image searching method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810951203.7A CN109308325B (en) | 2018-08-21 | 2018-08-21 | Image searching method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109308325A true CN109308325A (en) | 2019-02-05 |
CN109308325B CN109308325B (en) | 2022-07-01 |
Family
ID=65224003
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810951203.7A Active CN109308325B (en) | 2018-08-21 | 2018-08-21 | Image searching method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109308325B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120155752A1 (en) * | 2010-12-16 | 2012-06-21 | Sony Corporation | Geometric feature based image description and fast image retrieval |
CN103207879A (en) * | 2012-01-17 | 2013-07-17 | 阿里巴巴集团控股有限公司 | Method and equipment for generating image index |
CN105022752A (en) * | 2014-04-29 | 2015-11-04 | 中国电信股份有限公司 | Image retrieval method and apparatus |
US20180032837A1 (en) * | 2015-04-20 | 2018-02-01 | Hitachi Ltd. | Object Detection Method and Image Search System |
CN108364006A (en) * | 2018-01-17 | 2018-08-03 | 超凡影像科技股份有限公司 | Medical Images Classification device and its construction method based on multi-mode deep learning |
-
2018
- 2018-08-21 CN CN201810951203.7A patent/CN109308325B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120155752A1 (en) * | 2010-12-16 | 2012-06-21 | Sony Corporation | Geometric feature based image description and fast image retrieval |
CN103207879A (en) * | 2012-01-17 | 2013-07-17 | 阿里巴巴集团控股有限公司 | Method and equipment for generating image index |
CN105022752A (en) * | 2014-04-29 | 2015-11-04 | 中国电信股份有限公司 | Image retrieval method and apparatus |
US20180032837A1 (en) * | 2015-04-20 | 2018-02-01 | Hitachi Ltd. | Object Detection Method and Image Search System |
CN108364006A (en) * | 2018-01-17 | 2018-08-03 | 超凡影像科技股份有限公司 | Medical Images Classification device and its construction method based on multi-mode deep learning |
Also Published As
Publication number | Publication date |
---|---|
CN109308325B (en) | 2022-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109344701A (en) | A kind of dynamic gesture identification method based on Kinect | |
CN101662581B (en) | Multifunctional certificate information collection system | |
Wang et al. | Fuzzy-based algorithm for color recognition of license plates | |
CN108681994A (en) | A kind of image processing method, device, electronic equipment and readable storage medium storing program for executing | |
CN109636784B (en) | Image saliency target detection method based on maximum neighborhood and super-pixel segmentation | |
CN105184238A (en) | Human face recognition method and system | |
CN103020992B (en) | A kind of video image conspicuousness detection method based on motion color-associations | |
CN103996046B (en) | The personal identification method merged based on many visual signatures | |
CN103366178A (en) | Method and device for carrying out color classification on target image | |
CN108629783A (en) | Image partition method, system and medium based on the search of characteristics of image density peaks | |
US20030095704A1 (en) | Determination of an illuminant of digital color image by segmentation and filtering | |
CN106294705A (en) | A kind of batch remote sensing image preprocess method | |
CN105260428A (en) | Picture processing method and apparatus | |
CN109977882B (en) | A kind of half coupling dictionary is to the pedestrian of study again recognition methods and system | |
CN104636754A (en) | Intelligent image classifying method based on tongue body partition color feature | |
CN108664951A (en) | Pedestrian's recognition methods again based on color name feature | |
CN105426816A (en) | Method and device of processing face images | |
Huang et al. | Text detection and recognition in natural scene images | |
CN109034154A (en) | The extraction and recognition methods of Invoice Seal duty paragraph | |
CN109284759A (en) | One kind being based on the magic square color identification method of support vector machines (svm) | |
KR101334794B1 (en) | Flower recognition method and apparatus using feature extraction | |
Jiang et al. | A multi-scale approach to detecting standing dead trees in UAV RGB images based on improved faster R-CNN | |
Ciobanu et al. | Image categorization based on computationally economic LAB colour features | |
Jiang et al. | Object recognition and tracking for indoor robots using an RGB-D sensor | |
CN109308325A (en) | Image search method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |