CN107063458B - Ceramic tile coloration piecemeal detection method based on machine vision - Google Patents
Ceramic tile coloration piecemeal detection method based on machine vision Download PDFInfo
- Publication number
- CN107063458B CN107063458B CN201611060933.5A CN201611060933A CN107063458B CN 107063458 B CN107063458 B CN 107063458B CN 201611060933 A CN201611060933 A CN 201611060933A CN 107063458 B CN107063458 B CN 107063458B
- Authority
- CN
- China
- Prior art keywords
- ceramic tile
- image
- piecemeal
- mask
- color
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 239000000919 ceramic Substances 0.000 title claims abstract description 111
- 238000001514 detection method Methods 0.000 title claims abstract description 26
- 238000000034 method Methods 0.000 claims abstract description 30
- 238000012545 processing Methods 0.000 claims abstract description 27
- 230000009466 transformation Effects 0.000 claims abstract description 24
- 241000114727 Acetes chinensis Species 0.000 claims abstract description 21
- 238000012937 correction Methods 0.000 claims abstract description 20
- 230000008569 process Effects 0.000 claims abstract description 17
- 150000001875 compounds Chemical class 0.000 claims abstract description 15
- 238000012360 testing method Methods 0.000 claims abstract description 13
- 230000007547 defect Effects 0.000 claims abstract description 8
- 230000011218 segmentation Effects 0.000 claims abstract description 8
- 238000005192 partition Methods 0.000 claims abstract description 5
- 239000002131 composite material Substances 0.000 claims abstract description 4
- 230000006870 function Effects 0.000 claims description 9
- 230000004069 differentiation Effects 0.000 claims description 8
- 230000000903 blocking effect Effects 0.000 claims description 7
- 238000010586 diagram Methods 0.000 claims description 7
- 239000000945 filler Substances 0.000 claims description 6
- 238000013519 translation Methods 0.000 claims description 5
- 238000003708 edge detection Methods 0.000 claims description 3
- 238000001914 filtration Methods 0.000 claims description 3
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 abstract description 2
- 238000000605 extraction Methods 0.000 abstract description 2
- 230000000007 visual effect Effects 0.000 abstract description 2
- 230000004075 alteration Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- PCTMTFRHKVHKIS-BMFZQQSSSA-N (1s,3r,4e,6e,8e,10e,12e,14e,16e,18s,19r,20r,21s,25r,27r,30r,31r,33s,35r,37s,38r)-3-[(2r,3s,4s,5s,6r)-4-amino-3,5-dihydroxy-6-methyloxan-2-yl]oxy-19,25,27,30,31,33,35,37-octahydroxy-18,20,21-trimethyl-23-oxo-22,39-dioxabicyclo[33.3.1]nonatriaconta-4,6,8,10 Chemical group C1C=C2C[C@@H](OS(O)(=O)=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@H]([C@H](C)CCCC(C)C)[C@@]1(C)CC2.O[C@H]1[C@@H](N)[C@H](O)[C@@H](C)O[C@H]1O[C@H]1/C=C/C=C/C=C/C=C/C=C/C=C/C=C/[C@H](C)[C@@H](O)[C@@H](C)[C@H](C)OC(=O)C[C@H](O)C[C@H](O)CC[C@@H](O)[C@H](O)C[C@H](O)C[C@](O)(C[C@H](O)[C@H]2C(O)=O)O[C@H]2C1 PCTMTFRHKVHKIS-BMFZQQSSSA-N 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000003702 image correction Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01J—MEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
- G01J3/00—Spectrometry; Spectrophotometry; Monochromators; Measuring colours
- G01J3/46—Measurement of colour; Colour measuring devices, e.g. colorimeters
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01J—MEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
- G01J3/00—Spectrometry; Spectrophotometry; Monochromators; Measuring colours
- G01J3/46—Measurement of colour; Colour measuring devices, e.g. colorimeters
- G01J2003/467—Colour computing
Landscapes
- Physics & Mathematics (AREA)
- Spectroscopy & Molecular Physics (AREA)
- General Physics & Mathematics (AREA)
- Image Analysis (AREA)
Abstract
The present invention discloses the ceramic tile coloration piecemeal detection method based on machine vision, including:Step 1, Image Acquisition and positioning;Step 2, the correction of image pose:Using based on ROI image, tiltedly external square diagonal line carries out geometric transformation, to correct ceramic tile pose;Step 3, image block:ROI image after being corrected step 2 using vertical and horizontal partition strategy is evenly divided into test module, and test module is minimum ROI image;Step 4, composite mask:Processing is masked to the test module after segmentation using compound logic operation method;Test module after mask process is transformed into hsv color space by step 5, acetes chinensis, is generated color characteristic and is compared with standard value, determines ceramic tile and whether there is color defect.Present invention combination affine transformation, piecemeal processing, compound mask, color space, Feature Extraction Technology complete the visual color detection of ceramic tile, and the detected representation is good, and solving the problems, such as can not the intrinsic color acetes chinensis of exact representation ceramic tile.
Description
Technical field
The ceramic tile coloration piecemeal detection method based on machine vision that the present invention relates to a kind of.
Background technology
At present in industrial processes, ceramic tile acetes chinensis, which mainly has, manually visually observes completion, and this method labour is strong
Degree is big, is influenced by subjective factor, manually at being gradually increased, has been unable to meet the needs of modern automation production;Also there is utilization
Chromaticity detector carries out the correlation technique of ceramic tile acetes chinensis, as speed detector relies primarily on the movement of horizontal guide rail structure to mesh
Mark is scanned, and sweep speed is relatively slow and colorimetric detection excessively relies on production firm's color standard, it is difficult to according to actual product
Color is changed and adapts to;The method of the ceramic tile acetes chinensis of view-based access control model is now also relatively more, but proposed method
There are larger limitations, are mainly manifested in following points:
(1) it before ceramic tile detection, needs accurately to position detection ceramic tile, the color characteristic to count ceramic tile is believed
Breath, but still can not distinguish the interference characteristic of edge neighborhood Pixel-level, to when carrying out color characteristic, unavoidably bring into
The influence of environmental factor;
(2) statistics is mainly based upon global information and carries out color characteristic statistics, perception of this feature to local colour switching
Ability very little, i.e. global information statistics can dilute the expressive ability of local aberration transformation, therefore the precision of acetes chinensis and standard
Exactness can all be affected;
(3) selection of color space will produce prodigious influence to acetes chinensis, and there is presently no general color spaces
It is used by all product acetes chinensis, is only selected according to the actual demand of product.Based on current ceramic tile acetes chinensis
The present situation and engineering background of industry, this patent propose a kind of based on piecemeal compound mask chromaticity distortion detection algorithm.
Invention content
The present invention ties to solve the above problems, provide a kind of ceramic tile coloration piecemeal detection method based on machine vision
Affine transformation, piecemeal processing, compound mask, color space, Feature Extraction Technology are closed, the visual color detection of ceramic tile is completed, it should
Detected representation is good, solves traditional detection method because limitation and defect can not the intrinsic color aberration inspections of exact representation ceramic tile
Survey problem.
To achieve the above object, the technical solution adopted by the present invention is:
Ceramic tile coloration piecemeal detection method based on machine vision, includes the following steps:
Step 1, Image Acquisition and positioning
Tile image is acquired by color camera, then is schemed the ROI only containing ceramic tile by ceramic tile location algorithm
As splitting, subsequent processing is carried out as independent processing unit, the ROI image includes whole tile frontier district
The image in domain;
Step 2, the correction of image pose
Using based on geometric transformation is carried out on the basis of ROI image tiltedly external square diagonal line, to correct ceramic tile pose;
Step 3, image block
ROI image after being corrected step 2 using vertical and horizontal partition strategy is evenly divided into test module, and test module is most
Small ROI image;
Step 4, composite mask
Processing is masked to the test module after segmentation using compound logic operation method;
Step 5, acetes chinensis
Test module after mask process is transformed into hsv color space, generate color characteristic and is compared with standard value, is sentenced
Do not go out ceramic tile and whether there is color defect.
The step 1 specifically includes following steps:
Step 11, image is acquired by high speed linear array CCD camera;
Step 12, first gray level image, then it is filtered denoising, filtering figure is divided using edge detection algorithm,
Small tiles profile is extracted again, obtains ceramic tile profile diagram;
Step 13, the geometrical property of ceramic tile profile generates corresponding primitive feature, primitive in the profile diagram based on step 12
Feature includes width, height and integrity degree;Corresponding hsv color space characteristics, HSV are generated using the color characteristics of ceramic tile itself
Color space characteristic includes tone and saturation degree, primitive feature and color characteristic is then configured to bit combination feature, jointly
Complete the positioning of ceramic tile;
Step 14, it for the tile image after positioning, is generated and is corresponded on the basis of the angle point of the boundary rectangle of ceramic tile profile
ROI image.
ROI image is subjected to step 2 geometric transformation, formula is:
In formula, θcIt is the rotation angle of geometric transformation, Δ x, Δ y are correction translation , [x,y 1]For coordinate , [ before transformation;x1
y11]For the coordinate after transformation.
The step 3 specifically includes following steps:
Step 31:Image after correction is re-started into contours extract, obtains the minimum ROI image for being close to ceramic tile target,
Using the image origin as the starting point of piecemeal, piecemeal step-length is initialized, the definition of piecemeal step-length is:
StepxWith StepyIt is the integer taken after calculating, Scale is the scale of step size computation
Coefficient;
Minimum ROI image origin is as piecemeal starting point using after correction for step 32, then respectively laterally and longitudinally right with its
The step-length answered is divided into row block, completes the partiting step of entire ceramic tile.
Step 32 dividing mode is:
Minimum ROI image is divided into 0th intermediate area, 2nd area and 1st area and 2 in 1st area and upper and lower both sides at left and right sides of 0th area
3rd area that area intersects, boundary condition are divided into 4 kinds of regions, and the discriminant function using following g (i, j) as boundary condition is solved
Analysis:
The discriminant function is expressed as:
If g (i, j)=1, represents and occur laterally to cross the border in piecemeal ergodic process, be in the piecemeal size of critical zone
The Fan Weiwei [ of width;I, Width];
If g (i, j)=2, represents the generation longitudinal direction in piecemeal ergodic process and cross the border, be in the piecemeal size of critical zone
The Fan Weiwei [ of height;J, Height];
If g (i, j)=3, represents in piecemeal ergodic process while transverse and longitudinal occurs and cross the border, point in critical zone
The range Fen Biewei [ of block size width and height;I, Width]With [J, Height];
If g (i, j)=0, represent without crossing the border in piecemeal ergodic process, the range of width and height is respectively
[I, i+Stepx];With [J, j+Stepy];
And it defines:When g (i, j)={ 1,2,3 }, the region of division is external piecemeal, and region when g (i, j)=0 is interior
Partial block, internal piecemeal be need not carry out pixel differentiate processing part, external piecemeal just needs differentiate handle be need into
Row pixel differentiates the part of processing.
The step 4 specifically includes following steps:
Step 41:It initializes two width and divides the image that ROI sizes are identical and pixel value is 0, it is compound respectively as ceramic tile
The parent of mask is denoted as M1, M2;
Step 42:Correction profile in ceramic tile blocking step is drawn in M1 respectively with pixel precision, in M2 mask images, filling
Mask parent contoured interior and perimeter;Filler pixels are RGB (255,255,255) i.e. inside M1 image outlines, external
For RGB (0,0,0);The inside and outside portion's filler pixels of M2 are RGB (255,255,255) and RGB (255,0,0);
Step 43:Image after pose is corrected makees logic and operation with compound mask image M1, M2 respectively, is handled
Keep the image of ceramic tile contoured interior complete after mask region of interest area image I1 and I2 afterwards, interior mask and correcting image processing
Portion retains, and external background colour is respectively black and red.
Step 44:When g (i, j)={ 1,2,3 } in ceramic tile blocking step, piecemeal is in critical edge dividing value, due to nothing
Method ensures the side of ceramic tile and being completely superposed for segmentation ROI image, need to carry out the differentiation processing of ceramic tile inside and outside pixel, decision rule
For:If the value in boundary point pixel in the block in I1 and I2 meet simultaneously I1 (i, j)=RGB (0,0,0) and I1 (i, j)=
RGB (255,0,0), then the pixel value is to mix background pixel boundary is point in the block, is otherwise the pixel on ceramic tile.
Step 5 acetes chinensis is specially:
ROI image after piecemeal and mask is transformed into hsv color space, the hsv color spatial component life based on weight
At color characteristic, expression formula is as follows:
Fti=(λ1×H+λ2×S)/N
FtiIndicate that the color characteristic that i-th of piecemeal generates, H indicate that chrominance component, corresponding weights are λ1, S expression saturations
The corresponding weights component λ of degree2, N indicates the number of pixels that traverses in corresponding blocks, takes λ1=0.7 or λ2=0.3;
Step 52:Calculate the ceramic tile color characteristic collection F { F generatedti|Fti, i=1,2 ... N, k ∈ N+ and N >=1 }, standard
Ceramic tile color characteristic is Fm, the expression formula of acetes chinensis is:
ΔEti=|Fti-Fm|
The differentiation of positioning target is carried out using the method for threshold value, discrimination formula is as follows.
T is the bound of threshold value, g (Δ Eti)=1 indicates that misalignment, monoblock is not present in the block position of the ceramic tile
When corresponding the g () function of all pieces of ceramic tile is 1, just judge that misalignment is not present in the ceramic tile, if any block therein corresponds to
G ()=0, then differentiate that there are chromaticity distortions for the ceramic tile.
After adopting the above technical scheme, the present invention has the following advantages:
1, ceramic tile Target Segmentation is become by uniform detection module using vertical and horizontal partition strategy, overcomes traditional global information
Feature can not perceive the defect of small chromatic aberration, can protrude the change information of local aberration;
2, using based on ceramic tile profile, tiltedly external square diagonal line carries out the ceramic tile pose of geometric transformation and corrects mode, ensure horizontal
The effect of perpendicular partition strategy;
3, the problem of tile boundary influences color characteristic statistics can be overflowed for blocking unit, is transported using compound mask logic
The statistics that the non-ceramic tile pixel inside the piecemeal that makes to cross the border is not involved in color characteristic is calculated, to ensure the accurate of color expressing feature
Property;
4, it generates color characteristic to dividing the carry out acetes chinensis of block using hsv color space and is carried out pair with standard value
Than determining ceramic tile chromatic aberration defect, and the position of defect can be accurately positioned.
Description of the drawings
Attached drawing described herein is used to provide further understanding of the present invention, and constitutes the part of the present invention, this hair
Bright illustrative embodiments and their description are not constituted improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is the ceramic tile coloration separate detection method flow schematic diagram the present invention is based on machine vision;
Fig. 2 is the geometric representation of tile image correction of the present invention;
Fig. 3 is that piecemeal of the present invention shows intention;
Fig. 4 is ceramic tile acetes chinensis figure of the present invention.
Specific implementation mode
In order to keep technical problems, technical solutions and advantages to be solved clearer, clear, tie below
Closing accompanying drawings and embodiments, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only used
To explain the present invention, it is not intended to limit the present invention.
The ceramic tile coloration piecemeal detection method based on machine vision that the present invention as shown in Figure 1 discloses, includes the following steps:
Step 1, Image Acquisition and positioning, step 1 specifically include following steps:
Step 11, image is acquired by high speed linear array CCD camera;
Step 12, first gray level image, then it is filtered denoising, filtering figure is divided using edge detection algorithm,
Small tiles profile is extracted again, obtains ceramic tile profile diagram;
Step 13, the geometrical property of ceramic tile profile generates corresponding primitive feature, primitive in the profile diagram based on step 12
Feature includes width, height and integrity degree;Corresponding hsv color space characteristics, HSV are generated using the color characteristics of ceramic tile itself
Color space characteristic includes tone and saturation degree, primitive feature and color characteristic is then configured to bit combination feature, jointly
Complete the positioning of ceramic tile;
Step 14, it for the tile image after positioning, is generated and is corresponded on the basis of the angle point of the boundary rectangle of ceramic tile profile
ROI image.
ROI image is subjected to step 2 geometric transformation, formula is:
In formula, θcIt is the rotation angle of geometric transformation, Δ x, Δ y are correction translation , [x,y 1]For coordinate , [ before transformation;x1
y11]For the coordinate after transformation.
Step 2, the correction of image pose
Using based on geometric transformation is carried out on the basis of ROI image tiltedly external square diagonal line, to correct ceramic tile pose;Correction
Geometric representation is as shown in Figure 2.
If the oblique boundary rectangle of normal place ceramic tile is ABCD, diagonal line intersection point is p (xp,yp), diagonal line BD and pixel
The angular separations W of coordinate are that the coordinate of θ, B and D point is set to (xB,yB), (xD,yD), similarly set either objective position ceramic tile
Oblique boundary rectangle be A1B1C1D1, diagonal line intersection point p1(xp1,yp1), cornerwise B1D1, the angular separations W with pixel coordinate
For θ1, B1With D1The coordinate of point is set to (xB1, yB1),(xD1, yD1), W and H respectively represent the horizontal axis and the longitudinal axis of pixel coordinate,
Correction calculates and is subject to pixel dimension, and correction translation is set as Δ x, Δ y, and rotation angle is set as θc, geometric transformation formula is:
In formula, θcIt is the rotation angle of geometric transformation, Δ x, Δ y are correction translation , [x,y 1]For coordinate , [ before transformation;x1
y11]For the coordinate after transformation.
Step 3, image block, step 3 specifically include following steps:
Step 31:Image after correction is re-started into contours extract, obtains the minimum ROI image for being close to ceramic tile target
(being considered tile image when the image procossing) initializes piecemeal step-length, piecemeal step-length using the image origin as the starting point of piecemeal
Definition be:
StepxWith StepyIt is the integer taken after calculating, Scale is the scale of step size computation
Coefficient;It is worth that the smaller precision for representing piecemeal is higher, and the time complexity of algorithm can also improve, and general value is 0.1;
Step 32, minimum ROI image origin is as piecemeal starting point using after correction, then respectively laterally and longitudinally right with its
The step-length answered is divided into row block, completes the partiting step of entire ceramic tile.
But in actual division engineering, it is difficult to ensure that image length and width are the integral multiples of piecemeal step-length, to prevent piecemeal
Generation processing of crossing the border is abnormal, in addition following criterion:
As shown in figure 3, minimum ROI image is divided into 0th intermediate area, 2nd area in 1st area and upper and lower both sides at left and right sides of 0th area
And 1 3rd area for intersecting with 2nd area of area, boundary condition are divided into 4 kinds of regions, the differentiation using following g (i, j) as boundary condition
Function is parsed:
The discriminant function is expressed as:
If g (i, j)=1, represents and occur laterally to cross the border in piecemeal ergodic process, be in the piecemeal size of critical zone
The Fan Weiwei [ of width;I, Width];
If g (i, j)=2, represents the generation longitudinal direction in piecemeal ergodic process and cross the border, be in the piecemeal size of critical zone
The Fan Weiwei [ of height;J, Height];
If g (i, j)=3, represents in piecemeal ergodic process while transverse and longitudinal occurs and cross the border, point in critical zone
The range Fen Biewei [ of block size width and height;I, Width]With [J, Height];
If g (i, j)=0, represent without crossing the border in piecemeal ergodic process, the range of width and height is respectively
[I, i+Stepx];With [J, j+Stepy];
And it defines:When g (i, j)={ 1,2,3 }, the region of division is external piecemeal, and region when g (i, j)=0 is interior
Partial block, internal piecemeal be need not carry out pixel differentiate processing part, external piecemeal just needs differentiate handle be need into
Row pixel differentiates the part of processing.
By above algorithm flow, the uniform piecemeal to ceramic tile is completed, the scale of piecemeal is successfully solved and crosses the border
Abnormal problem provides a kind of new strategy to highlight local chromatic aberration;
Step 4, composite mask, specifically include following steps:
Step 41:It initializes two width and divides the image that ROI sizes are identical and pixel value is 0, it is compound respectively as ceramic tile
The parent of mask is denoted as M1, M2;
Step 42:Correction profile in ceramic tile blocking step is drawn in M1 respectively with pixel precision, in M2 mask images, filling
Mask parent contoured interior and perimeter;Filler pixels are RGB (255,255,255) i.e. inside M1 image outlines, external
For RGB (0,0,0);The inside and outside portion's filler pixels of M2 are RGB (255,255,255) and RGB (255,0,0);
Step 43:Image after outer pose is corrected makees logic and operation with compound mask image M1, M2 respectively, obtains everywhere
Enable the image of ceramic tile contoured interior after mask region of interest area image I1 and I2 after reason, interior mask and correcting image processing
All retain, external background colour is respectively black and red.
Step 44:When g (i, j)={ 1,2,3 } in ceramic tile blocking step, piecemeal is in critical edge dividing value, due to nothing
Method ensures the side of ceramic tile and being completely superposed for segmentation ROI image, need to carry out the differentiation processing of ceramic tile inside and outside pixel, decision rule
For:If the value in boundary point pixel in the block in I1 and I2 meet simultaneously I1 (i, j)=RGB (0,0,0) and I1 (i, j)=
RGB (255,0,0), then the pixel value is to mix background pixel boundary is point in the block, is otherwise the pixel on ceramic tile.It is above-mentioned
Rule of judgment only carry out pixel differentiation processing to being in boundary piecemeal, therefore the complexity of entire algorithm will not be increased, passed through
The logical calculation method of above-mentioned compound mask can fully achieve the generation that non-targeted pixel is strictly not involved in color characteristic
Target.
Geometry rectification only is carried out to ceramic tile and is not sufficient to ensure that the non-targeted pixel for the piecemeal that crosses the border strictly is not involved in color characteristic
Generation because the loss of significance in image processing process is inevitable, the boundary of ceramic tile can not possibly be with segmentation ROI figures
As being completely superposed, mask is a kind of very practical technology in image topology processing, and maximum is characterized in that arbitrary shape can be controlled
Area-of-interest, will all be shielded with unrelated feature interested, so that us is only concerned the image object of processing, in the present invention
In, not only use the shielding characteristic of mask, it is often more important that differentiate side using " compound mask " logical calculation method proposed
The non-targeted pixel of boundary's piecemeal, makes it strictly be not involved in the generation of color characteristic, to influence the accuracy of ceramic tile acetes chinensis;
Step 5, acetes chinensis
Test module after mask process is transformed into hsv color space, generate color characteristic and is compared with standard value, is sentenced
Do not go out ceramic tile and whether there is color defect.
Step 5 acetes chinensis is specially:
ROI image after piecemeal and mask is transformed into hsv color space, the hsv color spatial component life based on weight
At color characteristic, expression formula is as follows:
Fti=(λ1×H+λ2×S)/N
FtiIndicate that the color characteristic that i-th of piecemeal generates, H indicate that chrominance component, corresponding weights are λ1, S expression saturations
The corresponding weights component λ of degree2, N indicates the number of pixels that traverses in corresponding blocks, takes λ1=0.7 or λ2=0.3;
Step 52:Calculate the ceramic tile color characteristic collection F { F generatedti|Fti, i=1,2 ... N, k ∈ N+ and N >=1 }, standard
Ceramic tile color characteristic is Fm, the expression formula of acetes chinensis is:
ΔEti=|Fti-Fm|
The differentiation of positioning target is carried out using the method for threshold value, discrimination formula is as follows.
T is the bound of threshold value, g (Δ Eti)=1 indicates that misalignment, monoblock is not present in the block position of the ceramic tile
When corresponding the g () function of all pieces of ceramic tile is 1, just judge that misalignment is not present in the ceramic tile, if any block therein corresponds to
G ()=0, then differentiate that there are chromaticity distortions for the ceramic tile.
Experiment detection is carried out to ceramic tile using detection method and finds that the method for detection of the invention can be effective
Detect the position of ceramic tile color change, as shown in figure 4, the abscissa of statistical chart is the number of piecemeal, ordinate is characterized face
Color value FtiValue after normalization.
The preferred embodiment of the present invention has shown and described in above description, it should be understood that the present invention is not limited to this paper institutes
The form of disclosure is not to be taken as excluding other embodiments, and can be used for other combinations, modifications, and environments, and energy
Enough in this paper invented the scope of the idea, modifications can be made through the above teachings or related fields of technology or knowledge.And people from this field
The modifications and changes that member is carried out do not depart from the spirit and scope of the present invention, then all should be in the protection of appended claims of the present invention
In range.
Claims (7)
1. the ceramic tile coloration piecemeal detection method based on machine vision, it is characterised in that:Include the following steps:
Step 1, Image Acquisition and positioning
Tile image is acquired by color camera, then is divided the ROI image only containing ceramic tile by ceramic tile location algorithm
It cuts out, carries out subsequent processing as independent processing unit, the ROI image is comprising whole tile borderline region
Image;
Step 2, the correction of image pose
Using based on geometric transformation is carried out on the basis of ROI image tiltedly external square diagonal line, to correct ceramic tile pose;
Step 3, image block
ROI image after being corrected step 2 using vertical and horizontal partition strategy is evenly divided into test module, and test module is minimum
ROI image;
Step 4, composite mask
Processing is masked to the test module after segmentation using compound logic operation method;
Step 5, acetes chinensis
Test module after mask process is transformed into hsv color space, generate color characteristic and is compared with standard value, is determined
Ceramic tile whether there is color defect.
2. the ceramic tile coloration piecemeal detection method based on machine vision as described in claim 1, it is characterised in that:The step
1 specifically includes following steps:
Step 11, image is acquired by high speed linear array CCD camera;
Step 12, first gray level image, then it is filtered denoising, filtering figure is divided using edge detection algorithm, then carries
Small tiles profile is taken, ceramic tile profile diagram is obtained;
Step 13, the geometrical property of ceramic tile profile generates corresponding primitive feature, primitive feature in the profile diagram based on step 12
Including width, height and integrity degree;Corresponding hsv color space characteristics, hsv color are generated using the color characteristics of ceramic tile itself
Space characteristics include tone and saturation degree, and primitive feature and color characteristic are then configured to bit combination feature, common to complete
The positioning of ceramic tile;
Step 14, for the tile image after positioning, corresponding ROI is generated on the basis of the angle point of the boundary rectangle of ceramic tile profile
Image.
3. the ceramic tile coloration piecemeal detection method based on machine vision as described in claim 1, it is characterised in that:ROI is schemed
As carrying out step 2 geometric transformation, formula is:
In formula, θcIt is the rotation angle of geometric transformation, Δ x, Δ y are correction translation , [x,y 1]For coordinate , [ before transformation;x1y1 1]
For the coordinate after transformation.
4. the ceramic tile coloration piecemeal detection method based on machine vision as described in claim 1, it is characterised in that:The step
3 specifically include following steps:
Step 31:Image after correction is re-started into contours extract, the minimum ROI image for being close to ceramic tile target is obtained, with this
Image origin is the starting point of piecemeal, initializes piecemeal step-length, and the definition of piecemeal step-length is:
StepxWith StepyIt is the integer taken after calculating, Scale is the scale coefficient of step size computation;
Minimum ROI image origin is as piecemeal starting point using after correction for step 32, then respectively laterally and longitudinally corresponding with its
Step-length is divided into row block, completes the partiting step of entire ceramic tile.
5. the ceramic tile coloration piecemeal detection method based on machine vision as claimed in claim 4, it is characterised in that:The step
32 dividing modes are:
Minimum ROI image is divided into 0th intermediate area, 2nd area and 1st area and 2nd area in 1st area and upper and lower both sides at left and right sides of 0th area are handed over
3rd area of fork, boundary condition are divided into 4 kinds of regions, and the discriminant function using following g (i, j) as boundary condition is parsed:
The discriminant function is expressed as:
If g (i, j)=1, represents and occur laterally to cross the border in piecemeal ergodic process, be in the piecemeal size width of critical zone
Fan Weiwei [I, Width];
If g (i, j)=2, represents the generation longitudinal direction in piecemeal ergodic process and cross the border, be in the big low height of piecemeal of critical zone
Fan Weiwei [J, Height];
If g (i, j)=3, represents in piecemeal ergodic process while transverse and longitudinal occurs and cross the border, the piecemeal in critical zone is big
The range Fen Biewei [ of small width and height;I, Width]With [J, Height];
If g (i, j)=0, represent without crossing the border in piecemeal ergodic process, the range Fen Biewei [ of width and height;I, i
+Stepx];With [J, j+Stepy];
And it defines:When g (i, j)={ 1,2,3 }, the region of division is external piecemeal, and region when g (i, j)=0 is inside points
Block, internal piecemeal are the part that need not be carried out pixel and differentiate processing, and external piecemeal just needs to differentiate processing to need to carry out picture
Element differentiates the part of processing.
6. the ceramic tile coloration piecemeal detection method based on machine vision as claimed in claim 5, it is characterised in that:The step
4 specifically include following steps:
Step 41:It initializes two width and divides the image that ROI sizes are identical and pixel value is 0, respectively as ceramic tile compound mask
Parent, be denoted as M1, M2;
Step 42:Correction profile in ceramic tile blocking step is drawn in M1 with pixel precision respectively, in M2 mask images, fills mask
Parent contoured interior and perimeter;Filler pixels are RGB (255,255,255) i.e. inside M1 image outlines, and outside is RGB
(0,0,0);The inside and outside portion's filler pixels of M2 are RGB (255,255,255) and RGB (255,0,0);
Step 43:Image after pose is corrected makees logic and operation with compound mask image M1, M2 respectively, obtains that treated
Enable the whole guarantors of the image of ceramic tile contoured interior after mask region of interest area image I1 and I2, interior mask and correcting image processing
It stays, external background colour is respectively black and red;
Step 44:When g (i, j)={ 1,2,3 } in ceramic tile blocking step, piecemeal is in critical edge dividing value, due to that can not protect
The side of ceramic tile and being completely superposed for segmentation ROI image are demonstrate,proved, the differentiation processing of ceramic tile inside and outside pixel need to be carried out, decision rule is:
If the value in boundary point pixel in the block in I1 and I2 meets I1 (i, j)=RGB (0,0,0) and I1 (i, j)=RGB simultaneously
(255,0,0), then the pixel value is to mix background pixel boundary is point in the block, is otherwise the pixel on ceramic tile.
7. the ceramic tile coloration piecemeal detection method based on machine vision as described in claim 1, it is characterised in that:The step
5 acetes chinensis are specially:
ROI image after piecemeal and mask is transformed into hsv color space, the hsv color spatial component based on weight generates face
Color characteristic, expression formula are as follows:
Fti=(λ1×H+λ2×S)/N
FtiIndicate that the color characteristic that i-th of piecemeal generates, H indicate that chrominance component, corresponding weights are λ1, S expression saturation degrees pair
Answer weights component λ2, N indicates the number of pixels that traverses in corresponding blocks, takes λ1=0.7 or λ2=0.3;
Step 52:Calculate the ceramic tile color characteristic collection F { F generatedti|Fti, i=1,2 ... N, k ∈ N+ and N >=1 }, standard ceramic tile face
Color characteristic is Fm, the expression formula of acetes chinensis is:
ΔEti=|Fti-Fm|
The differentiation of positioning target is carried out using the method for threshold value, discrimination formula is as follows:
T is the bound of threshold value, g (Δ Eti)=1 indicates that misalignment, whole tile is not present in the block position of the ceramic tile
When all pieces of corresponding g () functions are 1, just judge that misalignment is not present in the ceramic tile, if the corresponding g of any block therein
()=0 then differentiates that there are chromaticity distortions for the ceramic tile.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611060933.5A CN107063458B (en) | 2017-02-07 | 2017-02-07 | Ceramic tile coloration piecemeal detection method based on machine vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611060933.5A CN107063458B (en) | 2017-02-07 | 2017-02-07 | Ceramic tile coloration piecemeal detection method based on machine vision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107063458A CN107063458A (en) | 2017-08-18 |
CN107063458B true CN107063458B (en) | 2018-10-26 |
Family
ID=59619419
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611060933.5A Active CN107063458B (en) | 2017-02-07 | 2017-02-07 | Ceramic tile coloration piecemeal detection method based on machine vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107063458B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108890692A (en) * | 2018-07-05 | 2018-11-27 | 陕西大中科技发展有限公司 | A kind of material color identification method for industrial robot vision's sorting |
CN109215026B (en) * | 2018-09-29 | 2022-02-11 | 广东工业大学 | High-speed accurate LED defect detection method based on machine vision |
CN109856051A (en) * | 2019-01-30 | 2019-06-07 | 广州市载道信息科技有限公司 | A kind of image color acquisition device |
CN109829496B (en) * | 2019-01-30 | 2021-05-25 | 广州市载道信息科技有限公司 | Physical measurement classification method and equipment |
CN112085038A (en) * | 2019-05-27 | 2020-12-15 | 湖北三江航天万峰科技发展有限公司 | High-speed video image processing method and system based on multi-core DSP |
CN110378327B (en) * | 2019-07-09 | 2021-05-18 | 浙江大学 | Target detection device and method with auxiliary significant features added |
CN111160476A (en) * | 2019-12-31 | 2020-05-15 | 佛山喀视科技有限公司 | Color difference detection model generation method, tile color separation method and device |
CN113408573B (en) * | 2021-05-11 | 2023-02-21 | 广东工业大学 | Method and device for automatically classifying and classifying tile color numbers based on machine learning |
CN117132499B (en) * | 2023-09-07 | 2024-05-14 | 石家庄开发区天远科技有限公司 | Background removing method and device for image recognition |
CN117644057B (en) * | 2024-01-29 | 2024-05-17 | 蒙娜丽莎集团股份有限公司 | Ceramic tile classified conveying method, system and readable storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2795852Y (en) * | 2005-05-12 | 2006-07-12 | 佛山市德科机电设备有限公司 | Automatic detector for glazed tile surface property |
CN102095499A (en) * | 2009-12-09 | 2011-06-15 | 程好学 | Method for automatic color separation of ceramic tiles |
CN203241152U (en) * | 2012-12-12 | 2013-10-16 | 杭州三速科技有限公司 | Ceramic tile aberration detection apparatus |
CN104034260A (en) * | 2014-05-27 | 2014-09-10 | 佛山职业技术学院 | Ceramic tile automatic detection device |
CN204116238U (en) * | 2014-06-24 | 2015-01-21 | 中南大学 | A kind of ceramic tile texture on-line checkingi sorter |
CN104458755A (en) * | 2014-11-26 | 2015-03-25 | 吴晓军 | Multi-type material surface defect detection method based on machine vision |
CN105574841A (en) * | 2014-11-05 | 2016-05-11 | Tcl集团股份有限公司 | Color-based image segmenting method and device |
-
2017
- 2017-02-07 CN CN201611060933.5A patent/CN107063458B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2795852Y (en) * | 2005-05-12 | 2006-07-12 | 佛山市德科机电设备有限公司 | Automatic detector for glazed tile surface property |
CN102095499A (en) * | 2009-12-09 | 2011-06-15 | 程好学 | Method for automatic color separation of ceramic tiles |
CN203241152U (en) * | 2012-12-12 | 2013-10-16 | 杭州三速科技有限公司 | Ceramic tile aberration detection apparatus |
CN104034260A (en) * | 2014-05-27 | 2014-09-10 | 佛山职业技术学院 | Ceramic tile automatic detection device |
CN204116238U (en) * | 2014-06-24 | 2015-01-21 | 中南大学 | A kind of ceramic tile texture on-line checkingi sorter |
CN105574841A (en) * | 2014-11-05 | 2016-05-11 | Tcl集团股份有限公司 | Color-based image segmenting method and device |
CN104458755A (en) * | 2014-11-26 | 2015-03-25 | 吴晓军 | Multi-type material surface defect detection method based on machine vision |
Also Published As
Publication number | Publication date |
---|---|
CN107063458A (en) | 2017-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107063458B (en) | Ceramic tile coloration piecemeal detection method based on machine vision | |
CN107203973B (en) | Sub-pixel positioning method for center line laser of three-dimensional laser scanning system | |
CN102883175B (en) | Methods for extracting depth map, judging video scene change and optimizing edge of depth map | |
CN110322522B (en) | Vehicle color recognition method based on target recognition area interception | |
CN107239748A (en) | Robot target identification and localization method based on gridiron pattern calibration technique | |
CN104809732A (en) | Electrical equipment appearance abnormity detection method based on image comparison | |
CN113313677B (en) | Quality detection method for X-ray image of wound lithium battery | |
CN105338342B (en) | The detection method and device of a kind of dead pixel points of images | |
CN105023265A (en) | Checkerboard angular point automatic detection method under fish-eye lens | |
WO2019076326A1 (en) | Shadow detection method and system for surveillance video image, and shadow removing method | |
CN106780526A (en) | A kind of ferrite wafer alligatoring recognition methods | |
CN105787912B (en) | Classification-based step type edge sub-pixel positioning method | |
CN103049904B (en) | A kind of image extraction method and system, digital certificates method for making and system thereof | |
CN105719306A (en) | Rapid building extraction method from high-resolution remote sensing image | |
CN103268472B (en) | Lip detection method based on double-colored color space | |
CN104966348B (en) | A kind of bill images key element integrality detection method and system | |
CN111429462A (en) | License plate positioning method based on edge detection and mathematical morphology | |
CN102980659B (en) | Digitalized characterization method of monochrome tight fabric surface color | |
CN110414385A (en) | A kind of method for detecting lane lines and system based on homography conversion and characteristic window | |
CN105957023A (en) | Laser stripe image reinforcing and de-noising method based on color space conversion | |
CN115049658B (en) | RGB-D camera quality detection method, electronic device and storage medium | |
CN106846271A (en) | A kind of method of reticulate pattern in removal identity card picture | |
CN107657620A (en) | A kind of method and system of textured metal freezing region recognition | |
CN108492306A (en) | A kind of X-type Angular Point Extracting Method based on image outline | |
CN114241436A (en) | Lane line detection method and system for improving color space and search window |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |