CN105354836A - Color sorting method - Google Patents
Color sorting method Download PDFInfo
- Publication number
- CN105354836A CN105354836A CN201510673852.1A CN201510673852A CN105354836A CN 105354836 A CN105354836 A CN 105354836A CN 201510673852 A CN201510673852 A CN 201510673852A CN 105354836 A CN105354836 A CN 105354836A
- Authority
- CN
- China
- Prior art keywords
- image
- color
- region
- labeled
- white image
- 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
- G06T7/0004—Industrial image inspection
- G06T7/001—Industrial image inspection using an image reference approach
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30128—Food products
Landscapes
- Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Sorting Of Articles (AREA)
- Spectrometry And Color Measurement (AREA)
Abstract
The invention belongs to the technical field of image processing, and particularly relates to a color sorting method. The color sorting method comprises the following steps: obtaining an original image of a material through a camera or a video camera, wherein the color of the material and a background color in the original image have a chromatic aberration convenient for identification; independently taking a value range of the background color and the value range of a spoiled material color as threshold values, and carrying out binarization processing on the original image to obtain a first black-and-white image and a second black-and-white image; and carrying out background expansion processing on the first black-and-white image, wherein the value of the structural element of the expansion processing is greater than or equal to the size of a material shadow; and carrying out intersection processing on the second black-and-white image and the image subjected to the expansion processing, and labeling and picking out the image subjected to the intersection processing to cause qualified products to remain. Through a series of processing, the edge shadow of the large-particle material is excluded, only whether the spoiled material color is in the presence in the material or not is judged, erroneous judgment caused by that the shadow is identified as the spoiled material color by mistake can be avoided, and the color sorting precision of the large-particle material is greatly improved after the large-particle material is processed in the above way.
Description
Technical field
The invention belongs to technical field of image processing, particularly a kind of color selection method.
Background technology
Color selector is a kind of main automatic separation equipment carrying out sorting material according to color.Initial color selector is mainly applied to selecting rice color, present then be widely used in the various materials such as coarse cereals, dehydrated vegetables, waste plastics, ore look choosing.
The less material of some particles such as rice, mung bean is when look choosing, and the differentiation ratio between honest material and stock is easier to, because material particles is less, as long as the color of certain material particles is all or part of stock color, can judge that this particle is stock.But when selecting the larger particles materials such as garlic, peanut, big white kidney bean, ore, waste plastics sheet when look, judge that certain material particles is that honest material or stock will become more complicated.Because when material particles is larger, there will be following disturbed conditions:
A kind of interference is from the shade in imaging process and reflective, large granular materials has thickness due to it, and surface is out-of-flatness also, it is each to evenly that the light source of color selector also cannot realize illumination, therefore large granular materials become the edge of image to have shade or reflective situation, these shades or reflective being easy to when judging are identified as stock color.Such as to the material of garlic, peanut and so on, if there is blackspot, be stock, and the color of material shade is also grey black, substantially identical with the color of blackspot, so the shade of honest material on image will cause the erroneous judgement of color selector, finally causes this honest material also to be falsely dropped out.Another kind is from interference variegated on a small quantity on large granular materials; plastic bottle closure fragment such as, have on the writing of some other colors or some materials and have a small amount of variegated spot; these writings or spot can't have influence on the quality of material; but when look choosing, a small amount of variegated writing on these honest materials or spot also can cause the erroneous judgement of color selector.Therefore to realize, to the accurate look choosing of above-mentioned large granular materials, reducing taking out of of honest material, just necessarily requiring color selector to have the ability eliminating interference when material handling image.
Summary of the invention
The object of the present invention is to provide a kind of color selection method, improve the precision of color separation of large granular materials.
For realizing above object, the technical solution used in the present invention is: a kind of color selection method, and comprise the steps: that (A) obtains the original image of material by camera or video camera, in original image, material color and background colour have the aberration being convenient to identify; (B) with the span of background colour for threshold value, binary conversion treatment is carried out to original image and obtains the first black white image; (C) with the span of stock color for threshold value, binary conversion treatment is carried out to original image and obtains the second black white image; (D) carry out background expansion process to the first black white image, the structural element value of this expansion process is more than or equal to the size of material shade; (E) image after the second black white image and step D process is carried out common factor to process, and will occur simultaneously process after image tagged and select, remaining certified products.
Compared with prior art, there is following technique effect in the present invention: by a series of process, the edge shadow of large granular materials is got rid of, only judge that material itself is with or without stock color, avoid the erroneous judgement by mistake becoming stock color to cause Shadow recognition, after such process, the precision of color separation of large granular materials is promoted greatly.
Accompanying drawing explanation
Fig. 1 is theory diagram of the present invention;
Fig. 2 is processing procedure schematic diagram of the present invention, and wherein Fig. 2 a is coloured image.
Embodiment
Below in conjunction with Fig. 1 to Fig. 2, the present invention is described in further detail.
Consult Fig. 1, a kind of color selection method, comprise the steps: that (A) obtains the original image of material by camera or video camera, in original image, material color and background colour have the aberration being convenient to identify; (B) with the span of background colour for threshold value, binary conversion treatment is carried out to original image and obtains the first black white image; (C) with the span of stock color for threshold value, binary conversion treatment is carried out to original image and obtains the second black white image; (D) carry out background expansion process to the first black white image, the structural element value of this expansion process is more than or equal to the size of material shade; (E) image after the second black white image and step D process is carried out common factor to process, and will occur simultaneously process after image tagged and select, remaining certified products.It should be noted that expansion process is carried out to background also namely corrosion treatment is carried out to material in step D.By the background expansion process in step D, the region of a circle outside material is excluded, so just the dash area around material can be got rid of, avoid dash area to have influence on follow-up judgement.Like this, by the common factor process of step e, just unacceptable product can be selected very accurately.
In above process, according to the difference of binary conversion treatment tense marker, there is the embodiment that two kinds are concrete:
Consult Fig. 2, embodiment one, here for shelled peanut, as shown in Figure 2 a, original image is colored to original image, and in Fig. 2 a, the shelled peanut in left side is certified products, the shelled peanut on right side is unacceptable product, but due to the existence of shade, if directly carry out look choosing according to existing color selection method, shelled peanut that can be left side is hypographous, qualified is as unacceptable product.In the first described black white image, background area is labeled as 0, material zone marker be the 1, first black white image as shown in Figure 2 b.In second black white image, stock region and shadow region are labeled as 1, all the other zone markers be the 0, second black white image as shown in Figure 2 c.In step D, carry out expansion process to the region being labeled as 0, the image after process is as Fig. 2 d.In step e, two marks that process of occuring simultaneously is about to two width image same positions carry out logic and operation, and be labeled as the region of region namely containing bad material of 1 after computing, the image after process of occuring simultaneously as shown in Figure 2 e.
Embodiment two, in the first described black white image, background area is labeled as 1, and material zone marker is 0; In second black white image, stock region and shadow region are labeled as 0, and all the other zone markers are 1; In step D, expansion process is carried out to the region being labeled as 1; In step e, two marks that process of occuring simultaneously is about to two width image same positions carry out logical OR computing, are labeled as the region of region namely containing bad material of 0 after computing.Embodiment two is similar with embodiment one, only with binary conversion treatment in, field color mark is contrary, it should be noted that during such process when occuring simultaneously process, is no longer logic and operation, but logical OR computing, and the region being labeled as 0 after computing is the region containing stock.
As preferred version of the present invention, in described steps A, original image is converted to HSI pattern by rgb format, in step B, step C according to the value of H, S, I by original image binaryzation.Binary conversion treatment is carried out according to H, S, I value, reliably more convenient, better processing effect.
Claims (4)
1. a color selection method, comprises the steps:
(A) obtained the original image of material by camera or video camera, in original image, material color and background colour have the aberration being convenient to identify;
(B) with the span of background colour for threshold value, binary conversion treatment is carried out to original image and obtains the first black white image;
(C) with the span of stock color for threshold value, binary conversion treatment is carried out to original image and obtains the second black white image;
(D) carry out background expansion process to the first black white image, the structural element value of this expansion process is more than or equal to the size of material shade;
(E) image after the second black white image and step D process is carried out common factor to process, and will occur simultaneously process after image tagged and select, remaining certified products.
2. color selection method as claimed in claim 1, it is characterized in that: in the first described black white image, background area is labeled as 0, material zone marker is 1; In second black white image, stock region and shadow region are labeled as 1, and all the other zone markers are 0; In step D, expansion process is carried out to the region being labeled as 0; In step e, two marks that process of occuring simultaneously is about to two width image same positions carry out logic and operation, are labeled as the region of region namely containing bad material of 1 after computing.
3. color selection method as claimed in claim 1, it is characterized in that: in the first described black white image, background area is labeled as 1, material zone marker is 0; In second black white image, stock region and shadow region are labeled as 0, and all the other zone markers are 1; In step D, expansion process is carried out to the region being labeled as 1; In step e, two marks that process of occuring simultaneously is about to two width image same positions carry out logical OR computing, are labeled as the region of region namely containing bad material of 0 after computing.
4. color selection method as claimed in claim 1, is characterized in that: in described steps A, original image is converted to HSI pattern by rgb format, in step B, step C according to the value of H, S, I by original image binaryzation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510673852.1A CN105354836B (en) | 2015-10-14 | 2015-10-14 | Color selection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510673852.1A CN105354836B (en) | 2015-10-14 | 2015-10-14 | Color selection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105354836A true CN105354836A (en) | 2016-02-24 |
CN105354836B CN105354836B (en) | 2018-08-28 |
Family
ID=55330803
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510673852.1A Active CN105354836B (en) | 2015-10-14 | 2015-10-14 | Color selection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105354836B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110523660A (en) * | 2019-09-26 | 2019-12-03 | 合肥长隆光电科技有限公司 | A kind of quick color sorting processing method of color selector |
CN113052177A (en) * | 2019-12-26 | 2021-06-29 | 合肥美亚光电技术股份有限公司 | Garlic scar identification method and device and sorting equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1403813A2 (en) * | 2002-09-30 | 2004-03-31 | Canon Kabushiki Kaisha | Image processing method, apparatus and program for dealing with inverted characters |
CN102509300A (en) * | 2011-11-18 | 2012-06-20 | 深圳市宝捷信科技有限公司 | Defect detection method and system |
CN103077529A (en) * | 2013-02-27 | 2013-05-01 | 电子科技大学 | System for analyzing plant leaf features based on image scanning |
CN103456021A (en) * | 2013-09-24 | 2013-12-18 | 苏州大学 | Piece goods blemish detecting method based on morphological analysis |
CN103559712A (en) * | 2013-11-07 | 2014-02-05 | 合肥安晶龙电子有限公司 | Color sorting method for black melon seeds |
-
2015
- 2015-10-14 CN CN201510673852.1A patent/CN105354836B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1403813A2 (en) * | 2002-09-30 | 2004-03-31 | Canon Kabushiki Kaisha | Image processing method, apparatus and program for dealing with inverted characters |
CN102509300A (en) * | 2011-11-18 | 2012-06-20 | 深圳市宝捷信科技有限公司 | Defect detection method and system |
CN103077529A (en) * | 2013-02-27 | 2013-05-01 | 电子科技大学 | System for analyzing plant leaf features based on image scanning |
CN103456021A (en) * | 2013-09-24 | 2013-12-18 | 苏州大学 | Piece goods blemish detecting method based on morphological analysis |
CN103559712A (en) * | 2013-11-07 | 2014-02-05 | 合肥安晶龙电子有限公司 | Color sorting method for black melon seeds |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110523660A (en) * | 2019-09-26 | 2019-12-03 | 合肥长隆光电科技有限公司 | A kind of quick color sorting processing method of color selector |
CN113052177A (en) * | 2019-12-26 | 2021-06-29 | 合肥美亚光电技术股份有限公司 | Garlic scar identification method and device and sorting equipment |
CN113052177B (en) * | 2019-12-26 | 2022-08-23 | 合肥美亚光电技术股份有限公司 | Garlic scar identification method and device and sorting equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105354836B (en) | 2018-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109269951B (en) | Image-based flotation tailing ash content, concentration and coarse particle content detection method | |
CN103439338B (en) | Film defects sorting technique | |
CN109872300B (en) | Visual saliency detection method for appearance defects of friction plate | |
AU2009305437B2 (en) | Method and system for item identification | |
US20070211242A1 (en) | Defect inspection apparatus and defect inspection method | |
US8064691B2 (en) | Method for identifying color in machine and computer vision applications | |
CN103698337B (en) | A kind of adhesion defect of label of flat wine bottle automatic testing method | |
CN104118609B (en) | Labeling quality determining method and device | |
CN109332192A (en) | A kind of image-recognizing method classified for pop can and beverage bottle | |
CN105046700A (en) | Brightness correction and color classification-based fruit surface defect detection method and system | |
CN103473778A (en) | Detecting algorithm for eccentrically-inserting defect of LED luminous chip | |
CN111665251A (en) | Visual detection method for surface defects | |
CN105354836A (en) | Color sorting method | |
Jau et al. | A comparison of RGB and HSI color segmentation in real-time video images: A preliminary study on road sign detection | |
CN114627109A (en) | Coal and gangue classification and identification method and process based on image enhancement and deep learning | |
Vishwanath et al. | Connected component analysis for Indian license plate infra-red and color image character segmentation | |
CN106407895A (en) | Vehicle shadow detection algorithm based on image gray and Lab color space | |
Duong et al. | Vision inspection system for pharmaceuticals | |
CN104349161A (en) | Image smudge judgment method of camera module | |
JP2006259885A (en) | Method of recognizing signboard and sign using color image | |
Fan et al. | An automatic machine vision method for the flaw detection on car's body | |
JP5390755B2 (en) | Appearance inspection method and apparatus using image processing | |
CN102572205A (en) | Image processing method, device and system | |
CN105344620A (en) | Color sorting method based on material shapes | |
Henderson et al. | An application of gaussian mixtures: Colour segmenting for the four legged league using hsi colour space |
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 |