CN104346599A - Detection method of color edge, and image processing device - Google Patents
Detection method of color edge, and image processing device Download PDFInfo
- Publication number
- CN104346599A CN104346599A CN201310311875.9A CN201310311875A CN104346599A CN 104346599 A CN104346599 A CN 104346599A CN 201310311875 A CN201310311875 A CN 201310311875A CN 104346599 A CN104346599 A CN 104346599A
- Authority
- CN
- China
- Prior art keywords
- image
- pixel
- pixel value
- edge
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
- Color Image Communication Systems (AREA)
- Image Processing (AREA)
Abstract
The embodiments of the invention disclose a detection method of a color edge, and an image processing device. The method provided by one embodiments of the invention comprises the following steps: obtaining a pixel value of a color to be detected; calculating a distance between an original pixel value of each pixel point in an image to be detected and the pixel value of the color to be detected, taking the distances as the first pixel values of the corresponding pixel points, and obtaining a first image; and by use of a local self-adaptive binary algorithm, performing binary processing on the first pixel values of all the pixel points in the first image to obtain a second image, and edge pixel points displaying the color in the second image determining the edge of the color, such that edge detection of a specific color in an image is effectively realized.
Description
Technical field
The present invention relates to image processing field, particularly relate to a kind of detection method and image processing equipment of color boundary.
Background technology
Be usually used in object to be identified to separate from background during image procossing, as identified automobile from road surface, extract word from paper, identifying workpiece etc. from travelling belt.These scenes have some common features: background is due to reasons such as own and optical fiber, there is certain shallow texture or uneven, simultaneously prospect and the comparison in difference of background on edge obvious, and in fixing application scenarios, background itself is constant substantially, for this type of image procossing, usually use the method for rim detection.
In prior art, conventional edge detection algorithm is widely used as Canny operator, Sobel operator, Gauss-Laplace etc., but this class algorithm can not detect the edge of a color of specifying, and can not determine color boundary in the picture.
Summary of the invention
Embodiments providing a kind of detection method and image processing equipment of color boundary, for detecting the edge of the appointment color in image, effectively can obtain the edge of this color.
The invention provides a kind of detection method of color boundary, comprising:
Obtain the pixel value of color to be detected;
Calculate the distance between the original pixel value of each pixel in testing image and the pixel value of described color to be detected, using described distance as the first pixel value of corresponding pixel, obtain the first image;
Utilize first pixel value of local auto-adaptive Binarization methods to all pixels in described first image to carry out binary conversion treatment, obtain the second image, in described second image, show the edge pixel point of described color.
The invention provides a kind of image processing equipment, comprising:
Acquiring unit, for obtaining the pixel value of color to be detected;
Computing unit, after obtaining the pixel value of described color to be detected at described acquiring unit, calculate the distance between the original pixel value of each pixel in testing image and the pixel value of described color to be detected, using described distance as the first pixel value of corresponding pixel, obtain the first image;
Binary conversion treatment unit, after obtaining described first image at described computing unit, first pixel value of local auto-adaptive Binarization methods to all pixels in described first image is utilized to carry out binary conversion treatment, obtain the second image, in described second image, show the edge pixel point of described color.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
Image processing equipment obtains the pixel value of color to be detected, calculate the distance between the original pixel value of each pixel in testing image and the pixel value of this color to be detected, using first pixel value of this distance as corresponding pixel, obtain the first image, and utilize first pixel value of local auto-adaptive Binarization methods to all pixels in the first image to carry out binary conversion treatment, obtain the second image, the edge pixel point of this color to be detected is shown in this second image, determine the edge of this color, effectively achieve the rim detection of the appointment color in image.
Accompanying drawing explanation
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 the 3rd 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.
Embodiment
Embodiments providing a kind of detection method and image processing equipment of color boundary, for detecting the edge of the appointment color in image, effectively can obtain the edge of this color.
Refer to Fig. 1, be the embodiment of the detection method of color boundary in the embodiment of the present invention, comprise:
101, the pixel value of color to be detected is obtained;
In embodiments of the present invention, after image processing equipment imports testing image, user can determine the color carrying out rim detection, be specifically as follows: the exportable pixel value carrying out the color of rim detection of user, or, user can click this image to be detected, after image processing equipment detects this clicking operation, determine the pixel of the position of clicking operation, using the pixel value of the pixel value of this pixel as color to be detected, therefore, image processing equipment can get the pixel value of color to be detected, and this color to be detected is appointment color.
102, calculate the distance between the original pixel value of each pixel in testing image and the pixel value of color to be detected, using first pixel value of distance as corresponding pixel, obtain the first image;
In embodiments of the present invention, image processing equipment is by the distance between the original pixel value of each pixel in calculating testing image and the pixel value of color to be detected, using first pixel value of this distance as corresponding pixel, the image be made up of the first pixel value of all pixels is the first image.
103, utilize first pixel value of local auto-adaptive Binarization methods to all pixels in the first image to carry out binary conversion treatment, obtain the second image, in the second image, show the edge pixel point of color to be detected.
In embodiments of the present invention, utilize first pixel value of local auto-adaptive Binarization methods to all pixels in the first image to carry out binary conversion treatment, obtain the second image, and in this second image, show the edge pixel point of color to be detected.
In embodiments of the present invention, utilize after local auto-adaptive Binarization methods carries out binary conversion treatment to the first image, the black white image of the second image obtained, the pixel value of the pixel in this second image is 0 or 255, makes edge pixel o'clock 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, calculate the distance between the original pixel value of each pixel in testing image and the pixel value of this color to be detected, using first pixel value of this distance as corresponding pixel, obtain the first image, and utilize first pixel value of local auto-adaptive Binarization methods to all pixels in the first image to carry out binary conversion treatment, obtain the second image, the edge pixel point of this color to be detected is shown in this second image, determine the edge of this color, effectively achieve the rim detection of the appointment color in image.
Technical scheme for a better understanding of the present invention in embodiment, refers to Fig. 2, is the embodiment of the detection method of color boundary in the embodiment of the present invention, comprises:
201, the pixel value of color to be detected is obtained;
Step 201 is similar to the content in the step 101 of middle description embodiment illustrated in fig. 1, repeats no more herein.
202, calculate the distance between the original pixel value of each pixel in testing image and the pixel value of color to be detected, using first pixel value of distance as corresponding pixel, obtain the first image;
In embodiments of the present invention, image processing equipment is by the distance between the original pixel value of each pixel in calculating testing image and the pixel value of color to be detected, using first pixel value of this distance as corresponding pixel, the image be made up of the first pixel value of all pixels is the first image.
Wherein, distance can be Euclidean distance, and image processing equipment can use following formula to calculate the first pixel value of each pixel in testing image respectively, and formula is as follows:
Dis(i,j)=sqrt((r
i-r
j)
2+(g
i-g
j)
2+(b
i-b
j)
2)
Wherein, i represents pixel i, and j represents pixel j, and r represents RGB (English full name is: Red, Green, Blue, is abbreviated as: RGB) color space r channel value, and g represents RGB color space g channel value, and b represents RGB color space b channel value, wherein, and r
i, g
i, b
ifor the pixel value of pixel i, r
j, g
j, b
jfor the pixel value of pixel j, and pixel j is the pixel value of color to be detected.
It should be noted that, image processing equipment also can use the distance between the pixel value of each pixel in the account form of other distances calculating testing image and the pixel value of color to be detected, or the pixel value of the pixel value of testing image and color to be detected also can be transformed into other color spaces calculating distance by image processing equipment, other color spaces can be, but not limited to following color space: tone, saturation degree, (English full name is: Hue in brightness, Saturation, Value, be abbreviated as: HSV) color space, lightness, (English full name is colourity: Luminance, Chrominance, be abbreviated as: YUV) color space.
203, utilize first pixel value of local auto-adaptive Binarization methods to all pixels in the first image to carry out binary conversion treatment, obtain the second image, in the second image, show the edge pixel point of color to be detected.
In embodiments of the present invention, after image processing equipment obtains the first image, the first pixel value utilizing local auto-adaptive Binarization methods to all pixels in the first image is carried out binary conversion treatment, obtains the second image, in the second image, show the edge pixel point of color to be detected.
Wherein, the window size of local auto-adaptive Binarization methods is 3*3, and this local auto-adaptive Binarization methods is wolf local auto-adaptive Binarization methods, or is Niblack Binarization methods, or is sauvola Binarization methods.
Wherein, if use wolf local auto-adaptive Binarization methods, and window size is 3*3, then by with the calculated value of the gray scale of under type calculation window central pixel point, formula is as follows:
T=m-ka(m-M);
a=1-s/R;
R=max(s);
Wherein, T represents the calculated value of the gray scale of window center pixel, and m represents the average of the gray-scale value of all pixels in window, M represents gray-scale value minimum in all pixels in window, k is constant, can be the variance that 0.4, s represents the gray-scale value of all pixels in window.
Utilizing after local auto-adaptive Binarization methods obtains the calculated value of the gray scale of window center pixel, image processing equipment judges whether the calculated value of this gray scale is greater than the threshold value pre-set, if be greater than, then the pixel value of this window center pixel is set to 0, if be less than or equal to, then the pixel value of this window center pixel is set to 255, or, image processing equipment judges whether the calculated value of this gray scale is greater than the threshold value pre-set, if be greater than, then window center pixel is set to 255, if be less than or equal to, then the pixel value of window center pixel is set to 0.
After by above-mentioned mode binary conversion treatment being carried out to the first image, the second image obtained is black white image, make the white pixel point in this second image be the edge pixel point of color to be detected, or the black pixel point in this second image is the edge pixel point of color to be detected.
204, carry out second-order correction process and remove putting process of making an uproar, the 3rd image after being optimized to the edge pixel point in the second image.
In embodiments of the present invention, in order to make the edge pixel point that obtains more accurate, image processing equipment also will be optimized process to the second image, namely image processing equipment puts process of making an uproar, the 3rd image after being optimized by carrying out second-order correction process to the edge pixel point in the second image and removing.
In embodiments of the present invention, image processing equipment first can carry out second-order correction process to the second image, carry out removal point to the second image after second-order correction process again to make an uproar process, obtain the 3rd image, or image processing equipment first can carry out removal point to the second image and to make an uproar process, second-order correction process is carried out again to removing the second image after putting process of making an uproar, the 3rd image after being optimized, in actual applications, second-order correction process can be set as required and remove the sequencing putting process of making an uproar, not limit herein.
In embodiments of the present invention, image processing equipment can carry out second-order correction process to the second image in such a way, comprising: calculate the distance between original pixel value in testing image of edge pixel point in the second image and the pixel value of color to be detected; Judge whether the distance between original pixel value in testing image of edge pixel point in the second image and the pixel value of color to be detected is greater than the first numerical value pre-set; If so, then the second pixel value of edge pixel point is revised as the second pixel value of non-edge pixels point, this edge pixel point is modified to non-edge pixels point, if not, then retain this edge pixel point.
In embodiments of the present invention, image processing equipment also can carry out second-order correction process to the second image in such a way, comprising: judge whether edge pixel in the second image the first pixel value o'clock in the first image is greater than the second value pre-set; If so, then the second pixel value of edge pixel point is revised as the second pixel value of non-edge pixels point, if not, then retains this edge pixel point.
In embodiments of the present invention, image processing equipment can carry out removal point to the second image or the second image of having carried out second-order correction process in such a way and to make an uproar process, comprising: judge whether eight pixels adjacent with edge pixel point in the second image are non-edge pixels point; If eight pixels adjacent with edge pixel point are non-edge pixels point, then the second pixel value of edge pixel point is revised as the second pixel value of non-edge pixels point, if eight pixels adjacent with edge pixel point are not all non-edge pixels point, then retain this edge pixel point.
In embodiments of the present invention, image processing equipment obtains the pixel value of color to be detected, calculate the distance between the original pixel value of each pixel in testing image and the pixel value of this color to be detected, using first pixel value of this distance as corresponding pixel, obtain the first image, and utilize first pixel value of local auto-adaptive Binarization methods to all pixels in the first image to carry out binary conversion treatment, obtain the second image, the edge pixel point of this color to be detected is shown in this second image, and carry out second-order correction process and remove putting process of making an uproar to this second image, the 3rd image after being optimized, the edge pixel point of color to be detected is shown in 3rd image, effectively achieve the rim detection of the appointment color in image.
The detection method of the color boundary for a better understanding of the present invention in embodiment, a concrete application scenarios will be introduced in detail below, comprising:
Image processing equipment imports testing image, refer to Fig. 3 a, Fig. 3 a is testing image, user needs to detect the edge of redness, then input red pixel value, after image processing equipment obtains the pixel value of this redness, by the distance between the original pixel value of each pixel that calculates respectively in this testing image and the pixel value of this redness, and using first pixel value of this distance as corresponding pixel, obtain the first image, refer to Fig. 3 b, Fig. 3 b is that in the embodiment of the present invention, testing image carries out the first image obtained after distance calculates, then, image processing equipment utilizes first pixel value of local auto-adaptive Binarization methods to each pixel in this first image to carry out binary conversion treatment, obtain the second image, refer to Fig. 3 c, for in the embodiment of the present invention, the second image that first image obtains after carrying out binary conversion treatment, and the white portion shown in Fig. 3 c is red edge pixel point, in order to be optimized process to the edge pixel point obtained, image processing equipment will carry out second-order correction process and remove putting process of making an uproar to the second image, refer to Fig. 3 d, for in the embodiment of the present invention, second-order correction process is carried out to the second image and goes out the 3rd image that obtains after process of a little making an uproar.
Refer to Fig. 4, be an embodiment of the structure of image processing equipment in the embodiment of the present invention, comprise:
Acquiring unit 401, for obtaining the pixel value of color to be detected;
Computing unit 402, after obtaining the pixel value of color to be detected at acquiring unit 401, calculate the distance between the original pixel value of each pixel in testing image and the pixel value of color to be detected, using first pixel value of distance as corresponding pixel, obtain the first image;
Binary conversion treatment unit 403, after obtaining the first image at computing unit 402, utilize first pixel value of local auto-adaptive Binarization methods to all pixels in the first image to carry out binary conversion treatment, obtain the second image, the edge pixel point of display color in the second image.
In embodiments of the present invention, after acquiring unit 401 in image processing equipment obtains the pixel value of color to be detected, computing unit 402 calculates the distance between the original pixel value of each pixel in testing image and the pixel value of color to be detected, using first pixel value of distance as corresponding pixel, obtain the first image, then, binary conversion treatment unit 403 utilizes first pixel value of local auto-adaptive Binarization methods to all pixels in the first image to carry out binary conversion treatment, obtain the second image, the edge pixel point of display color in second image.
In embodiments of the present invention, image processing equipment obtains the pixel value of color to be detected, calculate the distance between the original pixel value of each pixel in testing image and the pixel value of this color to be detected, using first pixel value of this distance as corresponding pixel, obtain the first image, and utilize first pixel value of local auto-adaptive Binarization methods to all pixels in the first image to carry out binary conversion treatment, obtain the second image, the edge pixel point of this color to be detected is shown in this second image, determine the edge of this color, effectively achieve the rim detection of the appointment color in image.
Image processing equipment in implementing for a better understanding of the present invention, refers to Fig. 5, is the embodiment of the structure of image processing equipment in the embodiment of the present invention, comprises:
The acquiring unit 401 described in embodiment as shown in Figure 4, computing unit 401 and binary conversion treatment unit 403, and similar to the content of middle description embodiment illustrated in fig. 4, repeat no more herein.
In embodiments of the present invention, if the distance that computing unit 402 calculates is Euclidean distance; Then computing unit 402 is specifically for once calculating the Euclidean distance of each pixel in the following manner:
Dis(i,j)=sqrt((r
i-r
j)
2+(g
i-g
j)
2+(b
i-b
j)
2)
Wherein, i represents pixel i, and j represents pixel j, and r represents RGB RGB color space r channel value, and g represents RGB color space g channel value, and b represents RGB color space b channel value, wherein, and r
i, g
i, b
ifor the pixel value of pixel i, r
j, g
j, b
jfor 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, and local auto-adaptive Binarization methods is wolf local auto-adaptive Binarization methods, or is Niblack Binarization methods, or is sauvola Binarization methods.
In embodiments of the present invention, image processing equipment also comprises:
Optimize unit 501, after obtaining the second image at binary conversion treatment unit 403, carry out second-order correction process and remove putting process of making an uproar, the 3rd image after being optimized to the edge pixel point in the second image.
In embodiments of the present invention, optimize unit 501 to comprise:
Metrics calculation unit 502, after obtaining the second image at binary conversion treatment unit 403, calculates the distance between original pixel value in testing image of edge pixel point in the second image and the pixel value of color to be detected;
Whether the first judging unit 503, be greater than the first numerical value pre-set for judging distance;
First amendment unit 504, for when the first judging unit 503 determines that distance is greater than the first numerical value pre-set, is revised as the second pixel value of non-edge pixels point by the second pixel value of edge pixel point.
In embodiments of the present invention, optimizing unit 501 can also be comprise:
Second judging unit 505, after obtaining the second image at binary conversion treatment unit 403, judges whether edge pixel in the second image the first pixel value o'clock in the first image is greater than the second value pre-set;
Second amendment unit 506, for when second judges to determine that edge pixel in 505 second images the first pixel o'clock in the first image is greater than the second value pre-set, the second pixel value of edge pixel point is revised as the second pixel value of non-edge pixels point.
In embodiments of the present invention, optimize unit 501 also to comprise:
3rd judging unit 507, for judging whether eight pixels adjacent with edge pixel point in the second image are non-edge pixels point;
3rd amendment unit 508, for determining that at the 3rd judging unit 507 eight pixels adjacent with edge pixel point in second image are non-edge pixels point, is then revised as the second pixel value of non-edge pixels point by the second pixel value of edge pixel point.
In embodiments of the present invention, after acquiring unit 401 in image processing equipment obtains the pixel value of color to be detected, computing unit 402 calculates the distance between the original pixel value of each pixel in testing image and the pixel value of color to be detected, using first pixel value of distance as corresponding pixel, obtain the first image, then, binary conversion treatment unit 403 utilizes first pixel value of local auto-adaptive Binarization methods to all pixels in the first image to carry out binary conversion treatment, obtain the second image, the edge pixel point of display color in second image.
In order to be optimized process to the edge pixel point in the second image, the optimization unit 501 in image processing equipment also puts process of making an uproar, the 3rd image after being optimized by carrying out second-order correction process to the edge pixel point in the second image and removing.Metrics calculation unit 502 in concrete optimization unit 501 calculates the distance between original pixel value in testing image of edge pixel point in the second image and the pixel value of color to be detected; Then whether the first judging unit 503 judging distance is greater than the first numerical value pre-set; And if the first judging unit 503 determines that this distance is greater than the first numerical value pre-set, then the second pixel value of edge pixel point is revised as the second pixel value of non-edge pixels point by the first amendment unit 504; Or the second judging unit 505 optimized in unit 501 judges whether edge pixel in the second image the first pixel value o'clock in the first image is greater than the second value pre-set; When second judges to determine that edge pixel in 505 second images the first pixel o'clock in the first image is greater than the second value pre-set, the second pixel value of edge pixel point is revised as the second pixel value of non-edge pixels point by the second amendment unit 506.Optimize unit 501 after second-order correction process is carried out to the edge pixel point of the second image, also judge whether eight pixels adjacent with edge pixel point in the second image are non-edge pixels point by by the 3rd judging unit 507 optimized in unit 501; And when eight pixels adjacent with edge pixel point that the 3rd judging unit 507 is determined in the second image are non-edge pixels point, the second pixel value of edge pixel point is revised as the second pixel value of non-edge pixels point by the 3rd amendment unit 509.
In embodiments of the present invention, image processing equipment obtains the pixel value of color to be detected, calculate the distance between the original pixel value of each pixel in testing image and the pixel value of this color to be detected, using first pixel value of this distance as corresponding pixel, obtain the first image, and utilize first pixel value of local auto-adaptive Binarization methods to all pixels in the first image to carry out binary conversion treatment, obtain the second image, the edge pixel point of this color to be detected is shown in this second image, and carry out second-order correction process and remove putting process of making an uproar to this second image, the 3rd image after being optimized, the edge pixel point of color to be detected is shown in 3rd image, effectively achieve the rim detection of the appointment color in image.
One of ordinary skill in the art will appreciate that all or part of step realized in above-described embodiment method is that the hardware that can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
Above the detection method of a kind of color boundary provided by the present invention and image processing equipment are described in detail, for one of ordinary skill in the art, according to the thought of the embodiment of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.
Claims (14)
1. a detection method for color boundary, is characterized in that, comprising:
Obtain the pixel value of color to be detected;
Calculate the distance between the original pixel value of each pixel in testing image and the pixel value of described color to be detected, using described distance as the first pixel value of corresponding pixel, obtain the first image;
Utilize first pixel value of local auto-adaptive Binarization methods to all pixels in described first image to carry out binary conversion treatment, obtain the second image, in described second image, show the edge pixel point of described color.
2. detection method according to claim 1, is characterized in that, described distance is Euclidean distance;
Then calculate the distance between the pixel value of each pixel in testing image and the pixel value of described color to be detected, using described distance as the first pixel value of corresponding pixel, obtain the first image and comprise:
Once calculate the Euclidean distance of each pixel in the following manner:
Dis(i,j)=sqrt((r
i-r
j)
2+(g
i-g
j)
2+(b
i-b
j)
2)
Wherein, i represents pixel i, and j represents pixel j, and r represents RGB RGB color space r channel value, and g represents RGB color space g channel value, and b represents RGB color space b channel value, wherein, and r
i, g
i, b
ifor the pixel value of pixel i, r
j, g
j, b
jfor the pixel value of pixel j, and pixel j is the pixel value of color to be detected.
3. detection method according to claim 1, it is characterized in that, the window size of described local auto-adaptive Binarization methods is 3*3, described local auto-adaptive Binarization methods is wolf local auto-adaptive Binarization methods, or be Niblack Binarization methods, or be sauvola Binarization methods.
4. detection method as claimed in any of claims 1 to 3, is characterized in that, described method also comprises:
Carry out second-order correction process and remove putting process of making an uproar, the 3rd image after being optimized to the edge pixel point in described second image.
5. detection method according to claim 4, is characterized in that, describedly carries out second-order correction process to the edge pixel point in described second image and comprises:
Calculate the distance between original pixel value in described testing image of edge pixel point in described second image and the pixel value of described color to be detected;
Judge whether described distance is greater than the first numerical value pre-set;
If so, then the second pixel value of described edge pixel point is revised as the second pixel value of non-edge pixels point.
6. detection method according to claim 4, is characterized in that, describedly carries out second-order correction process to the edge pixel point in described second image and comprises:
Judge whether first pixel value of edge pixel point in described first image in described second image is greater than the second value pre-set;
If so, then the second pixel value of described edge pixel point is revised as the second pixel value of non-edge pixels point.
7. detection method according to claim 4, is characterized in that, describedly carries out the process of making an uproar of removal point to the edge pixel point in described second image and comprises:
Judge whether eight pixels adjacent with edge pixel point in described second image are non-edge pixels point;
If so, then the second pixel value of described edge pixel point is revised as the second pixel value of non-edge pixels point.
8. an image processing equipment, is characterized in that, comprising:
Acquiring unit, for obtaining the pixel value of color to be detected;
Computing unit, after obtaining the pixel value of described color to be detected at described acquiring unit, calculate the distance between the original pixel value of each pixel in testing image and the pixel value of described color to be detected, using described distance as the first pixel value of corresponding pixel, obtain the first image;
Binary conversion treatment unit, after obtaining described first image at described computing unit, first pixel value of local auto-adaptive Binarization methods to all pixels in described first image is utilized to carry out binary conversion treatment, obtain the second image, in described second image, show the edge pixel point of described color.
9. image processing equipment according to claim 1, is characterized in that, described distance is Euclidean distance;
Then described computing unit is specifically for once calculating the Euclidean distance of each pixel in the following manner:
Dis(i,j)=sqrt((r
i-r
j)
2+(g
i-g
j)
2+(b
i-b
j)
2)
Wherein, i represents pixel i, and j represents pixel j, and r represents RGB RGB color space r channel value, and g represents RGB color space g channel value, and b represents RGB color space b channel value, wherein, and r
i, g
i, b
ifor the pixel value of pixel i, r
j, g
j, b
jfor the pixel value of pixel j, and pixel j is the pixel value of color to be detected.
10. detection method according to claim 8, it is characterized in that, the window size of described local auto-adaptive Binarization methods is 3*3, described local auto-adaptive Binarization methods is wolf local auto-adaptive Binarization methods, or be Niblack Binarization methods, or be sauvola Binarization methods.
Image processing equipment described in 11. any one of according to Claim 8 to 10, it is characterized in that, described image processing equipment also comprises:
Optimize unit, after obtaining described second image at described binary conversion treatment unit, carry out second-order correction process and remove putting process of making an uproar, the 3rd image after being optimized to the edge pixel point in described second image.
12. image processing equipments according to claim 11, is characterized in that, described optimization unit comprises:
Metrics calculation unit, after obtaining described second image at described binary conversion treatment unit, calculates the distance between original pixel value in described testing image of edge pixel point in described second image and the pixel value of described color to be detected;
First judging unit, for judging whether described distance is greater than the first numerical value pre-set;
First amendment unit, for determine at described first judging unit described distance be greater than described in pre-set the first numerical value time, the second pixel value of described edge pixel point is revised as the second pixel value of non-edge pixels point.
13. image processing equipments according to claim 11, is characterized in that, described optimization unit comprises:
Second judging unit, after obtaining described second image at described binary conversion treatment unit, judges whether first pixel value of edge pixel point in described first image in described second image is greater than the second value pre-set;
Second amendment unit, during the second value pre-set described in first pixel of edge pixel point in described first image for determining in described second image in described second judgement is greater than, the second pixel value of described edge pixel point is revised as the second pixel value of non-edge pixels point.
14. image processing equipments according to claim 12 or 13, it is characterized in that, described optimization unit also comprises:
3rd judging unit, for judging whether eight pixels adjacent with edge pixel point in described second image are non-edge pixels point;
3rd amendment unit, for determining that at described 3rd judging unit eight pixels adjacent with edge pixel point in described second image are non-edge pixels point, then the second pixel value of described edge pixel point is revised as the second pixel value of non-edge pixels point.
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 true CN104346599A (en) | 2015-02-11 |
CN104346599B 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108335404A (en) * | 2018-02-07 | 2018-07-27 | 深圳怡化电脑股份有限公司 | Edge fitting method and money-checking equipment |
CN111192250A (en) * | 2019-12-30 | 2020-05-22 | 合肥联宝信息技术有限公司 | Data processing method and device, computer storage medium and computer |
Citations (7)
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 |
CN103049904A (en) * | 2012-11-30 | 2013-04-17 | 北京华夏力鸿商品检验有限公司 | Image extraction method and system, and electronic certificate making method and system |
-
2013
- 2013-07-23 CN CN201310311875.9A patent/CN104346599B/en active Active
Patent Citations (7)
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 |
CN103049904A (en) * | 2012-11-30 | 2013-04-17 | 北京华夏力鸿商品检验有限公司 | Image extraction method and system, and electronic certificate making method and system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108335404A (en) * | 2018-02-07 | 2018-07-27 | 深圳怡化电脑股份有限公司 | Edge fitting method and money-checking equipment |
CN111192250A (en) * | 2019-12-30 | 2020-05-22 | 合肥联宝信息技术有限公司 | Data processing method and device, computer storage medium and computer |
CN111192250B (en) * | 2019-12-30 | 2022-02-08 | 合肥联宝信息技术有限公司 | Computer B-side frame detection method and device, computer storage medium and computer |
Also Published As
Publication number | Publication date |
---|---|
CN104346599B (en) | 2019-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8798361B2 (en) | Mapping colors of an image | |
US8599270B2 (en) | Computing device, storage medium and method for identifying differences between two images | |
CN107507144B (en) | Skin color enhancement processing method and device and image processing device | |
US20170193644A1 (en) | Background removal | |
US20140267826A1 (en) | Apparatus and techniques for image processing | |
CN103729828B (en) | video rain removing method | |
CN104637067B (en) | A kind of defect inspection method of grain surface | |
CN108389215B (en) | Edge detection method and device, computer storage medium and terminal | |
US20120320433A1 (en) | Image processing method, image processing device and scanner | |
CN103942756B (en) | A kind of method of depth map post processing and filtering | |
TW201032180A (en) | Method and device for keeping image background by multiple gauss models | |
CN110188640B (en) | Face recognition method, face recognition device, server and computer readable medium | |
JP6771134B2 (en) | Image correction method and image correction device | |
WO2024179474A1 (en) | Fisheye image processing method, electronic device, and storage medium | |
CN111582100A (en) | Target object detection method and device | |
US20240296537A1 (en) | Defect detection method and apparatus, and electronic device | |
US8803998B2 (en) | Image optimization system and method for optimizing images | |
US11588955B2 (en) | Apparatus, method, and computer program for image conversion | |
KR101854432B1 (en) | Method and apparatus for detecting and compensating back light frame | |
JP3659426B2 (en) | Edge detection method and edge detection apparatus | |
CN104346599A (en) | Detection method of color edge, and image processing device | |
CN117635485A (en) | Method, device, equipment and medium for removing purple fringing of image | |
CN105809677B (en) | Image edge detection method and system based on bilateral filter | |
CN104574448A (en) | Method for identifying connected pixel blocks | |
WO2021008187A1 (en) | Detection method and system for display interface switching function |
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 |