CN105354836B - Color selection method - Google Patents
Color selection method Download PDFInfo
- Publication number
- CN105354836B CN105354836B CN201510673852.1A CN201510673852A CN105354836B CN 105354836 B CN105354836 B CN 105354836B CN 201510673852 A CN201510673852 A CN 201510673852A CN 105354836 B CN105354836 B CN 105354836B
- Authority
- CN
- China
- Prior art keywords
- image
- color
- black white
- region
- 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.)
- Active
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)
- Sorting Of Articles (AREA)
- Image Analysis (AREA)
- Spectrometry And Color Measurement (AREA)
Abstract
The invention belongs to technical field of image processing, more particularly to a kind of color selection method includes the following steps:The original image of material is obtained by camera or video camera, material color has the aberration convenient for identification with background colour in original image;Respectively using background colour, stock color value range as threshold value, to original image carry out binary conversion treatment obtain the first and second black white image;Background expansion process is carried out to the first black white image, the structural element value of the expansion process is more than or equal to the size of material shade;Image after second black white image and expansion process is subjected to intersection processing, and by intersection treated image tagged and is selected, remaining certified products.By a series of processing, the edge shadow of large granular materials is excluded, only judges material itself whether there is or not stock color, avoids and accidentally greatly promotes Shadow recognition after handling in this way to the precision of color separation of large granular materials at erroneous judgement caused by stock color.
Description
Technical field
The invention belongs to technical field of image processing, more particularly to a kind of color selection method.
Background technology
Color selector is a kind of mainly according to color come the automatic separation equipment of sorting material.Initial color selector is mainly applied
In selecting rice color, and it is then widely used to the color sorting of the various materials such as coarse cereals, dehydrated vegetables, waste plastics, ore now.
For the smaller material of some particles such as rice, mung bean when color sorting, appearance is compared in the differentiation between honest material and stock
Easily, because material particles are smaller, as long as the color of some material particles is all or part of stock color, you can judge the particle
For stock.But when larger particles materials such as color sorting garlic, peanut, big white kidney bean, ore, waste plastics pieces, judge some object
Material particle, which is honest material or stock, will become more complicated.Because when material particles are larger, it may appear that following some interference
Situation:
A kind of interference is shade in imaging process and reflective, and large granular materials have thickness, and surface due to it
Also out-of-flatness, the light source of color selector also cannot achieve each to uniform of illumination, thus large granular materials at image edge meeting
There are shade or a reflective situation, these shades or reflective is easily identified into stock color when judging.Such as to garlic, flower
Raw etc material, if there is blackspot is then stock, and the color of material shade is also the basic phase of color of grey black and blackspot
Together, it then the shade of honest material on the image may result in the erroneous judgement of color selector, eventually leads to the honest material and also is falsely dropped out.It is another
Kind be a small amount of variegated interference on large granular materials, for example, had on plastic bottle closure fragment some other colors writing or
Have a small amount of variegated spot on some materials of person, these writings or spot do not interfere with the quality of material, but color sorting when
It waits, the either spot of a small amount of variegated writing on these honest materials also results in the erroneous judgement of color selector.Therefore it to realize to above-mentioned big
The accurate color sorting of granule materials, reduces taking out of for honest material, and color selector is just necessarily required to have elimination to interfere when handling material image
Ability.
Invention content
The purpose of the present invention is to provide a kind of color selection methods, improve the precision of color separation of large granular materials.
In order to achieve the above object, the technical solution adopted by the present invention is:A kind of color selection method, includes the following steps:(A) lead to
It crosses camera or video camera obtains the original image of material, material color has the color convenient for identification with background colour in original image
Difference;(B) using the value range of background colour as threshold value, binary conversion treatment is carried out to original image and obtains the first black white image;(C) with
The value range of stock color is threshold value, and carrying out binary conversion treatment to original image obtains the second black white image;(D) black to first
White image carries out background expansion process, and the structural element value of the expansion process is more than or equal to the size of material shade;(E) by
Two black white images and step D treated image carries out intersection processing, and by intersection treated image tagged and select, it is remaining
Certified products.
Compared with prior art, there are following technique effects by the present invention:By a series of processing, by the side of large granular materials
Edge shade excludes, and only judges material itself whether there is or not stock color, avoids and accidentally judges Shadow recognition at caused by stock color by accident,
After handling in this way, the precision of color separation of large granular materials is greatly promoted.
Description of the drawings
Fig. 1 is the principle of the present invention block diagram;
Fig. 2 is the processing procedure schematic diagram of the present invention, and wherein Fig. 2 a are coloured image.
Specific implementation mode
With reference to Fig. 1 to Fig. 2, the present invention is described in further detail.
Refering to fig. 1, a kind of color selection method, includes the following steps:(A) original graph of material is obtained by camera or video camera
Picture, material color has the aberration convenient for identification with background colour in original image;(B) using the value range of background colour as threshold value,
Binary conversion treatment is carried out to original image and obtains the first black white image;(C) using the value range of stock color as threshold value, to original
Image carries out binary conversion treatment and obtains the second black white image;(D) background expansion process is carried out to the first black white image, at the expansion
The structural element value of reason is more than or equal to the size of material shade;(E) by the second black white image and step D treated image into
Row intersection is handled, and by intersection treated image tagged and is selected, remaining certified products.It should be noted that pair in step D
Background carries out expansion process namely carries out corrosion treatment to material.By the background expansion process in step D, by the outside of material one
The region of circle excludes, and can thus exclude the dash area around material, dash area is avoided to influence subsequent judgement.
In this way, the intersection by step E is handled, defective work can be accurately selected very much.
In above processing, the difference marked when according to binary conversion treatment, there are two types of specific embodiments:
Referring to Fig.2, embodiment one, here by taking shelled peanut as an example, original image is as shown in Figure 2 a, and original image is colour
, the shelled peanut in left side is certified products in Fig. 2 a, and the shelled peanut on right side is defective work, but due to the presence of shade, if
Color sorting is directly carried out according to existing color selection method, shelled peanut that can be hypographous by left side, qualified treats as defective work.It is described
The first black white image in, background area be labeled as 0, material zone marker be 1, the first black white image is as shown in Figure 2 b.Second
In black white image, stock region and shadow region are labeled as 1, remaining zone marker is 0, and the second black white image is as shown in Figure 2 c.
In step D, expansion process, treated image such as Fig. 2 d are carried out to the region that label is.In step E, intersection processing will two
Two labels of width image same position carry out logic and operation, and the region for being is marked to contain the region of bad material after operation,
Treated that image is as shown in Figure 2 e for intersection.
Embodiment two, in first black white image, background area is labeled as 1, and material zone marker is 0;Second is black
In white image, stock region and shadow region are labeled as 0, remaining zone marker is 1;In step D, to label be region into
Row expansion process;In step E, two labels of two images same position are carried out logic or operation, operation by intersection processing
The region for being is marked to contain the region of bad material afterwards.Embodiment two is similar with embodiment one, only with binary conversion treatment
When, field color label should be noted that when on the contrary, handling in this way when intersection is handled, and no longer be logic and operation, and
It is logic or operation, also, it is the region containing stock that the region for being is marked after operation.
As the preferred embodiment of the present invention, in the step A, original image is converted into HSI patterns by rgb format,
Step B, in 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, is more convenient
Reliably, better processing effect.
Claims (2)
1. a kind of color selection method, includes the following steps:
(A) original image of material is obtained by camera or video camera, material color and background colour are with being convenient in original image
The aberration of identification;
(B) using the value size of background colour as threshold value, binary conversion treatment is carried out to original image and obtains the first black white image;
(C) using the value size of stock color as threshold value, binary conversion treatment is carried out to original image and obtains the second black white image;
(D) background expansion process is carried out to the first black white image, the structural element value of the expansion process is more than or equal to material the moon
The size of shadow;
(E) by the second black white image and step D treated image carries out intersection processing, and by intersection treated image tagged
And it selects, remaining certified products;
Wherein:In first black white image, background area is labeled as 0, and material zone marker is 1;In second black white image,
Stock region and shadow region are labeled as 1, remaining zone marker is 0;In step D, the region for being to label carries out at expansion
Reason;In step E, two labels of two images same position are carried out logic and operation by intersection processing, and label is after operation
Region be containing bad material region;
Or in first black white image, background area is labeled as 1, and material zone marker is 0;It is bad in second black white image
Expect that region and shadow region are labeled as 0, remaining zone marker is 1;In step D, expansion process is carried out to the region that label is;
In step E, two labels of two images same position are carried out logic or operation by intersection processing, are marked after operation
Region is the region containing bad material.
2. color selection method as described in claim 1, it is characterised in that:In the step A, by original image by rgb format
Be converted to HSI patterns, step B, in 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 CN105354836A (en) | 2016-02-24 |
CN105354836B true 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) |
Families Citing this family (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 |
CN113052177B (en) * | 2019-12-26 | 2022-08-23 | 合肥美亚光电技术股份有限公司 | 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 |
Also Published As
Publication number | Publication date |
---|---|
CN105354836A (en) | 2016-02-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1832867A1 (en) | Defect inspection apparatus and defect inspection method | |
US8064691B2 (en) | Method for identifying color in machine and computer vision applications | |
CN111133300B (en) | Inspection apparatus with color illumination | |
Morgand et al. | Generic and real-time detection of specular reflections in images | |
CN105354836B (en) | Color selection method | |
CN1370309A (en) | Method and appts. for digital image segmentation | |
CN113034488B (en) | Visual inspection method for ink-jet printed matter | |
US20220023917A1 (en) | Method for separating and classifying waste, in particular packaging | |
CN111665251A (en) | Visual detection method for surface defects | |
CN108037142A (en) | Mask plate optical defect detection method based on image intensity value | |
CN110412055A (en) | A kind of lens white haze defect inspection method based on multiple light courcess dark-ground illumination | |
Vishwanath et al. | Connected component analysis for Indian license plate infra-red and color image character segmentation | |
CN104156703A (en) | License plate location method and system based on color texture | |
JP2022133297A (en) | Video system having segment of colors for enhanced visual recognition of operator | |
Duong et al. | Vision inspection system for pharmaceuticals | |
US10145756B2 (en) | Inspection of defects in a contact lens | |
Fan et al. | An automatic machine vision method for the flaw detection on car's body | |
WO2013018207A1 (en) | Container mouth portion inspection method and device | |
JP5390755B2 (en) | Appearance inspection method and apparatus using image processing | |
KR101543896B1 (en) | Apparatus and method of detecting scap defect | |
Henderson et al. | An application of gaussian mixtures: Colour segmenting for the four legged league using hsi colour space | |
CN105344620A (en) | Color sorting method based on material shapes | |
Henderson et al. | An automated colour calibration system using multivariate gaussian mixtures to segment hsi colour space | |
US7321679B2 (en) | Machine for inspecting glass bottles | |
CN109543687A (en) | A kind of assembly line mess-tin automatic identifying method |
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 |