CN114677356A - Wine bottle appearance defect detection method based on multi-view image fusion - Google Patents
Wine bottle appearance defect detection method based on multi-view image fusion Download PDFInfo
- Publication number
- CN114677356A CN114677356A CN202210356955.5A CN202210356955A CN114677356A CN 114677356 A CN114677356 A CN 114677356A CN 202210356955 A CN202210356955 A CN 202210356955A CN 114677356 A CN114677356 A CN 114677356A
- Authority
- CN
- China
- Prior art keywords
- wine bottle
- image
- appearance
- images
- camera
- 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.)
- Pending
Links
- 230000007547 defect Effects 0.000 title claims abstract description 34
- 238000001514 detection method Methods 0.000 title claims abstract description 28
- 230000004927 fusion Effects 0.000 title claims abstract description 25
- 238000011161 development Methods 0.000 claims abstract description 11
- 230000018109 developmental process Effects 0.000 claims abstract description 11
- 238000012545 processing Methods 0.000 claims abstract description 8
- 238000010586 diagram Methods 0.000 claims abstract description 6
- 238000005516 engineering process Methods 0.000 claims abstract description 5
- 238000003709 image segmentation Methods 0.000 claims abstract description 5
- 238000000034 method Methods 0.000 claims description 20
- 239000011159 matrix material Substances 0.000 claims description 12
- 230000000694 effects Effects 0.000 claims description 9
- 238000001914 filtration Methods 0.000 claims description 9
- 238000004519 manufacturing process Methods 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000003384 imaging method Methods 0.000 claims description 6
- 238000012216 screening Methods 0.000 claims description 6
- 238000007781 pre-processing Methods 0.000 claims description 4
- 230000003044 adaptive effect Effects 0.000 claims description 3
- 238000003708 edge detection Methods 0.000 claims description 3
- 238000007526 fusion splicing Methods 0.000 claims description 3
- 230000009466 transformation Effects 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 2
- 235000013361 beverage Nutrition 0.000 description 10
- 238000013135 deep learning Methods 0.000 description 4
- 238000012937 correction Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 208000003464 asthenopia Diseases 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000010008 shearing Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
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
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/95—Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
- G01N21/952—Inspecting the exterior surface of cylindrical bodies or wires
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/95—Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
- G01N21/956—Inspecting patterns on the surface of objects
- G01N21/95607—Inspecting patterns on the surface of objects using a comparative method
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/12—Edge-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
- G01N2021/8887—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
-
- 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/20—Special algorithmic details
- G06T2207/20024—Filtering details
-
- 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/20—Special algorithmic details
- G06T2207/20112—Image segmentation details
- G06T2207/20132—Image cropping
-
- 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/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Analytical Chemistry (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Health & Medical Sciences (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Image Processing (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
The invention relates to a wine bottle appearance defect detection method based on multi-view image fusion, which belongs to the technical field of image processing and comprises the following steps: s1: the wine bottle is sent to a preset shooting position, and the light source environment condition is adjusted; s2: acquiring all-dimensional appearance image information of a wine bottle; s3: correcting the parameters of the camera, and shooting to obtain an undistorted wine bottle image; s4: pre-treating; s5: carrying out image splicing and fusion to obtain a wine bottle section two-dimensional expansion diagram with complete wine bottle appearance; s6: sequentially processing the spliced images, and rearranging the spliced images by using an image segmentation technology according to the sequence of the standard wine bottle development images to obtain a wine bottle appearance splicing image similar to the standard development images; s7: and carrying out color difference consistency matching on the section two-dimensional expanded view of the wine bottle appearance splicing view and the standard expanded view, then carrying out image subtraction, and judging whether the detected wine bottle has appearance defects.
Description
Technical Field
The invention belongs to the technical field of image processing, and relates to a wine bottle appearance defect detection method based on multi-view image fusion.
Background
Wine is a special food which is often seen in daily life, and various brands of wine commodities are owned in the market at present. In order to increase the sales volume of wine products of each big merchant, the packing of wine is full of time, a five-flower eight-door wine bottle style is designed, the style and the body pattern of the wine bottle are gradually attractive and complex, but just because the wine bottle becomes complex, the appearance defects of the wine bottle body and other problems can occur, the wine bottle reaches the hands of customers, once the customers find the wine bottle, the satisfaction degree of the customers can be reduced, the reputation and the market image of the wine merchants, especially the famous wine merchants are influenced, and great economic loss is brought. How to carry out high-efficient quick detection to beverage bottle outward appearance defect is the key step in beverage bottle manufacturing.
Traditional beverage bottle appearance defect detects mainly relies on artifical mode, and naked eye carries out the comparison one by one to the beverage bottle outward appearance, has great limitation, observes similar pattern for a long time, causes the eyestrain very easily, influences the observation comparison result to a great extent, and efficiency is lower, produces great influence to follow-up production manufacturing process.
At present except artifical mode, adopt more mode to carry out the defect detection for degree of depth study mode to the beverage bottle outward appearance, the limitation of artifical mode has been solved to this mode, has very big promotion to the testing effect. But need acquire a large amount of beverage bottle outward appearance data sets to need surround the shooting to the beverage bottle, work load is great, simultaneously because the position that the beverage bottle that each gets into the assembly line was put is different, the data set that obtains of shooting also has great difference, and when being used for the beverage bottle outward appearance detection of different styles, need acquire the data set again and detect consuming time and be hard.
Disclosure of Invention
In view of this, the invention aims to provide a wine bottle appearance defect detection method based on multi-view image fusion, which aims to solve the problems of low efficiency, complex data acquisition, non-uniform data of different types of wine bottles and the like in the prior art and improve the efficiency and the precision of wine bottle appearance detection.
In order to achieve the purpose, the invention provides the following technical scheme:
a wine bottle appearance defect detection method based on multi-view image fusion comprises the following steps:
s1: the wine bottle is conveyed to a preset shooting position through a production line conveying device, and the light source environment condition is set to be under the optimal imaging condition of a camera;
s2: acquiring all-dimensional appearance image information of the wine bottle by three cameras surrounding the wine bottle;
s3: calibrating each camera, acquiring internal parameters and distortion parameters of the camera, correcting the parameters of the camera, and shooting to obtain a non-distorted wine bottle image;
s4: preprocessing the collected wine bottle image, including denoising the image, then removing redundant parts in the image, and reserving a partial image only containing wine bottle information in the image;
s5: carrying out image splicing and fusion on the three wine bottle multi-view two-dimensional images with different viewing angles by adopting an image fusion splicing algorithm to obtain a wine bottle section two-dimensional expansion diagram with complete wine bottle appearance;
s6: sequentially processing the spliced images, and rearranging the spliced images by using an image segmentation technology according to the sequence of the standard wine bottle development images to obtain a wine bottle appearance splicing image similar to the standard development images;
s7: and carrying out color difference consistency matching on the section two-dimensional expanded view of the wine bottle appearance splicing view and the standard expanded view, then carrying out image subtraction, and judging whether the detected wine bottle has appearance defects.
Further, the step S1 specifically includes: the wine bottle is conveyed to a preset position shot by the camera through the assembly line conveying device, and a three-direction specific LED lighting method is adopted to achieve a preset optimal imaging effect.
Further, in the step S2, the three cameras surround the wine bottle at intervals of 120 °, and respectively take pictures of the wine bottle in three directions, and ensure that the three taken pictures contain the whole wine bottle appearance image.
Further, in step S3, calibrating each camera by using a zhang' S calibration method to obtain the internal and external parameters of the camera, specifically including: the calibrated checkerboard is used as one plane, the wine bottle is imaged on the other plane, the wine bottle has a corresponding point on the two planes respectively, a unit matrix of the two planes is obtained by solving the corresponding point pair, and then the internal and external parameters, the external parameter rotation matrix and the offset of the camera are obtained through the unit matrix.
Further, in step S4, the performing target position clipping and extraction on the image captured after the calibration is completed specifically includes: the shot wine bottle image comprises wine bottles and other redundant parts, so that the part containing wine bottle information is extracted, the Canny edge detection algorithm of a self-adaptive threshold value is adopted to extract the outer edge information of the wine bottles, the rest parts are cut off according to the edge information, and a wine bottle information partial image is reserved; and (4) performing target position cutting and extracting operation on the pictures shot by each camera to obtain an image only containing wine bottle information so as to perform fusion.
Further, the specific determination steps of the Canny adaptive threshold are as follows:
calculating gradient amplitude:
wherein x represents the abscissa of the pixel, y represents the ordinate of the pixel, IxRepresenting the gradient value, I, of the pixel point along the x-directionyRepresenting the gradient value of the pixel point along the y direction;
calculating the gradient direction:
calculating a high threshold:
Th=Gpeak+δ (11)
wherein G isiExpressing the gradient value of the ith pixel point, wherein the value of n is 2 or 3, and i expresses the pixel point;
calculating a low threshold:
Tl=Gpeak+δ' (13)
Gpeakis the gradient value corresponding to the peak of the histogram, N' and N are the correspondingThe number of pixels within the range.
Further, in step S5, performing image fusion on the wine bottle cross-section two-dimensional expansion map by using a Speeded-Up Robust Features (SURF) algorithm, specifically including: firstly, Gaussian filtering is carried out on image pixel points, three sequentially arranged wine bottle section two-dimensional expansion maps are fused through an SURF algorithm, a sea plug matrix is constructed, a characteristic value is calculated, and characteristic points are found out; constructing a Gaussian feature pyramid, positioning feature points, and describing the feature points; matching, screening and splicing the described feature points, registering the wine bottle image by using a random sample consensus (RANSAC) algorithm, and screening the feature points; and finally, fusing the three wine bottle images by adopting a pixel weighting method to obtain a fused complete wine bottle section expansion diagram, wherein the specific calculation formula is as follows:
Δ(H)=LxxLyy-(0.9Lxy)2 (16)
wherein x represents a certain pixel point, sigma represents a variable parameter in Gaussian smooth filtering, H (x, delta) represents a Hessian matrix of the certain pixel point, and Lxx、Lxy、LyyThe second derivative of each direction of the image pixel after Gaussian filtering is shown, delta (H) shows the image after transformation, and whether the point is an extreme point is judged, so that the characteristic point of the image is convenient to find.
Further, in step S6, the segmenting and rearranging the spliced wine bottle images specifically includes: and selecting a wine bottle standard expansion image as a comparison, segmenting the orderly disordered image, and sequentially arranging the standard images to obtain a wine bottle two-dimensional image in the standard sequential arrangement.
The invention has the beneficial effects that: the wine bottle defect detection method provided by the invention can be used for detecting the appearance defects of wine bottles on a production line, and comprises information such as labels, printing, characters and the like; meanwhile, a method of image fusion splicing technology is adopted, a complete wine bottle section expansion diagram can be obtained, the problems of wine bottle placing positions and directions in a production line are considered, the image can be corrected and adjusted, the model does not need to be updated again and again, time is saved well, and efficiency is improved. By comparing the image with a standard wine bottle image, the wine bottle appearance defect information can be obtained, the detection efficiency is greatly improved, and the product quality of wine bottle manufacturers is guaranteed.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the means of the instrumentalities and combinations particularly pointed out hereinafter.
Drawings
For the purposes of promoting a better understanding of the objects, aspects and advantages of the invention, reference will now be made to the following detailed description taken in conjunction with the accompanying drawings in which:
FIG. 1 is an overall flowchart of bottle appearance defect detection;
FIG. 2 is a schematic view showing the placement positions of the camera, the wine bottle and the light source;
FIG. 3 is a flowchart of the SURF algorithm for wine bottle image fusion;
fig. 4 is a schematic view of an integrated detection method for appearance defects of wine bottles.
Reference numerals: first light source 1, first camera 2, beverage bottle 3, second light source 4, assembly line 5, second camera 6, third light source 7, third camera 8.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention in a schematic way, and the features in the following embodiments and examples may be combined with each other without conflict.
Wherein the showings are for the purpose of illustration only and not for the purpose of limiting the invention, shown in the drawings are schematic representations and not in the form of actual drawings; to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numerals in the drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if there is an orientation or positional relationship indicated by terms such as "upper", "lower", "left", "right", "front", "rear", etc., based on the orientation or positional relationship shown in the drawings, it is only for convenience of description and simplification of description, but it is not an indication or suggestion that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes, and are not to be construed as limiting the present invention, and the specific meaning of the terms may be understood by those skilled in the art according to specific situations.
The technical problem to be solved by the invention is realized by adopting the following technical scheme, as shown in the attached figure 1:
step 1: as shown in fig. 2, after the wine bottle 3 enters the fixed placing opening of the assembly line 5, the assembly line 5 conveying device moves the wine bottle 3 to a preset shooting position, and at the position, cameras (a first camera 2, a second camera 6 and a third camera 8) in three directions can clearly shoot all appearance characteristics of the wine bottle; in addition, the best light source condition for imaging by the camera is selected, and a mode that specific LED lamps (the first light source 1, the second light source 4 and the third light source 7) vertically illuminate is adopted, so that the wine bottle image shot by the camera can achieve the clearest effect.
Step 2: three cameras with the same specification are selected to be perpendicular to the middle of the body of the wine bottle 3 at an interval of 120 degrees for shooting, after the positioning information and the light source conditions of the wine bottle 3 obtained in the step 1 are optimal, the images of the wine bottle 3 are shot, each camera of each wine bottle 3 shoots a wine bottle appearance image with different visual angles, and the three images with different visual angles of the same wine bottle 3 are stored.
And step 3: the Zhang calibration method is adopted for calibrating each camera, the Zhang calibration method can solve the problem of calibrating the same object under different visual angles, a checkerboard image is used as a calibration board, the internal and external parameters of each camera, including internal parameters and distortion parameters, are obtained through formula conversion from a world coordinate system to a camera coordinate system, then the parameters are used for carrying out distortion correction on the cameras, the photo distortion is eliminated, and the optimal imaging effect is achieved.
And 4, step 4: and preprocessing the wine bottle image shot after correction, wherein the preprocessing comprises eliminating some noise signals, modifying the size of the image and the like, extracting wine bottle edge information in the image by adopting a Canny edge detection method of a self-adaptive threshold value, shearing the wine bottle image according to the edge information, reserving image data only containing the wine bottle information, and preparing for subsequent image fusion.
The specific determination formula of the Canny adaptive threshold is as follows:
gradient magnitude calculation formula:
gradient direction calculation formula:
high threshold calculation formula:
Th=Gpeak+δ (19)
low threshold calculation formula:
Tl=Gpeak+δ' (21)
Gpeakis the gradient value corresponding to the peak value of the histogram, and N' and N are the number of pixel points in the corresponding range.
And 5: the final three wine bottle appearance development images for image fusion obtained by the steps are fused by using a SURF algorithm, as shown in figure 3.
The method specifically comprises the following steps: firstly, Gaussian filtering is carried out on image pixel points to ensure the scale independence of the image pixel points, then a sea plug matrix is constructed, a characteristic value is calculated, and the characteristic points are found out. And constructing a Gaussian feature pyramid, positioning feature points, describing the feature points, and matching, screening and splicing the described feature points, wherein a RANSAC algorithm is used for screening the feature points to ensure that the feature points are matched correctly. And then fusing the three wine bottle images by adopting a pixel weighted average method to finally obtain a complete wine bottle appearance development picture which completely contains all the characteristics of the wine bottle and does not contain repeated characteristics. The concrete formulas are shown as (7) and (8).
Δ(H)=LxxLyy-(0.9Lxy)2 (24)
Wherein x represents a certain pixel point, sigma represents a variable parameter in Gaussian smooth filtering, H (x, delta) represents a Hessian matrix of the certain pixel point, and Lxx、Lxy、LyyRepresenting the second derivative of each azimuth of the image pixel after Gaussian filtration, and delta (H) representing the image after transformation, judging whether the point is an extreme point or not, and being convenient for judging whether the point is an extreme point or notAnd searching image characteristic points.
Step 6: for the wine bottle appearance images fused and spliced in the step 5, the problem of the wine bottle orientation entering the shooting position is considered, the sequence of selecting the images for synthesis is performed according to the sequence of the cameras 1, 2 and 3, and each camera cannot shoot the same position of a wine bottle, so that the method of image segmentation and rearrangement is adopted to segment the images fused in the step 5, perform image segmentation on the wine bottle images with the sequence problem, and then arrange the images according to the correct sequence to obtain the finally required correct wine bottle appearance development image.
And 7: and (3) carrying out image subtraction on the fused wine bottle appearance development image obtained in the step (6) and a standard correct defect-free wine bottle appearance development image, wherein the image subtraction can judge the change effect of the two images in the same scene, then analyzing the obtained result through the image subtraction and the color component subtraction of the images, and judging whether the wine bottle has the problems of wine bottle body pattern defects, uneven glaze and the like within a certain threshold value range, thereby completing the detection of the wine bottle appearance defect problem.
In addition to the above-described detection of the appearance of the wine bottle, the present invention also has an integrated form, as shown in figure 4,
the invention also discloses another integrated implementation mode, namely, after the all-dimensional appearance information images of the wine bottles are collected by the camera, the data are uploaded and stored to a computer terminal, then image fusion software can be designed, the uploaded three wine bottle appearance information images are fused and spliced to obtain fused images, and the software is used again for carrying out image sequence correction and standard image comparison to obtain a final defect detection result. The implementation mode is not changed in nature, the processing steps are simple and convenient, and the effect of defect detection can be achieved.
Compared with the traditional manual mode and deep learning mode, the invention has the beneficial technical effects that:
1. in terms of the efficiency of the process,
compared with the traditional manual mode and deep learning method, the method provided by the invention has the advantages that the detection speed and the detection precision are greatly improved, the data acquisition and processing mode is more convenient, and the requirement of efficiently acquiring and processing wine bottle image data can be met.
2. In terms of the cost, it is preferable that,
according to the method, three cameras are needed to be used for surrounding shooting, the mechanical arm is used for carrying the cameras to surround the wine bottle for shooting, the cost of the mechanical arm is high, the cost of purchase, maintenance and the like, the three cameras can completely obtain the image covering the appearance characteristics of the wine bottle, the use of expensive cameras is not needed, and the cost is low.
3. In terms of the accuracy of defect identification,
the method has higher accuracy in the aspect of identifying the wine bottle defects, and the accuracy precision of the deep learning mode is slightly lower, because the deep learning technology cannot identify or identifies the defects incorrectly, the method directly distinguishes the obtained wine bottle images from the standard wine bottle images, and the defects are easily identified.
Finally, the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the present invention, and although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions, and all of them should be covered by the claims of the present invention.
Claims (8)
1. A wine bottle appearance defect detection method based on multi-view image fusion is characterized by comprising the following steps: the method comprises the following steps:
s1: the wine bottle is conveyed to a preset shooting position through a production line conveying device, and the light source environment condition is set to be under the optimal imaging condition of a camera;
s2: acquiring all-dimensional appearance image information of the wine bottle by three cameras surrounding the wine bottle;
s3: calibrating each camera, acquiring internal parameters and distortion parameters of the camera, correcting the parameters of the camera, and shooting to obtain a non-distorted wine bottle image;
s4: preprocessing the collected wine bottle image, including denoising the image, then removing redundant parts in the image, and reserving a partial image only containing wine bottle information in the image;
s5: carrying out image splicing and fusion on the three wine bottle multi-view two-dimensional images with different viewing angles by adopting an image fusion splicing algorithm to obtain a wine bottle section two-dimensional expansion diagram with complete wine bottle appearance;
s6: sequentially processing the spliced images, rearranging the spliced images by using an image segmentation technology according to the sequence of the standard wine bottle development images to obtain a wine bottle appearance spliced image similar to the standard development images;
s7: and carrying out color difference consistency matching on the section two-dimensional expanded view of the wine bottle appearance splicing view and the standard expanded view, then carrying out image subtraction, and judging whether the detected wine bottle has appearance defects.
2. The wine bottle appearance defect detection method based on multi-view image fusion as claimed in claim 1, wherein: the step S1 specifically includes: the wine bottle is conveyed to a preset position shot by the camera through the assembly line conveying device, and a three-direction specific LED lighting method is adopted to achieve a preset optimal imaging effect.
3. The wine bottle appearance defect detection method based on multi-view image fusion as claimed in claim 1, wherein: in the step S2, the three cameras surround the wine bottle at intervals of 120 °, and respectively take pictures of the wine bottle in three directions, and ensure that the three taken pictures contain the whole wine bottle appearance image.
4. The wine bottle appearance defect detection method based on multi-view image fusion as claimed in claim 1, wherein: in step S3, calibrating each camera by using a zhang scaling method to obtain the internal and external parameters of the camera, specifically including: the calibrated checkerboard is used as one plane, the wine bottle is imaged on the other plane, the wine bottle has a corresponding point on the two planes respectively, a unit matrix of the two planes is obtained by solving the corresponding point pair, and then the internal and external parameters, the external parameter rotation matrix and the offset of the camera are obtained through the unit matrix.
5. The wine bottle appearance defect detection method based on multi-view image fusion as claimed in claim 1, wherein: in step S4, performing target position clipping and extraction on the image captured after the calibration is completed, specifically including: extracting a part containing wine bottle information, extracting the outer edge information of a wine bottle by adopting a Canny edge detection algorithm of a self-adaptive threshold, cutting off the rest part according to the edge information, and keeping a wine bottle information partial image; and (4) performing target position cutting and extracting operation on the pictures shot by each camera to obtain an image only containing wine bottle information so as to perform fusion.
6. The wine bottle appearance defect detection method based on multi-view image fusion as claimed in claim 5, wherein: the specific determination steps of the Canny adaptive threshold are as follows:
calculating gradient amplitude:
wherein x represents the abscissa of the pixel, y represents the ordinate of the pixel, IxRepresenting the gradient value, I, of the pixel point along the x-directionyRepresenting the gradient value of the pixel point along the y direction;
calculating the gradient direction:
calculating a high threshold:
Th=Gpeak+δ (3)
wherein G isiExpressing the gradient value of the ith pixel point, wherein the value of n is 2 or 3, and i expresses the pixel point;
calculating a low threshold:
Tl=Gpeak+δ' (5)
Gpeakis the gradient value corresponding to the peak value of the histogram, and N' and N are the number of pixel points in the corresponding range.
7. The wine bottle appearance defect detection method based on multi-view image fusion as claimed in claim 1, wherein: in step S5, image fusion is performed on the wine bottle profile two-dimensional expansion map by using an speedup robust feature SURF algorithm, which specifically includes: firstly, Gaussian filtering is carried out on image pixel points, three sequentially arranged wine bottle section two-dimensional expansion maps are fused through an SURF algorithm, a sea plug matrix is constructed, a characteristic value is calculated, and characteristic points are found out; constructing a Gaussian feature pyramid, positioning feature points, and describing the feature points; matching, screening and splicing the described feature points, registering the wine bottle image by using a RANSAC algorithm, and screening the feature points; and finally, fusing the three wine bottle images by adopting a pixel weighting method to obtain a fused complete wine bottle section expansion diagram, wherein the specific calculation formula is as follows:
Δ(H)=LxxLyy-(0.9Lxy)2 (8)
wherein x represents a certain pixel point, sigma represents a variable parameter in Gaussian smooth filtering, and H (x, delta) represents a certain pixel pointHessian matrix of, Lxx、Lxy、LyyThe second derivative of each direction of the image pixel after Gaussian filtering is shown, delta (H) shows the image after transformation, and whether the point is an extreme point is judged, so that the characteristic point of the image is convenient to find.
8. The wine bottle appearance defect detection method based on multi-view image fusion as claimed in claim 7, wherein: in step S6, the segmenting and rearranging of the spliced wine bottle images specifically includes: and selecting a wine bottle standard expansion image as a contrast, segmenting the disordered sequential images, and sequentially arranging the standard images to obtain a two-dimensional wine bottle image in a standard sequential arrangement manner.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210356955.5A CN114677356A (en) | 2022-04-01 | 2022-04-01 | Wine bottle appearance defect detection method based on multi-view image fusion |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210356955.5A CN114677356A (en) | 2022-04-01 | 2022-04-01 | Wine bottle appearance defect detection method based on multi-view image fusion |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114677356A true CN114677356A (en) | 2022-06-28 |
Family
ID=82078966
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210356955.5A Pending CN114677356A (en) | 2022-04-01 | 2022-04-01 | Wine bottle appearance defect detection method based on multi-view image fusion |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114677356A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115791817A (en) * | 2023-02-06 | 2023-03-14 | 泸州老窖股份有限公司 | Quality detection method for transparent wine bottles |
CN117994532A (en) * | 2024-01-17 | 2024-05-07 | 钛玛科(北京)工业科技有限公司 | Gravure coating image recognition system |
CN118090743A (en) * | 2024-04-22 | 2024-05-28 | 山东浪潮数字商业科技有限公司 | Porcelain winebottle quality detection system based on multi-mode image recognition technology |
-
2022
- 2022-04-01 CN CN202210356955.5A patent/CN114677356A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115791817A (en) * | 2023-02-06 | 2023-03-14 | 泸州老窖股份有限公司 | Quality detection method for transparent wine bottles |
CN117994532A (en) * | 2024-01-17 | 2024-05-07 | 钛玛科(北京)工业科技有限公司 | Gravure coating image recognition system |
CN118090743A (en) * | 2024-04-22 | 2024-05-28 | 山东浪潮数字商业科技有限公司 | Porcelain winebottle quality detection system based on multi-mode image recognition technology |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114677356A (en) | Wine bottle appearance defect detection method based on multi-view image fusion | |
CN109285194B (en) | Camera calibration board and camera calibration data acquisition method | |
CN114897864B (en) | Workpiece detection and defect judgment method based on digital-analog information | |
CN110956661B (en) | Method for calculating dynamic pose of visible light and infrared camera based on bidirectional homography matrix | |
CN106897995B (en) | A kind of components automatic identifying method towards Automatic manual transmission process | |
CN111161295B (en) | Dish image background stripping method | |
CN112304960B (en) | High-resolution image object surface defect detection method based on deep learning | |
CN108197521A (en) | A kind of leggy Quick Response Code obtains identification device and method | |
CN114757913A (en) | Display screen defect detection method | |
KR101931564B1 (en) | Device and method for processing image using image registration | |
US20140218477A1 (en) | Method and system for creating a three dimensional representation of an object | |
CN111325803A (en) | Calibration method for evaluating binocular camera internal and external participation time synchronization | |
Kannala et al. | Object recognition and segmentation by non-rigid quasi-dense matching | |
CN114119695A (en) | Image annotation method and device and electronic equipment | |
CN106770322A (en) | Calibration point depth detection method and temperature controller appearance detecting method | |
CN116125489A (en) | Indoor object three-dimensional detection method, computer equipment and storage medium | |
CN113591548B (en) | Target ring identification method and system | |
CN115147386A (en) | Defect detection method and device for U-shaped pipe and electronic equipment | |
CN115034577A (en) | Electromechanical product neglected loading detection method based on virtual-real edge matching | |
Haala et al. | Combining Laser Scanning and Photogrammetry-A Hybrid Approach for Heritage Documentation. | |
CN114627055A (en) | Cylindrical label quality detection method and system | |
CN107895353B (en) | Interactive depth map texture copy flaw removal method | |
CN111062887A (en) | Image definition judgment method based on improved Retinex algorithm | |
CN115035294B (en) | Gear detection method and device for refrigerator temperature controller | |
CN114898148B (en) | Egg offset detection method and system based on deep learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |