CN110689566B - Zipper thickness dimension detection method and system - Google Patents

Zipper thickness dimension detection method and system Download PDF

Info

Publication number
CN110689566B
CN110689566B CN201910944302.7A CN201910944302A CN110689566B CN 110689566 B CN110689566 B CN 110689566B CN 201910944302 A CN201910944302 A CN 201910944302A CN 110689566 B CN110689566 B CN 110689566B
Authority
CN
China
Prior art keywords
zipper
edge points
coordinate information
straight line
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910944302.7A
Other languages
Chinese (zh)
Other versions
CN110689566A (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.)
China Jiliang University
Original Assignee
China Jiliang University
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 China Jiliang University filed Critical China Jiliang University
Priority to CN201910944302.7A priority Critical patent/CN110689566B/en
Publication of CN110689566A publication Critical patent/CN110689566A/en
Application granted granted Critical
Publication of CN110689566B publication Critical patent/CN110689566B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • G06F17/13Differential equations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Geometry (AREA)
  • Operations Research (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses a method for detecting the thickness dimension of a zipper, which comprises the following steps: collecting the measured images of the two adjacent frames of the zipper to be measured, and selecting t1Taking the measurement image at the moment as an image to be compensated; acquiring coordinate information of all edge points on the left side and the right side of the zipper in the image to be compensated; performing a motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side; respectively fitting the corrected coordinate information of all the edge points on the left side and the right side into a left parallel straight line and a right parallel straight line, and calculating the distance information between the left parallel straight line and the right parallel straight line; and calculating the thickness dimension of the zipper to be measured according to the distance information. Correspondingly, the invention also discloses a detection system for the thickness dimension of the zipper. The invention realizes the accurate measurement of the thickness dimension of the zipper under the vibration condition.

Description

Zipper thickness dimension detection method and system
Technical Field
The invention relates to the technical field of zipper detection, in particular to a zipper thickness dimension detection method and a zipper thickness dimension detection system.
Background
The zipper is a common accessory on clothes and bags. The thickness dimension is one of the important criteria for evaluating the quality of the zipper. The machine vision can greatly improve the automation degree of production, and the detection method of the machine vision can greatly improve the production efficiency and the automation degree of production. In the prior art, the quality of the zipper is usually detected by adopting a machine vision technology. However, in the process of visually measuring the thickness dimension of the zipper, due to the elastic property of the zipper, the vibration state of the production equipment can cause the self-vibration of the zipper to be measured, so that the coordinate values of each part of the zipper to be measured in the image are shifted, and the accuracy of the visual measurement result can be affected by the shift.
Therefore, how to accurately measure the thickness dimension of the zipper under the vibration condition becomes a technical problem which needs to be solved urgently.
Disclosure of Invention
The invention aims to provide a method and a system for detecting the thickness dimension of a zipper, which can realize the accurate measurement of the thickness dimension of the zipper under the vibration condition.
In order to achieve the above object, the present invention provides a method for detecting a thickness dimension of a slide fastener, the method comprising:
s1, collecting the measured images of the measured zipper of two adjacent frames, wherein the collecting time is t1Time t and2at a time, select t1Taking the measurement image at the moment as an image to be compensated;
s2, acquiring coordinate information of all edge points on the left side and the right side of the single zipper in the image to be compensated;
s3, carrying out a motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side;
s4, fitting the corrected coordinate information of all edge points on the left side and the right side into a left parallel straight line and a right parallel straight line respectively, and calculating the distance information between the left straight line and the right straight line;
and S5, calculating the thickness of the zipper to be measured according to the spacing information.
In accordance with the above object of the present invention, there is provided a zipper thickness dimension detecting system, comprising:
the acquisition module is used for acquiring the measurement images of the two adjacent frames of the zipper to be measured, and the acquisition time of the acquisition modules corresponds to t1Time t and2at a time, select t1Taking the measurement image at the moment as an image to be compensated;
the characteristic extraction module is used for acquiring coordinate information of all edge points on the left side and the right side of the single zipper in the image to be compensated;
the compensation module is used for carrying out motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side;
the fitting module is used for respectively fitting the corrected coordinate information of all the edge points on the left side and the right side into a left parallel straight line and a right parallel straight line and calculating the distance information between the left straight line and the right straight line;
and the calculating module is used for calculating the thickness of the zipper to be measured according to the distance information.
Compared with the prior art, the zipper thickness dimension detection method and the zipper thickness dimension detection system have the beneficial effects that: the technical problem of inaccurate measurement caused by vibration in the zipper thickness dimension measurement process in the prior art is solved; the influence of the vibration of the zipper on the measurement result is reduced; the standard deviation of the measuring result is greatly reduced, the high-precision measurement of the thickness dimension of the zipper is realized, and the industrial application value is better.
Drawings
FIG. 1 is a flowchart of a method for detecting a thickness dimension of a slide fastener according to an embodiment of the present invention.
FIG. 2 is a schematic view of a zipper lateral vibration model according to an embodiment of the present invention.
FIG. 3 is a system block diagram of a zipper thickness dimension detection system in accordance with one embodiment of the present invention.
Detailed Description
The present invention will be described in detail with reference to the specific embodiments shown in the drawings, which are not intended to limit the present invention, and structural, methodological, or functional changes made by those skilled in the art according to the specific embodiments are included in the scope of the present invention.
In an embodiment of the present invention shown in fig. 1, the present invention provides a method for detecting a thickness dimension of a zipper, the method including:
s1, collecting the measured images of the measured zipper of two adjacent frames, wherein the collecting time is t1Time t and2at a time, select t1Taking the measurement image at the moment as an image to be compensated;
s2, acquiring coordinate information of all edge points on the left side and the right side of the single zipper in the image to be compensated;
s3, carrying out a motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side;
s4, fitting the corrected coordinate information of all edge points on the left side and the right side into a left parallel straight line and a right parallel straight line respectively, and calculating the distance information between the left straight line and the right straight line;
and S5, calculating the thickness of the zipper to be measured according to the spacing information.
Collecting the measured images of the zipper to be measured of two adjacent frames, wherein the collecting time is t1Time t and2at a time, select t1And taking the measured image at the moment as an image to be compensated. In the process of measuring the zipper to be measured, the zipper to be measured is photographed, a sequence of measurement images are collected, the measurement images of the zipper to be measured of two adjacent frames are obtained, and one frame of the measurement image is selected as an image to be compensated.
And acquiring coordinate information of all edge points on the left side and the right side of the single-side zipper in the image to be compensated. By analyzing the imaging characteristics of the zippers, a left single-side zipper and a right single-side zipper exist in the image to be compensated, and each single-side zipper is divided into a left side and a right side. The design scheme of the invention is explained in detail by taking one single-side zipper, and the design scheme is also suitable for the other single-side zipper. Coordinate information of all edge points on the left side and the right side of a single-side zipper is obtained. According to a specific embodiment of the invention, the coordinate information of all edge points on the left side and the right side of the single-side zipper in the image to be compensated is obtained according to a feature extraction algorithm. Specifically, the step S2 includes:
s201, selecting an ROI (region of interest) in the image to be compensated, wherein the ROI is a rectangle, and the length of the rectangle in the y-axis horizontal direction is n;
s202, performing image preprocessing on the ROI;
s203, acquiring coordinate information of all edge points on the left side and the right side of the single-side zipper in the ROI according to a preset edge point coordinate extraction algorithm.
In step S201, the ROI Region (Region of interest) refers to a Region that needs to be processed and is extracted from the processed image in various ways. And a left single-side zipper and a right single-side zipper exist in the acquired image to be compensated, so that an ROI (region of interest) is respectively selected at the left side and the right side. And selecting an ROI (region of interest) in the image to be compensated so as to ensure that the subsequent image processing can acquire enough characteristic information.
In step S202, image preprocessing is performed on the ROI region. In order to extract the zipper region to be detected from the image background of the ROI, image preprocessing is required to be performed on the image, wherein the image preprocessing comprises image filtering, threshold segmentation and the like, for example, median filtering is used for suppressing noise in the image; the image is thresholded using the maximum inter-class variance method so that the image pixels are only black or white. After image preprocessing, the image pixel value of the zipper region of the target to be detected in the ROI region is 1, namely white, and the background image pixel value is 0, namely black, so that the zipper region of the target to be detected can be independently found.
In step S203, coordinate information of all edge points on the left and right sides of the zipper in the ROI area is obtained according to a preset edge point coordinate extraction algorithm. According to an embodiment of the present invention, the step S203 includes:
s2031, selecting a first sub ROI (region of interest) by taking the upper end of the ROI as a starting point according to a projection scanning method, wherein the first sub ROI is a rectangle, the length of the rectangle in the y-axis horizontal direction is n, and the length of the rectangle in the x-axis vertical direction is a standard distance delta d between two tooth heads of a zipper;
in this step, the ROI region is divided into a plurality of sub-ROI regions, each sub-ROI region having only one zipper tooth head therein;
s2032, in the first sub ROI area, calculating to obtain a first one-dimensional array according to vertical gray level projection, wherein the length of the first one-dimensional array is n, and the numerical value in the array represents the accumulated sum of pixel values corresponding to the x-axis direction;
s2033, sequentially judging from the left side of the first one-dimensional array, and if the (i-1) th numerical value is 0 and the (i) th numerical value is not 0, determining that the (i) value is the coordinate y of the edge point at the left side of the zipper in the first sub ROI areal
S2034, sequentially judging from the right side of the first one-dimensional array, and if the n-i number is 0 and the n-i +1 number is not 0, then the n-i +1 number is the coordinate y of the edge point at the right side of the zipper in the first sub ROI arear
S2035, respectively obtaining y in the first sub ROI areal、yrThe pixel value corresponding to each row in the column, and the row number with the pixel value of 1 is the yl、yrThe coordinates of the left and right edge points of the zipper in the first sub ROI area are respectively (x) corresponding to the x-axis coordinatel,yl)、(xr,yr);
S2036, repeatedly executing the steps S2031-S2035, and acquiring a plurality of sub ROI areas to obtain coordinate information of the edge points at the left side and the right side of the zipper in each sub ROI area;
in the step 2036, the lower end of the first sub-ROI is used as a starting point, a rectangular region with a length in the x-axis vertical direction as the standard distance Δ d between two teeth of the zipper and a length in the y-axis horizontal direction as n is selected as a second sub-region, according to the above steps, the coordinate information of the edge points on the left and right sides of the zipper in the second sub-ROI is obtained, and by analogy, the ROI is divided into a plurality of sub-ROI regions, and the coordinate information of the edge points on the left and right sides of the zipper in each sub-ROI region is obtained.
S2037, converting the coordinate information of the left and right edge points of the zipper in each sub ROI area into the corresponding coordinate information of the left and right edge points of the zipper in the image to be compensated, and obtaining the coordinate information of all the edge points on the left and right sides of the single zipper in the image to be compensated.
In this embodiment, the edge point coordinate information is obtained by using a projection scanning method. In another embodiment of the present invention, an edge detection method and a scanning method can be used to obtain the coordinate information of the edge points,the method comprises the following specific steps: extracting an edge image of the unilateral zipper by using an edge detection algorithm, wherein the edge detection algorithm comprises a Canny edge detection algorithm and a Sobel edge detection algorithm; selecting a first sub ROI area by taking the upper end of the ROI area as a starting point, wherein the first sub ROI area is a rectangle, the length of the rectangle in the y-axis horizontal direction is n, and the length of the rectangle in the x-axis vertical direction is a standard distance delta d between two tooth heads of the zipper; scanning from left to right and from top to bottom in the first sub ROI area in sequence, and when a point with a pixel value of 1 is scanned, recording the coordinate corresponding to the point as the coordinate (x) of the edge point at the left side of the zipper in the first sub ROI areal,yl) (ii) a Scanning from right to left and from top to bottom in the first sub ROI area in sequence, and when a point with a pixel value of 1 is scanned, recording the corresponding coordinate as the coordinate (x) of the edge point at the right side of the zipper in the first sub ROI arear,yr) (ii) a Repeatedly executing the steps to obtain a plurality of sub ROI areas to obtain the coordinate information of the left and right edge points of the zipper in each sub ROI area; and converting the coordinate information of the left and right edge points of the zipper in each sub ROI area into the coordinate information of the corresponding left and right edge points of the zipper in the image to be compensated, so as to obtain the coordinate information of all the edge points on the left and right sides of the single zipper in the image to be compensated.
In the process of visual online measurement of the size of the workpiece, in order to eliminate the influence of the self vibration of the measured object on the accuracy of the measurement result, a method of motion compensation on the shot image can be adopted to find out the relative displacement relationship of the measured object in different time periods and compensate the offset. The invention analyzes the zipper vibration mechanism and the vibration information measuring method, and calculates the global vibration information of the zipper at a certain moment by combining the zipper transverse vibration model and the optical flow method principle. According to the vibration information, a corresponding motion compensation algorithm is designed, and a corresponding zipper thickness dimension online measurement algorithm is provided.
As shown in FIG. 2, the zipper being tested can be described as a string between two pulleys. Let the zipper density be rho, the axial tension be P, the distance between two pulleys be L, and the Y-axis direction beThe transverse vibration is u (x, t), the vibration transmitted to the pulley by the production equipment is simplified into an excitation source of u (L, t) ═ A sin ω t, and the speed of wave propagation along the chord line
Figure BDA0002223737990000071
The tension of the zipper is kept unchanged, and the zipper vibrates slightly in the transverse direction under the action of an excitation source. If the influence of other external forces is neglected, by utilizing the Hamilton principle and referring to a method for establishing an axial motion string transverse vibration motion differential equation by Wickert and Mote, the differential equation for establishing the zipper transverse vibration model is as follows:
Figure BDA0002223737990000072
and (3) solving the formula (1) by adopting a separation variable method to obtain a series solution of the transverse vibration u (x, t) of the zipper in the z-axis direction.
Figure BDA0002223737990000073
In the formula, m is an infinite number of terms.
T can be calculated in two adjacent frames according to the formula (2)1、t2The expression of the lateral amplitude variation value Deltau of the tested zipper at x ═ L/2:
Figure BDA0002223737990000081
in the formula, Δ t is t1To t2The time interval of (c);
Figure BDA0002223737990000082
Figure BDA0002223737990000083
optical Flow (Optical Flow) refers to the speed of motion of a gray pattern in an image. The Lucas-Kanade method, namely the LK optical flow method, is a widely used optical flow estimation difference method, and uses the change of pixels in an image sequence in a time domain and the correlation between adjacent frames to find the corresponding relation between a previous frame and a current frame, thereby calculating the motion information of an object between the adjacent frames.
Let I (x, y, t) be the gray scale value of the image pixel (x, y) at time t, and based on the basic assumptions of the optical flow method, there are:
I(x,y,t)=I(x+dx,y+dy,t+dt) (4);
taylor expansion is carried out on the right end of the above formula, and an optical flow constraint equation can be obtained by simplification:
Ixux+Iyuy+It=0 (5);
wherein the content of the first and second substances,
Figure BDA0002223737990000084
respectively representing gradients of image pixel points in x, y and t directions, namely the gradients in space and time;
Figure BDA0002223737990000085
the moving components of the optical flow velocity of the pixel point (x, y) in the x and y directions are the optical flow size of the point, and reflect the motion state of the object. And solving an optical flow constraint equation by an LK optical flow method to obtain optical flow information of the image as follows.
Figure BDA0002223737990000091
Calculating to obtain two adjacent frames t of the detected zipper through an LK optical flow method1、t2An optical flow information map in the area near the midpoint.
Thereby extracting two adjacent frames t1、t2The actual transverse amplitude change value u of the tested zipper at x-L/2ym. Let Δ u be uymCan be solved to obtain:
Figure BDA0002223737990000092
or
Figure BDA0002223737990000093
Since the zipper vibration is periodically changed, t is obtained1There are two possible scenarios for the corresponding result within a single vibration cycle. Thus will t1T obtained by substituting formula (2)1The transverse vibration amplitude of the zipper to be detected at the moment, namely the global vibration information of the zipper to be detected also has two corresponding results, which are respectively expressed by the formula (9) and the formula (10).
Figure BDA0002223737990000094
Figure BDA0002223737990000095
Based on the above analysis, in step S3, a motion compensation algorithm is performed on the coordinate information of all the edge points on the left and right sides to obtain the modified coordinate information of all the edge points on the left and right sides. As can be seen from the above, t1The zipper to be tested at the moment can solve the global vibration information of two different zippers, and the global vibration information is not consistent with the actual state. Therefore, the actual vibration offset direction of the zipper to be measured needs to be judged, and then the coordinate information of all the edge points on the left side and the right side after correction is calculated and obtained by combining the motion compensation algorithm. Specifically, the step S3 includes:
s301, setting the midpoint coordinate of the detected zipper as (x) in the image to be compensatedm,ym);
S302, calculating the coordinates of the left edge point and the right edge point in the sub ROI area corresponding to the midpoint coordinate to be (x)l,yl)、(xr,yr);
S303, if yl-ym|≥|yr-ymIf the measured zipper is deviated to the left side, the measured zipper vibratesOtherwise, the detected zipper deflects to the right and vibrates;
s304, calculating to obtain coordinate information of all edge points on the left side and the right side after correction according to the offset vibration direction of the detected zipper, a preset motion compensation algorithm and a correction formula.
Specifically, the step S304 includes:
s3041, obtaining the zipper at t according to the calculation method of the optical flow method1The lateral vibration at that time equation (9) and equation (10) are as follows:
Figure BDA0002223737990000101
Figure BDA0002223737990000102
wherein x is x-axis coordinate, L is space between two pulleys, A is excitation source amplitude, omega is excitation source vibration angular velocity, u isyThe maximum movement component of the midpoint of the detected zipper in the y-axis direction is shown as delta t1To t2M is an infinite number of terms;
s3042, when the tested zipper is judged to deflect and vibrate towards the left, the correction formula is
Figure BDA0002223737990000103
Performing a motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side;
s3043, when the tested zipper is judged to deflect and vibrate to the right, the correction formula is
Figure BDA0002223737990000104
And carrying out a motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side.
From the above analysis, t is1Time of dayThe lateral vibration amplitude of the detected zipper, that is, the global vibration information of the detected zipper, has two corresponding results, so that the offset vibration direction of the detected zipper needs to be determined through step S303, and different motion compensation correction formulas are selected according to different offset vibration directions, which is specifically described in steps S3042 and S3043. And calculating to obtain the coordinate information of all the edge points on the left side and the right side after correction according to different selected motion compensation correction formulas.
In step S4, the coordinate information of all the edge points on the left and right sides after the correction is fitted to left and right parallel straight lines, and the distance information between the left and right straight lines is calculated. According to an embodiment of the present invention, the left and right side edge lines with respect to the thickness of the slide fastener are fitted using the integral least square method, which is substantially the minimum sum of squares of orthogonal distances from the edge points to the fitted lines. Because two straight lines which need to be fitted are parallel lines, the global least square method is improved. Specifically, the step of fitting the corrected coordinate information of all the edge points on the left and right sides into left and right parallel straight lines by using the whole least square method includes:
s401, setting two fitting straight lines L1And L2Equation (2) is equation (11), and two fitting straight lines are obtained according to fitting criterion equation (12):
Figure BDA0002223737990000111
Figure BDA0002223737990000112
wherein k is the number of edge points; x is the number of1i、y1i、x2i、y2iIs a straight line L1、L2The abscissa and ordinate of the ith edge point of (a); a is the slope of a straight line; b1、b2Is a straight line L1And L2Intercept of
S402, obtaining the distance d between two straight lines according to the formula (13)pixel
Figure BDA0002223737990000113
Wherein a is the slope of a straight line; b1、b2Is a straight line L1And L2The intercept of (2).
In step S5, the thickness of the zipper to be measured is calculated according to the distance information. In step S4, the zipper thickness dimension obtained by the least square fitting is in units of pixels, and therefore, calibration using a standard zipper is required. The zipper pixel size d is determined according to the pixel equivalent K between the actual value length unit (mm) and the pixel unit (pixel)pixelConversion to actual size dmmThe calculation formula of the thickness dimension of the measured zipper is as shown in formula (14):
dmm=K×dpixel (14);
wherein d ispixelFor the pitch information, K is the pixel equivalent between length units (mm) and pixel units (pixels).
According to the technical scheme, the global vibration information of the zipper at a certain moment is calculated by utilizing the principle of a zipper transverse vibration model and an optical flow algorithm, and the technical scheme for detecting the thickness dimension of the zipper under the vibration condition is provided according to the global vibration information and the corresponding motion compensation algorithm, so that the influence of the self vibration of the zipper on the measurement result is reduced; the standard deviation of the measuring result is greatly reduced, and the high-precision measurement of the thickness of the zipper is realized.
As shown in fig. 3, according to an embodiment of the present invention, there is provided a zipper thickness dimension detecting system, including:
an acquisition module 30 for acquiring the measured images of the two adjacent frames of the zipper to be measured, wherein the acquisition time is t1Time t and2at a time, select t1Taking the measurement image at the moment as an image to be compensated;
the characteristic extraction module 31 is configured to obtain coordinate information of all edge points on the left side and the right side of the single zipper in the image to be compensated;
the compensation module 32 is configured to perform a motion compensation algorithm on the coordinate information of all the edge points on the left and right sides to obtain modified coordinate information of all the edge points on the left and right sides;
the fitting module 33 is configured to respectively fit the corrected coordinate information of all the edge points on the left and right sides into a left parallel straight line and a right parallel straight line, and calculate distance information between the left straight line and the right straight line;
and the calculating module 34 is used for calculating the thickness dimension of the measured zipper according to the spacing information.
The acquisition module acquires the measurement images of the detected zipper of two adjacent frames, and the acquisition time of the acquisition images corresponds to t1Time t and2at a time, select t1And taking the measured image at the moment as an image to be compensated. In the process of measuring the zipper to be measured, the zipper to be measured is photographed, a sequence of measurement images are collected, the measurement images of the zipper to be measured of two adjacent frames are obtained, and one frame of the measurement image is selected as an image to be compensated.
And the characteristic extraction module acquires the coordinate information of all edge points on the left side and the right side of the single zipper in the image to be compensated. According to a specific embodiment of the invention, the coordinate information of all edge points on the left side and the right side of the single-side zipper in the image to be compensated is obtained according to a feature extraction algorithm. Specifically, the feature extraction module includes an ROI unit, an image preprocessing unit, and an acquisition unit. And in the ROI unit, selecting an ROI (region of interest) in the image to be compensated, wherein the ROI is a rectangle, the length of the rectangle in the horizontal direction of the y axis is n, and the ROI is selected in the image to be compensated so as to ensure that the subsequent image processing can acquire enough characteristic information. The image preprocessing unit carries out image preprocessing on the ROI, the image preprocessing comprises image filtering, threshold segmentation and the like, for example, median filtering and an inter-class variance method are used, and therefore the zipper region of the target to be detected can be separated. The acquisition unit acquires coordinate information of all edge points on the left side and the right side of the single-side zipper in the ROI according to a preset edge point coordinate extraction algorithm.
According to an embodiment of the present invention, the obtaining unit includes a first sub-ROI region subunit, a vertical gray projection subunit, a y-axis coordinate subunit, an x-axis coordinate subunit, and a conversion subunit. And selecting a first sub ROI area from the upper end of the ROI area as a starting point in the first sub ROI area subunit according to a projection scanning method, wherein the first sub ROI area is a rectangle, the length of the rectangle in the y-axis horizontal direction is n, and the length of the rectangle in the x-axis vertical direction is the standard distance delta d between two tooth heads of the zipper. In the vertical gray projection subunit, in the first sub-ROI region, a first one-dimensional array is obtained through calculation according to vertical gray projection, where the length of the first one-dimensional array is n, and a numerical value in the array represents a pixel value cumulative sum corresponding to the x-axis direction. In the y-axis coordinate subunit, sequentially starting to judge from the left side of the first one-dimensional array, and if the i-1 th numerical value is 0 and the i-th numerical value is not 0, the i value is the coordinate y of the edge point on the left side of the zipper in the first sub ROI areal(ii) a Sequentially starting to judge from the right side of the first one-dimensional array, and if the n-i number is 0 and the n-i +1 number is not 0, then the n-i +1 number is the coordinate y of the edge point at the right side of the zipper in the first sub ROI arear. In the x-axis coordinate subunit, respectively acquiring y in the first sub-ROI areal、yrThe pixel value corresponding to each row in the column, and the row number with the pixel value of 1 is the yl、yrThe coordinates of the left and right edge points of the zipper in the first sub ROI area are respectively (X)l,yl)、(xr,yr). In the conversion subunit, repeatedly executing the subunit, obtaining a plurality of sub ROI areas, obtaining coordinate information of left and right side edge points of the zipper in each sub ROI area in the ROI area, converting the coordinate information of the left and right side edge points of the zipper in each sub ROI area into coordinate information of the corresponding left and right side edge points of the zipper in the image to be compensated, and obtaining seats of all edge points on the left and right sides of a single zipper in the image to be compensatedAnd marking information.
And the compensation module performs a motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side. Specifically, the compensation module comprises a calculation unit, a judgment unit and a correction unit. In the computing unit, the midpoint coordinate of the detected zipper is set as (x) in the image to be compensatedm,ym) (ii) a Calculating the coordinates of the left and right edge points in the sub ROI area corresponding to the midpoint coordinate as (x)l,yl)、(xr,yr). In the judging unit, if yl-ym|≥|yr-ymIf not, the detected zipper deflects to the right and vibrates. And the correction unit calculates and obtains the coordinate information of all the edge points on the left side and the right side after correction according to the offset vibration direction of the detected zipper, a preset motion compensation algorithm and a correction formula.
According to an embodiment of the present invention, the correction unit includes: the device comprises a calculation subunit, a first correction subunit and a second correction subunit. The calculating subunit obtains the zipper position t according to an optical flow method calculating method1The lateral vibration at that time equation (9) and equation (10) are as follows:
Figure BDA0002223737990000151
Figure BDA0002223737990000152
x is x-axis coordinate, L is space between two pulleys, A is amplitude of excitation source, omega is angular velocity of vibration of excitation source, and u isyThe maximum movement component of the midpoint of the detected zipper in the y-axis direction is shown as delta t1To t2M is an infinite number of terms. In the first correction subunit, when the detected zipper is judged to deflect and vibrate towards the left, the correction formula is
Figure BDA0002223737990000153
And carrying out a motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side. In the second correction subunit, when the measured zipper is judged to deflect and vibrate towards the right, the correction formula is
Figure BDA0002223737990000154
And carrying out a motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side.
And the fitting module is used for fitting the corrected coordinate information of all the edge points on the left side and the right side into a left parallel straight line and a right parallel straight line respectively, and calculating the distance information between the left straight line and the right straight line. Specifically, the coordinate information of all the edge points on the left and right sides after correction is fitted into a left parallel straight line and a right parallel straight line by using a whole least square method, and two fitting straight lines L are set1And L2Equation (2) is equation (11), and two fitting straight lines are obtained according to fitting criterion equation (12):
Figure BDA0002223737990000155
Figure BDA0002223737990000156
wherein k is the number of edge points; x is the number of1i、y1i、x2i、y2iIs a straight line L1、L2The abscissa and ordinate of the ith edge point of (a); a is the slope of a straight line; b1、b2Is a straight line L1And L2The intercept of (2). The distance d between the two straight lines is obtained from the equation (13)pixel
Figure BDA0002223737990000161
And the calculation module calculates the thickness of the zipper to be measured according to the distance information. Specifically, the zipper pixel size d is determined according to the pixel equivalent K between the actual value length unit (mm) and the pixel unit (pixel)pixelConversion to actual size dmmThe calculation formula of the thickness dimension of the measured zipper is as shown in formula (14):
dmm=K×dpixel (14);
wherein d ispixelFor the pitch information, K is the pixel equivalent between length units (mm) and pixel units (pixels).
According to the technical scheme, the influence of the vibration of the zipper on the measurement result is reduced; the standard deviation of the measuring result is greatly reduced, and the high-precision measurement of the thickness of the zipper is realized.
Although the preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, without departing from the scope and spirit of the invention as disclosed in the accompanying claims.

Claims (10)

1. A method of detecting a thickness dimension of a zipper, the method comprising:
s1, collecting the measured images of the measured zipper of two adjacent frames, wherein the collecting time is t1Time t and2at a time, select t1Taking the measurement image at the moment as an image to be compensated;
s2, acquiring coordinate information of all edge points on the left side and the right side of the single zipper in the image to be compensated;
s3, carrying out a motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side;
s4, fitting the corrected coordinate information of all edge points on the left side and the right side into a left parallel straight line and a right parallel straight line respectively, and calculating the distance information between the left straight line and the right straight line;
and S5, calculating the thickness of the zipper to be measured according to the spacing information.
2. The method for detecting the thickness dimension of the slide fastener according to claim 1, wherein the step S2 includes:
s201, selecting an ROI (region of interest) in the image to be compensated, wherein the ROI is a rectangle, and the length of the rectangle in the y-axis horizontal direction is n;
s202, performing image preprocessing on the ROI;
s203, acquiring coordinate information of all edge points on the left side and the right side of the single-side zipper in the ROI according to a preset edge point coordinate extraction algorithm.
3. The method for detecting the thickness dimension of the zipper according to claim 2, wherein the step S203 comprises:
s2031, selecting a first sub ROI (region of interest) by taking the upper end of the ROI as a starting point according to a projection scanning method, wherein the first sub ROI is a rectangle, the length of the rectangle in the horizontal y-axis direction is n, and the length of the rectangle in the vertical x-axis direction is a standard distance delta d between two tooth heads of a zipper;
s2032, in the first sub ROI area, calculating to obtain a first one-dimensional array according to vertical gray level projection, wherein the length of the first one-dimensional array is n, and the numerical value in the array represents the accumulated sum of pixel values corresponding to the x-axis direction;
s2033, sequentially judging from the left side of the first one-dimensional array, and if the (i-1) th numerical value is 0 and the (i) th numerical value is not 0, determining that the (i) value is the coordinate y of the edge point at the left side of the zipper in the first sub ROI areal
S2034, sequentially judging from the right side of the first one-dimensional array, and if the n-i number is 0 and the n-i +1 number is not 0, then the n-i +1 number is the coordinate y of the edge point at the right side of the zipper in the first sub ROI arear
S2035, respectively obtaining y in the first sub ROI areal、yrThe pixel value corresponding to each row in the column, and the row number with the pixel value of 1 is the yl、yrThe coordinates of the left and right edge points of the zipper in the first sub ROI area are respectively (x) corresponding to the x-axis coordinatel,yl)、(xr,yr);
S2036, repeatedly executing the steps S2031-S2035, and acquiring a plurality of sub ROI areas to obtain coordinate information of the edge points at the left side and the right side of the zipper in each sub ROI area;
s2037, converting the coordinate information of the left and right edge points of the zipper in each sub ROI area into the corresponding coordinate information of the left and right edge points of the zipper in the image to be compensated, and obtaining the coordinate information of all the edge points on the left and right sides of the single zipper in the image to be compensated.
4. The method for detecting the thickness dimension of the slide fastener according to claim 3, wherein the step S3 includes:
s301, setting the midpoint coordinate of the detected zipper as (x) in the image to be compensatedm,ym);
S302, calculating the coordinates of the left edge point and the right edge point in the sub ROI area corresponding to the midpoint coordinate to be (x)l,yl)、(xr,yr);
S303, if yl-ym|≥|yr-ymIf not, the tested zipper vibrates towards the left side in a deviating way;
s304, calculating to obtain coordinate information of all edge points on the left side and the right side after correction according to the offset vibration direction of the detected zipper, a preset motion compensation algorithm and a correction formula.
5. The method for detecting the thickness dimension of the zipper according to claim 4, wherein the step S304 comprises:
obtaining the zipper position t according to a zipper transverse vibration model and an optical flow method calculation method1Equations (1) and (2) of the lateral vibration at a time, e.g.Shown below:
Figure FDA0003393294580000021
Figure FDA0003393294580000031
wherein x is x-axis coordinate, L is space between two pulleys, A is excitation source amplitude, omega is excitation source vibration angular velocity, u isyThe maximum movement component of the midpoint of the detected zipper in the y-axis direction is shown as delta t1To t2M is an infinite number of terms, uymThe actual transverse amplitude change value of the tested zipper at x-L/2, c is the speed of the vibration wave propagating along the chord line, and theta is the initial phase of the vibration wave, wherein two adjacent frames t of the tested zipper are calculated by an LK optical flow method1、t2Extracting two adjacent frames t from the optical flow information graph in the area near the middle point1、t2The actual transverse amplitude change value u of the measured zipper at x-L/2ym
The equation for j for the velocity c of a wave propagating along the chord is:
Figure FDA0003393294580000032
wherein rho is zipper density, and P is axial tension;
the calculation formula of the initial phase θ of the vibration wave is:
Figure FDA0003393294580000033
6. the method for detecting the thickness dimension of the zipper according to claim 5, wherein the step S304 further comprises:
when the zipper direction to be detected is judgedWhen the left side is shifted and vibrated, the correction formula is y + u1(x,t1) And performing a motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side.
7. The method for detecting the thickness dimension of the zipper according to claim 5, wherein the step S304 further comprises:
when the tested zipper is judged to be deflected and vibrated towards the right, the correction formula is that y is equal to y + u2(x,t1) And performing a motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side.
8. The method for detecting the thickness dimension of the slide fastener according to claim 6 or 7, wherein the step S4 includes:
and fitting the corrected coordinate information of all the edge points on the left side and the right side into a left parallel straight line and a right parallel straight line by using an integral least square method, wherein the steps comprise:
let two fitting straight lines L1And L2The equation (2) is equation (3), and two fitting straight lines are calculated according to the fitting criterion equation (4):
Figure FDA0003393294580000041
Figure FDA0003393294580000042
wherein k is the number of edge points; x is the number of1i、y1i、x2i、y2iIs a straight line L1、L2The abscissa and ordinate of the ith edge point of (a); a is the slope of a straight line; b1、b2Is a straight line L1And L2The intercept of (d);
the distance d between the two straight lines is obtained from the equation (5)pixel
Figure FDA0003393294580000043
Wherein a is the slope of a straight line; b1、b2Is a straight line L1And L2The intercept of (2).
9. The method for detecting the thickness dimension of the slide fastener according to claim 8, wherein the step S5 includes:
according to the pixel equivalent K between the actual value length unit and the pixel unit, the calculation formula of the thickness dimension of the measured zipper is shown as the formula (6):
dmm=K×dpixel (6);
wherein d ispixelFor the pitch information, K is the pixel equivalent between the length unit and the pixel unit, dmmIs the thickness dimension of the zipper to be tested.
10. A zipper thickness dimension detection system, the system comprising:
the acquisition module is used for acquiring the measurement images of the two adjacent frames of the zipper to be measured, and the acquisition time of the acquisition modules corresponds to t1Time t and2at a time, select t1Taking the measurement image at the moment as an image to be compensated;
the characteristic extraction module is used for acquiring coordinate information of all edge points on the left side and the right side of the single zipper in the image to be compensated;
the compensation module is used for carrying out motion compensation algorithm on the coordinate information of all the edge points on the left side and the right side to obtain the corrected coordinate information of all the edge points on the left side and the right side;
the fitting module is used for respectively fitting the corrected coordinate information of all the edge points on the left side and the right side into a left parallel straight line and a right parallel straight line and calculating the distance information between the left straight line and the right straight line;
and the calculating module is used for calculating the thickness of the zipper to be measured according to the distance information.
CN201910944302.7A 2019-09-30 2019-09-30 Zipper thickness dimension detection method and system Active CN110689566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910944302.7A CN110689566B (en) 2019-09-30 2019-09-30 Zipper thickness dimension detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910944302.7A CN110689566B (en) 2019-09-30 2019-09-30 Zipper thickness dimension detection method and system

Publications (2)

Publication Number Publication Date
CN110689566A CN110689566A (en) 2020-01-14
CN110689566B true CN110689566B (en) 2022-04-01

Family

ID=69111446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910944302.7A Active CN110689566B (en) 2019-09-30 2019-09-30 Zipper thickness dimension detection method and system

Country Status (1)

Country Link
CN (1) CN110689566B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009069728A1 (en) * 2007-11-30 2009-06-04 Rakupuri Co., Ltd. Zipper, method for transferring color pattern to the zipper, and zippered article
CN104359403A (en) * 2014-11-21 2015-02-18 天津工业大学 Plane part size measurement method based on sub-pixel edge algorithm
CN205696086U (en) * 2014-09-29 2016-11-23 Ykk株式会社 Chain belt and slide fastener
CN108180837A (en) * 2018-02-09 2018-06-19 中国计量大学 A kind of slide fastener sized image harvester and the online vision detection system based on the device
CN207850294U (en) * 2018-02-09 2018-09-11 中国计量大学 A kind of slide fastener sized image harvester and the online vision detection system based on the device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009069728A1 (en) * 2007-11-30 2009-06-04 Rakupuri Co., Ltd. Zipper, method for transferring color pattern to the zipper, and zippered article
CN205696086U (en) * 2014-09-29 2016-11-23 Ykk株式会社 Chain belt and slide fastener
CN104359403A (en) * 2014-11-21 2015-02-18 天津工业大学 Plane part size measurement method based on sub-pixel edge algorithm
CN108180837A (en) * 2018-02-09 2018-06-19 中国计量大学 A kind of slide fastener sized image harvester and the online vision detection system based on the device
CN207850294U (en) * 2018-02-09 2018-09-11 中国计量大学 A kind of slide fastener sized image harvester and the online vision detection system based on the device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
拉链质量视觉检测关键技术研究;李世明;《万方数据》;20170517;全文 *
浅谈拉链的质量特征及检验;黄仕辉;《民营科技》;20110228(第2期);全文 *

Also Published As

Publication number Publication date
CN110689566A (en) 2020-01-14

Similar Documents

Publication Publication Date Title
Chen et al. Modal identification of simple structures with high-speed video using motion magnification
US8107723B2 (en) Measurement of three-dimensional motion characteristics
CN101365144B (en) Regulating and calibrating method for linear array CCD scanning detection system
WO2016152076A1 (en) Structure condition assessing device, condition assessing system, and condition assessing method
CN108593087A (en) A kind of thin-wall part operational modal parameter determines method and system
JPWO2016152075A1 (en) Structure state determination apparatus, state determination system, and state determination method
CN109341548B (en) Three-dimensional vibration vision measurement system and method based on variable density stripes
AU2016308995A1 (en) Method, device, and program for measuring displacement and vibration of object by single camera
CN107817044B (en) Device and method for measuring plate vibration based on machine vision
CN110261052B (en) Structural vibration mode analysis system and method adopting force hammer excitation and photogrammetry
CN111623942B (en) Displacement measurement method for test structure model of unidirectional vibration table
JP4872836B2 (en) Information processing system
EP4276407A2 (en) Wire rope measuring device and wire rope measuring method
JP4058421B2 (en) Vibration measuring apparatus and measuring method thereof
JP2009146296A (en) Image corresponding point search device, and distance measuring equipment and image motion detector using the same
CN113804696B (en) Method for determining size and area of defect on surface of bar
CN110689566B (en) Zipper thickness dimension detection method and system
Zhu et al. A Noval Building Vibration Measurement system based on Computer Vision Algorithms
Zeinali et al. Accurate structural dynamic response monitoring of multiple structures using one CCD camera and a novel targets configuration
JP2014085156A (en) Strain measuring method and strain measuring system
CN101762967B (en) Photographing width measurement assistant strip, wide-angle image photographing method, method and device for partially splicing two adjacent images
JP2015007591A (en) Vehicle body rigidity test method and vehicle body rigidity test device
US9315047B2 (en) Velocity estimation methods, and imaging devices and printing devices using the methods
JP4887820B2 (en) Image position measuring method, image position measuring apparatus, and image position measuring program
JP5339070B2 (en) Displacement measuring apparatus and measuring method

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