CN103699532B - Image color retrieval method and system - Google Patents

Image color retrieval method and system Download PDF

Info

Publication number
CN103699532B
CN103699532B CN201210365623.XA CN201210365623A CN103699532B CN 103699532 B CN103699532 B CN 103699532B CN 201210365623 A CN201210365623 A CN 201210365623A CN 103699532 B CN103699532 B CN 103699532B
Authority
CN
China
Prior art keywords
value
pixel
color
tone
quantized
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
Application number
CN201210365623.XA
Other languages
Chinese (zh)
Other versions
CN103699532A (en
Inventor
杨杰
梁宇杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN201210365623.XA priority Critical patent/CN103699532B/en
Publication of CN103699532A publication Critical patent/CN103699532A/en
Application granted granted Critical
Publication of CN103699532B publication Critical patent/CN103699532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5838Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Library & Information Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of image search method and system, it is related to image processing field.This method includes:Quantification treatment is carried out to the hsv color space representation of pixel in image, the quantized color value belonged in the range of 0 ~ N is obtained, wherein, non-homogeneous fuzzy quantization is carried out to tone value;The histogram of the quantized color value of statistical picture pixel, is normalized with the sum of all pixels of image, obtains the color feature vector of image;The color feature vector of the color feature vector of image and other images is compared to determine to the similarity of image.The method and system of the present invention is extracted the image related to query image color in database, is made image retrieval more intelligent, the extraction result of color correlogram picture is also more accurate using the color feature vector after image quantization as related basis for estimation.The image in database images is handled in advance by using off-line module, execution speed is effectively improved.

Description

Image color retrieval method and system
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of image color retrieval method and system.
Background technology
With the fast development that multimedia technology, digital imaging technology and computer technology are applied, and massive store Geometric increasing trend is presented in equipment and digitizer popularization and application, image and video data, at the same time, occurs in that great Rong The image/video data storehouse of amount.But, digital imaging apparatus in itself not to image database management and query function, how Rapidly, accurately required digital picture, which is found, from immense image data base has become multimedia technology in recent years One of focus of research.The research of image retrieval technologies is to multimedia digital library, trade mark copyright management and satellite remote sensing Manage multiple research fields such as information system and provide strong support.
Early in phase late 1970s, the method that people just propose image retrieval, this search method is a kind of base In the retrieval technique of text/data structure, by being retrieved to the keyword or free text that describe image.Firstly the need of right View data in database carries out text description, and the process of inquiry is accurate match or probability based on iamge description text Match somebody with somebody.However, this image search method has the shortcomings that following to be difficult to overcome:1) the means subjectivity by being manually labeled Very strong, the different people of same sub-picture might have different explanations to its content, and same description vocabulary may also have very A variety of different meanings, and country variant different nationalities are difficult that image is explained with a kind of unified language.2) due to The expansion of data scale and cause the expense manually marked to be increasingly difficult to bear.3) content of image is relatively enriched, with " one The characteristics of figure K word ", in some cases, it can not clearly express image expressed meaning in itself at all with limited word Think, especially when image, which contains, certain connotation.Although 4) date created of image, format information, resolution ratio etc. Many parameter informations, can be automated extraction to a certain extent, and provide some basic index clues, but based on text The method of content mark is but difficult on the similarity retrieval to Image Visual Feature.
The content of the invention
The inventors found that above-mentioned have problem in the prior art, and at least one be therefore directed in described problem Individual problem proposes a kind of new technical scheme.
It is an object of the present invention to provide a kind of technical scheme for being used to quickly and accurately carry out image retrieval.
According to the first aspect of the invention there is provided a kind of image search method, including:Obtain the color of pixel in image Tune, saturation degree and brightness hsv color space representation;Quantification treatment is carried out to the hsv color space representation of pixel in described image, The quantized color value that acquisition belongs in the range of 0 ~ N, N is natural number, wherein, non-homogeneous fuzzy quantization is carried out to tone value;Statistics The histogram of the quantized color value of described image pixel, is normalized with the sum of all pixels of described image, obtains described The color feature vector of image;By the color feature vector of the color feature vector of described image and other images be compared with Determine the similarity of image.
Alternatively, carrying out non-homogeneous fuzzy quantization to tone value includes:Transition region is set in the intersection of tone, if color Tone pitch falls in the transition region, then the tone value is quantified as to the weighting of the color quantization value related to the transition region With if the tone value is not fallen within the transition region, the tone value is directly quantified.
Alternatively, carrying out non-homogeneous fuzzy quantization to tone value includes:Multiple quantization boundaries of tone are set;In the amount The both sides for changing border set quantization edge transitional region, and the scope between the size of the transition region and two adjacent quantization borders is big It is small to be directly proportional;The membership function of the transition region is obtained, is distributed according to ridge type, tries to achieve the degree of membership that tone value belongs to transition region Functional value;If the tone value of pixel falls in the transition region, the tone value of the pixel is quantified as and the mistake The weighted sum of two related color quantization values of area is crossed, weighted value is membership function value;If the tone value of pixel falls Outside transition region, then corresponding quantized value is determined according to tone value.
Alternatively, N is 36, and the quantization boundary includes 22,45,70,155,186,278,330.
Alternatively, this method also includes:The pixel of described image is represented by RGB color to be converted to hsv color sky Between represent, wherein, the span of tone is 0 to 360, and the span of saturation degree is 0 to 1, and the span of brightness arrives for 0 1。
Alternatively, the hsv color space representation progress quantification treatment acquisition to pixel in described image belongs in the range of 0 ~ N Quantized color value include:If the brightness value of pixel is less than 0.2, the quantized color value value of pixel is 0;If pixel Brightness value be more than or equal to 0.8, the value of saturation degree is less than 0.2, then the quantized color value value of pixel is 7;If pixel Brightness value is between 0.2 and 0.8, and saturation degree s value is less than 0.2, then the quantized color value value of pixel is the 10 of brightness value Demultiplication 1 and the value after rounding downwards;If the brightness value of pixel is more than or equal to 0.2, the value of saturation degree is more than or equal to 0.2, then as The quantized color value of vegetarian refreshments is weighted by the quantized value of the brightness value of pixel, intensity value and tone value and obtained.
Alternatively, if the brightness value of pixel is more than or equal to 0.2, the value of saturation degree is more than or equal to the 0.2, quantization of pixel Color value is included by the quantized value weighting of the brightness value of pixel, intensity value and tone value:If the brightness value of pixel Between 0.2 and 0.7, then the quantized value of the brightness value of pixel is 0;If brightness v value is between 0.7 and 1, pixel The quantized value of brightness value is 1;If the intensity value of pixel is between 0.2 and 0.65, the quantization of the intensity value of pixel It is worth for 0;If the intensity value of pixel is between 0.65 and 1, the quantized value of the intensity value of pixel is 1;To pixel Tone value carry out non-homogeneous fuzzy quantization processing;The quantized color value of pixel by the tone value of pixel, intensity value and The quantized value weighting of brightness value is obtained:I=4H+2S+V+8, wherein, I is quantized color value, and H is tone, and S is saturation degree, and V is bright Degree.
Alternatively, the color feature vector of the color feature vector of described image and other images is compared to determine Similar image includes:The color feature vector of the color feature vector of described image and other images is compared, according to face Absolute value distance or Euclidean distance between color characteristic vector calculate described image and the similarity of other images.
According to another aspect of the present invention there is provided a kind of image indexing system, including:Color space represents acquisition module, For obtaining the tone of pixel in image, saturation degree and brightness hsv color space representation;Color space represents quantization modules, uses The hsv color space representation of pixel carries out quantification treatment in described image, obtains the quantized color belonged in the range of 0 ~ N Value, N is natural number, wherein, non-homogeneous fuzzy quantization is carried out to tone value;Color feature vector acquisition module, for counting The histogram of the quantized color value of image pixel is stated, is normalized with the sum of all pixels of described image, the figure is obtained The color feature vector of picture;Color feature vector comparison module, for by the color feature vector of described image and other images Color feature vector be compared to determine the similarity of image.
Alternatively, the color space represents that quantization modules include:Luminance quantization unit, for quantifying to brightness value Obtain luminance quantization value;Saturation degree quantifying unit, for carrying out quantifying to obtain saturation degree quantized value to intensity value;Tone quantifies Unit, tone quantized value is obtained for carrying out non-homogeneous fuzzy quantization to tone value;Quantized color value determining unit, for basis Brightness value, intensity value and the luminance quantization value of pixel, saturation degree quantized value and tone quantized value determine to belong to 0 ~ N models The quantized color value of pixel in enclosing.
Alternatively, tone quantifying unit sets transition region in the intersection of tone, if tone value falls in the transition region It is interior, then the tone value is quantified as to the weighted sum of the color quantization value related to the transition region, if the tone value does not have Have in the transition region, then the tone value is directly quantified.
Alternatively, tone quantifying unit is used for the multiple quantization boundaries for setting tone;Set on the both sides of the quantization boundary Quantization boundary transition region is put, the range size between the size of the transition region and two adjacent quantization borders is directly proportional;Obtain The membership function of the transition region, is distributed according to ridge type, tries to achieve the membership function value that tone value belongs to transition region;If picture The tone value of vegetarian refreshments falls in the transition region, then the tone value of the pixel is quantified as two related to the transition region The weighted sum of color quantization value, weighted value is membership function value;If the tone value of pixel falls outside transition region, directly Corresponding quantized value is determined according to tone value.
Alternatively, N is 36, and the quantization boundary includes 22,45,70,155,186,278,330.
Alternatively, if quantized color value determining unit judges that the brightness value of pixel is less than 0.2, the quantization face of pixel Colour value is 0;If the brightness value of pixel is more than 0.8, the value of saturation degree is less than 0.2, then the quantized color value of pixel takes It is worth for 7;If the brightness value of pixel is between 0.2 and 0.8, the value of saturation degree is less than 0.2, then the quantized color value of pixel takes Value after being worth 10 demultiplications 1 for brightness value and rounding downwards;If the brightness value of pixel is more than or equal to 0.2, the value of saturation degree is big In equal to 0.2, then the quantized color value of pixel is obtained the luminance quantization value, described full of pixel by the luminance quantization unit The weighting for obtaining the tone quantized value that saturation degree quantized value and the tone quantifying unit are obtained with metrization unit obtains pixel The quantized color value of point.
Alternatively, if the brightness value of pixel is more than or equal to 0.2, saturation degree s value is more than or equal to 0.2, the then brightness If quantifying unit judges the brightness value of pixel between 0.2 and 0.7, the quantized value of the brightness value of pixel is 0, if brightness V value is between 0.7 and 1, then the quantized value of the brightness value of pixel is 1;If the saturation degree quantifying unit judges pixel Intensity value between 0.2 and 0.65, then the quantized value of the intensity value of pixel be 0, if the intensity value of pixel exists Between 0.65 and 1, then the quantized value of the intensity value of pixel is 1;The tone quantifying unit is entered to the tone value of pixel The non-homogeneous fuzzy quantization processing of row.
Alternatively, color space represents acquisition module, and the pixel of described image is represented to be converted to by RGB color Hsv color space representation, wherein, the span of tone is 0 to 360, and the span of saturation degree is 0 to 1, the value of brightness Scope is 0 to 1.
Alternatively, color feature vector comparison module is special by the color of the color feature vector of described image and other images Levy vector to be compared, described image and other figures are calculated according to the absolute value distance between color feature vector or Euclidean distance The similarity of picture..
An advantage of the present invention is that the judgement mark using the color feature vector after image quantization as image similarity Standard, directly make use of the content information of image, without manually image is described, make image retrieval quicker, color phase The extraction result for closing image is also more accurate.
By referring to the drawings to the detailed description of the exemplary embodiment of the present invention, further feature of the invention and its Advantage will be made apparent from.
Brief description of the drawings
The accompanying drawing for constituting a part for specification describes embodiments of the invention, and is used to solve together with the description Release the principle of the present invention.
Referring to the drawings, according to following detailed description, the present invention can be more clearly understood from, wherein:
Fig. 1 shows the flow chart of one embodiment of the image search method of the present invention.
Fig. 2 shows the general structure and workflow diagram of one embodiment of the image indexing system of the present invention.
Fig. 3 shows the flow chart of an example of the color space conversion of the present invention.
Fig. 4 shows color quantizing main flow chart in one embodiment of the present of invention.
Fig. 5 shows colored area quantization flow chart in one embodiment of the present of invention.
Fig. 6 shows tone fuzzy quantization flow chart in one embodiment of the present of invention.
Fig. 7 shows the structure chart of one embodiment of the image indexing system of the present invention.
Fig. 8 shows the structure chart of another embodiment of the image indexing system of the present invention.
Embodiment
The various exemplary embodiments of the present invention are described in detail now with reference to accompanying drawing.It should be noted that:Unless had in addition Body illustrates that the part and the positioned opposite of step, numerical expression and numerical value otherwise illustrated in these embodiments does not limit this The scope of invention.
Simultaneously, it should be appreciated that for the ease of description, the size of the various pieces shown in accompanying drawing is not according to reality Proportionate relationship draw.
The description only actually at least one exemplary embodiment is illustrative below, never as to the present invention And its any limitation applied or used.
It may be not discussed in detail for technology, method and apparatus known to person of ordinary skill in the relevant, but suitable In the case of, the technology, method and apparatus should be considered as authorizing a part for specification.
In shown here and discussion all examples, any occurrence should be construed as merely exemplary, without It is as limitation.Therefore, the other examples of exemplary embodiment can have different values.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang Yi It is defined, then it need not be further discussed in subsequent accompanying drawing in individual accompanying drawing.
Fig. 1 shows the flow chart of one embodiment of the image search method of the present invention.
As shown in figure 1, step 102, obtains the tone of pixel in image(Hue)H, saturation degree(Saturation)S and bright Degree(Value)V hsv color space representation.The color space of image has many kinds, such as RGB, YIQ, YUV, YCbCr, YES, Also towards color space HIS, HSV, HSL, HSB, TSL for being represented by psychological three attributes of color of tone etc..Hsv color space Represent to realize the quantitative description to color by the way of tone H, saturation degree S and brightness V separation, more precisely reflect Human visual system is preferable to image discrimination to the understanding mode of color.For the image represented by other color spaces, HSV can be converted to by the conversion formula between each color space.Specific conversion realization may refer to relevant technical literature Introduction, for brevity herein without be described in detail.
Step 104, quantification treatment is carried out to the hsv color space representation of pixel in image, acquisition belongs in the range of 0 ~ N Quantized color value, N is natural number, wherein, non-homogeneous fuzzy quantization is carried out to tone h.By quantification treatment, reduce image pixel Dimension represent, be easy to subsequently compare processing.N multiple choices such as taking 36,48,64,108,128,256.
Step 106, the histogram of the quantized color value of statistical picture pixel, place is normalized with the sum of all pixels of image Reason, obtains the color feature vector of image.Using the characteristic vector obtained by above-mentioned processing as the image character representation.
Step 108, the color feature vector of the color feature vector of image and other images is compared to determine figure The similarity of picture.It is for instance possible to use the mode such as Euclidean distance between color feature vector represents similar between two images Degree, it would however also be possible to employ absolute value distance calculates the color correlation of image as the standard of correlation is calculated.
In above-described embodiment, using the color feature vector after image quantization as related criterion, in database Extract the image related to query image color.The content information of image is directly make use of, without manually image is described, Make image indexing system more intelligent, the extraction result of color correlogram picture is also more accurate.By the way of fuzzy quantization pair Tone h carries out quantification treatment, fully takes into account the similitude and continuity of tone h quantization boundaries vicinity color, reduces and quantifies Error.
Fig. 2 shows the workflow diagram of one embodiment of the image indexing system of the present invention.In this embodiment, this is System includes processed offline module 21 and online two modules 22 of processing.
Wherein, processed offline module 21 is responsible for handling the image in database, is each width figure in database As producing corresponding color feature vector, the color feature vector sum image of image is corresponded to together and is stored in data In storehouse.Carry out that when follow-up feature compares the color feature vector of image can be introduced directly into, without image is carried out feature to The reprocessing extracted is measured, to improve the execution speed of system.The workflow of processed offline module 21 includes database images Read 211a, color of image space conversion 212a, color fuzzy quantization processing 213a, color feature 214a and generate color Characteristic vector file.It is specifically described as follows:
Step 211a, database images are read.The title of image in database is obtained, image name list is formed.Can be with The sum M of image included in database is calculated, and distinguishes the image in registration database using 1~M, can also be according to image Other unique marks represent each image.According to mark number, the image in database is read in into processed offline module successively.Read The image entered is for example represented using RGB color in systems.
Step 212a, the conversion of color of image space.Compared to RGB color, HSV can more preferable digitized processing face Color.Color space conversion first is carried out to image before being quantified, HSV space is transformed into by rgb space.Color of image space After converting, each pixel of image is indicated using tone h, saturation degree s and brightness v, wherein h value model The span that the span enclosed for 0 to 360, s is 0 to 1, v is 0 to 1.
Step 213a, the processing of color fuzzy quantization.The color of coloured image is very abundant, and a width rgb image is for example There can be the different color of 256*256*256 kinds, directly carry out amount of calculation during color comparison very big.In view of human eye to face The resolution ratio of color is limited, i.e., in the range of some, and change of the human eye to color is insensitive or even can not perceive, and can use The mode of color quantizing reduces color sum, so as to reduce the dimension of color characteristic, shortens the calculating time that color is compared.Typically For, in visual signature, the difference between color is mainly embodied by the difference of shade of color.To reduce computation complexity, Fuzzy quantization only is carried out to tone h components when carrying out color quantizing, s and v components are handled by the way of directly quantifying. So-called fuzzy quantization is exactly the intersection setting transition region in tone, for given h values, if fallen in transition region, Think that the color quantizing of the pixel has ambiguity, just it is quantified as adding for the several color quantization values related to the transition region Quan He, and then quantified for not falling within the pixel in transition region using the method directly quantified.Face is being carried out to image After color blurring quantification treatment, the span of color value is between 0 ~ N-1 after each pixel quantifies.
Step 214a, color feature.Color value in statistic quantification image is respectively 0 pixel quantity for arriving N-1, And be normalized with the sum of all pixels of image, just form the N-dimensional color feature vector of the image.
Image in database is handled through above-mentioned steps complete after, by the color of image feature description vectors formed and The title of image is saved in database images color feature vector file together, at image completion all in database Reason.Processed offline module is responsible for handling the image in database, is that every piece image in database is produced accordingly Color feature vector, color feature vector sum image is corresponded to together and is stored in database.Carry out follow-up spy The color feature vector of image can be introduced directly into by levying when comparing, without being handled online image, to improve holding for system Scanning frequency degree.
Online processing module 22 is responsible for obtaining query image from terminal, color is formed after being handled query image special Description vectors are levied, are compared with the color feature vector of image in database, are chosen and query image color from database Similitude highest image, and final result is shown to terminal.The workflow of line processing module 22 is obtained including query image 211b, color of image space conversion 212b, color fuzzy quantization processing 213b, color feature 214b, feature compare 215 and Extract result and show 216, be described in detail as follows:
Step 211b, query image is obtained.Image is obtained from terminal, online processing module is read in.The image of reading is being For example it is indicated in system using RGB color.
Step 212b, color of image space conversion, HSV space is transformed into by rgb space.Color of image space is converted Afterwards, each pixel of image is indicated using tone h, saturation degree s and brightness v, and wherein h span arrives for 0 The span that 360, s span is 0 to 1, v is 0 to 1.
Step 213b, the processing of color fuzzy quantization.According to the color attribute in hsv color space, mould is carried out to tone h components Paste quantifies, s and v components are handled by the way of directly quantifying.After color fuzzy quantization processing is carried out to image, often The span of color value is between 0 ~ N-1 after one pixel quantifies.
Step 214b, color feature.Color value in statistic quantification image is respectively 0 pixel quantity for arriving N-1, and It is normalized with the sum of all pixels of image, forms the query image color feature vector of N-dimensional.
Step 215, feature compares.The database images color feature vector file generated in off-line module is read in, It is compared using the query image color feature of acquisition is vectorial with the file, calculating phase is used as using absolute value distance The standard of closing property, calculates the color correlation per piece image in query image and database.
Step 216, color correlogram picture is extracted, result is carried out and shows.To the query image and data obtained in step 215 Color correlation in storehouse per piece image is ranked up from big to small, chooses the former width images of correlation highest, and in number According to the title that these images are obtained in the color of image feature description vectors file of storehouse.According to title, transferred from database corresponding Image and be sent to terminal carry out extract result show.
In above-described embodiment, system is handled the image in database images by processed offline module, is data Every piece image in storehouse generates corresponding color feature vector, and the title of the vector sum image is saved in into number together According in the color of image feature description vectors file of storehouse., can be with when carrying out color correlogram picture using query image and extracting operation Directly read in database images color feature vector file and carry out Characteristic Contrast, without being located online to database images Reason, can effectively improve the execution speed of system.
In one embodiment, it is 36 kinds of color values by Color Image Quantization in hsv color space, and utilizes Fuzzy Control System eliminates the quantization error that is caused by border discontinuity, statistical picture quantify after color histogram, as color characteristic from The image related to query image color is extracted in database.
With reference to introducing key step therein exemplified by Fig. 3 to Fig. 6.
Fig. 3 shows the flow chart of an example of the color space conversion of the present invention, and the key step of conversion is as follows:
Step 3a, brightness v conversion.Value to tri- passages of pixel R, G, B is compared, and is chosen in three passages Maximum, carries out normalizing calculating, you can obtain the value of brightness v in HSV space using 255 as the normalized parameter of brightness, its Span is between 0 to 1.
Step 3b, saturation degree s conversion.In the picture, its R, G, B tri- channel values are calculated each pixel respectively Sum, choose sum maximum be used as saturation degree normalized parameter.When calculating the saturation degree s of single pixel point, choosing should Maximum and minimum value in tri- channel values of pixel R, G, B, normalizing is carried out to their official post with above-mentioned normalized parameter Calculate, you can obtain the value of saturation degree s in HSV space, its span is between 0 to 1.
Step 3c, tone h conversion.Tone h value is angle of the span between 0 to 360 in HSV space Degree, is drawn by carrying out arc cosine computing to the parameter being made up of tri- channel values of R, G, B.If the channel B value of pixel Less than or equal to G channel values, it is the value that can obtain tone h in HSV space that arc cosine computing is directly carried out to the parameter.If pixel The channel B value of point is more than G channel values, then needs to subtract the result for carrying out arc cosine computing with 360 and just can obtain color in HSV space Adjust h value.
It may be noted that step 3a, 3b and 3c can be performed sequentially or parallel processing, the order between each step It is not restricted.
The color of coloured image is very abundant, and a width rgb image can just have 256*256*256 kinds different Color, directly carries out amount of calculation during color comparison very big.It is limited to the resolution ratio of color in view of human eye, i.e., at some In the range of, change of the human eye to color is insensitive or even can not perceive, and the mode of color quantizing can be used to reduce color sum, So as to reduce the dimension of color characteristic, shorten the calculating time that color is compared.In general, in visual signature, between color Difference mainly embodied by the difference of shade of color.To reduce computation complexity, only tone h is divided when carrying out color quantizing Amount carries out fuzzy quantization, s and v components are handled by the way of directly quantifying.
Fig. 4 shows color quantizing main flow chart in one embodiment of the present of invention, and the key step of color quantizing is as follows:
Step 401, judge whether brightness v value is less than 0.2;If brightness v value is less than 0.2, then it represents that the pixel The brightness of color is very low, and the pixel in interval is in black region herein, and the color value I after quantization is represented with 0(Step 402);If brightness v value is more than or equal to 0.2, continue step 403.
Step 403, judge whether saturation degree s is less than 0.2;If saturation degree s value is more than or equal to 0.2, represent in this area Interior pixel is in colored region, and the color value I after quantization is added by following brightness v, saturation degree s and tone h quantized value Power is drawn(Step 407), the acquisition of quantized color value in colored region is specifically introduced later referring to Fig. 5.If saturation degree s value Less than 0.2, then continue step 404.
Step 404, judge whether brightness v value is less than 0.8;If brightness v value is less than 0.8, then it represents that interval herein Interior pixel is in gray area, and brightness v is bigger, and grey is more shallow, the color value I after quantization by brightness v 10 demultiplications 1 And the value after rounding downwards is indicated(Step 405);If brightness v value is more than 0.8, the pixel in interval herein is represented Color value I after white portion, quantization is represented with 7(Step 406).Fig. 5 describes colored region one example of quantization Flow chart.
As shown in figure 5, step 501, luminance quantization.If brightness v value is between 0.2 and 0.7, its quantized value is 0;If Brightness v value is between 0.7 and 1, then its quantized value is 1.
Step 502, saturation metrization.If saturation degree s value is between 0.2 and 0.65, its quantized value is 0;If saturation S value is spent between 0.65 and 1, then its quantized value is 1.
Step 503, tone quantifies.Because general color space is for human eye perception and uneven, in order to more preferable Meet human visual experience, to tone h components carry out quantization use non-homogeneous fuzzy quantization, be situated between in detail later in conjunction with Fig. 6 The one kind of tone h element quantizations of continuing is implemented.
Step 504, quantized color value I is obtained by h, s, v quantized value weighting:
I=4H+2S+V+8 (1)
Wherein, I is quantized color value, and H is the quantized value of tone, and S is the quantized value of saturation degree, and V is the quantized value of brightness.
Fig. 6 is described in the flow chart of an example of tone fuzzy quantization, the example, quantized color value value 0 ~ 35. Specific step is as follows:
Step 601, quantization boundary is set:Choose 22,45,70,155,186,278,330 as tone h quantization boundary.
Step 602, set and quantify edge transitional region:Set on the both sides of the quantization boundary of selection and quantify edge transitional region. Range size between the size of transition region and two adjacent quantization borders is directly proportional.
Step 603, transition region membership function is obtained:It is distributed according to ridge type, tries to achieve the degree of membership that tone h belongs to transition region Function.All it is 0.5 for the membership function in adjacent twoth area in the tone h of boundary.
Step 604, judge whether the hue h value of pixel falls in transition regionIf it is, continue step 605, it is no Then, step 606 is continued.
Step 605, if the hue h value of pixel falls in transition region, then it is assumed that the color quantizing of the pixel exists fuzzy Property, is just quantified as it weighted sum of two color quantization value related to the transition region, and weighted value is to try to achieve in step 603 Membership function value.So the quantized value on border both sides all generates influence to current quantisation value.
Step 606, if the hue h value of pixel falls outside transition region, then it is assumed that mould is not present in the color quantizing of the pixel Paste property, directly finds corresponding quantized value according to tone h value.
After color fuzzy quantization processing is carried out to image, the span of color value exists after each pixel quantifies Between 0 ~ 35.Color value in statistic quantification image is respectively 0 to 35 pixel quantity, and returned with the sum of all pixels of image One change is handled, and just forms 36 dimension color feature vectors of the image.
The side that a kind of treated color characteristic of use fuzzy quantization carries out associated picture extraction is provided in above-described embodiment Method, overcomes the shortcoming and defect of the image retrieval technologies based on text marking, is used to help people fast and accurately from Large Copacity The image related to query image color is extracted in image library.
Fig. 7 shows the structure chart of one embodiment of the image indexing system of the present invention.As shown in fig. 7, the image retrieval System includes:Color space represents acquisition module 71, for obtaining the tone of pixel in image, saturation degree and the HSV of brightness face The colour space is represented;Color space represents quantization modules 72, is carried out for the hsv color space representation to pixel in image at quantization Reason, obtains the quantized color value belonged in the range of 0 ~ N, N is natural number, wherein, non-homogeneous fuzzy quantization is carried out to tone value;Face Color characteristic vector acquisition module 73, for the histogram of the quantized color value of statistical picture pixel, is entered with the sum of all pixels of image Row normalized, obtains the color feature vector of image;Color feature vector comparison module 74, for the color of image is special Levy the similarity that the vectorial color feature vector with other images is compared to determine image.In one embodiment, color Space representation acquisition module, the pixel of image is represented by RGB color to be converted to hsv color space representation, wherein, tone Span be 0 to 360, the span of saturation degree is 0 to 1, and the span of brightness is 0 to 1.
Fig. 8 shows the structure chart of another embodiment of the image indexing system of the present invention.In this embodiment, color is empty Between represent quantization modules 82 include:Luminance quantization unit 822, for carrying out quantifying to obtain luminance quantization value to brightness value;Saturation Metrization unit 823, for carrying out quantifying to obtain saturation degree quantized value to intensity value;Tone quantifying unit 824, for color Tone pitch carries out non-homogeneous fuzzy quantization and obtains tone quantized value;Quantized color value determining unit 821, for the brightness according to pixel Value, intensity value and luminance quantization value, saturation degree quantized value and tone quantized value determine the amount of the pixel belonged in the range of 0 ~ N Change color value.
In one embodiment, tone quantifying unit sets transition region in the intersection of tone, if tone value falls in mistake Cross in area, then tone value is quantified as to the weighted sum of the color quantization value related to transition region, if tone value was not fallen within Cross in area, then tone value is directly quantified.For example, tone quantifying unit is used for the multiple quantization boundaries for setting tone;Quantifying The both sides on border, which are set, quantifies edge transitional region, and the range size between the size of transition region and two adjacent quantization borders is into just Than;The membership function of transition region is obtained, is distributed according to ridge type, tries to achieve the membership function value that tone value belongs to transition region;Such as The tone value of fruit pixel falls in transition region, then the tone value of pixel is quantified as two colors related to the transition region The weighted sum of quantized value, weighted value is membership function value;If the tone value of pixel falls outside transition region, direct basis Tone value determines corresponding quantized value.In one embodiment, N is 36, quantization boundary include 22,45,70,155,186,278, 330。
In one embodiment, if quantized color value determining unit judges that the brightness value of pixel is less than 0.2, pixel Quantized color value value be 0;If the brightness value of pixel is more than or equal to 0.8, the value of saturation degree is less than 0.2, then pixel Quantized color value value is 7;If the brightness value of pixel is between 0.2 and 0.8, the value of saturation degree is less than 0.2, then pixel 10 demultiplications 1 of the quantized color value value for brightness value and the value after rounding downwards;If the brightness value of pixel is more than or equal to 0.2, Saturation degree s value is more than or equal to 0.2, then the quantized color value of pixel is obtained the luminance quantization of pixel by luminance quantization unit The weighting that value, saturation degree quantifying unit obtain the tone quantized value that saturation degree quantized value and tone quantifying unit are obtained obtains pixel The quantized color value of point.If the brightness value of pixel is more than or equal to 0.2, the value of saturation degree is more than or equal to 0.2, then luminance quantization list If member judges the brightness value of pixel between 0.2 and 0.7, the quantized value of the brightness value of pixel is 0, if brightness v value Between 0.7 and 1, then the quantized value of the brightness value of pixel is 1;If saturation degree quantifying unit judges the intensity value of pixel Between 0.2 and 0.65, then the quantized value of the intensity value of pixel be 0, if the intensity value of pixel 0.65 and 1 it Between, then the quantized value of the intensity value of pixel is 1;Tone quantifying unit carries out non-homogeneous fuzzy quantity to the tone value of pixel Change is handled.
Embodiments of the invention are using the color feature vector after image quantization as related basis for estimation, in database The image related to query image color is extracted, makes image indexing system more intelligent, the extraction result of color correlogram picture It is more accurate.The image in database images is handled in advance by using off-line module, is effectively improved and performs speed Degree.
So far, the image search method and system according to the present invention is described in detail.In order to avoid the masking present invention Design, some details known in the field are not described.Those skilled in the art as described above, completely can be with bright How to implement technical scheme disclosed herein in vain.
The method and system of the present invention may be achieved in many ways.For example, can by software, hardware, firmware or Software, hardware, firmware any combinations come realize the present invention method and system.The said sequence of the step of for method is only Order described in detail above is not limited in order to illustrate, the step of method of the invention, is especially said unless otherwise It is bright.In addition, in certain embodiments, the present invention can be also embodied as recording to program in the recording medium, these programs include Machine readable instructions for realizing the method according to the invention.Thus, the present invention also covering storage is used to perform according to this hair The recording medium of the program of bright method.
Although some specific embodiments of the present invention are described in detail by example, the skill of this area Art personnel are it should be understood that above example is merely to illustrate, the scope being not intended to be limiting of the invention.The skill of this area Art personnel to above example it should be understood that can modify without departing from the scope and spirit of the present invention.This hair Bright scope is defined by the following claims.

Claims (14)

1. a kind of image search method, it is characterised in that including:
Obtain tone, saturation degree and the brightness hsv color space representation of pixel in image;
Quantification treatment is carried out to the hsv color space representation of pixel in described image, the quantization face belonged in the range of 0~N is obtained Colour, N is natural number, wherein, non-homogeneous fuzzy quantization is carried out to tone value;
The histogram of the quantized color value of described image pixel is counted, is normalized with the sum of all pixels of described image, Obtain the color feature vector of described image;
The color feature vector of described image is compared to determine the similar of image to the color feature vector of other images Degree;
It is described that the non-homogeneous fuzzy quantization of tone value progress is included:
Multiple quantization boundaries of tone are set;
Set on the both sides of the quantization boundary and quantify edge transitional region, the size of the transition region and two adjacent quantization borders Between range size be directly proportional;
The membership function of the transition region is obtained, is distributed according to ridge type, tries to achieve the membership function that tone value belongs to transition region Value;
If the tone value of pixel falls in the transition region, the tone value of the pixel is quantified as and the transition The weighted sum of two related color quantization values of area, weighted value is membership function value;
If the tone value of pixel falls outside transition region, corresponding quantized value is determined according to tone value.
2. according to the method described in claim 1, it is characterised in that described that the non-homogeneous fuzzy quantization of tone value progress is included:
Transition region is set in the intersection of tone, if tone value falls in the transition region, the tone value be quantified as The weighted sum of the color quantization value related to the transition region is right if the tone value is not fallen within the transition region The tone value directly quantifies.
3. according to the method described in claim 1, it is characterised in that the N is 36, the quantization boundary includes 22,45,70, 155、186、278、330。
4. according to the method described in claim 1, it is characterised in that also include:
The pixel of described image is represented by RGB RGB color to be converted to hsv color space representation, wherein, tone Span is 0 to 360, and the span of saturation degree is 0 to 1, and the span of brightness is 0 to 1.
5. method according to claim 4, it is characterised in that the hsv color spatial table to pixel in described image Show that progress quantification treatment obtains the quantized color value belonged in the range of 0~N and included:
If the brightness value of pixel is less than 0.2, the quantized color value value of pixel is 0;
If the brightness value of pixel is more than or equal to 0.8, the value of saturation degree is less than 0.2, then the quantized color value value of pixel is 7;
If the brightness value of pixel is between 0.2 and 0.8, the value of saturation degree is less than 0.2, then the quantized color value value of pixel 10 demultiplications 1 for brightness value and the value after rounding downwards;
If the brightness value of pixel is more than or equal to 0.2, the value of saturation degree is more than or equal to 0.2, then the quantized color value of pixel by The brightness value of pixel, the quantized value weighting of intensity value and tone value are obtained.
6. method according to claim 5, it is characterised in that if the brightness value of the pixel is more than or equal to 0.2, saturation The value of degree is more than or equal to the quantized color value of 0.2, pixel by the quantized value of the brightness value of pixel, intensity value and tone value Weighting is included:
If the brightness value of pixel is between 0.2 and 0.7, the quantized value of the brightness value of pixel is 0;If brightness v value exists Between 0.7 and 1, then the quantized value of the brightness value of pixel is 1;
If the intensity value of pixel is between 0.2 and 0.65, the quantized value of the intensity value of pixel is 0;If pixel Intensity value between 0.65 and 1, then the quantized value of the intensity value of pixel be 1;
Non-homogeneous fuzzy quantization processing is carried out to the tone value of pixel;
The quantized color value of pixel is obtained by the quantized value weighting of the tone value of pixel, intensity value and brightness value:
I=4H+2S+V+8
Wherein, I is quantized color value, and H is the quantized value of tone, and S is the quantized value of saturation degree, and V is the quantized value of brightness.
7. according to the method described in claim 1, it is characterised in that the color feature vector by described image and other figures The color feature vector of picture, which is compared to determine similar image, to be included:
The color feature vector of the color feature vector of described image and other images is compared, according to color feature vector Between absolute value distance or Euclidean distance calculate the similarities of described image and other images.
8. a kind of image indexing system, it is characterised in that including:
Color space represents acquisition module, for obtaining the tone of pixel in image, saturation degree and brightness hsv color spatial table Show;
Color space represents quantization modules, carries out quantification treatment for the hsv color space representation to pixel in described image, obtains The quantized color value that must belong in the range of 0~N, N is natural number, wherein, non-homogeneous fuzzy quantization is carried out to tone value;
Color feature vector acquisition module, the histogram of the quantized color value for counting described image pixel, uses described image Sum of all pixels be normalized, obtain described image color feature vector;
Color feature vector comparison module, for by the color feature vector of the color feature vector of described image and other images It is compared to determine the similarity of image;
The color space represents that quantization modules include:
Luminance quantization unit, for carrying out quantifying to obtain luminance quantization value to brightness value;
Saturation degree quantifying unit, for carrying out quantifying to obtain saturation degree quantized value to intensity value;
Tone quantifying unit, tone quantized value is obtained for carrying out non-homogeneous fuzzy quantization to tone value;
Quantized color value determining unit, for the brightness value according to pixel, intensity value and the luminance quantization value, saturation degree Quantized value and tone quantized value determine the quantized color value of the pixel belonged in the range of 0~N;
The tone quantifying unit is used for the multiple quantization boundaries for setting tone;Set on the both sides of the quantization boundary and quantify side Boundary's transition region, the range size between the size of the transition region and two adjacent quantization borders is directly proportional;Obtain the transition The membership function in area, is distributed according to ridge type, tries to achieve the membership function value that tone value belongs to transition region;If the color of pixel Tone pitch falls in the transition region, then the tone value of the pixel is quantified as two color quantizations related to the transition region The weighted sum of value, weighted value is membership function value;If the tone value of pixel falls outside transition region, directly according to tone Value determines corresponding quantized value.
9. system according to claim 8, it is characterised in that the tone quantifying unit was set in the intersection of tone Area is crossed, if tone value falls in the transition region, the tone value is quantified as to the color amount related to the transition region The weighted sum of change value, if the tone value is not fallen within the transition region, directly quantifies to the tone value.
10. system according to claim 8, it is characterised in that the N is 36, the quantization boundary includes 22,45,70, 155、186、278、330。
11. system according to claim 8, it is characterised in that if the quantized color value determining unit judges pixel Brightness value be less than 0.2, then the quantized color value value of pixel be 0;If the brightness value of pixel is more than or equal to 0.8, saturation The value of degree is less than 0.2, then the quantized color value value of pixel is 7;If the brightness value of pixel is between 0.2 and 0.8, saturation The value of degree is less than 0.2, then 10 demultiplications 1 of the quantized color value value of pixel for brightness value and the value after rounding downwards;If picture The brightness value of vegetarian refreshments is more than or equal to 0.2, and saturation degree s value is more than or equal to 0.2, then the quantized color value of pixel is by the brightness Quantifying unit obtains the luminance quantization value of pixel, the saturation degree quantifying unit and obtains saturation degree quantized value and the amount of tones The weighting for changing the tone quantized value that unit is obtained obtains the quantized color value of pixel.
12. system according to claim 11, it is characterised in that if the brightness value of pixel is more than or equal to 0.2 and saturation The value of degree is more than or equal to 0.2, if then the brightness value of the luminance quantization unit judges pixel is between 0.2 and 0.7, pixel The quantized value of the brightness value of point is 0, if brightness v value is between 0.7 and 1, and the quantized value of the brightness value of pixel is 1;Institute If stating the intensity value of saturation degree quantifying unit judgement pixel between 0.2 and 0.65, the amount of the intensity value of pixel Change value is 0, if the intensity value of pixel is between 0.65 and 1, and the quantized value of the intensity value of pixel is 1;The color Quantifying unit is adjusted to carry out non-homogeneous fuzzy quantization processing to the tone value of pixel.
13. system according to claim 8, it is characterised in that the color space represents acquisition module, by described image Pixel represented to be converted to hsv color space representation by RGB RGB color, wherein, the span of tone arrives for 0 360, the span of saturation degree is 0 to 1, and the span of brightness is 0 to 1.
14. system according to claim 8, it is characterised in that the color feature vector comparison module is by described image The color feature vector of color feature vector and other images be compared, according to the absolute value distance between color feature vector Or Euclidean distance calculates described image and the similarity of other images.
CN201210365623.XA 2012-09-27 2012-09-27 Image color retrieval method and system Active CN103699532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210365623.XA CN103699532B (en) 2012-09-27 2012-09-27 Image color retrieval method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210365623.XA CN103699532B (en) 2012-09-27 2012-09-27 Image color retrieval method and system

Publications (2)

Publication Number Publication Date
CN103699532A CN103699532A (en) 2014-04-02
CN103699532B true CN103699532B (en) 2017-08-25

Family

ID=50361063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210365623.XA Active CN103699532B (en) 2012-09-27 2012-09-27 Image color retrieval method and system

Country Status (1)

Country Link
CN (1) CN103699532B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105488510B (en) * 2015-11-20 2019-01-15 上海华力创通半导体有限公司 The construction method and its system of the color histogram of static images
CN105913460A (en) * 2015-11-26 2016-08-31 乐视致新电子科技(天津)有限公司 Skin color detection method and device
CN105740789B (en) * 2016-01-26 2018-12-07 浙江捷尚视觉科技股份有限公司 A kind of video object search method based on color characteristic
CN106599185B (en) * 2016-12-14 2020-10-23 北京微智信业科技有限公司 HSV-based image similarity identification method
CN108804475B (en) * 2017-05-05 2021-07-16 北京京东尚科信息技术有限公司 Method and device for searching color similar picture
CN107358635B (en) * 2017-07-19 2020-11-03 辽宁工程技术大学 Color morphological image processing method based on fuzzy similarity
CN108279238A (en) * 2018-01-30 2018-07-13 深圳春沐源控股有限公司 A kind of fruit maturity judgment method and device
CN110647910A (en) * 2019-08-12 2020-01-03 浙江浩腾电子科技股份有限公司 Image similarity calculation method based on color quantization
CN110533622B (en) * 2019-08-27 2022-03-25 辽宁东智威视科技有限公司 Automatic parameter configuration method in picture synthesis
CN110728722B (en) * 2019-09-18 2022-08-02 苏宁云计算有限公司 Image color migration method and device, computer equipment and storage medium
CN110717444A (en) * 2019-10-09 2020-01-21 北京明略软件系统有限公司 Lipstick number identification method and device
CN113096149B (en) * 2019-12-23 2023-11-10 北矿机电科技有限责任公司 Shaking table ore belt segmentation method based on three color elements
CN113127670A (en) * 2019-12-31 2021-07-16 飞书数字科技(上海)有限公司 Method, device, storage medium and processor for searching target color
CN111787671A (en) * 2020-07-15 2020-10-16 江门市征极光兆科技有限公司 Control method based on movie and television picture synchronous light atmosphere
CN114638826B (en) * 2022-05-13 2022-10-28 河南银金达新材料股份有限公司 Method for detecting optical fatigue degree of photochromic barrier film
CN115830352B (en) * 2023-02-20 2023-06-02 深圳中微电科技有限公司 Image similarity comparison method, device and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763429A (en) * 2010-01-14 2010-06-30 中山大学 Image retrieval method based on color and shape features

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8488901B2 (en) * 2007-09-28 2013-07-16 Sony Corporation Content based adjustment of an image

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763429A (en) * 2010-01-14 2010-06-30 中山大学 Image retrieval method based on color and shape features

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于颜色特征的图像检索技术研究";于仕;《中国优秀硕士学位论文全文数据库(信息科技辑)》;20120315(第03期);论文第2.1节、第2.3.1节、第4.2节、第4.3.1节、第4.3.2节、第4.4.2节、图2.1 *

Also Published As

Publication number Publication date
CN103699532A (en) 2014-04-02

Similar Documents

Publication Publication Date Title
CN103699532B (en) Image color retrieval method and system
Wang et al. Fuzzy-based algorithm for color recognition of license plates
Chaves-González et al. Detecting skin in face recognition systems: A colour spaces study
WO2019100282A1 (en) Face skin color recognition method, device and intelligent terminal
CN109344701A (en) A kind of dynamic gesture identification method based on Kinect
CN104732200B (en) A kind of recognition methods of skin type and skin problem
US20100172578A1 (en) Detecting skin tone in images
US9075876B2 (en) Search method for video clip
CN112906550B (en) Static gesture recognition method based on watershed transformation
CN107545049A (en) Image processing method and related product
Jun et al. Face detection based on LBP
CN109920018A (en) Black-and-white photograph color recovery method, device and storage medium neural network based
CN114972847A (en) Image processing method and device
CN110956184A (en) Abstract diagram direction determination method based on HSI-LBP characteristics
Chang et al. Deformed trademark retrieval based on 2D pseudo-hidden Markov model
CN112529914B (en) Real-time hair segmentation method and system
CN113052194A (en) Garment color cognition system based on deep learning and cognition method thereof
Garg et al. Color based segmentation using K-mean clustering and watershed segmentation
Tan et al. Gesture segmentation based on YCb'Cr'color space ellipse fitting skin color modeling
CN111738964A (en) Image data enhancement method based on modeling
CN115063800B (en) Text recognition method and electronic equipment
Cao et al. A skin detection algorithm based on Bayes decision in the YCbCr color space
CN103871084B (en) Indigo printing fabric pattern recognition method
CN115272923B (en) Intelligent identification method and system based on big data platform
CN105825161A (en) Image skin color detection method and system thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant