CN103544716B - A kind of pixel to image carries out method and the device of color classification - Google Patents

A kind of pixel to image carries out method and the device of color classification Download PDF

Info

Publication number
CN103544716B
CN103544716B CN201310528711.1A CN201310528711A CN103544716B CN 103544716 B CN103544716 B CN 103544716B CN 201310528711 A CN201310528711 A CN 201310528711A CN 103544716 B CN103544716 B CN 103544716B
Authority
CN
China
Prior art keywords
pixel
value
subset
image
predetermined threshold
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
CN201310528711.1A
Other languages
Chinese (zh)
Other versions
CN103544716A (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.)
Shantou North Financial Technology Co.,Ltd.
Original Assignee
North Capital Infotech Share Co 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 North Capital Infotech Share Co Ltd filed Critical North Capital Infotech Share Co Ltd
Priority to CN201310528711.1A priority Critical patent/CN103544716B/en
Publication of CN103544716A publication Critical patent/CN103544716A/en
Application granted granted Critical
Publication of CN103544716B publication Critical patent/CN103544716B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Color Image Communication Systems (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses method and device that a kind of pixel to image carries out color classification, method comprises: the YCbCr value obtaining each pixel in image, obtains the expectation value of the absolute value of the difference of Cb and the Cr of each pixel in described image as first threshold; The absolute value filtering out the difference of Cb and the Cr of pixel from described image is greater than the pixel of described first threshold as screening set of pixels; Obtain the expectation value of the standard deviation of the rgb value of each pixel in described screening set of pixels as Second Threshold; Be monochrome pixels collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is less than described Second Threshold, be colour element collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is more than or equal to described Second Threshold, the Fast Classification of the pixel included by image being carried out to monochrome pixels and colour element can be realized.

Description

A kind of pixel to image carries out method and the device of color classification
Technical field
The present invention relates to Computer Applied Technology field, be specifically related to technical field of image processing, particularly relate to method and device that a kind of pixel to image carries out color classification.
Background technology
Along with the develop rapidly that national information is built, the enterprises and institutions such as government bodies, customs, the tax, bank, insurance are by utilizing scanner, paper document (such as receipt, invoice, contract, document, design drawing, architectural drawing etc.) is converted into electronic image, and carry out storing, transmit and automatically identifying, improve work efficiency, reduce cost, improve service level, also create a large amount of images thus.Mainly word is comprised to these images, signature, the parts such as seal and blank, there is picture material simple, the feature of the less grade of color category, carry out reasonably carrying out color classification to the pixel of image to pixel included in these images, particularly distinguish monochrome pixels and colour element, can be used for the many aspects of image procossing, such as can be applicable to financial sector (bank, insurance etc.) bill, the drawing of engineering field, the compression of the images such as the circuit diagram of electronic applications, identify and classification, and color of image coupling can be widely used in, image enhaucament, the field such as image co-registration and image rectification.
Such as, carry out reasonably carrying out color classification to the pixel of image to pixel included in image, can be used for carrying out image recognition according to the pixel of same class color, the pixel being such as pink group according to color in bill identifies seal designs, signature etc. is identified according to the pixel that color is black class, and for example by video camera real-time grasp shoot with after the vehicle static image obtaining high-resolution, by the pixel included by this still image is carried out to the pixel of image carry out color classification can obtain from this still image accurately vehicle-related information (as the number-plate number, vehicle feature, vehicle brand, or body color etc.).Wherein, as the body color of pith in information of vehicles, jointly or individually multiple occasion can be widely used in out of Memory (such as the number-plate number) by after the technical limit spacing vehicle body image that the pixel of image carried out to color classification, such as search loss vehicle, investigate and prosecute violating the regulations or vehicle, and assist vehicle to steal the detection etc. of robbing case.
And for example, carry out reasonably carrying out color classification to the pixel of image to pixel included in image, can be used for according to the pixel of image is carried out color classification to come in filtering image variegated, so that improve image compression rate etc. when carrying out compression of images, thus can effectively save hardware store cost, reduce Internet Transmission occupied bandwidth, improve transmission speed, promote work efficiency.
This method of classification realizing color by the mode of artificial intelligence (as neural metwork training) in prior art needs to train sorter, require that there is suitable training sample set, the quantity of sample set and choose whether appropriately directly affect last classification and the accuracy of recognition result, and, be difficult to the sample set obtaining representative some in some cases, this just causes the limitation of the method, in addition, this sorting technique, need first to set up training pattern, then train, finally carry out classifying and identifying.This mode overall process complexity is high, and speed is slow.
Summary of the invention
In view of this, a kind of method that the embodiment of the present invention provides pixel to image to carry out color classification and device, carry out the Fast Classification of monochrome pixels and colour element to the pixel included by image.
The embodiment of the present invention is by the following technical solutions:
First aspect, embodiments provides a kind of method that pixel to image carries out color classification, comprising:
Obtain the YCbCr value of each pixel in image, obtain the expectation value of the absolute value of the difference of Cb and the Cr of each pixel in described image as first threshold;
The absolute value filtering out the difference of Cb and the Cr of pixel from described image is greater than the pixel of described first threshold as screening set of pixels;
Obtain the expectation value of the standard deviation of the rgb value of each pixel in described screening set of pixels as Second Threshold;
Being monochrome pixels collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is less than described Second Threshold, is colour element collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is more than or equal to described Second Threshold.
Second aspect, the embodiment of the present invention additionally provides the device that a kind of pixel to image carries out color classification, comprising:
First threshold acquiring unit, for obtaining the YCbCr value of each pixel in image, obtains the expectation value of the absolute value of the difference of Cb and the Cr of each pixel in described image as first threshold;
Screening set of pixels acquiring unit, the absolute value for the difference filtering out Cb and the Cr of pixel from described image is greater than the pixel of described first threshold as screening set of pixels;
Second Threshold acquiring unit, for obtaining the expectation value of the standard deviation of the rgb value of each pixel in described screening set of pixels as Second Threshold;
Taxon, being monochrome pixels collection for the standard deviation of the rgb value of pixel in described image being less than the pixel classifications of described Second Threshold, is colour element collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is more than or equal to described Second Threshold.
The Advantageous Effects of the technical scheme that the embodiment of the present invention proposes is:
The technical scheme that the embodiment of the present invention proposes is greater than the expectation value of the absolute value of the difference of Cb and the Cr of all pixels in described image as screening set of pixels by the absolute value of the difference filtering out Cb and the Cr of pixel from image; Obtain the expectation value of the standard deviation of the rgb value of each pixel in described screening set of pixels as Second Threshold; Being monochrome pixels collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is less than described Second Threshold, is colour element collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is more than or equal to described Second Threshold.The Fast Classification of the pixel included by image being carried out to monochrome pixels and colour element can be realized.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing the embodiment of the present invention is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to the content of the embodiment of the present invention and these accompanying drawings.
Fig. 1 is the method flow diagram that the pixel to image described in the specific embodiment of the invention one carries out color classification;
Fig. 2 is the overall schematic that the pixel to image described in the specific embodiment of the invention two carries out color classification;
Fig. 3 is the method flow diagram that the pixel to image described in the specific embodiment of the invention two carries out color classification;
Fig. 4 is the result schematic diagram that the pixel to image described in the specific embodiment of the invention two carries out color classification;
Fig. 5 is the structured flowchart that the pixel to image described in the specific embodiment of the invention three carries out the device of color classification.
Embodiment
The technical matters solved for making the present invention, the technical scheme of employing and the technique effect that reaches are clearly, be described in further detail below in conjunction with the technical scheme of accompanying drawing to the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those skilled in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Technical scheme of the present invention is further illustrated by embodiment below in conjunction with accompanying drawing.
Embodiment one
The method that the pixel to image that the embodiment of the present invention provides carries out color classification can be applicable to the compression of the image such as bill, the drawing of engineering field, the circuit diagram of electronic applications of financial sector (such as bank, insurance etc.), identification and classification, and can be widely used in the fields such as color of image coupling, image enhaucament, image co-registration and image rectification.It is few that the content of original image has color category, nominal value background color is single, mostly be white, based on the feature such as word and red seal, the color space of original image can be random color space, includes but not limited to RGB color space, YUV color space, HSL color space, YCbCr color space, hsv color space.
Fig. 1 is the method flow diagram that the pixel to image described in the present embodiment carries out color classification, and as shown in Figure 1, the method that the pixel to image described in the present embodiment carries out color classification comprises:
In S101, acquisition image, the YCbCr value of each pixel, obtains the expectation value of the absolute value of the difference of Cb and the Cr of each pixel in described image as first threshold.
YCbCr is called YCC sometimes.YCbCr applies maximum members in computer systems, which, and its application is very extensive, and JPEG, MPEG all adopt this form.YCbCr has many sampling forms, as 4:4:4,4:2:2,4:1:1 and 4:2:0.In YCbCr, Y refers to luminance component, and Cb refers to chroma blue component, and Cr refers to red chrominance component.YCbCr is in the consumer video products such as DVD, video camera, Digital Television, conventional color-coded scheme.
If original image is not the image of the YCbCr color color space, then original image is carried out space transforming, be transformed into YCbCr color space.
If original image is RGB color space, be 0-255 for the scope of the value of each component of RGB and YCbCr, such as, being YCbCr color space by original image by RGB color space conversion is:
Y C b C r = 16 128 128 + ( 1 / 256 ) * 65.738 129.057 25.06 - 37.945 - 74.494 112.43 112.439 - 94.154 - 18.28 * R G B
That is:
Y=0.257*R+0.564*G+0.098*B+16
Cb=-0.148*R-0.291*G+0.439*B+128
Cr=0.439*R-0.368*G-0.071*B+128
Obtain the expectation value of the absolute value of the difference of Cb and the Cr of each pixel in described image as first threshold.
S102, the absolute value filtering out the difference of Cb and the Cr of pixel from described image are greater than the pixel of described first threshold as screening set of pixels.
In YCbCr color space, the absolute value of the difference of Cb and Cr is greater than the pixel extraction of described first threshold out, is designated as screening set of pixels.
S103, obtain the expectation value of standard deviation of the rgb value of each pixel in described screening set of pixels as Second Threshold.
If original image is the image of RGB color space, then obtain the rgb value of each pixel in screening set of pixels, if original image is the image of YCbCr color space, then in described screening set of pixels, each pixel is RGB color space by YCbCr color space conversion.Obtain the expectation value of the standard deviation of the rgb value of each pixel in described screening set of pixels again, using described expectation value as Second Threshold.
If original image is YCbCr color space, be 0-255 for the scope of the value of each component of RGB and YCbCr, such as, being RGB color space by original image by YCbCr color space conversion is:
R G B = ( 1 / 256 ) * 298.082 0 408.58 298.082 - 100.291 - 208.12 298.082 561.411 0 * Y - 16 C b - 128 C b - 128
That is:
R=1.164*(Y-16)+1.596*(Cr-128)
G=1.164*(Y-16)-0.392*(Cb-128)-0.813*(Cr-128)
B=1.164*(Y-16)+2.017*(Cb-128)
For the rgb value of pixel, the computing formula of the standard deviation of each pixel is:
σ = 1 3 [ ( R - μ ) 2 + ( G - μ ) 2 + ( B - μ ) 2 ]
Wherein μ=(R+G+B)/3;
S104, the pixel classifications standard deviation of the rgb value of pixel in described image being less than described Second Threshold are monochrome pixels collection, are colour element collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is more than or equal to described Second Threshold.
If original image is not the image of RGB color space, the Methods and steps S103 obtaining the standard deviation of the rgb value of each pixel and the rgb value of each pixel in original image is identical, and therefore not to repeat here.
The method that the pixel to image described in the present embodiment carries out color classification is greater than the expectation value of the absolute value of the difference of Cb and the Cr of all pixels in described image as screening set of pixels by the absolute value of the difference filtering out Cb and the Cr of pixel from image; Obtain the expectation value of the standard deviation of the rgb value of each pixel in described screening set of pixels as Second Threshold; Being monochrome pixels collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is less than described Second Threshold, is colour element collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is more than or equal to described Second Threshold.The Fast Classification of the pixel included by image being carried out to monochrome pixels and colour element can be realized.
Embodiment two
The present embodiment is for the original image of RGB color space, after the pixel in described image is divided into monochrome pixels collection and colour element collection by the method for being carried out color classification by the pixel to image described in embodiment one, RGB mean value according to pixel is classified further to described monochrome pixels collection, and the HSV value according to pixel is classified further to described colour element collection.
The present embodiment be applicable to the compression of the image such as bill, the drawing of engineering field, the circuit diagram of electronic applications of financial sector (such as bank, insurance etc.), identification and classification, and the fields such as color of image coupling, image enhaucament, image co-registration and image rectification can be widely used in.Because it is few that these images have color category, nominal value background color is single, mostly is white, based on the feature such as word and red seal.For its These characteristics, first consider first gray scale (comprising black, white and ash) to be separated with colour, more respectively two class colors are segmented further and identified, thus complete classification and the identification of image object integral color.
Color due to image in computing machine generally adopts RGB color space to represent, the present embodiment, for the original image of RGB color space, directly obtains R, G, B value of color of image.Little compared with color pixel cell of the standard deviation of R, G, B value of gray-scale pixels point, and both gaps are remarkable, the present embodiment is gray scale and color separation accordingly.But due to bill image impact by the factor such as illumination, nominal value reflectivity by taking pictures, in the mode acquisition process such as scanning, the sharpness of gained image, the saturation degree of color etc. are different, therefore this embodiment avoids and use fixing threshold value to realize being separated of gray scale and colour in all images.
Utilize the larger difference of color pixel cell Cb and Cr in YCbCr color space, the appropriate threshold value meeting human eye vision can be obtained by the method for statistical study, make it have adaptivity.
The colour be separated, for the accurate description of colour, can be divided into red, green, blue, Huang, green grass or young crops, magenta etc. by H component by recycling hsv color space.According to the needs of practical application, further often kind of color can be continued segmentation by S component.In addition, can also further grey be segmented.
Like this, classification and the identification of image object color is just completed more subtly.Fig. 2 is the overall schematic of the method described in the present embodiment.
Fig. 3 is the method flow diagram that the pixel to image described in the present embodiment carries out color classification, and as shown in Figure 3, the method that the pixel to image described in the present embodiment carries out color classification comprises:
The standard deviation matrix of the RGB of S301, acquisition image.
For original image I, read R, G, B value of wherein every bit according to the order of Row Column, utilize the standard deviation of all pixels of standard deviation formulae discovery, thus obtain standard deviation matrix σ (i, j) corresponding with original image pixel coordinate.
For the rgb value of pixel, the computing formula of the standard deviation of each pixel is:
σ = 1 3 [ ( R - μ ) 2 + ( G - μ ) 2 + ( B - μ ) 2 ]
Wherein μ=(R+G+B)/3;
S302, by image by RGB color space conversion to YCbCr color space.
R, G, B value in original image I is transformed into YCbCr space by the conversion formula changing into YCbCr according to RGB, obtains the value of Y, Cb, Cr, thus obtains the image I' after changing.
Particularly, being YCbCr color space by original image by RGB color space conversion is:
Y C b C r = 16 128 128 + ( 1 / 256 ) * 65.738 129.057 25.06 - 37.945 - 74.494 112.43 112.439 - 94.154 - 18.28 * R G B
That is:
Y=0.257*R+0.564*G+0.098*B+16
Cb=-0.148*R-0.291*G+0.439*B+128
Cr=0.439*R-0.368*G-0.071*B+128
The expectation value of the absolute value of the difference of Cb and Cr of all pixels in S303, acquisition image.
Utilize the expectation value of the absolute value of Cb and the Cr difference of all pixels in expectation value formulae discovery image I', be designated as a.
For Cb and the Cr value of each pixel, the expectation value a computing formula of the absolute value of its difference is:
a = 1 N Σ | C b - C r |
Wherein N is the pixel quantity of image.
S304, obtain Cb and Cr difference in image absolute value in be greater than the pixel of described expectation value as screening set of pixels.
In statistical picture I' Cb and the Cr difference of all pixels absolute value in be greater than number and the coordinate of the pixel of above-mentioned expectation value a.
S305, obtain threshold value according to described screening set of pixels.
Standard deviation in standard deviation matrix σ (i, j) corresponding to all coordinates in step S304 is sued for peace, and utilizes its mean value of individual numerical evaluation in step S304, be designated as μ.
S306, standard deviation matrix according to the RGB of described threshold value and described image, be divided into monochrome pixels collection and colour element collection by described image.
Take μ as threshold value, according to order scanning standard difference matrix σ (i, j) of Row Column, the classify of image element be greater than for standard deviation wherein in the original image corresponding to point coordinate of above-mentioned threshold value is colour, otherwise is categorized as monochrome pixels collection.
S307, described monochrome pixels collection to be segmented.
RGB mean value according to pixel is classified further to described monochrome pixels collection, specifically comprises:
The pixel classifications described monochrome pixels being concentrated the RGB mean value of pixel to be greater than the 3rd predetermined threshold value is white pixel subset;
The RGB mean value of pixel described monochrome pixels is concentrated to be less than or equal to described 3rd predetermined threshold value and the pixel classifications being greater than the 4th predetermined threshold value is subset of gray pixels;
The pixel classifications described monochrome pixels being concentrated the RGB mean value of pixel to be less than or equal to described 4th predetermined threshold value is black picture element subset.
Such as, for the pixel being categorized as gray scale, calculate its R, G, B value average value mu '.According to following formula classification and the gray scale color situation identifying target corresponding to pixel.
Those skilled in the art it should be explicitly made clear at this point, above-mentioned formula is mainly according to the visual characteristic of human eye, be [0 in the span of R, G, B, 255] when, the experimental formula obtained, in formula, the concrete numerical value of the 3rd predetermined threshold value, the 4th predetermined threshold value floats within the specific limits, includes within the scope of the present invention.
S308, described colour element to be integrated by RGB color space conversion as hsv color space.
For being categorized as colored all pixels, according to the following formula by its color space by RGB color space conversion to hsv color space.H, S and V value of each pixel obtains according to following formulae discovery.
H = 0 δ = 0 40 * G - B δ max = R 40 * B - R δ + 80 max = G 40 * R - G δ + 160 max = B
V=max;
max=MAX(R,G,B);
min=min(R,G,B);
δ=max-min
S309, described colour element collection to be segmented.
HSV value according to pixel is classified further to described colour element collection.The H value obtained by step S308, according to the different spans of H in formula as follows, by all pixel classifications to different colour types, and achieves the colour recognition of corresponding impact point.
The pixel classifications described colour element being concentrated the H of the HSV value of pixel to be less than the 5th predetermined threshold value or to be greater than the 6th predetermined threshold value is red pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 5th predetermined threshold value and the pixel classifications being less than the 7th predetermined threshold value is yellow pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 7th predetermined threshold value and the pixel classifications being less than the 8th predetermined threshold value is green pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 8th predetermined threshold value and the pixel classifications being less than the 9th predetermined threshold value is cyan pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 9th predetermined threshold value and the pixel classifications being less than the tenth predetermined threshold value is blue pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the tenth predetermined threshold value and the pixel classifications being less than the 6th predetermined threshold value is magenta pixel subset.
With the 5th predetermined threshold value for 20, the 6th predetermined threshold value is the 220, seven predetermined threshold value is 60,8th predetermined threshold value is 100, to be the 140, ten predetermined threshold value be 9th predetermined threshold value 180 is example, and the HSV value according to pixel is classified as follows further to described colour element collection:
Those skilled in the art it should be explicitly made clear at this point, above-mentioned formula is mainly according to the visual characteristic of human eye, be [0 in the span of R, G, B of original image, 255] when, the experimental formula obtained, in formula, the concrete numerical value of the 5th predetermined threshold value, the 6th predetermined threshold value, the 7th predetermined threshold value, the 8th predetermined threshold value, the 9th predetermined threshold value, the tenth predetermined threshold value floats within the specific limits, includes within the scope of the present invention.
S310, again subset of gray pixels and each colour element subset to be segmented.
According to the needs using application, grey further can be segmented according to its mean value.Meanwhile, can be different according to the value of the S in value of color, segmented further.Fig. 4 is that the present embodiment carries out carrying out the result schematic diagram after color classification to the pixel of image.
The present embodiment is for the image of RGB color space, utilize the larger difference of color pixel cell Cb and Cr in YCbCr color space, obtain by the method for statistical study the appropriate threshold value meeting human eye vision, the pixel included by original image is divided into monochrome pixels collection and colour element collection; And then according to the visual characteristic of human eye, obtained isolated monochrome pixels collection is segmented further black, white, grey; And then recycling hsv color space is for the accurate description of colour, the colour be separated can be divided into red, green, blue, Huang, green grass or young crops, magenta etc. by H component.According to the needs of practical application, further often kind of color is continued segmentation by S component further.In addition, further grey can be segmented again, can classify to pixel included in image more subtly, can be color of image coupling, image enhaucament, image co-registration and image rectification etc. and technical support is provided, what also can be used in filtering image is variegated, so that compression of images, improve image compression rate etc.
Embodiment three
Fig. 5 is the structured flowchart that the pixel to image described in the present embodiment carries out the device of color classification, and as shown in Figure 5, the device that the pixel to image described in the present embodiment carries out color classification comprises:
First threshold acquiring unit 501, for obtaining the YCbCr value of each pixel in image, obtains the expectation value of the absolute value of the difference of Cb and the Cr of each pixel in described image as first threshold;
Screening set of pixels acquiring unit 502, the absolute value for the difference filtering out Cb and the Cr of pixel from described image is greater than the pixel of described first threshold as screening set of pixels;
Second Threshold acquiring unit 503, for obtaining the expectation value of the standard deviation of the rgb value of each pixel in described screening set of pixels as Second Threshold;
Taxon 504, being monochrome pixels collection for the standard deviation of the rgb value of pixel in described image being less than the pixel classifications of described Second Threshold, is colour element collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is more than or equal to described Second Threshold.
Further, described device also comprises the second taxon, pixel classifications for the standard deviation of the rgb value of pixel in described image being less than described Second Threshold in described taxon 504 is monochrome pixels collection, after the pixel classifications standard deviation of the rgb value of pixel in described image being more than or equal to described Second Threshold is colour element collection, the RGB mean value according to pixel is classified further to described monochrome pixels collection and/or classifies further to described colour element collection according to the HSV value of pixel.
Further, described second taxon is carried out further classification according to the RGB mean value of pixel to described monochrome pixels collection and is specifically comprised:
The pixel classifications described monochrome pixels being concentrated the RGB mean value of pixel to be greater than the 3rd predetermined threshold value is white pixel subset;
The RGB mean value of pixel described monochrome pixels is concentrated to be less than or equal to described 3rd predetermined threshold value and the pixel classifications being greater than the 4th predetermined threshold value is subset of gray pixels;
The pixel classifications described monochrome pixels being concentrated the RGB mean value of pixel to be less than or equal to described 4th predetermined threshold value is black picture element subset.
Further, described second taxon also comprises the 3rd taxon, described 3rd predetermined threshold value is less than or equal to and after the pixel classifications being greater than the 4th predetermined threshold value is subset of gray pixels, the RGB mean value according to pixel is classified further to the pixel in described subset of gray pixels for described monochrome pixels being concentrated the RGB mean value of pixel.
Further, described second taxon is carried out further classification according to the HSV value of pixel to described colour element collection and is specifically comprised:
The pixel classifications described colour element being concentrated the H of the HSV value of pixel to be less than the 5th predetermined threshold value or to be greater than the 6th predetermined threshold value is red pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 5th predetermined threshold value and the pixel classifications being less than the 7th predetermined threshold value is yellow pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 7th predetermined threshold value and the pixel classifications being less than the 8th predetermined threshold value is green pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 8th predetermined threshold value and the pixel classifications being less than the 9th predetermined threshold value is cyan pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 9th predetermined threshold value and the pixel classifications being less than the tenth predetermined threshold value is blue pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the tenth predetermined threshold value and the pixel classifications being less than the 6th predetermined threshold value is magenta pixel subset.
Further, described second taxon also comprises the 4th taxon, after described colour element collection is categorized as red pixel subset, yellow pixel subset, green pixel subset, cyan pixel subset, blue pixel subset and/or magenta pixel subset, according to the S value in the HSV of pixel, described red pixel subset, yellow pixel subset, green pixel subset, cyan pixel subset, blue pixel subset and/or magenta pixel subset are classified further.
The absolute value that the device that the pixel to image described in the present embodiment carries out color classification passed through the difference of Cb and the Cr filtering out pixel from image is greater than the expectation value of the absolute value of the difference of Cb and the Cr of all pixels in described image as screening set of pixels; Obtain the expectation value of the standard deviation of the rgb value of each pixel in described screening set of pixels as Second Threshold; Being monochrome pixels collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is less than described Second Threshold, is colour element collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is more than or equal to described Second Threshold.The Fast Classification of the pixel included by image being carried out to monochrome pixels and colour element can be realized.
All or part of content in the technical scheme that above embodiment provides can be realized by software programming, and its software program is stored in the storage medium that can read, storage medium such as: the hard disk in computing machine, CD or floppy disk.
Note, above are only preferred embodiment of the present invention and institute's application technology principle.Skilled person in the art will appreciate that and the invention is not restricted to specific embodiment described here, various obvious change can be carried out for a person skilled in the art, readjust and substitute and can not protection scope of the present invention be departed from.Therefore, although be described in further detail invention has been by above embodiment, the present invention is not limited only to above embodiment, when not departing from the present invention's design, can also comprise other Equivalent embodiments more, and scope of the present invention is determined by appended right.

Claims (12)

1. the pixel of image is carried out to a method for color classification, it is characterized in that, comprising:
Obtain the YCbCr value of each pixel in image, obtain the expectation value of the absolute value of the difference of Cb and the Cr of each pixel in described image as first threshold;
The absolute value filtering out the difference of Cb and the Cr of pixel from described image is greater than the pixel of described first threshold as screening set of pixels;
Obtain the expectation value of the standard deviation of the rgb value of each pixel in described screening set of pixels as Second Threshold;
Being monochrome pixels collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is less than described Second Threshold, is colour element collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is more than or equal to described Second Threshold.
2. method of the pixel of image being carried out to color classification as claimed in claim 1, it is characterized in that, the described pixel classifications standard deviation of the rgb value of pixel in described image being less than described Second Threshold is monochrome pixels collection, and the pixel classifications standard deviation of the rgb value of pixel in described image being more than or equal to described Second Threshold also comprises after being the step of colour element collection: the RGB mean value according to pixel is classified further to described monochrome pixels collection and/or classifies further to described colour element collection according to the HSV value of pixel.
3. method of the pixel of image being carried out to color classification as claimed in claim 2, is characterized in that, the described RGB mean value according to pixel specifically comprises the step that described monochrome pixels collection carries out classification further:
The pixel classifications described monochrome pixels being concentrated the RGB mean value of pixel to be greater than the 3rd predetermined threshold value is white pixel subset;
The RGB mean value of pixel described monochrome pixels is concentrated to be less than or equal to described 3rd predetermined threshold value and the pixel classifications being greater than the 4th predetermined threshold value is subset of gray pixels;
The pixel classifications described monochrome pixels being concentrated the RGB mean value of pixel to be less than or equal to described 4th predetermined threshold value is black picture element subset.
4. method of the pixel of image being carried out to color classification as claimed in claim 3, it is characterized in that, describedly described monochrome pixels concentrated the RGB mean value of pixel to be less than or equal to described 3rd predetermined threshold value and the pixel classifications being greater than the 4th predetermined threshold value also comprises after being the step of subset of gray pixels: the RGB mean value according to pixel is classified further to the pixel in described subset of gray pixels.
5. method of the pixel of image being carried out to color classification as claimed in claim 2, is characterized in that, the described HSV value according to pixel specifically comprises the step that described colour element collection carries out classification further:
The pixel classifications described colour element being concentrated the H of the HSV value of pixel to be less than the 5th predetermined threshold value or to be greater than the 6th predetermined threshold value is red pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 5th predetermined threshold value and the pixel classifications being less than the 7th predetermined threshold value is yellow pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 7th predetermined threshold value and the pixel classifications being less than the 8th predetermined threshold value is green pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 8th predetermined threshold value and the pixel classifications being less than the 9th predetermined threshold value is cyan pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 9th predetermined threshold value and the pixel classifications being less than the tenth predetermined threshold value is blue pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the tenth predetermined threshold value and the pixel classifications being less than the 6th predetermined threshold value is magenta pixel subset.
6. method of the pixel of image being carried out to color classification as claimed in claim 5, it is characterized in that, described method also comprises: after described colour element collection is categorized as red pixel subset, yellow pixel subset, green pixel subset, cyan pixel subset, blue pixel subset and/or magenta pixel subset, classify further to described red pixel subset, yellow pixel subset, green pixel subset, cyan pixel subset, blue pixel subset and/or magenta pixel subset according to the S value in the HSV of pixel.
7. the pixel of image is carried out to a device for color classification, it is characterized in that, comprising:
First threshold acquiring unit, for obtaining the YCbCr value of each pixel in image, obtains the expectation value of the absolute value of the difference of Cb and the Cr of each pixel in described image as first threshold;
Screening set of pixels acquiring unit, the absolute value for the difference filtering out Cb and the Cr of pixel from described image is greater than the pixel of described first threshold as screening set of pixels;
Second Threshold acquiring unit, for obtaining the expectation value of the standard deviation of the rgb value of each pixel in described screening set of pixels as Second Threshold;
Taxon, being monochrome pixels collection for the standard deviation of the rgb value of pixel in described image being less than the pixel classifications of described Second Threshold, is colour element collection by the pixel classifications that the standard deviation of the rgb value of pixel in described image is more than or equal to described Second Threshold.
8. the device pixel of image being carried out to color classification as claimed in claim 7, it is characterized in that, described device also comprises the second taxon, pixel classifications for the standard deviation of the rgb value of pixel in described image being less than described Second Threshold in described taxon is monochrome pixels collection, after the pixel classifications standard deviation of the rgb value of pixel in described image being more than or equal to described Second Threshold is colour element collection, RGB mean value according to pixel is classified further to described monochrome pixels collection and/or classifies further to described colour element collection according to the HSV value of pixel.
9. the device pixel of image being carried out to color classification as claimed in claim 8, it is characterized in that, described second taxon is carried out further classification according to the RGB mean value of pixel to described monochrome pixels collection and is specifically comprised:
The pixel classifications described monochrome pixels being concentrated the RGB mean value of pixel to be greater than the 3rd predetermined threshold value is white pixel subset;
The RGB mean value of pixel described monochrome pixels is concentrated to be less than or equal to described 3rd predetermined threshold value and the pixel classifications being greater than the 4th predetermined threshold value is subset of gray pixels;
The pixel classifications described monochrome pixels being concentrated the RGB mean value of pixel to be less than or equal to described 4th predetermined threshold value is black picture element subset.
10. the device pixel of image being carried out to color classification as claimed in claim 9, it is characterized in that, described second taxon also comprises the 3rd taxon, described 3rd predetermined threshold value is less than or equal to and after the pixel classifications being greater than the 4th predetermined threshold value is subset of gray pixels, the RGB mean value according to pixel is classified further to the pixel in described subset of gray pixels for described monochrome pixels being concentrated the RGB mean value of pixel.
11. devices pixel of image being carried out to color classification as claimed in claim 8, it is characterized in that, described second taxon is carried out further classification according to the HSV value of pixel to described colour element collection and is specifically comprised:
The pixel classifications described colour element being concentrated the H of the HSV value of pixel to be less than the 5th predetermined threshold value or to be greater than the 6th predetermined threshold value is red pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 5th predetermined threshold value and the pixel classifications being less than the 7th predetermined threshold value is yellow pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 7th predetermined threshold value and the pixel classifications being less than the 8th predetermined threshold value is green pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 8th predetermined threshold value and the pixel classifications being less than the 9th predetermined threshold value is cyan pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the 9th predetermined threshold value and the pixel classifications being less than the tenth predetermined threshold value is blue pixel subset; And/or
The H of the HSV value of pixel described colour element is concentrated to be more than or equal to the tenth predetermined threshold value and the pixel classifications being less than the 6th predetermined threshold value is magenta pixel subset.
12. devices pixel of image being carried out to color classification as claimed in claim 11, it is characterized in that, described second taxon also comprises the 4th taxon, after described colour element collection is categorized as red pixel subset, yellow pixel subset, green pixel subset, cyan pixel subset, blue pixel subset and/or magenta pixel subset, according to the S value in the HSV of pixel, described red pixel subset, yellow pixel subset, green pixel subset, cyan pixel subset, blue pixel subset and/or magenta pixel subset are classified further.
CN201310528711.1A 2013-10-30 2013-10-30 A kind of pixel to image carries out method and the device of color classification Active CN103544716B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310528711.1A CN103544716B (en) 2013-10-30 2013-10-30 A kind of pixel to image carries out method and the device of color classification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310528711.1A CN103544716B (en) 2013-10-30 2013-10-30 A kind of pixel to image carries out method and the device of color classification

Publications (2)

Publication Number Publication Date
CN103544716A CN103544716A (en) 2014-01-29
CN103544716B true CN103544716B (en) 2016-04-27

Family

ID=49968136

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310528711.1A Active CN103544716B (en) 2013-10-30 2013-10-30 A kind of pixel to image carries out method and the device of color classification

Country Status (1)

Country Link
CN (1) CN103544716B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103458242B (en) * 2013-07-02 2016-12-28 京北方信息技术股份有限公司 Method for compressing image based on color classification Yu cluster
CN107798301A (en) * 2017-10-13 2018-03-13 上海眼控科技股份有限公司 A kind of signature detection system and method for vehicle annual test
CN108510460B (en) * 2018-04-10 2022-06-07 昆明物理研究所 False color image fusion method based on bicolor space
CN109949376A (en) * 2019-02-25 2019-06-28 平安科技(深圳)有限公司 Discrimination method, device, computer equipment and the storage medium of black and white picture
CN109949333B (en) * 2019-03-20 2021-06-08 北京小蜻蜓智能科技有限公司 Character and seal separation method based on color unmixing
CN112669290A (en) * 2020-12-30 2021-04-16 稿定(厦门)科技有限公司 Image comparison method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901350A (en) * 2010-07-23 2010-12-01 北京航空航天大学 Characteristic vector-based static gesture recognition method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100647402B1 (en) * 2005-11-01 2006-11-23 매그나칩 반도체 유한회사 Apparatus and method for improving image of image sensor
KR100983037B1 (en) * 2008-07-25 2010-09-17 삼성전기주식회사 Method for controlling auto white balance

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901350A (en) * 2010-07-23 2010-12-01 北京航空航天大学 Characteristic vector-based static gesture recognition method

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
A BAYESIAN APPROACH TO SKIN COLOR CLASSIFICATION IN YCBCR COLOR SPACE;Chai D.and Bouzerdoum A.;《TENCON 2000. Proceedings》;20000927;第2卷;421-424 *
Fire detection in video sequences using a generic color model;Turgay Celik, Hasan Demirel;《Fire Safety Journal》;20080707;147-158 *
Fuzzy class ifcation, image segmentation and shape analysis for Humanface detection;Ben Hmida M.and Ben Jamaa Y.;《Electronic, Circuits and Systems》;20061213;640-643 *
基于HCbCr的人脸检测方法;赵怀勋,徐锋;《计算机应用与软件》;20110331;第28卷(第3期);231-233 *
基于YCbCr空间的亮度自适应肤色检测;王金庭,杨敏;《计算机系统应用》;20070630(第6期);99-102 *

Also Published As

Publication number Publication date
CN103544716A (en) 2014-01-29

Similar Documents

Publication Publication Date Title
CN103544716B (en) A kind of pixel to image carries out method and the device of color classification
Kim et al. An Efficient Color Space for Deep‐Learning Based Traffic Light Recognition
JP4396376B2 (en) Graphic reading method and apparatus, and main color extraction method and apparatus
CN103559507B (en) The method for traffic sign detection being combined based on color with shape facility
CN102142084B (en) Method for gesture recognition
CN108090459B (en) Traffic sign detection and identification method suitable for vehicle-mounted vision system
CN110378332A (en) A kind of container terminal case number (CN) and Train number recognition method and system
CN109657715B (en) Semantic segmentation method, device, equipment and medium
CN108062554B (en) Method and device for identifying color of vehicle annual inspection label
CN108596892A (en) A kind of identification of Weld Defects based on improvement LeNet-5 models
CN103093203A (en) Human body re-recognition method and human body re-recognition system
CN104899586A (en) Method for recognizing character contents included in image and device thereof
CN107273838A (en) Traffic lights capture the processing method and processing device of picture
Qin et al. Traffic sign segmentation and recognition in scene images
CN115761549A (en) Unmanned aerial vehicle small sample weak target increment detection and identification method and system
CN117336453B (en) Security check image conversion method, system, equipment and storage medium
CN104299234A (en) Method and system for removing rain field in video data
JP4336755B2 (en) A signboard recognition method using color images
CN103136536A (en) System and method for detecting target and method for exacting image features
Su et al. Vehicle color recognition in the surveillance with deep convolutional neural networks
CN104899898A (en) Multidimensional information probability model based road surface detection method
CN107609584A (en) A kind of choosing method of the skin detection multi-color space of feature based selection
CN103136524A (en) Object detecting system and method capable of restraining detection result redundancy
Fang et al. Color identifying of vehicles based on color container and BP network
CN105488532A (en) License plate screening method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100089 Beijing, West Third Ring Road North, No. 25, green building, room 701, Haidian District

Applicant after: NORTHKING INFORMATION TECHNOLOGY CO.,LTD.

Address before: 100089 Beijing, West Third Ring Road North, No. 25, green building, room 701, Haidian District

Applicant before: Beijing Northking Information Technology Co.,Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: BEIJING NORTH KING INFORMATION TECHNOLOGY CO., LTD. TO: NORTHKING INFORMATION TECHNOLOGY CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220902

Address after: Building 8, No. 1369, Zhengtai Road, Fangzi District, Weifang City, Shandong Province, 261206

Patentee after: Shantou North Financial Technology Co.,Ltd.

Address before: Room 701, Qingzheng building, No. 25, Xisanhuan North Road, Haidian District, Beijing 100089

Patentee before: NORTHKING INFORMATION TECHNOLOGY CO.,LTD.

TR01 Transfer of patent right