CN103440348B - A kind of global and local color-image retrieval method based on vector quantization - Google Patents
A kind of global and local color-image retrieval method based on vector quantization Download PDFInfo
- Publication number
- CN103440348B CN103440348B CN201310420161.1A CN201310420161A CN103440348B CN 103440348 B CN103440348 B CN 103440348B CN 201310420161 A CN201310420161 A CN 201310420161A CN 103440348 B CN103440348 B CN 103440348B
- Authority
- CN
- China
- Prior art keywords
- color
- image
- local
- code book
- global
- 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.)
- Active
Links
Landscapes
- Image Analysis (AREA)
Abstract
A kind of global and local color-image retrieval method based on vector quantization.The present invention proposes a kind of new color-image retrieval method, relates to technical field of image processing.RGB color is converted to hsv color space by the method, uses Competitive Learning Algorithm based on neutral net to train code book, color space is carried out the most accurate clustering;Introduce color transfer matrix and describe the space distribution situation of color;Index rectangular histogram and two kinds of color characteristics of domain color transfer matrix are combined and carry out similarity measurement;Use morphology opening and closing operation to process image, highlight objective contour, to extract local region of interest, highlight important area, limit background information.The color-image retrieval method that the present invention proposes overcomes global color histogram method and describes not to Color-spatial distribution, it is impossible to the shortcoming effectively limiting background information.Making color quantizing the most accurate, matching effect is more preferable, is the effective ways improving recall precision further.
Description
Technical field
The invention belongs to CBIR field, be specifically related to a kind of global and local based on vector quantization
The color search method that area-of-interest combines.
Background technology
Along with the development of computer technology, multimedia technology and network technology, great amount of images data are extensive by the Internet
Propagate.But, for want of effective image search method so that the utilization for huge image data base is constantly in extremely low
Efficiency.Search method for view data generally has three kinds: be free to navigate through, text based image retrieval (Text
Based Image Retrieval, TBIR) and CBIR (Content Based Image
Retrieval, CBIR).It is free to navigate through being only applicable to cas fortuit, for the professional client of commonly used special multimedia messages
It is inappropriate.Problem of both the existence of text based image retrieval: one is to require a great deal of time to each
Width view data carries out manual text annotation and classification in case building storehouse;Two is that this note is often for personalized human subject
The expression of vision content cannot precision.In CBIR system, image is by for self
Vision content replaces keyword and explains acquisition characteristic information, such as color, texture and shape information.They are closer to the mankind's
Visual system.The commonly used low-level image feature based on color of image retrieval technologies at present, processes based on morphological images, based on arrow
The technology such as amount quantization.
Color is the coloured image bottom, the most intuitively physical features, generally to noise, the degeneration of picture quality, size,
The change in resolution and direction etc. has the strongest robustness, is most CBIR multimedia databases
One of feature of middle use.Conventional color characteristic mainly include color histogram, colour consistency vector, color correlogram and
Color matrix etc..Wherein, utilizing color histogram retrieval is most basic method, but is a lack of retouching color space information
State;Color correlogram emphasizes same color space length dependency in the picture;Color matrix mainly uses in image each
Average and the variance of color compare, and process simple, can use it as the initial survey of image retrieval, and the retrieval for next step is reduced
Hunting zone.Fig. 1 is a kind of image search method flow chart based on global color.
Mathematical morphology be one based on algebra of sets, research digitized video morphosis and fast parallel process
A new branch of science.The basic thought that morphological images processes is to utilize one to be referred to as structural element " probe " to collect image
Information.When probe the most constantly moves when, just can consider the mutual relation between image parts, thus
Solve the architectural feature of image.Structural element is concept most important, most basic in Morphological scale-space, its work in morphological transformation
With " filter window " that be equivalent in signal processing.For same piece image, structural element is different, then the result processed is the most not
With.In bianry image morphology application, the selection principle of structural element often has rotational invariance, or at least mirror image is constant
Property, say, that the initial point of structural element is at its geometric center, and other pixels are about this initial point symmetrically shape.Conventional
To structural elements have that level is single-row, the most single-row, cross, disk, rhombus and square etc..Along with Mathematical Morphology theory
The most perfect, mathematical morphology is applied more and more extensive in image is split.
In recent years, image search method based on vector quantization becomes the popular domain of many scholar's research.Vector quantization
In be usually block of image pixels quantified, realize transmission and the coupling of image by the index of transmission or coupling code word.Amount
The process changed can regard one as from k dimension space RkTo the mapping of one of them finite subset Y, Q:Rk→ Y={Y1,Y2,…,
YN}.Its ultimate principle is k dimension space RkExhaustively it is divided into N number of mutually disjoint subspace (cell) R1,R2,…,RN。
At each subspace RiIn find out representative vector Yi={ yi1,yi2,…,yik, it is designated as vector set Y={Y1,Y2,…,
YN, Y is referred to as code book or code book, YiBeing referred to as code word or code vector, N is code book size.Vector quantization process is exactly to an input vector X
={ x1,x2,…,xk, Y finds out a Y the most close with XiReplace X, i.e. YiIt it is the quantized value of X.
In the case of given image to be retrieved, from image library, find the image that user wants the most quickly and accurately
Being the problem researched and solved of all kinds of image retrieval technologies, improving the performance of image indexing system, to have become mesh previous the most important
Research topic.But the search method color space quantization inaccuracy of prior art, the spatial distribution of color describes not enough and office
Portion's important information does not highlights, it is difficult to obtain the information of accurately retrieval.
Summary of the invention
The present invention is directed to color space quantization inaccuracy in existing color-image retrieval method, the spatial distribution of color is retouched
State deficiency and local important information not distinct issues, propose color-image retrieval method.
The present invention solves the technical scheme of above-mentioned technical problem, a kind of global and local color diagram based on vector quantization
As search method, including step: read color image data, it is transformed into hsv color space from RGB color, chooses
4 × 4 pixels of adjacent and non-overlapping copies are as trained vector;The method using the sequence of trained vector quadratic sum forms initial code
Book;Choose the image construction trained vector collection training inceptive code book in image library;By adding up the percent frequency that each color occurs
The when color situation of change of adjacent pixel blocks, forms color index rectangular histogram and domain color transfer matrix, as retrieval
Feature;Utilize morphological images to process, highlight objective contour to extract local image region interested;Utilize global color feature
With local region of interest color characteristic Weighted Searching.
Specifically include:
Color space quantization: (1) chooses a width rich color and the image being evenly distributed, and is transformed into from RGB color
Hsv color space, and by its H, tri-components of S, V extract;(2) adjacent and 4 × 4 pixel conducts of non-overlapping copies are selected
Trained vector;(3) method using the sequence of vector quadratic sum forms inceptive code book;(4) in all kinds of image of image library, figure is chosen
As training image collection, training inceptive code book with Competitive Learning Algorithm (CL algorithm).(5) through color cluster, three-dimensional colour figure
As three code book H can be obtained respectivelyi,Si,Vi, they are merged into a characteristic vector (code book) ω, ω=(Hi,Si,
Vi) i=1,2 ..., N, and the set of codewords indexes is equivalent to a color look up table comprising N kind color.
Color feature extracted: (1) color index rectangular histogram: according to color look up table, by image in image to be retrieved and image library
Being divided into the block of pixels of 4 × 4, each block of pixels is characterized by the call number (namely a kind of color) of a code word;By statistics
The frequency of each codewords indexes appearance and percentage, obtain the color index rectangular histogram H (v of coloured image1,v2…,vi,…
vN);Wherein, viRepresenting the ratio that the code word that call number is i occurs, N is code book size.(2) domain color transfer matrix: by image
Being divided into m × n block, each piece all comprises s × t pixel;Draw domain color index value (namely the occurrence number in this block of each piece
Most index values), form a two-dimentional domain color matrix, its size is m × n, is designated as A={ai,jI=1,2 ... m, j
=1,2 ... n;Setting up the matrix P of a N × N, the initial value of its each element is 0;Matrix A is scanned by Z-shaped, if
ai,jAnd ap,qFor the color (a in succession occurred in scanning sequence a pairi,jAt above ap,q), then respective element in PFrom increasing
1, the most repeatedly, until having scanned;The neighbouring relations of variant color and this relation in entire image in statistical picture
The ratio that all block of pixels centerings occur.
Region of interesting extraction: the correspondingly-shaped use structural element tolerance, extracting in image, simplifies data, keeps base
This shape facility also removes incoherent structure;Utilize opening operation to eliminate the scatterplot less than structural element and burr, cut off elongated
Overlap and play the effect of separation, i.e. image is carried out smooth and low-pass filtering;Utilize closed operation little the lacking than structural element
On mouth or holes filling, overlapping short interruption and object is coupled together, image i.e. carries out filtered external, polishing is convex in image
The wedge angle in portion;Through opening and closing operation, image is smoothed, retains the important profile of image, remove and easily cause undue division
Details and noise;Then set corresponding threshold value and eliminate tiny piecemeal, take out the block that area is maximum;The row of record start pixel
Train value and width and height are to extract rectangle area-of-interest.
Similarity mode: calculate image to be checked and Image Visual Feature similarity in image library, by global and local sense
Region of interest characteristic of field Weighted Searching.If image to be checked is A, in image library, any piece image is B, their area-of-interest
Being respectively a and b, its corresponding color index rectangular histogram and domain color transfer matrix are respectively as follows: HA,HB,Ha,Hb,DA,DB,Da,Db;
Calculate overall situation similarityAnd local similarityω1For the weight of global color histogram,
ω2For the weight of overall situation domain color transfer matrix, ω3Histogrammic weight, ω is indexed for local color4Turn for local domain color
Move weight (the wherein ω of matrix1,ω2,ω3,ω4∈ [0,1], ω1+ω2=1, ω3+ω4=1);By overall situation similarity drawn game
Portion's similarity synthesis is as final tolerance: Similar=pSimi1+qSimi2 (wherein p, q ∈ [0,1] p+q=1);Will
Similar is arranged by ascending order, and the image that Similarity value is the least is the most similar to query image;Return the retrieval knot after sequence on demand
Really.
The present invention uses method choice inceptive code book based on the sequence of vector quadratic sum, uses competition based on neutral net
Learning algorithm training code book, carries out the most accurate clustering to color space, makes quantized result closer to the perception of people;?
Color transfer matrix is introduced, to describe the space distribution situation of color on the basis of extracting blocking implicit format;Rectangular histogram will be indexed
Combine with two kinds of color characteristics of domain color transfer matrix and carry out similarity measurement;Morphology opening and closing operation is used to process image,
Highlight objective contour, to extract local region of interest;It is assigned to different weights to image overall and local region of interest,
Reflect the space distribution situation of color of image the most to a certain extent, highlight again important area, limit background information.This programme
Overcome global color histogram method and Color-spatial distribution is described not, it is impossible to the shortcoming effectively limiting background information, competition
Learning algorithm has effectively clustered similar vectors, constructs the preferable code book of robustness, makes color space quantization the most accurate,
Join effect more preferable, be the effective ways improving recall precision further.
Accompanying drawing explanation
Fig. 1 is a kind of image search method flow chart based on global color;
Fig. 2 is the basic flow sheet of the inventive method;
Fig. 3 is Codebook Design (color quantizing) algorithm flow chart;
Fig. 4 is to utilize morphological images to process the algorithm flow chart extracting area-of-interest;
Fig. 5 is overall precision ratio curve chart.
Detailed description of the invention
Used in hereafter, the meaning of variable is as follows: X represents trained vector;Y represents code book;ω represents three color components
The final code book of synthesis;N represents code book size;H represents color index rectangular histogram;D represents domain color transfer matrix;P represents and looks into
Quasi-rate.
The present invention, from color space quantization and local region of interest, improves color quantizing precision, fully reflects figure
As distribution of color situation and enhancing image local feature are to improve retrieval performance.Concrete example used below and accompanying drawing are to the present invention
Being described further, Fig. 2 is the basic flow sheet of the inventive method.It is embodied as step as follows:
Color space quantization: choosing HSV space is color quantizing space, carries out the rgb space conversion to HSV space;Will
Image H, S, V spatial decimation out, selects 4 × 4 pixels of adjacent and non-overlapping copies as trained vector;Use vector square
Inceptive code book is formed with the method for sequence;And form final code book (vector quantization code table) with CL Algorithm for Training inceptive code book, i.e.
Form a color look up table (color set).
Color feature extracted: color characteristic selects color index rectangular histogram and domain color transfer matrix.
(1) color index rectangular histogram: according to color look up table each small pixel block of image in image to be retrieved and image library
The color of (4 × 4) is attributed to the codewords indexes value of its correspondence;By adding up frequency and the shared percentage that each codewords indexes occurs
Ratio, obtains the Color Statistical vector of coloured image;With the call number of each code word as abscissa, its ratio occurred is vertical coordinate,
Obtain the color index rectangular histogram of image.
(2) domain color transfer matrix: by image block the small pixel block of t 4 × 4 (every piece comprise), unite according to color look up table
The index value that in counting each piece, color frequency is most is as the domain color of this block of pixels;Each block of pixels is scanned, statistics by Z-shaped
The domain color value in succession occurred;In record image, neighbouring relations and this neighbouring relations of variant color own in entire image
The ratio that block of pixels centering occurs.
Region of interesting extraction: utilize morphologic opening and closing operation to be smoothed image, retains image important
Profile, remove details and the noise easily causing undue division;Then set corresponding threshold value and eliminate tiny piecemeal, take out area
Maximum block;The ranks value of record start pixel and width and height are to form rectangle area-of-interest.
Similarity mode: calculate respectively the Euclidean of global and local color index rectangular histogram and domain color transfer matrix away from
From;Global color is indexed the Euclidean distance weighting of rectangular histogram and domain color transfer matrix, is overall situation similarity;Will local face
The Euclidean distance weighting of color index rectangular histogram and domain color transfer matrix, is local similarity;Synthesis global and local is similar
Spend and arrange by ascending order.
The following specifically describes the implementation of the present invention:
(1) inceptive code book design: choosing a width rich color and the image being evenly distributed, by its H, S, V spatial decimation goes out
Come, select 4 × 4 pixels of adjacent and non-overlapping copies as trained vector;At the beginning of the method using the sequence of vector quadratic sum is formed
Beginning code book.Fig. 3 is Codebook Design (color quantizing) algorithm flow chart.Concretely comprising the following steps of vector quadratic sum ranking method:
1. set trained vector to integrate as X={X1,X2,…,XL, code book a size of N;
2. the X of each vector is calculatedlQuadratic sum Sl, by SlArrange by ascending order;
3. the trained vector after sequence being divided into N section, every section has K=L/N trained vector;
Select first code word of every section as initial code word the most successively, form the inceptive code book of a size of N.
Trained vector is used method segmentation based on the sequence of vector quadratic sum to choose initial code word by this inceptive code book algorithm.
Algorithm employs the characteristic quantity of vector, departing from the dependence to picture structure factor, forms the preferable inceptive code book of robustness.
(2) codebook training: choose 24 totally different width images of color in all kinds of image of image library as training image collection, and
Inceptive code book is trained with Competitive Learning Algorithm (CL algorithm).
Competitive Learning Algorithm (CL algorithm) concrete steps:
1. the trained vector setting piece image integrates as X={X1,X2,…,XLAnd Xl∈ X, code book to be designed is Y={Y1,
Y2,…,YN, iterations is t, obtains N number of initial codebook through inceptive code book designAnd use square error to estimate;
2. the error metric between trained vector and each code word is calculated
3. minimum error is selected to estimate code word Y of correspondencei, i.e. the code word of current competitive triumph,
di=min (dj), j=1,2 ..., N;
Adjust winning unit code word: Y the most as the following formulai (t)=Yi (t-1)+a(t)[Xl-Yi (t-1)];
Wherein, a(t)For learning rate, take a here(t)=1/t;
5. the deconditioning when meeting error requirements or given number of iterations, gained Y is as final code book;Otherwise, go to
Step is 2..
Competition learning vector quantization is a kind of simple hard decision clustering algorithm, and during study, a renewal is won
Neuron (code word), and constantly regularized learning algorithm speed, make algorithmic statement.Through color cluster, three-dimensional color image can obtain respectively
Obtain three code book Hi,Si,Vi, they are merged into a characteristic vector (code book) ω, ω=(Hi,Si,Vi) i=1,
2 ..., N, and the set of codewords indexes is equivalent to a color look up table comprising N kind color.
(3) color index rectangular histogram: in color histogram based on pixel, for piece image I, its color has N level
(C1,C2,…,CN) composition, CiFor i-stage color value.In entire image, there is CiThe number of pixels of value is | | Lci| |, then one
The statistical value h of group pixel1,h2,…,hNJust become the color histogram of this image.It is defined as: H (I)=(h1,h2,…,hN)
Wherein, hi=| | Lci||/m;CiThe feature value of representative image;N is that feature can the number of value;||Lci| | represent in image and have
Having color feature value is CiNumber of pixels;M is the number of pixels that image is total.
First index rectangular histogram based on vector quantization divides the image into the block of pixels identical with codeword size, then to often
One block carries out vector quantization, output quantization manipulative indexing, then computation index sequence rectangular histogram, and (quantity of bin is equal to code book
Size).Wherein the quantity of block of pixels is much smaller than pixel quantity, and amount of calculation can effectively reduce.When two block of pixels have identical
Or during similar pixel rectangular histogram, its content is the most different, relative to being considered as phase in pixel processing method
For same block of pixels, in vector quantization, they are not generally possible to be quantified as same code word, namely corresponding different index
Value.Index histogrammic concrete forming step as follows:
1. image in image to be retrieved and image library is divided into the block of pixels of 4 × 4;
2. according to color look up table, each block of pixels is characterized by the call number (namely a kind of color) of a code word;
Concrete grammar is described as follows:
1) Euclidean distance between each trained vector and each code word is calculated;
2) for each trained vector, select the codewords indexes minimum with its Euclidean distance as the sign of this vector;
3) codewords indexes value corresponding to all vectors (i.e. characterization) are recorded.
3. by adding up frequency and the percentage that each codewords indexes occurs, the color index of every width coloured image is obtained
Rectangular histogram H (v1,v2…,vi,…vN);Wherein, viRepresenting the ratio that the code word that call number is i occurs, N is code book size.
(4) domain color transfer matrix: domain color transfer matrix be built upon on HSV quantized color space in order to portray
A kind of color characteristic of color Relative distribution position.First by image block, every piece of color frequency is added up according to color look up table most
Index value as the domain color of this block of pixels;Each block of pixels, the domain color value that statistics occurs in succession is scanned by Z-shaped;Note
The ratio that in record image, the neighbouring relations of variant color and this neighbouring relations occur in entire image all block of pixels centering.
The concrete grammar obtaining image domain color transfer matrix is described as follows:
1. obtained the vector quantization code table of image by CL Algorithm for Training, altogether N number of code word, namely be quantized into N kind color;
2. dividing the image into m × n block, each piece all comprises s × t pixel;
3. the domain color index value of each piece, the index value that namely this block occurrence number is most are drawn.Thus formed
One two-dimentional domain color matrix, its size is m × n, is designated as
A={ai,jI=1,2 ... m, j=1,2 ... n;
4. setting up the matrix P of a N × N, the initial value of each element is 0.Matrix A is scanned by Z-shaped, if ai,j
And ap,qFor the color (a in succession occurred in scanning sequence a pairi,jAt above ap,q) then respective element in PFrom increasing 1, as
This repeatedly, until scanned;
5. setting up the matrix D of a N × N, the computing formula of its element is as follows
(5) region of interesting extraction: its basic thought is that the target characteristic according to original image chooses suitable structural element,
Utilize structural element that original image is translated, the computing such as intersecting and merging, smoothed image also highlights objective contour, then takes turns important
Wide region forms a rectangular area, output coordinate point.First with opening and closing operation, image is smoothed, retains image
Important profile, removal easily cause the undue details divided and noise;Then set corresponding threshold value and eliminate tiny piecemeal, take out
The block that area is maximum;The ranks value of record start pixel and width and height are to form rectangle area-of-interest.Fig. 4 is for utilizing
Morphological images processes the algorithm flow chart extracting area-of-interest.
The elementary operation that morphological images processes has expansion, burn into opening operation and closed operation.
Expand: mathematical definition is set operation, and A is expanded by B, is designated asIt is defined as
Wherein,For empty set, B is structural element.A, by the set that B expansion is all structural element origin positions composition, reflects
B after penetrating and translating at least some part with A is overlapping.Expansion is that being had powerful connections of being contacted with object is merged into this
Object, the process making border expand to outside, can be used to the cavity filling up in object.Specifically comprise the following steps that
1. by each pixel of structural element B-scan image A;
2. the bianry image covered with it with structural element does AND-operation;
If being the most all 0, this pixel of result images is 0, is otherwise 1.
Corrosion: A is corroded by B, is designated as A Θ B, is defined as
Wherein,For empty set, B is structural element.A, by the set that B corrosion is all structural element origin positions composition, reflects
The background of B with A after penetrating and translating does not superposes.Corrosion is a kind of elimination Debris, makes the process that border is internally shunk,
Can be used to eliminate little and insignificant object.Specifically comprise the following steps that
1. by each pixel of structural element B-scan image A;
2. the bianry image covered with it with structural element does AND-operation;
If being the most all 1, this pixel of result images is 1, is otherwise 0.
Opening operation: first corrode and expand afterwards, carrys out the result after dilation erosion with B again after i.e. A is corroded by B, is defined as:
Wherein, ∪ { } refers to all union of sets collection, symbol in bracesRepresent that C is a subset of D.Should
The simple geometry of formula is construed to: A ο B is the union of the translation that B mates in A completely.Opening operation deletes can not comprise completely
The subject area of structural element, has smoothed object outline, is disconnected narrow connection, eliminates tiny ledge, the most not
Substantially change its area.
Closed operation: first expand post-etching, corrodes the result after expansion with B again after i.e. A is expanded by B, is defined as:
Wherein, ∪ { } refers to all union of sets collection in braces, from geometrically saying that A B is all not overlapping with A B
Translation union.As opening operation, closed operation can smooth object profile.But unlike opening operation, closed operation is general
Narrow breach can be coupled together and form elongated curved mouth, and the hole that packing ratio structural element is little, simultaneously and inconspicuous change
Its area.
Extract specifically comprising the following steps that of area-of-interest
1. read coloured image, be converted into gray level image;
2. being filtered gray level image, smoothed image removes noise;
3. choose disc structure element, gray level image is carried out opening operation;
4. the image after opening operation is subtracted computing, to strengthen image, eliminate background;
5. enhanced gray level image being carried out contrast stretching, gray value is mapped to [0,1];
6. by Binary Sketch of Grey Scale Image;
7. choose rectangular configuration element, respectively rectangle row, column is carried out opening and closing operation;
8. the region of connection is marked;
9. calculate the characteristic size of each connected region of image, take out the region that area is maximum, record its starting pixels point
Ranks value and height and width to form rectangular area;
10. according to the size of code word, rectangular area is intercepted as suitably sized.
(6) similarity mode: for an image to be retrieved, first extract its area-of-interest, records its initial and knot
The ranks coordinate of bundle pixel, in corresponding intercepting image library, the respective regions of each image carries out color characteristic as area-of-interest
Coupling.Finally global color feature and local region of interest characteristic weighing are retrieved.Specifically comprise the following steps that and set image to be checked
For A, in image library, any piece image is B, extracts its area-of-interest, respectively a and b;
1. add up the percentage frequency of each color of global and local, form color histogram HA,HB,Ha,Hb;
2. add up the color situation of change of adjacent pixel blocks, form color transfer matrix DA,DB,Da,Db;
3. employing Euclidean distance calculating overall situation similarity: Wherein ω1Histogrammic weight, ω is indexed for global color2For overall situation domain color transfer
Weight (the ω of matrix1,ω2∈ [0,1] and ω1+ω2=1),For color transfer matrix DA,DBIn i-th row j row
Element;
4. employing Euclidean distance calculating local similarity: Wherein ω3Histogrammic weight, ω is indexed for local color4Shift for local domain color
Weight (the ω of matrix3,ω4∈ [0,1] and ω3+ω4=1),For color transfer matrix, Da,DbIn i-th row j row
Element;
5. similarity: Similar=pSimi1+qSimi2 (wherein p, q ∈ [0,1] p+q=1) is synthesized;
6. Similar is arranged by ascending order, return retrieval result.
Under MATLAB7.9 software platform, combine accompanying drawing the example of the present invention program is described in detail
Use the color image data source of 256 × 384 specifications, by emulation experiment and a kind of image based on global color
Searching algorithm compares.The present invention program to be embodied as step as follows:
The inceptive code book design phase:
Step 1: read a width rich color and the coloured image being evenly distributed, obtain the 3-dimensional square in color image data source
Battle array A (has 256 row, 384 row, 3 Color Channels, be abbreviated as (256 × 384 × 3));
Step 2: RGB color is converted to hsv color space, extracts H (tone), S (saturation), V (bright respectively
Degree) three components.Wherein parameter H represents color information, the position of i.e. residing spectral color, and it represents with angular metric, red,
Green, blue being separated by 120 degree respectively, complementary color differs 180 degree respectively.Saturation S is a ratio value, and scope is from 0 to 1, and it represents institute
Select the ratio between the saturation of color and this color maximum saturation.V represents the light levels of color, and scope is from 0 to 1;
Step 3: use the method for vector quadratic sum sequence by three element quantizations of H, S, V (its size is 256 × 384)
Become three inceptive code books.As a example by tone H, if the size of code book is N, first by 4 × 4 block of pixels of adjacent non-overlapping copies
Be converted into the row vector of 1 × 16, then entire image is converted to 6144 × 16 (i.e. 6144 row vectors) by 256 × 384;Calculate
Quadratic sum S of 6144 vectorsl, by SlArrange by ascending order;Sequence trained vector is divided into N section, and every section has T=6144/N
Individual trained vector;Selecting first code word of every section as initial code word successively, forming size N is inceptive code book.
The codebook training stage:
Step 1: choose 24 totally different width images of color in all kinds of image of image library as training image collection;
Step 2: the trained vector setting piece image integrates as X={X1,X2,…,X6144And Xl∈ X, code book to be designed is Y
={ Y1,Y2,…,YN, iterations is t, obtains N number of initial codebook through inceptive code book designAnd use square error to survey
Degree;
Step 3: calculate the error metric between trained vector and each code word
Step 4: select minimum error to estimate code word Y of correspondencei, i.e. the code word of current competitive triumph,
di=min (dj), j=1,2 ..., N;
Step 5: adjustment winning unit code word as the following formula:
Wherein, a(t)For learning rate, take a here(t)=1/t;
Step 6: the deconditioning when meeting error requirements or given number of iterations, gained Y is as final code book;Otherwise,
Go to step 3;
Step 7: successively the image of training image collection is trained.
After CL algorithm color cluster, three-dimensional color image can obtain three code book H respectivelyi,Si,Vi(i=1,2 ...,
N), three color components after quantifying merge into a characteristic vector (code book) ω, ω=(Hi,Si,Vi)=LH·Hi+
LS·Si+LV·Vi, and the set of codewords indexes is equivalent to a color look up table comprising N kind color.
Color index rectangular histogram:
Step 1: in image the most to be retrieved and image library, image is divided into the block of pixels with code word formed objects (such as this test
In be 4 × 4);
Step 2: according to color look up table, each block of pixels is characterized by the call number (namely a kind of color) of a code word,
Specific implementation method is as follows:
4) Euclidean distance between each trained vector and each code word is calculated;
5) for each trained vector, select the codewords indexes minimum with its Euclidean distance as the sign of this vector;
6) the codewords indexes value (i.e. characterization) that 6144 vectors of record are corresponding.
Step 3: the percentage frequency occurred by each index of statistics, obtains the color index rectangular histogram of every width coloured image
H(v1,v2…,vi,…vN);Wherein, viRepresenting the ratio that the code word that call number is i occurs, N is code book size.
Domain color transfer matrix:
Step 1: obtained the vector quantization code table of image by color space quantization above, altogether N number of code word, namely be quantized into
N kind color;
Step 2: dividing the image into m × n block, each piece all comprises s × t (this experiment chooses 4 × 4) individual pixel;
Step 3: draw the domain color index value of each piece, the index value that namely this block occurrence number is most.Thus
Defining a two-dimentional domain color matrix, its size is m × n, is designated as A={ai,jI=1,2 ... m, j=1,2 ... n;
Step 4: set up the matrix P of a N × N, the initial value of each element is 0.Matrix A is scanned by Z-shaped, if
ai,jAnd ap,qFor the color (a in succession occurred in scanning sequence a pairi,jAt above ap,q) then respective element in PFrom increasing 1,
The most repeatedly, until having scanned;
Step 5: set up the matrix D of a N × N, the computing formula of its element is as followsD is just
It it is the domain color transfer matrix of this image.
Region of interesting extraction:
Step 1: read coloured image, and be converted into gray level image;
Step 2: be filtered gray level image, filters noise and interference to extract useful information from input data;
Step 3: utilization IPT function strel structure is variously-shaped, and (flat disc is chosen in this experiment with size structure element
Structural element);
Step 4: gray level image carries out opening operation, deletes the subject area that can not comprise structural element, smooth profile pair
As, disconnect narrow connection and remove tiny connection, simultaneously and its area of unconspicuous change;
Step 5: carry out subtracting computing by the image after filtered gray level image and opening operation, to strengthen image, eliminates the back of the body
Scape;
Step 6: enhanced gray level image is carried out contrast stretching, arranges threshold value m, by the input value gray scale less than m
In level boil down to output image in the narrower range of dark gray level;Similarly, gray-scale compression input value being higher than m is defeated
Publish picture as in brighter gray level narrower range in;Output has the image of higher contrast, and gray value is mapped to [0,1];
Step 7: gray level image is chosen by suitable threshold value, it is thus achieved that still can reflect image entirety and local feature
Binary image, make that image becomes is simple, and data volume reduces and highlights the objective contour of area-of-interest, to facilitate image
Further process;
Step 8: choose rectangular configuration element, respectively rectangle row, column is carried out opening and closing operation, the tiny sky in smooth object
The tiny noise of distribution on hole, burr and background area;
Step 9: be marked the region of connection, general employing eight connectivity or four connections are found.Eight connectivity refers to one
If pixel and other pixels in upper and lower, left and right, the upper left corner, the lower left corner, the upper right corner and the lower right corner be connected to, then it is assumed that they
It it is connection;Four connections refer to if the position of pixel is adjacent upper, lower, left, or right of other pixels, then it is assumed that they are even
Lead to, in the upper left corner, the lower left corner, the upper right corner or the lower right corner connect, then be not considered as that they connect;
Step 10: calculate the characteristic size of connected region, takes out the region that area is maximum, records the row of its starting pixels point
Train value and the height in region and width are to form rectangular area;
Step 11: the number of pixels mould 4 of ranks is removed remainder, forms the rectangular area that ranks value is all the integral multiple of 4
(owing to this experiment block of pixels quantifies to take 4 × 4 sizes, code word is 1 × 16, therefore rectangular area ranks pixel to be area-of-interest
Point is required to be the integral multiple of 4, to facilitate block of pixels to quantify).
Similarity mode:
Step 1: set two width image A and B, extract its area-of-interest, respectively a and b;
Step 2: the percentage frequency of the statistics each color of global and local, forms color index rectangular histogram HA,HB,Ha,Hb;
Step 3: the color situation of change of statistics adjacent pixel blocks, forms domain color transfer matrix DA,DB,Da,Db;
Step 4: use Euclidean distance as measure, calculate two width image overall index rectangular histogram and domain color respectively
Two kinds of color characteristics are weighted by the Euclidean distance of transfer matrix.Then overall situation similarity is:Wherein, ω1For global color rope
Draw histogrammic weight, ω2Weight (ω for overall situation domain color transfer matrix1,ω2∈ [0,1] and ω1+ω2=1);
Step 5: use Euclidean distance as measure, calculate two width image local index rectangular histogram and domain color respectively
Two kinds of color characteristics are weighted by the Euclidean distance of transfer matrix.Then local similarity is:Wherein, ω3For local color rope
Draw histogrammic weight, ω4Weight (ω for local domain color transfer matrix3,ω4∈ [0,1] and ω3+ω4=1);
Step 6: synthesis similarity: Similar=pSimi1+qSimi2 (wherein p, q ∈ [0,1] p+q=1);
Step 7: Similar is arranged (Similar value the least explanation two width image is the most similar) by ascending order;
Step 8: return retrieval result by demand.
Evaluation for retrieval effectiveness is to retrieve the correctness of result, mainly uses precision ratio
And recall ratio (recall) two indices (precision).Precision ratio refers to during one query, and system returns inquiry knot
In Guo, the number of associated picture accounts for the ratio of all return picture number.Recall ratio refers to that system returns relevant figure in Query Result
The number of picture accounts for the ratio of all associated picture numbers in image library (that include returning and do not return).The two index is more
The effect of high explanation search method is the best.The formula of precision ratio and recall ratio is represented by:
Precision ratio
Recall ratio
Wherein, RARepresent the number of the associated picture retrieved;RBRepresent the unrelated images number retrieved;RCRepresent figure
As the associated picture number of missing inspection in storehouse.
Experiment uses the standard image data storehouse that Li.J provides, and chooses wherein 420 256 × 384 or 384 × 256
Coloured image forms retrieval image library, total personage, dinosaur, flower, grassland, seabeach, mountain peak and automobile seven class image, every class bag
Containing 60 width, weigh its retrieval performance with precision ratio.
When specifically testing, different classes of image respectively takes 10 width and constitutes test image set, and each image returns 6 width successively,
12 width ..., the retrieval image of 60 width.In the case of difference returns number, calculate the average precision of Different categories of samples image respectively
Precision ratio as the category.It is 6 width that table 1 gives global color searching algorithm and inventive algorithm returning picture number,
12 width ..., the precision ratio of every class image in the case of 60 width.
The precision ratio P (%) of table 1 each class image
Table 1 continues
As it can be seen from table 1 when returning picture number and being less, the precision ratio of Global Algorithm and this algorithm is the highest, with
The increase returning picture number, precision ratio has declined.The image that distribution of color is more concentrated, as personage, dinosaur,
Flowers etc., after adding local region of interest, when returning different images number, recall precision is all significantly improved.For sea
The image that beach, this two classes distribution of color of mountain peak relatively dissipate, after adding local region of interest, recall precision has some to rise and fall,
If seabeach is when returning 30 width image, mountain peak is when returning 48 width and 54 width, and recall precision has declined herein, this is because face
Color is distributed the image do not concentrated, and target is distinguished inconspicuous with background.For the precision ratio that image library is overall, Fig. 5 gives accordingly
Result.
In the case of return picture number is identical, calculate the average precision of seven class images, as at this return number
The overall precision ratio in hypograph storehouse, carries out overall merit with this to algorithm.Owing to the image of each semantic category is very different, often
Individual is the most different, so precision ratio has certain fluctuation to impression and the understanding of image.From the point of view of whole structure, the present invention carries
The searching algorithm performance gone out is more excellent compared with global search algorithm.
Claims (4)
1. a global and local color-image retrieval method based on vector quantization, it is characterised in that read coloured image number
According to, it is transformed into hsv color space from RGB color, chooses 4 × 4 pixels of adjacent and non-overlapping copies as training
Vector;The sequence of trained vector quadratic sum is formed inceptive code book;Choose at the beginning of the image construction trained vector collection training in image library
Beginning code book;By adding up the color situation of change of the percent frequency when adjacent pixel blocks that each color occurs, form color index
Rectangular histogram and domain color transfer matrix, as retrieval character;Utilize morphological images to process, highlight objective contour to extract
Local image region interested;Utilize global color feature and local region of interest color characteristic Weighted Searching, it is thus achieved that feel emerging
Interest area image, described utilizes global color feature and local region of interest color characteristic Weighted Searching particularly as follows: statistics is complete
The percentage frequency of each color of office and local, forms color index rectangular histogram HA,HB,Ha,Hb;The color of statistics adjacent pixel blocks
Situation of change, forms domain color transfer matrix DA,DB,Da,Db;Use Euclidean distance according to formula:Calculate overall situation similarity Simi1, wherein ω1
Histogrammic weight, ω is indexed for global color2Weight (ω for overall situation domain color transfer matrix1,ω2∈ [0,1], and ω1+
ω2=1);According to formula:Calculate local
Similarity Simi2, wherein ω3Histogrammic weight, ω is indexed for local color4Weight for local domain color transfer matrix
(ω3,ω4∈ [0,1] and ω3+ω4=1);Synthesis similarity Similar=pSimi1+qSimi2, by Similar by ascending order
Arrangement, returns retrieval result, wherein p, q ∈ [0,1], p+q=1.
Method the most according to claim 1, it is characterised in that described formation inceptive code book farther includes: calculate training and vow
The quadratic sum of each trained vector in quantity set, and arrange by ascending order;According to code book size N, the trained vector after sequence is divided into N
Section, selects first code word of every section as initial code word successively, forms the inceptive code book of a size of N, use CL Algorithm for Training
Inceptive code book, obtains tone, saturation and brightness form final code book, and export the code word of the color look up table comprising N kind color
Index value.
Method the most according to claim 1, it is characterised in that the frequency occurred according to each codewords indexes in color look up table statistical picture
Rate percentage ratio, forms color index rectangular histogram;According to vector quantization codewords indexes table, image is carried out Z-shaped scanning, add up phase
The color situation of change of adjacent block of pixels, forms domain color transfer matrix.
Method the most according to claim 1, it is characterised in that described local image region interested extracts and specifically includes: profit
By opening and closing operation, image is smoothed, retains the important profile of image and remove noise;Set threshold value and remove tiny point
Block, takes out initial row train value and the width of largest block and highly forms rectangular area;Ranks number of pixels mould M is utilized to remove remaining
Number, forms the rectangle local image region interested of the integral multiple that ranks pixel count is M.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310420161.1A CN103440348B (en) | 2013-09-16 | 2013-09-16 | A kind of global and local color-image retrieval method based on vector quantization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310420161.1A CN103440348B (en) | 2013-09-16 | 2013-09-16 | A kind of global and local color-image retrieval method based on vector quantization |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103440348A CN103440348A (en) | 2013-12-11 |
CN103440348B true CN103440348B (en) | 2016-11-02 |
Family
ID=49694041
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310420161.1A Active CN103440348B (en) | 2013-09-16 | 2013-09-16 | A kind of global and local color-image retrieval method based on vector quantization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103440348B (en) |
Families Citing this family (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104050301A (en) * | 2014-07-09 | 2014-09-17 | 哈尔滨工程大学 | Image retrieval method based on subblocks with color characteristics and direction characteristics fused |
CN104063522A (en) * | 2014-07-18 | 2014-09-24 | 国家电网公司 | Image retrieval method based on reinforced microstructure and context similarity |
CN105488515B (en) * | 2014-09-17 | 2019-06-25 | 富士通株式会社 | The image processing method and image processing apparatus that a kind of pair of image is classified |
CN104462199B (en) * | 2014-10-31 | 2017-09-12 | 中国科学院自动化研究所 | A kind of approximate multiimage searching method under network environment |
US10120933B2 (en) | 2014-12-10 | 2018-11-06 | Kyndi, Inc. | Weighted subsymbolic data encoding |
CN104918030A (en) * | 2015-06-05 | 2015-09-16 | 河海大学 | Color space conversion method based on ELM extreme learning machine |
CN105205171B (en) * | 2015-10-14 | 2018-09-21 | 杭州中威电子股份有限公司 | Image search method based on color characteristic |
CN105488150A (en) * | 2015-11-26 | 2016-04-13 | 小米科技有限责任公司 | Image display method and apparatus |
CN105654173B (en) * | 2016-01-06 | 2018-04-17 | 大连海洋大学 | Industrial nut region labeling and number detection method |
CN106485199A (en) * | 2016-09-05 | 2017-03-08 | 华为技术有限公司 | A kind of method and device of body color identification |
CN106713921B (en) * | 2016-11-29 | 2019-07-23 | 西安万像电子科技有限公司 | The compression method and device and method for compressing image and device of character block |
CN107908630A (en) * | 2017-06-28 | 2018-04-13 | 重庆完美空间科技有限公司 | Material picture color classification retrieving method |
CN107437293A (en) * | 2017-07-13 | 2017-12-05 | 广州市银科电子有限公司 | A kind of bill anti-counterfeit discrimination method based on bill global characteristics |
WO2020050354A1 (en) * | 2018-09-05 | 2020-03-12 | 日本電気株式会社 | Image search system, image search method, and program |
CN109191475B (en) * | 2018-09-07 | 2021-02-09 | 博志生物科技(深圳)有限公司 | Vertebral endplate segmentation method and device and computer readable storage medium |
CN109740674B (en) * | 2019-01-07 | 2021-01-22 | 京东方科技集团股份有限公司 | Image processing method, device, equipment and storage medium |
CN110263205B (en) * | 2019-06-06 | 2023-07-21 | 温州大学 | Retrieval method for ginseng image |
CN110378953B (en) * | 2019-07-17 | 2023-05-02 | 重庆市畜牧科学院 | Method for intelligently identifying spatial distribution behaviors in swinery |
CN112084394B (en) * | 2020-09-09 | 2024-04-23 | 重庆广播电视大学重庆工商职业学院 | Search result recommending method and device based on image recognition |
CN112085030A (en) * | 2020-09-09 | 2020-12-15 | 重庆广播电视大学重庆工商职业学院 | Similar image determining method and device |
CN112418123B (en) * | 2020-11-30 | 2021-08-03 | 西南交通大学 | Hough transformation-based engineering drawing line and line type identification method |
CN112561976A (en) * | 2020-12-09 | 2021-03-26 | 齐鲁工业大学 | Image dominant color feature extraction method, image retrieval method, storage medium and device |
CN112991470B (en) * | 2021-02-08 | 2023-12-26 | 上海通办信息服务有限公司 | Certificate photo background color checking method and system under complex background |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6760714B1 (en) * | 1993-09-20 | 2004-07-06 | Fair Issac Corporation | Representation and retrieval of images using content vectors derived from image information elements |
CN101763429A (en) * | 2010-01-14 | 2010-06-30 | 中山大学 | Image retrieval method based on color and shape features |
-
2013
- 2013-09-16 CN CN201310420161.1A patent/CN103440348B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6760714B1 (en) * | 1993-09-20 | 2004-07-06 | Fair Issac Corporation | Representation and retrieval of images using content vectors derived from image information elements |
CN101763429A (en) * | 2010-01-14 | 2010-06-30 | 中山大学 | Image retrieval method based on color and shape features |
Non-Patent Citations (3)
Title |
---|
一种改进的基于Hadamard域的码书设计算法;王佳果等;《电信科学》;20120215(第02期);82-84 * |
基于目标区域的图像检索技术与实现;张茵;《中国优秀硕士学位论文全文数据库 信息科技辑》;20090815(第08期);论文正文24-48页 * |
矢量量化用于颜色图像检索的改进方法;陈善学等;《电子技术应用》;20120531;第38卷(第5期);125-127 * |
Also Published As
Publication number | Publication date |
---|---|
CN103440348A (en) | 2013-12-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103440348B (en) | A kind of global and local color-image retrieval method based on vector quantization | |
CN111126202B (en) | Optical remote sensing image target detection method based on void feature pyramid network | |
CN110363215B (en) | Method for converting SAR image into optical image based on generating type countermeasure network | |
CN111784602B (en) | Method for generating countermeasure network for image restoration | |
CN108875813B (en) | Three-dimensional grid model retrieval method based on geometric image | |
CN112001960B (en) | Monocular image depth estimation method based on multi-scale residual error pyramid attention network model | |
CN113222823B (en) | Hyperspectral image super-resolution method based on mixed attention network fusion | |
CN105096286A (en) | Method and device for fusing remote sensing image | |
CN110738663A (en) | Double-domain adaptive module pyramid network and unsupervised domain adaptive image segmentation method | |
CN115620010A (en) | Semantic segmentation method for RGB-T bimodal feature fusion | |
CN113744136A (en) | Image super-resolution reconstruction method and system based on channel constraint multi-feature fusion | |
Zhang et al. | A multiple feature fully convolutional network for road extraction from high-resolution remote sensing image over mountainous areas | |
CN112686830B (en) | Super-resolution method of single depth map based on image decomposition | |
CN114612709A (en) | Multi-scale target detection method guided by image pyramid characteristics | |
Deng et al. | Multiple frame splicing and degradation learning for hyperspectral imagery super-resolution | |
CN108090873B (en) | Pyramid face image super-resolution reconstruction method based on regression model | |
CN116993639A (en) | Visible light and infrared image fusion method based on structural re-parameterization | |
CN116310452B (en) | Multi-view clustering method and system | |
Hesham et al. | Image colorization using Scaled-YOLOv4 detector | |
Gorisse et al. | IRIM at TRECVID 2010: semantic indexing and instance search | |
CN112818920B (en) | Double-temporal hyperspectral image space spectrum joint change detection method | |
CN112861965B (en) | Image matching method based on multi-feature cross consistency model | |
CN115082344A (en) | Dual-branch network panchromatic sharpening method based on detail injection | |
CN115240079A (en) | Multi-source remote sensing image depth feature fusion matching method | |
Xu et al. | AS 3 ITransUNet: Spatial-Spectral Interactive Transformer U-Net with Alternating Sampling for Hyperspectral Image Super-Resolution |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |