CN104346599B - A kind of detection method and image processing equipment of color boundary - Google Patents

A kind of detection method and image processing equipment of color boundary Download PDF

Info

Publication number
CN104346599B
CN104346599B CN201310311875.9A CN201310311875A CN104346599B CN 104346599 B CN104346599 B CN 104346599B CN 201310311875 A CN201310311875 A CN 201310311875A CN 104346599 B CN104346599 B CN 104346599B
Authority
CN
China
Prior art keywords
image
pixel
value
pixel value
edge
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
CN201310311875.9A
Other languages
Chinese (zh)
Other versions
CN104346599A (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.)
Shenzhen Tencent Computer Systems Co Ltd
Original Assignee
Shenzhen Tencent Computer Systems 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 Shenzhen Tencent Computer Systems Co Ltd filed Critical Shenzhen Tencent Computer Systems Co Ltd
Priority to CN201310311875.9A priority Critical patent/CN104346599B/en
Publication of CN104346599A publication Critical patent/CN104346599A/en
Application granted granted Critical
Publication of CN104346599B publication Critical patent/CN104346599B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Abstract

The embodiment of the invention discloses a kind of detection method of color boundary and image processing equipments.The method comprise the steps that obtaining the pixel value of color to be detected;The distance between the pixel value for calculating each of the testing image original pixel value of pixel and color to be detected, the first pixel value by distance as corresponding pixel, obtains the first image;Binary conversion treatment is carried out using first pixel value of the local auto-adaptive Binarization methods to all pixels point in the first image, obtain the second image, the edge pixel point of color is shown in second image, it is determined that the edge of the color effectively realizes the edge detection of the specified color in image.

Description

A kind of detection method and image processing equipment of color boundary
Technical field
The present invention relates to field of image processing more particularly to the detection methods and image processing equipment of a kind of color boundary.
Background technique
Image procossing is frequently used for separating object to be identified from background, automobile is identified such as from road surface, from paper Upper extraction text identifies workpiece etc. from conveyer belt.These scenes have some common features: background is due to itself and optical fiber Etc. reasons, there is certain shallow texture or uneven, while the comparison in difference of prospect and background on edge is obvious, and in fixation Application scenarios in, background itself be substantially it is constant, for such image procossing, usually using the side of edge detection Method.
In the prior art, common edge detection algorithm widely used such as Canny operator, Sobel operator, Gauss draws general Laplacian operater etc., however this kind of algorithms can not detect the edge of a specified color, it cannot in the picture really Determine color boundary.
Summary of the invention
The embodiment of the invention provides a kind of detection method of color boundary and image processing equipments, for in image The edge of specified color is detected, and the edge of the color can be effectively obtained.
The present invention provides a kind of detection methods of color boundary, comprising:
Obtain the pixel value of color to be detected;
Each of testing image is calculated between the original pixel value of pixel and the pixel value of the color to be detected Distance first pixel value of the distance as corresponding pixel is obtained into the first image;
It is carried out using first pixel value of the local auto-adaptive Binarization methods to all pixels point in the first image Binary conversion treatment obtains the second image, and the edge pixel point of the color is shown in second image.
The present invention provides a kind of image processing equipments, comprising:
Acquiring unit, for obtaining the pixel value of color to be detected;
Computing unit, for calculating to mapping after the pixel value that the acquiring unit obtains the color to be detected The distance between the pixel value of each of the picture original pixel value of pixel and the color to be detected makees the distance For the first pixel value of corresponding pixel, the first image is obtained;
Binary conversion treatment unit, for utilizing local auto-adaptive after the computing unit obtains the first image Binarization methods carry out binary conversion treatment to the first pixel value of all pixels point in the first image, obtain the second figure Picture shows the edge pixel point of the color in second image.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that
Image processing equipment obtains the pixel value of color to be detected, calculates the original of each of testing image pixel The distance between the pixel value of pixel value and the color to be detected, using the distance as the first pixel value of corresponding pixel, Obtain the first image, and using local auto-adaptive Binarization methods to the first pixel value of all pixels point in the first image into Row binary conversion treatment obtains the second image, the edge pixel point of the color to be detected is shown in second image, it is determined that the color Color edge, effectively realizes the edge detection of the specified color in image.
Detailed description of the invention
Fig. 1 is a schematic diagram of the detection method of color boundary in the embodiment of the present invention;
Fig. 2 is another schematic diagram of the detection method of color boundary in the embodiment of the present invention;
Fig. 3 a is the schematic diagram of testing image in the embodiment of the present invention;
Fig. 3 b is the schematic diagram of the first image in the embodiment of the present invention;
Fig. 3 c is the schematic diagram of the second image in the embodiment of the present invention;
Fig. 3 d is the schematic diagram of third image in the embodiment of the present invention;
Fig. 4 is a schematic diagram of the structure of image processing equipment in the embodiment of the present invention;
Fig. 5 is a schematic diagram of the structure of image processing equipment in the embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides a kind of detection method of color boundary and image processing equipments, for in image The edge of specified color is detected, and the edge of the color can be effectively obtained.
Referring to Fig. 1, for the embodiment of the detection method of color boundary in the embodiment of the present invention, comprising:
101, the pixel value of color to be detected is obtained;
In embodiments of the present invention, image processing equipment imports after testing image, and user can determine carry out edge detection Color, be specifically as follows: the pixel value of the exportable color for carrying out edge detection of user, alternatively, can to click this to be checked by user Altimetric image after image processing equipment detects the clicking operation, determines the pixel of the position of clicking operation, by the pixel Pixel value of the pixel value as color to be detected, therefore, the available pixel value to color to be detected of image processing equipment, The color to be detected is specified color.
102, each of testing image is calculated between the original pixel value of pixel and the pixel value of color to be detected Distance first pixel value of the distance as corresponding pixel is obtained into the first image;
In embodiments of the present invention, image processing equipment will calculate the original pixels of each of testing image pixel The distance between the pixel value of value and color to be detected, using the distance as the first pixel value of corresponding pixel, by owning Pixel the first pixel value constitute image be the first image.
103, it is carried out using first pixel value of the local auto-adaptive Binarization methods to all pixels point in the first image Binary conversion treatment obtains the second image, and the edge pixel point of color to be detected is shown in the second image.
In embodiments of the present invention, using local auto-adaptive Binarization methods to of all pixels point in the first image One pixel value carries out binary conversion treatment, obtains the second image, and the edge pixel point of color to be detected is shown in second image.
In embodiments of the present invention, using local auto-adaptive Binarization methods to the first image carry out binary conversion treatment it Afterwards, the black white image of the second image obtained, the pixel value of the pixel in second image is 0 or 255, so that edge picture Vegetarian refreshments is in the second image with black or white displays.
In embodiments of the present invention, image processing equipment obtains the pixel value of color to be detected, calculates in testing image The distance between the pixel value of the original pixel value of each pixel and the color to be detected, using the distance as corresponding picture First pixel value of vegetarian refreshments obtains the first image, and using local auto-adaptive Binarization methods to all pictures in the first image First pixel value of vegetarian refreshments carries out binary conversion treatment, obtains the second image, the side of the color to be detected is shown in second image Edge pixel, it is determined that the edge of the color effectively realizes the edge detection of the specified color in image.
Technical solution in embodiment in order to better understand the present invention, referring to Fig. 2, for color in the embodiment of the present invention The embodiment of the detection method at edge, comprising:
201, the pixel value of color to be detected is obtained;
Step 201 is similar to the content in step 101 described in embodiment illustrated in fig. 1, and details are not described herein again.
202, each of testing image is calculated between the original pixel value of pixel and the pixel value of color to be detected Distance first pixel value of the distance as corresponding pixel is obtained into the first image;
In embodiments of the present invention, image processing equipment will calculate the original pixels of each of testing image pixel The distance between the pixel value of value and color to be detected, using the distance as the first pixel value of corresponding pixel, by owning Pixel the first pixel value constitute image be the first image.
Wherein, distance can be Euclidean distance, and formula below can be used to calculate separately testing image for image processing equipment Each of pixel the first pixel value, formula is as follows:
Dis(i,j)=sqrt((ri-rj)2+(gi-gj)2+(bi-bj)2)
Wherein, i indicate pixel i, j indicate pixel j, r indicate RGB (full name in English are as follows: Red, Green, Blue, Abbreviation are as follows: RGB) color space r channel value, g expression RGB color g channel value, b expression RGB color b channel value, In, ri, gi, biFor the pixel value of pixel i, rj, gj, bjFor the pixel value of pixel j, and pixel j is color to be detected Pixel value.
It should be noted that image processing equipment also can be used other distances calculation calculate testing image in it is every The distance between pixel value of the pixel value of one pixel and color to be detected or image processing equipment can also will be to mappings The pixel value of the pixel value of picture and color to be detected be transformed into other color spaces calculate distance, other color spaces can with but not It is limited to color space below: hue, saturation, intensity (full name in English are as follows: Hue, Saturation, Value, abbreviation are as follows: HSV) color space, brightness, coloration (full name in English are as follows: Luminance, Chrominance, abbreviation are as follows: YUV) color are empty Between.
203, it is carried out using first pixel value of the local auto-adaptive Binarization methods to all pixels point in the first image Binary conversion treatment obtains the second image, and the edge pixel point of color to be detected is shown in the second image.
In embodiments of the present invention, after image processing equipment obtains the first image, local auto-adaptive binaryzation will be utilized Algorithm carries out binary conversion treatment to the first pixel value of all pixels point in the first image, obtains the second image, the second image The edge pixel point of middle display color to be detected.
Wherein, the window size of local auto-adaptive Binarization methods is 3*3, and the local auto-adaptive Binarization methods are Wolf local auto-adaptive Binarization methods are perhaps Niblack Binarization methods or are sauvola Binarization methods.
Wherein, if using wolf local auto-adaptive Binarization methods, and window size is 3*3, then can be in the following manner The calculated value of the gray scale of calculation window central pixel point, formula are as follows:
T=m-ka(m-M);
a=1-s/R;
R=max(s);
Wherein, T indicates that the calculated value of the gray scale of window center pixel, m indicate the gray value of all pixels point in window Mean value, M indicate window in all pixels point in the smallest gray value, k is constant, can for 0.4, s indicate window in institute There is the variance of the gray value of pixel.
After obtaining the calculated value of gray scale of window center pixel using local auto-adaptive Binarization methods, at image Reason equipment judges whether the calculated value of the gray scale is greater than pre-set threshold value, if more than then by the window center pixel Pixel value is set as 0, if being less than or equal to, 255 is set by the pixel value of the window center pixel, alternatively, at image Reason equipment judges whether the calculated value of the gray scale is greater than pre-set threshold value, if more than then window center pixel is arranged It is 255, if being less than or equal to, sets 0 for the pixel value of window center pixel.
After carrying out binary conversion treatment to the first image by above-mentioned mode, the second obtained image is black white image, So that edge pixel point or the black picture in second image that the white pixel point in second image is color to be detected Vegetarian refreshments is the edge pixel point of color to be detected.
204, second-order correction processing is carried out to the edge pixel point in the second image and processing of making an uproar is put in removal, after obtaining optimization Third image.
In embodiments of the present invention, in order to enable obtained edge pixel point is more accurate, image processing equipment will also be right Second image optimizes processing, i.e. image processing equipment will carry out second-order correction processing to the edge pixel point in the second image And processing of making an uproar, the third image after being optimized are put in removal.
In embodiments of the present invention, image processing equipment first can carry out second-order correction processing to the second image, then to two The second image after secondary correcting process is removed processing of a little making an uproar, and obtains third image or image processing equipment can be first right Second image is removed processing of a little making an uproar, then makes an uproar that treated to removal point the second image carries out second-order correction processing, obtains excellent Third image after change can be set as needed second-order correction processing and the successive suitable of processing of making an uproar is put in removal in practical applications Sequence, herein without limitation.
In embodiments of the present invention, image processing equipment can in the following way carry out at second-order correction the second image Reason, comprising: calculate the pixel of original pixel value and to be detected color of the edge pixel point in the second image in testing image The distance between value;Judge original pixel value of the edge pixel point in testing image and color to be detected in the second image Whether the distance between pixel value is greater than pre-set first numerical value;If so, the second pixel value of edge pixel point is repaired It is changed to the second pixel value of non-edge pixels point, which is modified to non-edge pixels point, if it is not, then retaining the side Edge pixel.
In embodiments of the present invention, image processing equipment can also in the following way carry out at second-order correction the second image Reason, comprising: it is pre-set to judge whether first pixel value of the edge pixel in the second image o'clock in the first image is greater than Second value;If so, the second pixel value of edge pixel point is revised as to the second pixel value of non-edge pixels point, if it is not, Then retain the edge pixel point.
In embodiments of the present invention, image processing equipment to the second image or can carry out secondary in the following way Second image of correcting process is removed processing of a little making an uproar, comprising: judges eight adjacent with edge pixel point in the second image Whether a pixel is non-edge pixels point;If eight pixels adjacent with edge pixel point are non-edge pixels point, Second pixel value of edge pixel point is then revised as to the second pixel value of non-edge pixels point, if adjacent with edge pixel point Eight pixels are not all non-edge pixels point, then retain the edge pixel point.
In embodiments of the present invention, image processing equipment obtains the pixel value of color to be detected, calculates in testing image The distance between the pixel value of the original pixel value of each pixel and the color to be detected, using the distance as corresponding picture First pixel value of vegetarian refreshments obtains the first image, and using local auto-adaptive Binarization methods to all pictures in the first image First pixel value of vegetarian refreshments carries out binary conversion treatment, obtains the second image, the side of the color to be detected is shown in second image Edge pixel, and second image is carried out second-order correction processing and removed to put processing of making an uproar, the third image after being optimized should The edge pixel point that color to be detected is shown in third image, effectively realizes the edge detection of the specified color in image.
A tool is described in detail below in the detection method of color boundary in embodiment in order to better understand the present invention The application scenarios of body, comprising:
Image processing equipment imports testing image, please refers to Fig. 3 a, and Fig. 3 a is testing image, and user needs to red side Edge is detected, then inputs red pixel value, after image processing equipment obtains the pixel value of the red, will calculate separately this The original pixel value of each of testing image pixel and the distance between the pixel value of the red, and by this apart from conduct First pixel value of corresponding pixel, obtains the first image, please refers to Fig. 3 b, and Fig. 3 b is testing image in the embodiment of the present invention Carry out the first image for obtaining after calculating, then, image processing equipment using local auto-adaptive Binarization methods to this First pixel value of each of one image pixel carries out binary conversion treatment, obtains the second image, please refers to Fig. 3 c, for this In inventive embodiments, the first image carries out the second image obtained after binary conversion treatment, and the white portion shown in Fig. 3 c As red edge pixel point, in order to carry out optimization processing to obtained edge pixel point, image processing equipment will be to second Image carries out second-order correction processing and removal point is made an uproar processing, please refers to Fig. 3 d, is in the embodiment of the present invention, to the progress of the second image Second-order correction processing and the third image for handling and obtaining later of a little making an uproar of going out.
Referring to Fig. 4, for one embodiment of the structure of image processing equipment in the embodiment of the present invention, comprising:
Acquiring unit 401, for obtaining the pixel value of color to be detected;
Computing unit 402, for calculating testing image after the pixel value that acquiring unit 401 obtains color to be detected Each of the original pixel value of pixel and color to be detected the distance between pixel value, will be apart from as corresponding picture First pixel value of vegetarian refreshments, obtains the first image;
Binary conversion treatment unit 403, for utilizing local auto-adaptive two after computing unit 402 obtains the first image Value algorithm carries out binary conversion treatment to the first pixel value of all pixels point in the first image, obtains the second image, and second The edge pixel point of color is shown in image.
In embodiments of the present invention, the acquiring unit 401 in image processing equipment obtain color to be detected pixel value it Afterwards, computing unit 402 calculate each of testing image original pixel value of pixel and color to be detected pixel value it Between distance first pixel value of the distance as corresponding pixel is obtained into the first image, then, binary conversion treatment unit 403 are carried out at binaryzation using the first pixel value of the local auto-adaptive Binarization methods to all pixels point in the first image Reason, obtains the second image, the edge pixel point of color is shown in the second image.
In embodiments of the present invention, image processing equipment obtains the pixel value of color to be detected, calculates in testing image The distance between the pixel value of the original pixel value of each pixel and the color to be detected, using the distance as corresponding picture First pixel value of vegetarian refreshments obtains the first image, and using local auto-adaptive Binarization methods to all pictures in the first image First pixel value of vegetarian refreshments carries out binary conversion treatment, obtains the second image, the side of the color to be detected is shown in second image Edge pixel, it is determined that the edge of the color effectively realizes the edge detection of the specified color in image.
Image processing equipment in implementing in order to better understand the present invention, referring to Fig. 5, to scheme in the embodiment of the present invention As the embodiment of the structure of processing equipment, comprising:
Acquiring unit 401, computing unit 401 and binary conversion treatment unit 403 described in embodiment as shown in Figure 4, and Similar to content described in embodiment illustrated in fig. 4, details are not described herein again.
In embodiments of the present invention, if the distance that computing unit 402 calculates is Euclidean distance;Then computing unit 402 is specific For once calculating the Euclidean distance of each pixel as follows:
Dis(i,j)=sqrt((ri-rj)2+(gi-gj)2+(bi-bj)2)
Wherein, i indicates that pixel i, j indicate that pixel j, r indicate RGB RGB color r channel value, and g indicates RGB Color space g channel value, b indicate RGB color b channel value, wherein ri, gi, biFor the pixel value of pixel i, rj, gj, bj For the pixel value of pixel j, and pixel j is the pixel value of color to be detected.
In embodiments of the present invention, the window size of local auto-adaptive Binarization methods is 3*3, local auto-adaptive binaryzation Algorithm be wolf local auto-adaptive Binarization methods, perhaps be Niblack Binarization methods or be sauvola binaryzation calculation Method.
In embodiments of the present invention, image processing equipment further include:
Optimize unit 501, for after binary conversion treatment unit 403 obtains the second image, to the side in the second image Edge pixel carries out second-order correction processing and processing of making an uproar, the third image after being optimized are put in removal.
In embodiments of the present invention, optimization unit 501 includes:
Metrics calculation unit 502, for calculating the second image after binary conversion treatment unit 403 obtains the second image In edge pixel point at a distance from the original pixel value in testing image is between the pixel value of color to be detected;
First judging unit 503, for judging whether distance is greater than pre-set first numerical value;
First modification unit 504, for determining that distance is greater than pre-set first numerical value in the first judging unit 503 When, the second pixel value of edge pixel point is revised as to the second pixel value of non-edge pixels point.
In embodiments of the present invention, optimization unit 501, which can also be, includes:
Second judgment unit 505, for judging the second image after binary conversion treatment unit 403 obtains the second image In first pixel value of the edge pixel o'clock in the first image whether be greater than pre-set second value;
Second modification unit 506, for judging to determine the edge pixel o'clock in 505 second images in the first image second In the first pixel be greater than pre-set second value when, the second pixel value of edge pixel point is revised as non-edge picture Second pixel value of vegetarian refreshments.
In embodiments of the present invention, optimize unit 501 further include:
Third judging unit 507, for whether judging eight adjacent with the edge pixel point pixel in the second image It is non-edge pixels point;
Third modifies unit 508, adjacent with edge pixel point in second image for determining in third judging unit 507 Eight pixels be non-edge pixels point, then the second pixel value of edge pixel point is revised as the of non-edge pixels point Two pixel values.
In embodiments of the present invention, the acquiring unit 401 in image processing equipment obtain color to be detected pixel value it Afterwards, computing unit 402 calculate each of testing image original pixel value of pixel and color to be detected pixel value it Between distance first pixel value of the distance as corresponding pixel is obtained into the first image, then, binary conversion treatment unit 403 are carried out at binaryzation using the first pixel value of the local auto-adaptive Binarization methods to all pixels point in the first image Reason, obtains the second image, the edge pixel point of color is shown in the second image.
Optimization unit 501 in order to carry out optimization processing to the edge pixel point in the second image, in image processing equipment Also second-order correction processing will be carried out to the edge pixel point in the second image and processing of making an uproar is put in removal, the third figure after being optimized Picture.Metrics calculation unit 502 in specific optimization unit 501 calculates the edge pixel point in the second image in testing image Original pixel value and color to be detected the distance between pixel value;Then the first judging unit 503 judges whether distance is big In pre-set first numerical value;And if the first judging unit 503 determine the distance greater than pre-set first numerical value, the Second pixel value of edge pixel point is revised as the second pixel value of non-edge pixels point by one modification unit 504;Alternatively, optimization Second judgment unit 505 in unit 501 judges first pixel value of the edge pixel o'clock in the second image in the first image Whether pre-set second value is greater than;Determine the edge pixel o'clock in 505 second images in the first image in the second judgement In the first pixel when being greater than pre-set second value, the second modification unit 506 is by the second pixel of edge pixel point Value is revised as the second pixel value of non-edge pixels point.It is secondary in the edge pixel point progress to the second image to optimize unit 501 After correcting process, also by by the third judging unit 507 in optimization unit 501 judge in the second image with edge pixel point Whether eight adjacent pixels are non-edge pixels point;And in the second image and side is determined in third judging unit 507 When eight adjacent pixels of edge pixel are non-edge pixels point, third modifies unit 509 for the second of edge pixel point Pixel value is revised as the second pixel value of non-edge pixels point.
In embodiments of the present invention, image processing equipment obtains the pixel value of color to be detected, calculates in testing image The distance between the pixel value of the original pixel value of each pixel and the color to be detected, using the distance as corresponding picture First pixel value of vegetarian refreshments obtains the first image, and using local auto-adaptive Binarization methods to all pictures in the first image First pixel value of vegetarian refreshments carries out binary conversion treatment, obtains the second image, the side of the color to be detected is shown in second image Edge pixel, and second image is carried out second-order correction processing and removed to put processing of making an uproar, the third image after being optimized should The edge pixel point that color to be detected is shown in third image, effectively realizes the edge detection of the specified color in image.
Those of ordinary skill in the art will appreciate that implement the method for the above embodiments be can be with Relevant hardware is instructed to complete by program, the program can store in a kind of computer readable storage medium, on Stating the storage medium mentioned can be read-only memory, disk or CD etc..
Detailed Jie has been carried out to the detection method and image processing equipment of a kind of color boundary provided by the present invention above It continues, for those of ordinary skill in the art, thought according to an embodiment of the present invention, in specific embodiments and applications There will be changes, in conclusion the contents of this specification are not to be construed as limiting the invention.

Claims (14)

1. a kind of detection method of color boundary characterized by comprising
Obtain the pixel value of color to be detected;
Calculate each of testing image between the original pixel value of pixel and the pixel value of the color to be detected away from From obtaining the first image for first pixel value of the distance as corresponding pixel;
The gray value that all pixels point in the first image is calculated using local auto-adaptive Binarization methods, will be calculated Each gray value be compared with pre-set threshold value, and based on comparison result to all pixels point in the first image The first pixel value carry out binary conversion treatment, obtain the second image, the edge pixel of the color shown in second image Point.
2. detection method according to claim 1, which is characterized in that the distance is Euclidean distance;
The pixel value of each of testing image pixel and the distance between the pixel value of the color to be detected are then calculated, The first pixel value by the distance as corresponding pixel, obtaining the first image includes:
The Euclidean distance of each pixel is once calculated as follows:
Dis (i, j)=sqrt ((ri-rj)2+(gi-gj)2+(bi-bj)2)
Wherein, i indicates that pixel i, j indicate that pixel j, r indicate RGB RGB color r channel value, and g indicates RGB color Space g channel value, b indicate RGB color b channel value, wherein ri, gi, biFor the pixel value of pixel i, rj, gj, bjFor picture The pixel value of vegetarian refreshments j, and pixel j is the pixel value of color to be detected.
3. detection method according to claim 1, which is characterized in that the window of the local auto-adaptive Binarization methods is big Small is 3*3, and the local auto-adaptive Binarization methods are wolf local auto-adaptive Binarization methods, or are Niblack two-value Change algorithm, or is sauvola Binarization methods.
4. detection method as claimed in any of claims 1 to 3, which is characterized in that the method also includes:
Second-order correction processing is carried out to the edge pixel point in second image and removal point is made an uproar processing, the after being optimized Three images.
5. detection method according to claim 4, which is characterized in that the edge pixel point in second image Carrying out second-order correction processing includes:
Calculate original pixel value of the edge pixel point in the testing image in second image and the colour examining to be checked Color the distance between pixel value;
Judge whether the distance is greater than pre-set first numerical value;
If so, the second pixel value of the edge pixel point to be revised as to the second pixel value of non-edge pixels point.
6. detection method according to claim 4, which is characterized in that the edge pixel point in second image Carrying out second-order correction processing includes:
Judge whether first pixel value of the edge pixel point in the first image in second image is greater than to set in advance The second value set;
If so, the second pixel value of the edge pixel point to be revised as to the second pixel value of non-edge pixels point.
7. detection method according to claim 4, which is characterized in that the edge pixel point in second image Being removed processing of a little making an uproar includes:
Judge whether eight adjacent with the edge pixel point pixel in second image is non-edge pixels point;
If so, the second pixel value of the edge pixel point to be revised as to the second pixel value of non-edge pixels point.
8. a kind of image processing equipment characterized by comprising
Acquiring unit, for obtaining the pixel value of color to be detected;
Computing unit, for calculating in testing image after the pixel value that the acquiring unit obtains the color to be detected Each pixel original pixel value and the color to be detected the distance between pixel value, by it is described distance as pair First pixel value of the pixel answered, obtains the first image;
Binary conversion treatment unit, for utilizing local auto-adaptive two-value after the computing unit obtains the first image Change algorithm calculate the first image in all pixels point gray value, by each gray value being calculated with it is pre-set Threshold value is compared, and carries out binaryzation based on first pixel value of the comparison result to all pixels point in the first image Processing, obtains the second image, the edge pixel point of the color is shown in second image.
9. image processing equipment according to claim 8, which is characterized in that the distance is Euclidean distance;
Then the computing unit is specifically used for once calculating the Euclidean distance of each pixel as follows:
Dis (i, j)=sqrt ((ri-rj)2+(gi-gj)2+(bi-bj)2)
Wherein, i indicates that pixel i, j indicate that pixel j, r indicate RGB RGB color r channel value, and g indicates RGB color Space g channel value, b indicate RGB color b channel value, wherein ri, gi, biFor the pixel value of pixel i, rj, gj, bjFor picture The pixel value of vegetarian refreshments j, and pixel j is the pixel value of color to be detected.
10. image processing equipment according to claim 8, which is characterized in that the local auto-adaptive Binarization methods Window size is 3*3, and the local auto-adaptive Binarization methods are wolf local auto-adaptive Binarization methods, Huo Zhewei Niblack Binarization methods, or be sauvola Binarization methods.
11. according to the described in any item image processing equipments of claim 8 to 10, which is characterized in that described image processing equipment Further include:
Optimize unit, for after the binary conversion treatment unit obtains second image, in second image Edge pixel point carries out second-order correction processing and processing of making an uproar, the third image after being optimized are put in removal.
12. image processing equipment according to claim 11, which is characterized in that the optimization unit includes:
Metrics calculation unit, for calculating second figure after the binary conversion treatment unit obtains second image As in edge pixel point between the pixel value of original pixel value and the color to be detected in the testing image away from From;
First judging unit, for judging whether the distance is greater than pre-set first numerical value;
First modification unit, for determining that the distance is greater than pre-set first numerical value in first judging unit When, the second pixel value of the edge pixel point is revised as to the second pixel value of non-edge pixels point.
13. image processing equipment according to claim 11, which is characterized in that the optimization unit includes:
Second judgment unit, for judging second figure after the binary conversion treatment unit obtains second image Whether first pixel value of the edge pixel point in the first image as in is greater than pre-set second value;
Second modification unit, for determining the edge pixel point in second image described the in the second judgment unit When the first pixel value in one image is greater than the pre-set second value, by the second pixel value of the edge pixel point It is revised as the second pixel value of non-edge pixels point.
14. image processing equipment according to claim 12 or 13, which is characterized in that the optimization unit further include:
Third judging unit, for judge eight adjacent with the edge pixel point pixel in second image whether be Non-edge pixels point;
Third modifies unit, adjacent with edge pixel point in second image for determining in the third judging unit Eight pixels are non-edge pixels point, then the second pixel value of the edge pixel point are revised as non-edge pixels point Second pixel value.
CN201310311875.9A 2013-07-23 2013-07-23 A kind of detection method and image processing equipment of color boundary Active CN104346599B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310311875.9A CN104346599B (en) 2013-07-23 2013-07-23 A kind of detection method and image processing equipment of color boundary

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310311875.9A CN104346599B (en) 2013-07-23 2013-07-23 A kind of detection method and image processing equipment of color boundary

Publications (2)

Publication Number Publication Date
CN104346599A CN104346599A (en) 2015-02-11
CN104346599B true CN104346599B (en) 2019-09-17

Family

ID=52502175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310311875.9A Active CN104346599B (en) 2013-07-23 2013-07-23 A kind of detection method and image processing equipment of color boundary

Country Status (1)

Country Link
CN (1) CN104346599B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108335404B (en) * 2018-02-07 2020-09-15 深圳怡化电脑股份有限公司 Edge fitting method and currency detecting equipment
CN111192250B (en) * 2019-12-30 2022-02-08 合肥联宝信息技术有限公司 Computer B-side frame detection method and device, computer storage medium and computer

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6351566B1 (en) * 2000-03-02 2002-02-26 International Business Machines Method for image binarization
CN101246593A (en) * 2008-03-27 2008-08-20 北京中星微电子有限公司 Color image edge detection method and apparatus
CN101770646A (en) * 2010-02-25 2010-07-07 昆山锐芯微电子有限公司 Edge detection method based on Bayer RGB images
CN102346848A (en) * 2010-08-03 2012-02-08 富士施乐株式会社 Binarizing device, image processing apparatus, and method for binarizing
CN102693426A (en) * 2012-05-21 2012-09-26 清华大学深圳研究生院 Method for detecting image salient regions
CN102819850A (en) * 2012-08-16 2012-12-12 李勃 Method for detecting edge of color image on basis of local self-adaption color difference threshold

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049904B (en) * 2012-11-30 2016-04-20 北京华夏力鸿商品检验有限公司 A kind of image extraction method and system, digital certificates method for making and system thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6351566B1 (en) * 2000-03-02 2002-02-26 International Business Machines Method for image binarization
CN101246593A (en) * 2008-03-27 2008-08-20 北京中星微电子有限公司 Color image edge detection method and apparatus
CN101770646A (en) * 2010-02-25 2010-07-07 昆山锐芯微电子有限公司 Edge detection method based on Bayer RGB images
CN102346848A (en) * 2010-08-03 2012-02-08 富士施乐株式会社 Binarizing device, image processing apparatus, and method for binarizing
CN102693426A (en) * 2012-05-21 2012-09-26 清华大学深圳研究生院 Method for detecting image salient regions
CN102819850A (en) * 2012-08-16 2012-12-12 李勃 Method for detecting edge of color image on basis of local self-adaption color difference threshold

Also Published As

Publication number Publication date
CN104346599A (en) 2015-02-11

Similar Documents

Publication Publication Date Title
CN110544258B (en) Image segmentation method and device, electronic equipment and storage medium
CN110008954B (en) Complex background text image extraction method and system based on multi-threshold fusion
US8798361B2 (en) Mapping colors of an image
EP3272110B1 (en) Apparatus and method for color calibration
US6707940B1 (en) Method and apparatus for image segmentation
JP2007140684A (en) Image processor, method and program
US9401027B2 (en) Method and apparatus for scene segmentation from focal stack images
JP2015197816A (en) Image processing apparatus and image processing method
CN108389215B (en) Edge detection method and device, computer storage medium and terminal
CN105069453A (en) Image correction method and apparatus
US20120207379A1 (en) Image Inspection Apparatus, Image Inspection Method, And Computer Program
CN104637067B (en) A kind of defect inspection method of grain surface
US20170193644A1 (en) Background removal
US20120320433A1 (en) Image processing method, image processing device and scanner
EP3086552A1 (en) Method and apparatus for image colorization
AU2018207032A1 (en) Logo detection video analytics
CN103942756B (en) A kind of method of depth map post processing and filtering
JP2019095886A (en) Building damage estimation device
Yu et al. Efficient highlight removal of metal surfaces
US20150221101A1 (en) Method of selecting a region of interest
CN104346599B (en) A kind of detection method and image processing equipment of color boundary
US9552531B2 (en) Fast color-brightness-based methods for image segmentation
WO2013164043A1 (en) Method and system for determining a color mapping model able to transform colors of a first view into colors of at least one second view
JP3659426B2 (en) Edge detection method and edge detection apparatus
WO2024016632A1 (en) Bright spot location method, bright spot location apparatus, electronic device and storage medium

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