CN101398392B - Cotton impurity high speed real-time detection method based on HSI color space - Google Patents

Cotton impurity high speed real-time detection method based on HSI color space Download PDF

Info

Publication number
CN101398392B
CN101398392B CN2007101224739A CN200710122473A CN101398392B CN 101398392 B CN101398392 B CN 101398392B CN 2007101224739 A CN2007101224739 A CN 2007101224739A CN 200710122473 A CN200710122473 A CN 200710122473A CN 101398392 B CN101398392 B CN 101398392B
Authority
CN
China
Prior art keywords
cotton
pixel
image information
blue
real
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
CN2007101224739A
Other languages
Chinese (zh)
Other versions
CN101398392A (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.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
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 Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN2007101224739A priority Critical patent/CN101398392B/en
Publication of CN101398392A publication Critical patent/CN101398392A/en
Application granted granted Critical
Publication of CN101398392B publication Critical patent/CN101398392B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a cotton impurity high-speed real-time detection method on the basis of tone, saturation and grey HSI color space, comprising the steps as follows: image format of image information of the collected cotton is converted so as to obtain HSI images and carry out the operation and recognition, thus learning training process and impurity detection process; combination self-learning of cotton image information and background image information is carried out; impurity information of the cotton is recognized and the positioning results for real impurities of the cotton are output. A three-dimensional look up table (3D-LUT) technique is used for quickly obtaining HSI images; the impurity recognition is carried out by the parameters obtained during the self-learning process; furthermore, by virtue of a color movement compensation technique, the impurities are re-authenticated. The detection method can achieve the whole process of collection of 80-line cotton stream images, conversion of image formats, detection and positioning of the impurities and the like within 10ms. Under the condition that the cotton stream speed is 18m/s and the impurity size is 2 multiplied by 2mm<2>, the impurity recognition correct rate can reach 95.4 percent.

Description

A kind of moits high speed real-time detection method based on the HSI color space
Technical field
The invention belongs to the Vision Builder for Automated Inspection technical field, particularly relate to moits and sort real-time detection method automatically.
Background technology
Cotton is often sneaked into some impurity in processes such as harvesting, transportation and processing, these impurity of sneaking into not only influence the price of cotton, and have a strong impact on the following process quality of cotton.In order to ensure the quality of cotton, the cotton spinning corporate boss will adopt manual sorting's method to reject impurity.Manual sorting not only labour is strong, and efficient is low, and bigger owing to influenced by artificial subjective factor, and the letter sorting effect is wayward.
In recent years, can obtain and handle a large amount of information apace, be widely used in every field such as operating condition monitoring, finished product detection and quality control by people because of Vision Builder for Automated Inspection.The researchist also is applied to machine vision technique the moits detection range both at home and abroad, has obtained certain progress.In industrial practical application, the detection speed of moits then is the primary factor that can this kind of restriction solution be used in industry.In the present detection method, a part is to discern at the image of area array cameras collection.Use the area array cameras images acquired, for the movement velocity of cotton itself restriction of strictness is arranged, otherwise will cause serious motion blur, thereby can't carry out impurities identification.And the method for discerning at the image of line-scan digital camera collection for other because the restriction of the processing speed of algorithm own, and has to reduce the picking rate of line-scan digital camera, also will cause the decline of image resolution ratio, is unfavorable for the detection of impurity.Therefore, moits detection method in high-speed real-time ground has very important significance for the control of cotton quality.
Summary of the invention
Be subjected to the algorithm process speed limit in order to solve the prior art images acquired, adopt the technical scheme that reduces images acquired speed, image resolution ratio is descended, the problem that the quality that moits are detected reduces, the present invention is intended to improve moits and detects quality, for this reason, the invention provides a kind of can be in practical application in industry, based on the moits high speed real-time detection method of tone, saturation degree, gray scale HSI color space.
To achieve these goals, the invention provides the moits high speed real-time detection method based on the HSI color space, its technical scheme of dealing with problems comprises that step is as follows:
Step S1: gather the cotton image information;
Step S2: carry out image format conversion to gathering the cotton image information, obtain the HSI image;
Step S3: the HSI image is operated differentiation, if be the learning training process, then execution in step 4, if be the impurity testing process, then execution in step 5;
Step S4: cotton image information and background image information are carried out combination self-learning;
Step S5: moits information is discerned the real impure point positioning result of output cotton.
According to embodiments of the invention, the step of described image format conversion is as described below:
Step 21: set up two 24 three-dimensional RGB look-up table;
Step 22: utilize two 24 three-dimensional RGB look-up table that the RGB image transitions of camera collection is become the HSI image.
According to embodiments of the invention, described two 24 three-dimensional RGB look-up table is a dynamic memory internal memory, and the address of dynamic memory internal memory is corresponding red, green, blue coefficient component respectively; Data in this address are respectively the tone H and the saturation degree S value of corresponding red, green, blue coefficient component.
According to embodiments of the invention, described cotton image and background image combination self-learning step are as follows:
Step 41: select suitable background color, make this background image color on tone H and saturation degree S space characteristics, keep similarity with the cotton image;
Step 42: carry out self study by cotton and background image row, obtain average and the covariance matrix parameter of the tone H and the saturation degree S of cotton and each row of background image respectively.
According to embodiments of the invention, described moits identification step is as follows:
Step 51: according to the average and the covariance matrix of background image, calculate each pixel of cotton image information to be detected and background image distance in tone H-saturation degree S space, if this distance, thinks then that the pixel in this cotton image information is candidate's impure point greater than threshold value;
Step 52: utilize colored motion compensation technique, confirm whether the candidate's impure point in the cotton image information is the real impure point of cotton image information, if the real impure point of cotton image information, then execution in step 53, if not the real impure point of cotton image information, then abandon execution in step;
Step 53: will discern the real impure point result output of cotton image information.
According to embodiments of the invention, described colored motion compensation technique is that three coefficients of red, green, blue with three coefficients of red, green, blue of candidate's impure point of cotton image information and the neighbor on its column direction recomputate combination, generates new pixel; New pixel and background image are calculated in the distance in tone H-saturation degree S space, if this distance, thinks then that this pixel is real impure point greater than threshold value, if this distance, thinks then that this pixel is candidate's impure point less than threshold value.
According to embodiments of the invention, it is as follows that the coefficient of the neighbor on described candidate's impure point coefficient and its column direction recomputates combination step: the red, green, blue color component of establishing current pixel point is: R0, G0, B0; On column direction, red, turquoise, the color component of the previous pixel of current pixel are: R1, G1, B1, the red, green, blue color component of preceding two pixels is: R2, G2, B2, the RGB color component of the pixel in back is: R3, G3, B3, the RGB color component of latter two pixel is: R4, G4, B4; The RGB color component of the pixel after then reconfiguring is respectively: R2, G1, B0 and R4, G3, B0 promptly uses the red component of preceding two pixels, and the blue component of previous pixel blue component and current pixel point is reassembled into the color value of a new pixel; With the red component of latter two pixel, the blue component of a back pixel blue component and current pixel point is reassembled into the color value of a new pixel.
Good effect of the present invention: the key distinction of the present invention and prior art is: prior art is mainly carried out moits based on RGB (red, blue, green) color space and is detected; The present invention then is based on HSI (tone, saturation degree, gray scale) color space and carries out the moits detection.Prior art is mainly carried out moits based on global informations such as rim detection, zone detections and is detected; The present invention then is based on local message such as image column information and carries out moits and detect.
It is the 3D-LUT technology that the maximum characteristics that the present invention proposes method have adopted three dimensional lookup table exactly, obtains the technical scheme of HSI image fast, solves image acquisition resolution and descends, the problem that the quality that moits are detected reduces; Adopt local message, effectively improve the precision that moits detect by image column study; At color camera mechanism, adopt colored movement compensating algorithm, effectively reduce the mistake differentiation rate that moits detect.The recognition speed of algorithm of the present invention is fast, and recognition effect is good, has solved in the commercial Application difficult problem that speed and discrimination can't be unified effectively.The present invention can finish all processes such as the detection of collection, image format conversion, impurity of the cotton stream picture of 80 lines and location in 10ms.At cotton stream velocity degree 18m/s, the impurity size is 2 * 2mm 2Situation under, the impurities identification accuracy can reach 95.4%.
Description of drawings
Fig. 1 is based on the moits high speed real-time detection method process flow diagram of HSI color space
Fig. 2 utilizes LUT technology image format conversion synoptic diagram
Embodiment
Below in conjunction with accompanying drawing the present invention is described in detail, be to be noted that described embodiment only is intended to be convenient to the understanding of the present invention, and it is not played any qualification effect.
Utilize high-speed CCD line scan camera images acquired, adopt the 3D-LUT technology, obtain the HSI image fast; Cotton and background image are carried out the self study process; The parameter of utilizing the self study process to obtain is carried out the identification of impurity, and utilizes colored motion compensation technique, and impure point is authenticated once more.
As Fig. 1, the present invention is based on shown in the moits high speed real-time detection method in HSI tone, saturated, greyscale color space, this method comprises three big steps:
First step S1 gathers the cotton image information;
The second step S2, image format conversion;
The 3rd step S3, training or the differentiation that detects;
The 4th step S4, cotton image and background image self study;
The 5th step S5, moits identification.
It is as follows below each step to be carried out specific description:
Step S1 utilizes the high-speed CCD line scan camera to gather the cotton image information; The camera model that adopts among the present invention is Basler L301kc, and setting line scanning frequency was 8000 line/seconds, and the time shutter is 0.125 millisecond.Flying speed average out to 18 meter per seconds of cotton in cotton-conveying pipe.
Step S2, image format conversion
At first, calculate pairing tone H of all red, green, blue RGB components and saturation degree S value.Each RGB rgb pixel and corresponding tone H component can obtain with following formula:
Figure S2007101224739D00051
Here
&theta; = arccos { 1 2 [ ( R - G ) + ( R - B ) ] [ ( R - G ) 2 + ( R - B ) ( G - B ) ] 1 / 2 } .
Saturation degree S component is calculated by following formula:
S = 1 - 3 R + G + B [ min ( R , G , B ) ] .
Secondly, set up two 24 three-dimensional red, green, blue R, G, B look-up table, three dimensional lookup table 3D-LUT is a dynamic memory internal memory, and the address of dynamic memory internal memory is corresponding red, green, blue coefficient component respectively; Data in this address are respectively the tone H and the saturation degree S value of corresponding red, green, blue coefficient component.Red, green, blue RGB component is as the Input Address of this dynamic memory internal memory, and the tone H of output and saturation degree S value are respectively the pairing data in this address.Under the programmed environment of VC.NET, can use three-dimensional array, as LUT[255] [255] [255] set up three dimensional lookup table, and each dimension of this array is represented the red, green, blue component respectively, and the numerical value in the three-dimensional array then is respectively the color harmony intensity value of red, green, blue component correspondence.
Then, utilize this three-dimensional red, green, blue look-up table of two 24, the red, green, blue component of the cotton image of camera collection is imported look-up table respectively as the address, thereby obtain the corresponding respectively color harmony intensity value in this address.As Fig. 2, utilize shown in the look-up table LUT technology image format conversion synoptic diagram.Under the programmed environment of VC.NET, set up three dimensional lookup table with three-dimensional array, then can locate the position of three-dimensional array according to the red, green, blue component of input, the data of this position correspondence are the color harmony intensity value.
Step S3 is to the differentiation of tone, saturation degree, the training of gray scale HSI image or testing process;
If carry out the training study process, execution in step 4; Differentiate process, execution in step 5 if carry out impurity;
Step S4: cotton and background image combination self-learning process
At first, utilize camera to take the cotton image, calculate the average of the color harmony saturation degree of cotton.Utilize the color harmony intensity value of the cotton that obtains to make background, the background colour tone pitch that the present invention uses is 40, and intensity value is 56.
Then, cotton and background image are carried out the combination self-learning process, carry out self study, calculate respectively and obtain cotton and the tone H of each row of background image and average μ and the covariance matrix ∑ parameter of saturation degree S by cotton and background image row.Here the calculated value with first row is an example, and the tone average that calculates is 42, and the saturation degree average is 52, and covariance matrix is followed successively by [3.9530 ,-4.61421 ,-4.6121,9.2993] by the value of row order;
Step S5, moits identification
At first, the parameter of utilizing the self study process to obtain is carried out the identification of impurity, promptly according to the average μ and the covariance matrix ∑ of the background image that obtains among the step S4, calculate that each pixel z and background image are in the distance in H-S space in the cotton image information to be detected, the distance calculation formula is as follows:
D(z)=[(z-μ) T-1(z-μ) 1/2
If this distance D greater than threshold value, is 10, think that then this cotton pixel is a cotton candidate impure point here.Need to prove that higher if desired impurity accuracy of detection then is adjusted into 7 with this threshold value, can make false drop rate that some raisings are arranged certainly like this;
Then, utilize colored motion compensation technique that cotton candidate impure point is authenticated once more, confirm promptly whether cotton candidate impure point is real moits point; Colored motion compensation technique, after red, green, blue three coefficients of red, green, blue three coefficients of cotton candidate impure point and the neighbor on its column direction are reconfigured, calculate new pixel that produces and background image distance once more in the H-S space, if this distance greater than certain threshold value (getting threshold value here is 10), thinks that then this cotton pixel is the real impure point of cotton.It is as follows that the coefficient of the neighbor on described candidate's impure point coefficient and its column direction recomputates combination step:
If the red, green, blue color component of current pixel point is: R0, G0, B0; On column direction, red, turquoise, the color component of the previous pixel of current pixel are: R1, G1, B1, the red, green, blue color component of preceding two pixels is: R2, G2, B2, the RGB color component of the pixel in back is: R3, G3, B3, the RGB color component of latter two pixel is: R4, G4, B4; The RGB color component of the pixel after then reconfiguring is respectively: R2, G1, B0 and R4, G3, B0 promptly uses the red component of preceding two pixels, and the blue component of previous pixel blue component and current pixel point is reassembled into the color value of a new pixel; With the red component of latter two pixel, the blue component of a back pixel blue component and current pixel point is reassembled into the color value of a new pixel.
At last, with the real impure point positioning result output of the cotton of identification.
The above; only be the embodiment among the present invention; but protection scope of the present invention is not limited thereto; anyly be familiar with the people of this technology in the disclosed technical scope of the present invention; can understand conversion or the replacement expected; all should be encompassed in of the present invention comprising within the scope, therefore, protection scope of the present invention should be as the criterion with the protection domain of claims.

Claims (4)

1. the moits high speed real-time detection method based on the HSI color space is characterized in that, comprises that the detection step is as follows:
Step S1: gather the cotton image information;
Step S2: the step of collection cotton image information being carried out image format conversion is as follows: step 21: set up two 24 three-dimensional RGB look-up table; Step 22: utilize two 24 three-dimensional RGB look-up table that the RGB image transitions of camera collection is become the HSI image;
Step S3: the HSI image is operated differentiation, if be the learning training process, then execution in step 4, if be the impurity testing process, then execution in step 5;
Step S4: the step of cotton image information and background image information being carried out combination self-learning is as follows: step 41: select suitable background color, make this background image color keep similarity with the cotton image on tone H and saturation degree S space characteristics; Step 42: carry out self study by cotton and background image row, obtain average and the covariance matrix parameter of the tone H and the saturation degree S of cotton and each row of background image respectively;
Step S5: the step that moits information is discerned is as follows: step 51: according to the average and the covariance matrix of background image, calculate each pixel of cotton image information to be detected and background image distance in tone H-saturation degree S space, if this distance, thinks then that the pixel in this cotton image information is candidate's impure point greater than threshold value; Step 52: utilize colored motion compensation technique, confirm whether the candidate's impure point in the cotton image information is the real impure point of cotton image information, if the real impure point of cotton image information, then execution in step 53, if not the real impure point of cotton image information, then abandon execution in step; Step 53: will discern the real impure point of cotton image information, the real impure point positioning result of output cotton.
2. by the described moits high speed real-time detection method of claim 1, it is characterized in that described two 24 three-dimensional RGB look-up table is a dynamic memory internal memory, the address of dynamic memory internal memory is corresponding red, green, blue coefficient component respectively; Data in this address are respectively the tone H and the saturation degree S value of corresponding red, green, blue coefficient component.
3. by the described moits high speed real-time detection method of claim 1, it is characterized in that, described colored motion compensation technique is that three coefficients of red, green, blue with three coefficients of red, green, blue of candidate's impure point of cotton image information and the neighbor on its column direction recomputate combination, generates new pixel; New pixel and background image are calculated in the distance in tone H-saturation degree S space, if this distance, thinks then that this pixel is real impure point greater than threshold value, if this distance, thinks then that this pixel is candidate's impure point less than threshold value.
4. by the described moits high speed real-time detection method of claim 3, it is characterized in that it is as follows that the coefficient of the neighbor on described candidate's impure point coefficient and its column direction recomputates combination step:
If the red, green, blue color component of current pixel point is: R0, G0, B0; On column direction, the red, green, blue of the previous pixel of current pixel, color component are: R1, G1, B1, the red, green, blue color component of preceding two pixels is: R2, G2, B2, the RGB color component of the pixel in back is: R3, G3, B3, the RGB color component of latter two pixel is: R4, G4, B4; The RGB color component of the pixel after then reconfiguring is respectively: R2, G1, B0 and R4, G3, B0 promptly uses the red component of preceding two pixels, and the blue component of previous pixel blue component and current pixel point is reassembled into the color value of a new pixel; With the red component of latter two pixel, the blue component of a back pixel blue component and current pixel point is reassembled into the color value of a new pixel.
CN2007101224739A 2007-09-26 2007-09-26 Cotton impurity high speed real-time detection method based on HSI color space Active CN101398392B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101224739A CN101398392B (en) 2007-09-26 2007-09-26 Cotton impurity high speed real-time detection method based on HSI color space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101224739A CN101398392B (en) 2007-09-26 2007-09-26 Cotton impurity high speed real-time detection method based on HSI color space

Publications (2)

Publication Number Publication Date
CN101398392A CN101398392A (en) 2009-04-01
CN101398392B true CN101398392B (en) 2011-08-10

Family

ID=40517097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101224739A Active CN101398392B (en) 2007-09-26 2007-09-26 Cotton impurity high speed real-time detection method based on HSI color space

Country Status (1)

Country Link
CN (1) CN101398392B (en)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8301410B2 (en) * 2010-05-06 2012-10-30 Uster Technologies Ag Visual weight compensation
CN102004076B (en) * 2010-10-29 2013-04-03 中国农业大学 Method and system for detecting foreign fiber in ginned cotton
CN102209387B (en) * 2011-06-13 2014-09-17 南京漫城软件科技有限公司 Three-dimensional fast positioning method based on wireless sensor network (WSN) technology
CN102297867B (en) * 2011-07-20 2013-09-04 上海元一电子有限公司 Detection system for assembly quality of wiring harness
CN102759528B (en) * 2012-07-09 2014-04-02 陕西科技大学 Method for detecting diseases of crop leaves
CN102980659B (en) * 2012-11-07 2014-10-08 上海工程技术大学 Digitalized characterization method of monochrome tight fabric surface color
CN103234975B (en) * 2013-03-29 2015-07-29 西安理工大学 A kind of detection and location method of cotton foreign fiber
CN104198496A (en) * 2014-09-04 2014-12-10 安徽财经大学 Automatic cotton defect detection device
CN104574389A (en) * 2014-12-26 2015-04-29 康奋威科技(杭州)有限公司 Battery piece chromatism selection control method based on color machine vision
CN105424709A (en) * 2015-11-20 2016-03-23 陕西科技大学 Fruit surface defect detection method based on image marking
CN106918594B (en) * 2015-12-25 2023-06-20 济南大学 Method for on-line analysis of seed cotton color characteristics and impurities
DE102016121662A1 (en) * 2016-11-11 2018-05-17 Saurer Germany Gmbh & Co. Kg Method and device for assessing the quality of a longitudinally moved strand-like material
CN107016699A (en) * 2017-03-14 2017-08-04 上海大学 A kind of color coding approach of the variegated particle of automatic identification
CN107737735A (en) * 2017-09-30 2018-02-27 沈阳知行科技有限公司 The fusion of abandoned car recovery metal perceives online separation system and method for separating
CN108459019B (en) * 2017-12-06 2021-03-23 成都理工大学 Landslide slope body broken stone content detection method and intelligent mobile terminal
CN109146878A (en) * 2018-09-30 2019-01-04 安徽农业大学 A kind of method for detecting impurities based on image procossing
CN110632094B (en) * 2019-07-24 2022-04-19 北京中科慧眼科技有限公司 Pattern quality detection method, device and system based on point-by-point comparison analysis
CH716607A1 (en) * 2019-09-17 2021-03-31 Uster Technologies Ag Method and device for monitoring foreign materials in a textile fiber structure.
CN111062305B (en) * 2019-12-12 2023-02-24 河南省科学院高新技术研究中心 Method and device for monitoring smoldering during cotton loading, unloading and transporting
CN112767367B (en) * 2021-01-25 2022-11-25 济南大学 Cotton impurity detection method and system for mechanically-harvested seed cotton
CN113261428B (en) * 2021-06-18 2022-04-12 湖北省农业科学院经济作物研究所 Whole-process quality control method for machine-harvested cotton

Also Published As

Publication number Publication date
CN101398392A (en) 2009-04-01

Similar Documents

Publication Publication Date Title
CN101398392B (en) Cotton impurity high speed real-time detection method based on HSI color space
WO2020248439A1 (en) Crown cap surface defect online inspection method employing image processing
CN110070524A (en) A kind of intelligent terminal panel visual fault detection system
CN108596880A (en) Weld defect feature extraction based on image procossing and welding quality analysis method
CN102930287B (en) A kind of detection number system and method for overlooking pedestrian
CN102974551A (en) Machine vision-based method for detecting and sorting polycrystalline silicon solar energy
CN112149543B (en) Building dust recognition system and method based on computer vision
CN104700424B (en) Medical color fujinon electronic video endoscope dead pixel points of images detection means
CN107613229A (en) A kind of dead pixels of image sensor surveys means for correcting and method
CN103080331A (en) Method for detecting microorganisms, device for detecting microorganisms and program
CN106056597A (en) Object visual detection method and device
CN108510476A (en) A kind of Mobile phone screen wireline inspection method based on machine vision
CN106157323A (en) The insulator division and extracting method that a kind of dynamic division threshold value and block search combine
CN105991997B (en) A kind of method that condenser type imaging sensor bad point positions in real time
CN104952754B (en) Silicon chip method for separating after plated film based on machine vision
CN110096980A (en) Character machining identifying system
CN106127124A (en) The automatic testing method of the abnormal image signal in region, taxi front row
CN104048966B (en) The detection of a kind of fabric defect based on big law and sorting technique
CN106932408A (en) A kind of paper cocooning frame pollution silk cocoon detection method based on image procossing
CN106254864B (en) Snowflake and noise noise detecting method in monitor video
CN101807297B (en) Medical ultrasonic image line detection method
CN108492306A (en) A kind of X-type Angular Point Extracting Method based on image outline
CN207283689U (en) A kind of dead pixels of image sensor surveys means for correcting
CN108563997A (en) It is a kind of establish Face datection model, recognition of face method and apparatus
CN116721039A (en) Image preprocessing method applied to automatic optical defect detection

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant