CN1147723C - Automatic product image detecting system - Google Patents

Automatic product image detecting system

Info

Publication number
CN1147723C
CN1147723C CNB001144219A CN00114421A CN1147723C CN 1147723 C CN1147723 C CN 1147723C CN B001144219 A CNB001144219 A CN B001144219A CN 00114421 A CN00114421 A CN 00114421A CN 1147723 C CN1147723 C CN 1147723C
Authority
CN
China
Prior art keywords
image
product
variance
examined
examined product
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.)
Expired - Fee Related
Application number
CNB001144219A
Other languages
Chinese (zh)
Other versions
CN1271095A (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.)
FOSHAN CONSTANT HYDRAULIC MACHINERY Co Ltd
Huazhong University of Science and Technology
Original Assignee
FOSHAN CONSTANT HYDRAULIC MACHINERY Co Ltd
Huazhong University of Science and Technology
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 FOSHAN CONSTANT HYDRAULIC MACHINERY Co Ltd, Huazhong University of Science and Technology filed Critical FOSHAN CONSTANT HYDRAULIC MACHINERY Co Ltd
Priority to CNB001144219A priority Critical patent/CN1147723C/en
Publication of CN1271095A publication Critical patent/CN1271095A/en
Application granted granted Critical
Publication of CN1147723C publication Critical patent/CN1147723C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The present invention discloses an automatic product image detecting system, which comprises an illumination system, a color CCD camera, a true color image collecting card, a microcomputer, system software, application software and an output control card, wherein the application software comprises a system interface, a fault detection algorism, a color sorting algorithm, etc. The color sorting method adopts a minimum distance method and a neural net method, and relative mean values and relative square deviations are adopted to replace mean values and square deviations. The minimum distance method adopts a dynamic sample center. A fault detection module adopts an image segmentation method of partial square deviations to replace the traditional boundary operator detection method, and also adopts dynamic threshold division. The automatic product image detecting system has the advantages of strong system flexibility and high stability.

Description

The product image automatic testing method
Technical field
The invention belongs to industrial detection and image processing technique field, specifically, it relates to a kind of product image automatic testing method.
Background technology
Along with optoelectronic information technology and development of computer and progress, the many work that originally can only finish by the people, can adopt now with the computing machine is that the automatic system of core is finished.One of field that comes to this based on the industrial detection and the quality control system of product image (herein " image " is equivalent to " Pattern ").In general existing this type systematic is made up of following hardware: ccd video camera, image collection card, microcomputer etc.Software then mainly comprises development system software and application software two large divisions; System software comprises operating system and Software Development Platform, as WINDOWS 95 operating systems, and MICROSOFT VISUAL C++ etc.Application software then is to require and by the software of finishing specific function that the developer develops voluntarily, be the core of automatic checkout system according to different detection systems.The Luo Wei of Shanghai Communications University, Yang Jinfu " computing machine micro measurement and data handling system " (be stated from≤computer engineering and application 〉=, in January, 1999, pp.124-126) introduce a kind of product quality in the literary composition and detected management system, this system is example with the filament electrode product as detected object, utilize equipment such as microscope, image collection card and microcomputer, detect in conjunction with the quality of computer software to meticulous small product.Therefore but this system directly handles the digital image that is obtained by the CCD camera, can only measure the apparent size of product etc., and be difficult to classify for the color of product.According to the image-forming principle of ccd video camera, color depends on multiple factor affecting such as illumination, color of object surface and reflectivity, so the classification and Detection of color is much more difficult.Even under laboratory condition, can obtain better result, in actual environments such as factory,, be difficult to stable operation then owing to be subjected to factor affecting such as illumination, electromagnetic interference (EMI), vibration, voltage fluctuation, finally influenced the detection technique application in practice of being developed.Can therefore, solve the robustness of automatic checkout system and stability be the technical barrier that present common used in industry detection technique is faced.
Summary of the invention
The object of the present invention is to provide a kind of product image automatic testing method, this method is color, the defective of testing product automatically, with definite product quality, and has than strong adaptability and better stability.
In order to finish above-mentioned task, this product image automatic testing method utilizes the realization of computer technology and image processing technique, and it may further comprise the steps successively:
(1) utilizes the colored CCD camera to gather the image of examined product and obtain color image data, calculate the average and the variance of the rgb image that resolves into by color image, be labeled as X R, X G, X B, Std R, Std GAnd Std B, again with the average X of R image RBe set at arbitrary constant M, the relative average and the variance that calculate rgb image at last are: M, MX G/ X R, MX B/ X R, MStd R/ X R, MStd G/ X R, MStd B/ X RIn minimum distance classification method and neural network classification method, substitute average and variance with relative average and variance;
(2) examined product is carried out defects detection, its treatment step is as follows:
1. utilize N * N template, the N value is 3-11, calculates the local mean value and the variance of examined product image;
2. when examined product is one color product, directly carry out step 3.; When examined product is the decorative pattern product, calculate the local mean value and the variance of sample image, and with described examined product image local mean value and the local mean value of variance and sample image and variance take absolute value after subtracting each other, as the new local variance image of examined product;
3. the local variance image of examined product is carried out dynamic threshold and cuts apart, in cutting procedure, distinguished by following dynamic threshold:
T=a+kb
Wherein, a, b represent the average and the variance of the local variance image of examined product respectively, and k is a coefficient, and its value is between the 0-1, adjust, and the T value is 0-255; The pixel gray scale is designated as 0 less than the pixel of thresholding T, and the pixel that the pixel gray scale is higher than thresholding T is designated as 1, and the latter represents to occur the pixel of fault;
4. the binary picture that 3. step is obtained is carried out opening operation and closed operation, removes the false edge that produces owing to small noise or micro-displacement;
5. the figure image point that 4. step is obtained is added up, and judges according to production standard whether examined product is certified products;
(3) when examined product is substandard product, directly carry out step (4); When examined product is specification product, set ultimate range thresholding R and number of categories I in the class, the R value is 1-2, the I value is 3-10, adopt the minimum distance classification method that the color of examined product image is detected, when the number of categories I that experiment type sample and color can be provided≤6, adopt neural net method or minimum distance classification method to detect;
The disposal route of minimum distance classification method is: calculate between tested image and the sample image apart from r, get minimum value r wherein j, work as r jDuring less than distance threshold R, test product is included into the j class, the j value is 1-10, and the image of examined product and the center of a sample of j class are merged as the new center of a sample of j class, works as r jDuring greater than distance threshold R, if increasing its classification number of a new class is less than and equals number of categories I, then with examined product as a new class, and with the center of a sample of examined product image, otherwise after the same method examined product is classified again after revising distance threshold R or number of categories I as the class that increases newly;
(4) according to the product quality information of testing result output examined product.
Its middle node number of layers can value be 3 in adopting above-mentioned neural net method; But the template size value in the said goods defects detection is 7 * 7.
Adopt the present invention that product image is detected automatically, detected object is wide, and defects detection precision height can adapt to the different needs of actual production environment, and testing result can keep relative stability when factors vary such as illumination, vibration, voltage.That this system also has is simple to operate, be easy to grasp and characteristics such as economical and practical.The present invention can be used for that porcelain product, wood-based product, cotton product and glass product etc. are carried out product image and detects automatically.It is that example is implemented when of the present invention that the inventor adopts colour floor brick, and the defects detection precision reaches as high as 0.5 millimeter, and 1 millimeter detection probability is near 100%; When carrying out the product colour detection, the method that adopts relative average and variance to substitute average and variance can reduce to 0.2 pixel from nearly ten pixels with the Change in Mean scope of same type floor tile; This system has better degree of stability, reach tens days experimental results show that this system works is reliable and stable.
Description of drawings
Fig. 1 is for adopting the automatic product image detecting system structural representation of the inventive method;
Fig. 2 is a product image automatic testing method overview flow chart of the present invention;
Fig. 3 is the one color product defect inspection method process flow diagram among the present invention;
Fig. 4 is the decorative pattern product defects detection method process flow diagram among the present invention;
Fig. 5 is the neural network classification method flow diagram among the present invention;
Fig. 6 is the minimum distance classification method flow diagram among the present invention;
Fig. 7 is the floor tile letter sorting runnable interface among the embodiment;
Fig. 8 is the systematic parameter interface among the embodiment;
Fig. 9 is the learning functionality interface in the neural network classification method among the embodiment.
Embodiment
The present invention is further detailed explanation below in conjunction with accompanying drawing.
As shown in Figure 1, system and device of the present invention comprises illumination system, colored Array CCD Camera, true colour imagery capture card, computing machine, system software, system hardware and output control card.Computing machine can be 586 and the microcomputer of above configuration, and system software can be the software of WINDOW95, VISUALC++5.00 and above version thereof.
In product image auto Detection Software overview flow chart shown in Figure 2, application software comprises parts such as system interface, defects detection algorithm, color classification algorithm.System interface comprises adopting as initialization, visual deposit, sample learning, comprehensive detection and the master menu that logs off and forms.Wherein comprehensive detection comprises that the color classification of differentiating, differentiating based on minor increment based on the color classification of neural network differentiates and form based on three parts of defects detection of mathematical morphology.Sample learning is made up of systematic parameter, neural network, three sub-menus of sample collection.Sample collection then be with video camera the pictorial data of gathering in real time handle, and store as the training sample of neural network.This system interface can adopt VISUAL C++5.0 programming to realize under WINDOWS 95 environment.
The method of calculating relative average of rgb image and variance among Fig. 2 is as follows: earlier composite coloured picture intelligence is decomposed into the gray scale image corresponding to three different-wavebands of RGB, calculates their average and variance again.These six different characteristic quantities have just constituted the input feature vector of color classification.Problems such as input imagery average and variance are big with illumination variation in order to solve, poor stability the present invention proposes the preprocess method of a kind of relative average and variance.Its concrete treatment step is: calculate the average and the variance of rgb image, and be designated as X respectively R, X G, X B, Std R, Std GAnd Std BAgain with the average X of R image RBe set at arbitrary constant M, calculate the relative average and the variance of rgb image at last: M, MX G/ X R, MX B/ X R, MStd R/ X R, MStd G/ X R, MStd B/ X RColor classification algorithm in the application software of this system all adopts relative average and variance to replace average and variance.
One color product defect inspection method among Fig. 2 as shown in Figure 3; Decorative pattern product defects detection method as shown in Figure 4.Defect inspection method mainly is made up of following steps;
1. utilize N * N template, calculate the average and the variance of local variance image
Defective all will produce saltus step on the gray scale on the image as fault, crackle etc.Propose to adopt the local variance image partitioning method in order to detect this saltus step the present invention, rather than traditional boundary operator detection method.The big I of image subsection that is adopted when calculating local variance is determined according to institute's testing product.In general, template is big more, and the ability of removing grey scale change is also just strong more, but the ability of defects detection is also just poor more simultaneously.The size N of general desirable template * N is 7 * 7 in experiment.
2. calculation template image average and variance
For the decorative pattern product is arranged, in order to solve the Gray Level Jump problem that the change in pattern of product image own is produced, must storage calculate the local variance image according to the known sample image, take absolute value behind the local variance image subtraction with the local variance of tested image image and sample image simultaneously, as new local variance image, calculate the average and the variance of this new local variance image, be used for dynamic threshold and cut apart.One color product detects does not need this step.
3. dynamic threshold is cut apart.
Because the unevenness of product image itself is therefore even without the saltus step that fault also can produce gray scale occurring.Therefore, in cutting procedure, distinguished by following dynamic threshold:
T=a+kb
Here a, b represent the average and the variance of local variance image respectively, and k is a coefficient, are determined by experiment.In general, K is big more, and detected fault is also just few more, and the possibility of omission is also just big more; Otherwise K is more little, and detected fault is also just many more, and false-alarm probability is also just big more.Generally the K value is between the 0-1 in experiment, can adjust by the interface.Utilizing dynamic threshold that local variogram is resembled and cut apart, is 0 less than the pixel of thresholding T, and the pixel that is higher than thresholding T is 1, and the latter represents to occur the pixel of fault.
4. mathematical morphology computing
For carrying out opening operation and closed operation, remove the false edge that produces owing to small noise or micro-displacement by binary picture 3..
5. for adding up, and judge whether to be certified products according to production standard by the figure image point that is 4. obtained.
Neural network classification method among Fig. 2 as shown in Figure 5, the neural network classification method among the present invention is identical with common neural network classification method.Based on the method for sorting colors of neural network with the relative average of image and variance input layer as the BP neural network, the differentiation result of expectation sample is as output layer, the number of intermediate node layer is adjustable (to utilize system interface, do not need update routine), it is general when the intermediate node number is too much, though help obtaining final expectation value,, make the time of neural network learning extend greatly owing to need the weight coefficient of adjustment too many; And if very few, then may make sum of errors be difficult to drop to the thresholding of regulation, thereby make study be difficult to convergence.The inventor finds to adopt and to export the close value of classification number more suitable in experiment.This method is applicable to the situation that the experiment type sample can be provided, but when number of categories when too big (as greater than 6), the time that need carry out sample learning is longer.By the study of sample product, can determine the link weight coefficients of neural network.The inventor elects node level as 3 in experiment.When identification, extract same characteristic features for product to be detected, then with its input as neural network.Like this, in the output layer class of output valve maximum be this product the classification that should belong to.The flow chart of specific implementation as shown in Figure 4.
Minimum distance classification method among Fig. 2 as shown in Figure 6.Traditional minimum distance classification method is difficult to adapt to the variation that is produced based on fixing center of a sample when fluctuation takes place in center of a sample.Addressed this problem since the method at minimum distance classification method employing dynamic sample center in the present invention.Its concrete grammar is first setpoint distance thresholding R and number of categories I, calculate again between tested image and the sample image apart from r, get minimum value r wherein j, work as r jLess than in the maximum kind during distance threshold R, test product is included into the j class, and the image of examined product and the center of a sample of j class are merged as the new center of a sample of j class, work as r jDuring greater than distance threshold R, if increase its classification number of a new class be less than equal I with examined product as a new class, and with examined product image center of a sample, otherwise can select to revise distance threshold R or number of categories I as the class that increases newly.If select to revise number of categories I, then with examined product as a new class, and with the center of a sample of examined product image as the class that increases newly; If select to revise distance threshold R, then can classify to examined product according to aforementioned same method.From this examined product, this automatic checkout system is classified to subsequent product according to new distance threshold R.Distance threshold R determines and should judge with other number of final output class.If the classification of output is moderate, then this distance threshold is just suitable.This method realizes color classification with similar criteria for classifying, has guaranteed that the colour-difference of same series products is controlled in the given scope.In addition, this method is different from neural net method, and it will learn to combine together with identifying, not only significantly reduce learning time, and make it can finish the automatic study and the renewal of sample.Experimental result shows, it is to guarantee the work long hours effective way of stability of system.The concrete steps method as shown in Figure 4.
Embodiment
1, examined product is example with the porcelain floor tile;
2, hardware environment comprises colored CCD face battle array gamma camera, DH-VRT-CG200/6 color image capture card, 8 * 20 watts of energy-conservation incandescent lamps, PENTIUM100M microcomputer and A-7225 input/output interface card that Beijing Imax Corp. of Daheng produces.
3, software environment comprises Window 95 operating systems, Visual C++5.0 Integrated Development Environment, N=7, M=200, I=6, R=10.
4, flow chart such as Fig. 2 are to shown in Figure 6.
5, runnable interface as shown in Figure 7.
6, systematic parameter interface and parameter value thereof as shown in Figure 8, the learning parameter setting in the neural network classification method is as shown in Figure 9.

Claims (5)

1, a kind of product image automatic testing method, utilize computer technology and image processing technique to realize that it may further comprise the steps successively:
(1) utilizes the colored CCD camera to gather the image of examined product and obtain color image data, calculate the average and the variance of the rgb image that resolves into by color image, be labeled as X R, X G, X B, Std R, Std GAnd Std B, again with the average X of R image RBe set at arbitrary constant M, the relative average and the variance that calculate rgb image at last are: M, MX G/ X R, MX B/ X R, MStd R/ X R, MStd G/ X R, MStd B/ X RIn minimum distance classification method and neural network classification method, substitute average and variance with relative average and variance;
(2) examined product is carried out defects detection, its treatment step is as follows:
1. utilize N * N template, the N value is 3-11, calculates the local mean value and the variance of examined product image;
2. when examined product is one color product, directly carry out step 3.; When examined product is the decorative pattern product, calculate the local mean value and the variance of sample image, and take absolute value after the local mean value of the local mean value of described examined product image and variance and sample image and variance subtracted each other, as the new local variance image of examined product;
3. the local variance image of examined product is carried out dynamic threshold and cuts apart, in cutting procedure, distinguished by following dynamic threshold:
T=a+kb
Wherein, a, b represent the average and the variance of the local variance image of examined product respectively, and k is a coefficient, and its value is between the 0-1, adjust, and the T value is 0-255; The pixel gray scale is designated as 0 less than the pixel of thresholding T, and the pixel that the pixel gray scale is higher than thresholding T is designated as 1, and the latter represents to occur the pixel of fault;
4. the binary picture that 3. step is obtained is carried out opening operation and closed operation, removes the false edge that produces owing to small noise or micro-displacement;
5. the figure image point that 4. step is obtained is added up, and judges according to production standard whether examined product is certified products;
(3) when examined product is substandard product, directly carry out step (4); When examined product is specification product, set ultimate range thresholding R and number of categories I in the class, the R value is 1-2, the I value is 3-10, adopt the minimum distance classification method that the color of examined product image is detected, when the number of categories I that experiment type sample and color can be provided≤6, adopt neural net method or minimum distance classification method to detect;
The disposal route of minimum distance classification method is: calculate again between tested image and the sample image apart from r, get minimum value r wherein j, work as r jDuring less than distance threshold R, test product is included into the j class, the j value is 1-10, and the image of examined product and the center of a sample of j class are merged as the new center of a sample of j class, works as r jDuring greater than distance threshold R, if increasing its classification number of a new class is less than and equals number of categories I, then with examined product as a new class, and with the center of a sample of examined product image, otherwise after the same method examined product is classified again after revising distance threshold R or number of categories I as the class that increases newly;
(4) according to the product quality information of testing result output examined product.
2, product image automatic testing method according to claim 1 is characterized in that: the treatment step in the described product image automatic testing method can be changed into set by step (1) (3) (2) (4) order and carry out.
3, product image automatic testing method according to claim 1 and 2 is characterized in that: the node layer number in the described neural net method is 3.
4, product image automatic testing method according to claim 1 and 2 is characterized in that: described N * N template is of a size of 7 * 7.
5, product image automatic testing method according to claim 3 is characterized in that: described N * N template is of a size of 7 * 7.
CNB001144219A 2000-03-14 2000-03-14 Automatic product image detecting system Expired - Fee Related CN1147723C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB001144219A CN1147723C (en) 2000-03-14 2000-03-14 Automatic product image detecting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB001144219A CN1147723C (en) 2000-03-14 2000-03-14 Automatic product image detecting system

Publications (2)

Publication Number Publication Date
CN1271095A CN1271095A (en) 2000-10-25
CN1147723C true CN1147723C (en) 2004-04-28

Family

ID=4584105

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB001144219A Expired - Fee Related CN1147723C (en) 2000-03-14 2000-03-14 Automatic product image detecting system

Country Status (1)

Country Link
CN (1) CN1147723C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2775808C2 (en) * 2018-08-22 2022-07-11 Флорент Текнолоджиз, ЭлЭлСи Neural network systems and computer-implemented methods of identifying and/or evaluating one or more food products in visual input information

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100543698B1 (en) * 2002-12-14 2006-01-20 삼성전자주식회사 Apparatus and method for reproducing of skin color in video signal
CN1305292C (en) * 2003-09-15 2007-03-14 北京中星微电子有限公司 Method for estimating offset between continuous image frames
CN102456128B (en) * 2010-10-27 2014-06-11 徐继圣 Stereoscopic vision dice point identification system and method in uncontrolled environments
CN108181316B (en) * 2018-03-13 2019-12-20 广西师范大学 Bamboo strip defect detection method based on machine vision
CN108693441B (en) * 2018-04-16 2021-01-22 华北电力大学(保定) Method and system for identifying insulator of power transmission line

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2775808C2 (en) * 2018-08-22 2022-07-11 Флорент Текнолоджиз, ЭлЭлСи Neural network systems and computer-implemented methods of identifying and/or evaluating one or more food products in visual input information
RU2775808C9 (en) * 2018-08-22 2022-09-27 Флорент Текнолоджиз, ЭлЭлСи Neural network-based systems and computer-implemented methods for identifying and/or evaluating one or more food items present in a visual input

Also Published As

Publication number Publication date
CN1271095A (en) 2000-10-25

Similar Documents

Publication Publication Date Title
CN109376792B (en) Photovoltaic cell appearance defect classification method based on multi-channel residual error neural network
CN109859171B (en) Automatic floor defect detection method based on computer vision and deep learning
Moaveni et al. Evaluation of aggregate size and shape by means of segmentation techniques and aggregate image processing algorithms
CN109753890B (en) Intelligent recognition and sensing method for road surface garbage and implementation device thereof
CN115351598A (en) Numerical control machine tool bearing detection method
Mathavan et al. Use of a self-organizing map for crack detection in highly textured pavement images
CN100341313C (en) Method of determining color composition of an image
CN111815564B (en) Method and device for detecting silk ingots and silk ingot sorting system
CN109598681B (en) No-reference quality evaluation method for image after repairing of symmetrical Thangka
CN115082719B (en) Wood quality grading method
CN111292321A (en) Method for identifying defect image of insulator of power transmission line
CN113989257A (en) Electric power comprehensive pipe gallery settlement crack identification method based on artificial intelligence technology
Mahler et al. Pavement distress analysis using image processing techniques
CN1147723C (en) Automatic product image detecting system
CN110717520A (en) Solid waste identification method based on fusion of spatial features and spectral features of hyperspectral images
CN113129265A (en) Method and device for detecting surface defects of ceramic tiles and storage medium
CN112989881A (en) Unsupervised migratable 3D visual object grabbing method
Desoli et al. A system for automated visual inspection of ceramic tiles
CN113808206B (en) Typesetting system and method based on vision tracking robot
CN114985150A (en) Visual perception-based control method for accurate spraying of spraying machine
CN111797730B (en) Automatic analysis method for cement clinker lithofacies
CN114120061A (en) Small target defect detection method and system for power inspection scene
CN114004771A (en) HSV model-based brightness compensation method and detection method
CN111784666A (en) Learning and memory-based LED lamp bead defect detection method
CN116756835B (en) Template combination design method, device, equipment and storage medium

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
C14 Grant of patent or utility model
GR01 Patent grant
C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee