CN111578838A - Gear size visual measurement device and measurement method - Google Patents
Gear size visual measurement device and measurement method Download PDFInfo
- Publication number
- CN111578838A CN111578838A CN202010447522.1A CN202010447522A CN111578838A CN 111578838 A CN111578838 A CN 111578838A CN 202010447522 A CN202010447522 A CN 202010447522A CN 111578838 A CN111578838 A CN 111578838A
- Authority
- CN
- China
- Prior art keywords
- light source
- image
- gear
- point
- pixel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30164—Workpiece; Machine component
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The invention discloses a gear size visual measurement device which comprises a workbench, a camera, a first light source, a second light source, a first transverse support, a second transverse support, a longitudinal support, an embedded main controller, a human-computer interaction interface and a memory, wherein the second light source is arranged on the workbench, the longitudinal support is arranged on the workbench and positioned on one side of the second light source, the first transverse support and the second transverse support are respectively arranged on the longitudinal support, the first light source is arranged on the second transverse support and is opposite to the second light source, the camera is arranged on the first transverse support and is positioned above the first light source, the camera is in communication connection with the embedded main controller, and the human-computer interaction interface and the memory are respectively in communication connection with the embedded main controller. The invention can improve the efficiency and the precision of measurement; the definition of the image edge is improved, and the complexity of a subsequent image processing algorithm is reduced. The invention also provides a gear size visual measurement method.
Description
Technical Field
The invention belongs to the field of precision measuring instruments, and particularly relates to a gear size-based visual measuring device and a measuring method.
Background
Along with the process of industrialization, the measurement technology has become an important index for measuring the development level of the industry in China. Because the traditional manual measurement has the problems of low efficiency, high cost, poor precision and the like, the machine measurement technology is gradually replacing the manual work and becomes a research hotspot in the industry. A machine vision measuring system is a novel non-contact precision measuring instrument in the field of precision measurement. The existing vision measuring system based on a computer can work in a severe environment repeatedly without tiredness, but still has the defects of no modularization of the system structure, poor portability, heavy volume, inconvenience in installation and the like.
Aiming at the problems, corresponding improvements are also carried out, for example, the publication date is 24/7/2013, the publication date is CN101182990B, and the patent name is Chinese patent of a large-scale in-process workpiece geometry measuring system based on machine vision, which discloses a technical scheme, and the system comprises a mechanical arm mounting seat, a mechanical arm, a camera, a light source frame, a mechanical arm numerical control module, an image acquisition card and a computer; the mechanical arm mounting seat is a portable interface piece with a built-in stepping motor and a transmission gear and is arranged on a machine tool spindle shell or a workbench; the mechanical arm capable of two-dimensionally stretching and rotating around two shafts is arranged on the mechanical mounting seat, and the tail end of the mechanical arm is additionally provided with a camera; the light source frame is arranged above the workpiece; one end of the mechanical arm numerical control module is connected with the mechanical arm, and the other end of the mechanical arm numerical control module is connected with the computer; the computer is also connected with the camera through an image acquisition card. The technical scheme has the following defects that: although the geometric measurement of large-scale workpieces in manufacturing can be completed, the whole measurement system is large in size, is not suitable for transplantation and is poor in cuttability.
Disclosure of Invention
1. Problems to be solved
Aiming at the problems of no modularization of a system structure, poor transportability, heavy volume, inconvenience in installation and the like in the prior art, the invention provides a gear size-based vision measuring device and a measuring method.
2. Technical scheme
In order to solve the problems, the technical scheme adopted by the invention is as follows: the utility model provides a gear size vision measuring device, includes workstation, camera, first light source, second light source, first horizontal support, the horizontal support of second, vertical support, embedded main control unit, human-computer interaction interface, memory, the second light source sets up on the workstation, vertical support sets up on the workstation, is located one side of second light source, first horizontal support and the horizontal support of second set up respectively on vertical support, first light source set up on the horizontal support of second, and with the second light source sets up relatively, the camera sets up on first horizontal support, is located first light source top, the camera with embedded main control unit communication is connected, human-computer interaction interface, memory respectively with main control embedded unit communication is connected. According to the technical scheme, the camera is used for shooting the image of the measured object, the acquired image is processed and analyzed through the embedded main controller, the specific size of the gear workpiece is calculated, the measurement of the gear workpiece is realized, the characteristics of non-contact and high measurement speed are achieved, and the measurement efficiency and precision are improved; moreover, the technical scheme adopts the design of double light sources, so that the shadow can be reduced to improve the definition of the image edge, and the complexity of a subsequent image processing algorithm can be reduced.
Furthermore, the centers of the camera, the first light source and the second light source are located on the same central axis, and the camera, the first light source and the second light source are arranged in parallel.
Further, the first light source is an annular light source. The light generated by the annular light source is sufficient and can uniformly irradiate on the gear workpiece to be measured.
Further, the second light source is a surface light source. The surface light source can make the edge of the workpiece clearer and obtain an image with high contrast.
Further, the camera is an industrial camera with a lens. The industrial camera is compact in structure, convenient to install, stable in performance, not prone to damage, high in anti-interference capacity and capable of obtaining workpiece images with high quality.
Further, the embedded main controller is S3C 2440A.
The invention also provides a gear size visual measurement method, an industrial camera is used for acquiring an image of a gear workpiece, the image is transmitted to the embedded main controller after analog-to-digital conversion, the embedded main controller performs median filtering processing, image edge detection and Hough circle detection algorithm fitting processing on the image to obtain a pixel value of the gear workpiece, and the embedded main controller converts the pixel value of the gear workpiece into a physical space size according to a pixel equivalent obtained by calibrating the size of the camera; the image edge detection comprises the following steps:
s1, utilizing convolution kernel Sobel in horizontal directionxAnd the convolution kernel Sobel in the vertical directionyCarrying out convolution filtering processing on the image f (x, y) to obtain a filtered image g (x, y);
s2, solving the gradient direction theta (x, y) and gradient amplitude t (x, y) of the pixel point (x, y),
wherein, (x, y) represents the pixel coordinate of a certain pixel point; px(x, y) is the partial derivative of the image g (x, y) in the x-direction, Py(x,y)
Is the partial derivative of the image g (x, y) in the y direction;
s3, carrying out non-maximum suppression processing on each pixel point by using the gradient direction theta (x, y) and the gradient amplitude t (x, y);
s4, dividing the pixels processed by the non-maximum value suppression into H1、H2、H3The gradient amplitude is divided into l levels; wherein H1Being imagesNon-edge points, containing gradient magnitude t1,t2,...,tkPixel of { right above }; h2As possible image edge points, including gradient magnitude { t }k+1,tk+2,...,tsPixel of { right above }; h3Is an edge point of the image, and contains gradient magnitude ts+1,ts+2,...,tlK is more than or equal to 1 and less than or equal to l, k +1 is more than or equal to s and less than or equal to l, 64 is more than or equal to l and less than or equal to 128, k, s and l represent the grade number of the gradient amplitude of one pixel point, and then the pixel H is1、H2、H3Inter-class variance value of
Wherein, tmFor any gradient amplitude, pmGradient amplitude equal to tmThe probability of the pixel in the image is more than or equal to 64 and less than or equal to 128, and m is more than or equal to 1 and less than or equal to l;
will sigma2(k, s) takes t corresponding to the maximum valuemax、pmaxAre respectively set to H1、H2、H3Demarcation point of interval, i.e. high threshold ThAnd a low threshold Tl;
S5, adopting high threshold value ThAnd a low threshold TlThe image is segmented to extract the edges of the gear workpiece.
The Canny algorithm in the technical scheme has parameter self-adaption capability and is suitable for high threshold value ThAnd a low threshold TlThe selection of the method enables the division of the gear image edge to be more accurate, and therefore the gear image edge detection has better noise resistance and detection precision.
Further, the step S3 is: if the gradient amplitude of the point (x, y) is larger than the amplitudes of two adjacent pixel points in the 3 x 3 neighborhood, the point is the edge point; otherwise it is not.
Further, the step S5 is: if the gradient amplitude t (x, y)>ThThen the point must be an edge point; if t (x, y)<TlThen the point must not be an edge point; if Ti<t(x,y)<ThThen find if there is a larger than in the neighborhood of the pointThIf found, then the point is an edge point, otherwise not.
3. Advantageous effects
Compared with the prior art, the invention has the beneficial effects that:
(1) the invention adopts the industrial camera to shoot the image of the measured object, processes and analyzes the acquired image through the embedded main controller, calculates the specific size of the gear workpiece, realizes the measurement of the gear workpiece, has the characteristics of non-contact and high measurement speed, and improves the measurement efficiency and precision;
(2) the invention adopts the embedded main controller, and has the advantages of small volume, low cost, high integration level and the like;
(3) the invention adopts OTSU self-adaptive threshold Canny edge detection algorithm, and high threshold T is detectedhAnd a low threshold TlThe selection of the method enables the division of the gear image edge to be more accurate, so that the method has better anti-noise capability and detection precision when the gear image edge is detected;
(4) the invention has strong portability, convenient installation and easy realization.
Drawings
FIG. 1 is a schematic structural view of the present invention;
FIG. 2 is a flow chart of the operation of the present invention;
fig. 3(a) is a 3 x 3 image matrix before median filtering in the example;
fig. 3(b) is a 3 x 3 image matrix after median filtering in an embodiment;
FIG. 4 is a flow chart of image processing according to the present invention;
FIG. 5 is a schematic diagram of the results of edge detection using the measurement method of the present invention;
in the figure: 1: an industrial camera; 2: a lens; 3: a first light source; 4: a second light source; 5: a work table; 6: a longitudinal support; 7: a transverse support; 8: a transverse support; 9: an embedded main controller; 10: a human-computer interaction interface; 11: a memory; 12: a gear workpiece.
Detailed Description
The invention is further described with reference to specific examples.
As shown in figure 1, the industrial camera 1 adopted by the invention has a compact structure, is convenient to install, has stable performance and is not easy to damage, has high anti-interference capability, and can acquire a workpiece image with higher quality. The first transverse bracket 7 and the second transverse bracket 8 are respectively arranged on the longitudinal bracket 6, the first transverse bracket 7 is arranged above the second transverse bracket 8, the industrial camera 1 is arranged on the first transverse bracket 7, and the first light source 3 is arranged on the second transverse bracket 8; the second light source 4 is arranged on the workbench 5, the gear workpiece 12 to be measured is placed on the second light source 4, the centers of the industrial camera 1, the first light source 3, the second light source 4 and the gear workpiece 12 to be measured are located on the same central axis, and the industrial camera 1, the first light source 3, the second light source 4 and the gear workpiece 12 are parallel to each other. The invention adopts a double-light source design, and the first light source 3 generates sufficient and uniform light to irradiate on the gear workpiece 12 to be measured. The edge of the gear workpiece 12 can be clearer due to the upward irradiation of the second light source 4 from bottom to top, so that an image with high contrast is obtained, and the design of the double light sources can reduce the shadow so as to change the definition of the edge of the image and reduce the complexity of a subsequent image processing algorithm. In a specific implementation, the first light source 3 may be an annular light source, and the second light source 4 may be a surface light source.
The industrial camera 1 is in communication connection with an embedded main controller 9, the embedded main controller 9 is in communication connection with a human-computer interaction interface 10 and a memory 11 respectively, specifically, the industrial camera 1 transmits acquired images of the gear workpiece 12 to the embedded main controller 9 through a data line, and the embedded main controller 9 displays the acquired images of the gear workpiece 12 on the human-computer interaction interface 10; when a command for calculating the specific size parameters of the gear workpiece 12 is input on the human-computer interaction interface 10, the embedded main controller 9 calculates the size of the gear workpiece 12 by using digital image processing and machine vision technology; when a save command is input on the human-machine interface 10, the main controller 9 saves the processed gear workpiece 12 image and the size measurement result to the memory 11. In this embodiment, the embedded main controller 9 adopts a processor with a model number S3C 2440A; the industrial camera 1 adopts a BaumerTXG12 gigabit Ethernet camera; the lens 2 adopts an AZUER-3514M manual diaphragm fixed focus lens.
The working process of the invention is as shown in fig. 2, firstly, the second light source 4 and the first light source 3 are adjusted according to the material and the surface reflection condition of the gear workpiece 12, the gear workpiece 12 is placed on the second light source 4 on the workbench under the appropriate illumination environment, the image of the gear workpiece 12 is collected by the industrial camera 1, the industrial camera 1 performs analog-to-digital conversion on the collected image to obtain a digital signal, and the digital image information is sent to the embedded main controller 9 through a data line. The embedded main controller 9 analyzes and processes the image data of the gear workpiece 12 by using digital image processing and machine vision technology, including filtering and denoising processing of the image, edge detection of the image, Hough circle detection algorithm fitting processing and the like, wherein the filtering and denoising of the image is to suppress the noise of a target image under the condition of keeping the detailed characteristics of the image as much as possible so as to improve the effectiveness and reliability of subsequent image processing and analysis; the edge detection of the image is to extract the edge of the gear workpiece, namely to distinguish the gear workpiece from the background to obtain the image of the single gear workpiece; the Hough circle detection algorithm fitting processing can obtain the addendum circle and the dedendum circle of the gear workpiece, further obtain the radius of the addendum circle or the dedendum circle of the gear workpiece, and reversely obtain other parameters of the gear according to a gear parameter calculation formula, wherein the parameters take pixels as units. Secondly, by shooting a calibration plate or a calibration block with the shape and the size determined in advance, the embedded main controller converts the pixel value of the gear workpiece into the physical space size, namely the actual size of the gear workpiece, according to the pixel equivalent obtained by calibrating the size of the camera. Finally, the embedded main control sends and displays the image of the gear workpiece 12 and the actual size parameter information on the human-computer interaction interface 10. When a command for calculating specific size parameters of the gear workpiece 12 is input on the human-computer interaction interface 10, the embedded main controller 9 calculates the size of the gear workpiece 12 by using a digital image algorithm; when a save command is input on the human-machine interface 10, the embedded main controller 9 saves the processed image and the size measurement result of the gear workpiece 12 to the memory 11.
When processing the image, the method comprises the following steps:
(1) carrying out median filtering denoising processing on the image;
(2) detecting edges of the image;
(3) obtaining the addendum circle and the dedendum circle of the gear workpiece through the Hough circle detection algorithm, further solving the radius of the addendum circle or the dedendum circle of the gear workpiece, and reversely solving other parameters of the gear according to a gear parameter calculation formula to obtain the pixel value of the gear workpiece;
(4) the embedded main controller converts the pixel value of the gear workpiece into a physical space size according to the pixel equivalent obtained by calibrating the size of the camera, namely the actual size measurement value of the gear workpiece.
Wherein, step (3) and step (4) are both prior art, and are not described herein again, and step (1) and step (2) are further described below.
(1) And carrying out median filtering denoising processing on the image. Since the image inevitably contains some noise, a filtering and denoising process is required in the image preprocessing process. The median filtering is a better method for filtering noise, and arranges pixel points in a neighborhood according to an ascending order or a descending order on the basis of a sorting statistical theory, and takes the intermediate value of the group of data as an output gray value. The nonlinear filtering method not only can effectively remove the noise of the image, but also ensures the clearness of the edge of the gear image.
The median filter is defined as follows:
for a set of values a1,a2,...,anThe values of the group are arranged into a from small to large in sequence1≤a2≤...≤an,Then, then
Wherein b is the sequence { a1,a2,...,anThe median value of.
Fig. 3(a) and fig. 3(b) show a specific processing procedure of median filtering by taking a 3 × 3 image matrix as an example, specifically: the pixel values in the matrix block in fig. 3(a) are first arranged in ascending order to be 35, 56, 87, 98, 105, 112, 124, 131, 139, and then the median of the group of data is taken to replace the pixel value at the center position of the matrix block, and the processed effect is as shown in the matrix block in fig. 3 (b).
(2) Edges of the image are detected. The invention mainly aims to process a gear image to finish the precise measurement of the size of a small gear, and whether the edge of the gear can be precisely detected directly influences the measurement precision, so that the edge detection is an indispensable key step. In the calibrated gear size vision measuring device, if the edge information of the gear in the image can be accurately detected and extracted, the relationship between the pixel size of the gear edge in the image and the actual size of the corresponding gear in the space can be determined.
The edge detection algorithms of the gear image are numerous, and a traditional edge detection algorithm, a modern edge detection algorithm and the like are commonly used. The first-order differential edge detection algorithm based on convolution operation, such as Sobel (Sobel), Prewitt (Prewitt), etc., has the following two disadvantages:
(1) the gradient direction of the edge is not fully utilized.
(2) Only by the threshold processing, a binarized gear image after the final edge detection is obtained. If the threshold value is too large, much edge information is lost; if the threshold is too small, a lot of noise will result.
The Canny algorithm edge detection is improved based on the two points as follows:
(1) non-maxima suppression based on edge gradient direction.
(2) Double threshold TlAnd ThThe hysteresis processing of (3).
The Canny algorithm has strong noise immunity, but the traditional Canny algorithm needs to specify upper and lower threshold values, and the OTSU algorithm can provide high and low threshold values for the Canny algorithm, but the low threshold value needs to be obtained by multiplying the high threshold value by a fixed threshold value ratio. Aiming at the phenomenon that different images generate false edges due to fixed thresholds, the invention provides a gradient amplitude OTSU method to adaptively set high and low thresholds of a Canny algorithm. The basic flow chart of the Canny algorithm edge detection in the invention is shown in fig. 4, and the specific steps are as follows:
the first step is as follows: firstly, a convolution kernel Sobel in the horizontal direction is utilizedxAnd the convolution kernel Sobel in the vertical directionyAnd performing convolution filtering processing on the gear image f (x, y) to obtain a filtered image g (x, y).
The second step is that: calculating the partial derivative P of the filtered image g (x, y) in the x-directionxPartial derivatives P in the (x, y) and y directionsy(x, y), wherein:
in the filtered image g (x, y), the gradient direction θ (x, y) and the gradient magnitude t (x, y) of each pixel point (x, y) are respectively:
where (x, y) represents the pixel coordinate of a certain pixel.
The third step: and carrying out non-maximum suppression processing on each pixel point by utilizing the gradient direction theta (x, y) and the gradient amplitude t (x, y) so as to improve the positioning accuracy of the edge. If the gradient amplitude of the point (x, y) is larger than the amplitudes of two adjacent pixel points in the 3 x 3 neighborhood, the point is the edge point; otherwise it is not. It should be noted that the pixels in the 3 × 3 neighborhood include the current pixel point (x, y) and eight pixels adjacent to the current pixel value in the vertical and horizontal directions.
The fourth step: dividing the pixels after non-maximum suppression into three categories: h1、H2、H3The gradient amplitude is divided into l levels. Wherein H1Is a non-edge point of the image, and contains gradient magnitude t1,t2,...,tkPixel of { right above }; h2Possibly edge points or non-edge points, containing gradient magnitude tk+1,tk+2,...,tsPixel of { right above }; h3Is an edge point of the image, and contains gradient magnitude ts+1,ts+2,...,tlWhere k is greater than or equal to 1 and less than or equal to l, k +1 and less than or equal to s and less than or equal to l, and k, s and l represent the number of gradient amplitude levels of a certain pixel, where t (x, y) and t (x, y) are required to be mentioned1、t2……tk、tk+1……ts……tlAll represent the gradient amplitude of the pixel point, the difference lies in that: t (x, y) represents the gradient magnitude of a pixel point with pixel coordinates (x, y), and t1、t2……tk、tk+1……ts……tlThe gradient amplitudes of the pixel points with the number of the stages representing the gradient amplitudes being 1 and 2 … k … k +1 … l respectively. In a specific implementation, the value of l may be set by itself, in this embodiment, the value of l may be set to 128, and of course, other values may also be set, and the larger the value of l, the longer the calculation time; the smaller the value of l, the less appropriate the threshold value to look for may be, and in general, a more appropriate value of l ranges from 64 ≦ l ≦ 128. Let D be the total number of pixels in the image, tmAt an arbitrary gradient amplitude, dmGradient amplitude equal to tmThe number of the pixel points is equal to tmIs present in the imagemComprises the following steps:
pm=dm/D,m=1,2,...,l
three kinds of pixels H1、H2、H3The probability of gradient amplitude occurrence is defined as p (k), p (k, s), and p(s), respectively, then:
let E be the average value of the gradient amplitude of the whole image, three kinds of pixels H1、H2、H3Respectively is e1(k)、e2(k,s)、e3(s), then:
wherein m is more than or equal to 1 and less than or equal to l, and pixel H1、H2、H3The variance value between classes is denoted as sigma2(k, s) then
σ2(k,s)=[e1(k)-E]2·p(k)+[e2(k,s)-E]2·p(k,s)
+[e3(s)-E]2·p(s)
Namely:
will sigma2(k, s) takes t corresponding to the maximum valuemax、pmaxAre respectively H1、H2、H3Demarcation point of interval, i.e. high threshold T as Canny algorithmhAnd a low threshold Tl。
The fifth step: using dual threshold, i.e. high threshold ThAnd a low threshold TlThe image is segmented to extract the edges of the gear workpiece. The gradient amplitude of the current pixel point (x, y) is t (x, y), if t (x, y)>ThThen the point must be an edge point; if t (x, y)<TlThen the point must not be an edge point; if T isi<t(x,y)<ThThen find if there is more than T in the neighborhood of the pointhIf found, then the point is an edge point, otherwise not. When the edge point is determined, the edge of the gear workpiece is successfully extractedThen, the gear workpiece and the background can be separated, and the measurement of the gear workpiece is more accurate.
Experimental results show that the Canny algorithm based on the gradient amplitude maximum inter-class variance method has parameter self-adaption capability, and has good anti-noise capability and detection accuracy for gear image edge detection, as shown in FIG. 5.
The present invention and its embodiments have been described above schematically, without limitation, and what is shown in the drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. Therefore, if the person skilled in the art receives the teaching, without departing from the spirit of the invention, the person skilled in the art shall not inventively design the similar structural modes and embodiments to the technical solution, but shall fall within the scope of the invention.
Claims (9)
1. A gear size vision measuring device which is characterized in that: including workstation, camera, first light source, second light source, first horizontal support, the horizontal support of second, vertical support, embedded main control unit, human-computer interaction interface, memory, the second light source sets up on the workstation, vertical support setting is on the workstation, is located one side of second light source, the horizontal support of first horizontal support and second sets up respectively on vertical support, first light source set up on the horizontal support of second, and with the second light source sets up relatively, the camera sets up on the horizontal support of first, is located first light source top, the camera with embedded main control unit communication is connected, human-computer interaction interface, memory respectively with main control embedded unit communication is connected.
2. The gear dimensional visual measurement device of claim 1, wherein: the centers of the camera, the first light source and the second light source are located on the same central axis, and the camera, the first light source and the second light source are arranged in parallel.
3. Gear size visual measuring device according to claim 1 or 2, characterized in that: the first light source is an annular light source.
4. Gear size visual measuring device according to claim 1 or 2, characterized in that: the second light source is a surface light source.
5. Gear size visual measuring device according to claim 1 or 2, characterized in that: the camera is an industrial camera with a lens.
6. Gear size visual measuring device according to claim 1 or 2, characterized in that: the embedded main controller is S3C 2440A.
7. A gear size visual measurement method is characterized in that: acquiring an image of a gear workpiece by an industrial camera, performing analog-to-digital conversion on the image, transmitting the image to an embedded main controller, performing median filtering processing, image edge detection and Hough circle detection algorithm fitting processing on the image by the embedded main controller to obtain a pixel value of the gear workpiece, and converting the pixel value of the gear workpiece into a physical space size by the embedded main controller according to a pixel equivalent obtained by calibrating the size of the camera; the image edge detection comprises the following steps:
s1, utilizing convolution kernel Sobel in horizontal directionxAnd the convolution kernel Sobel in the vertical directionyCarrying out convolution filtering processing on the image f (x, y) to obtain a filtered image g (x, y);
s2, solving the gradient direction theta (x, y) and gradient amplitude t (x, y) of the pixel point (x, y),
wherein (x, y) represents a pixel of a certain pixelCoordinates; px(x, y) is the partial derivative of the image g (x, y) in the x-direction, Py(x, y) is the partial derivative of image g (x, y) in the y direction;
s3, carrying out non-maximum suppression processing on each pixel point by using the gradient direction theta (x, y) and the gradient amplitude t (x, y);
s4, dividing the pixels processed by the non-maximum value suppression into H1、H2、H3The gradient amplitude is divided into l levels; wherein H1Is a non-edge point of the image, and contains gradient magnitude t1,t2,...,tkPixel of { right above }; h2As possible image edge points, including gradient magnitude { t }k+1,tk+2,...,tsPixel of { right above }; h3Is an edge point of the image, and contains gradient magnitude ts+1,ts+2,...,tlK is more than or equal to 1 and less than or equal to l, k +1 is more than or equal to s and less than or equal to l, and k, s and l represent the number of stages of the gradient amplitude of one pixel point, so that the pixel H is formed1、H2、H3Inter-class variance value of
Wherein, tmFor any gradient amplitude, pmGradient amplitude equal to tmThe probability of the pixel in the image is more than or equal to 64 and less than or equal to 128, and m is more than or equal to 1 and less than or equal to l;
will sigma2(k, s) takes t corresponding to the maximum valuemax、pmaxAre respectively set to H1、H2、H3Demarcation point of interval, i.e. high threshold ThAnd a low threshold Tl;
S5, adopting high threshold value ThAnd a low threshold TlThe image is segmented to extract the edges of the gear workpiece.
8. The gear dimension vision measuring method of claim 7, wherein: the step S3 is: if the gradient amplitude of the point (x, y) is larger than the amplitudes of two adjacent pixel points in the 3 x 3 neighborhood, the point is the edge point; otherwise it is not.
9. The gear dimension vision measuring method of claim 7, wherein: the step S5 is: if the gradient amplitude t (x, y)>ThThen the point must be an edge point; if t (x, y)<TlThen the point must not be an edge point; if Ti<t(x,y)<ThThen find if there is more than T in the neighborhood of the pointhIf found, then the point is an edge point, otherwise not.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010447522.1A CN111578838A (en) | 2020-05-25 | 2020-05-25 | Gear size visual measurement device and measurement method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010447522.1A CN111578838A (en) | 2020-05-25 | 2020-05-25 | Gear size visual measurement device and measurement method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111578838A true CN111578838A (en) | 2020-08-25 |
Family
ID=72110367
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010447522.1A Pending CN111578838A (en) | 2020-05-25 | 2020-05-25 | Gear size visual measurement device and measurement method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111578838A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112330599A (en) * | 2020-10-15 | 2021-02-05 | 浙江大学台州研究院 | Size measurement scoring device, adjusting method and scoring method |
CN113222955A (en) * | 2021-05-24 | 2021-08-06 | 同济大学 | Gear size parameter automatic measurement method based on machine vision |
CN114708265A (en) * | 2022-06-06 | 2022-07-05 | 武汉工程大学 | High-speed rail motor train unit key part image recognition detection method and system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102426649A (en) * | 2011-10-13 | 2012-04-25 | 石家庄开发区冀科双实科技有限公司 | Simple steel seal digital automatic identification method with high accuracy rate |
CN107464252A (en) * | 2017-06-30 | 2017-12-12 | 南京航空航天大学 | A kind of visible ray based on composite character and infrared heterologous image-recognizing method |
CN108596966A (en) * | 2018-03-14 | 2018-09-28 | 浙江大学山东工业技术研究院 | The measurement method at the refractory brick surface inclination angle based on fit Plane normal vector |
CN109389612A (en) * | 2018-08-31 | 2019-02-26 | 南京理工大学 | A kind of municipal rail train pantograph pan edge detection method |
CN109410230A (en) * | 2018-09-07 | 2019-03-01 | 南京航空航天大学 | One kind can antimierophonic improvement Canny method for detecting image edge |
CN109636822A (en) * | 2018-12-13 | 2019-04-16 | 大连理工大学 | A kind of improvement Canny adaptive edge extracting method based on new building subordinating degree function |
CN111189387A (en) * | 2020-01-02 | 2020-05-22 | 西安工程大学 | Industrial part size detection method based on machine vision |
-
2020
- 2020-05-25 CN CN202010447522.1A patent/CN111578838A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102426649A (en) * | 2011-10-13 | 2012-04-25 | 石家庄开发区冀科双实科技有限公司 | Simple steel seal digital automatic identification method with high accuracy rate |
CN107464252A (en) * | 2017-06-30 | 2017-12-12 | 南京航空航天大学 | A kind of visible ray based on composite character and infrared heterologous image-recognizing method |
CN108596966A (en) * | 2018-03-14 | 2018-09-28 | 浙江大学山东工业技术研究院 | The measurement method at the refractory brick surface inclination angle based on fit Plane normal vector |
CN109389612A (en) * | 2018-08-31 | 2019-02-26 | 南京理工大学 | A kind of municipal rail train pantograph pan edge detection method |
CN109410230A (en) * | 2018-09-07 | 2019-03-01 | 南京航空航天大学 | One kind can antimierophonic improvement Canny method for detecting image edge |
CN109636822A (en) * | 2018-12-13 | 2019-04-16 | 大连理工大学 | A kind of improvement Canny adaptive edge extracting method based on new building subordinating degree function |
CN111189387A (en) * | 2020-01-02 | 2020-05-22 | 西安工程大学 | Industrial part size detection method based on machine vision |
Non-Patent Citations (1)
Title |
---|
程福安: "基于嵌入式技术的机器视觉系统设计与应用", 《工业控制计算机》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112330599A (en) * | 2020-10-15 | 2021-02-05 | 浙江大学台州研究院 | Size measurement scoring device, adjusting method and scoring method |
CN112330599B (en) * | 2020-10-15 | 2024-02-20 | 浙江大学台州研究院 | Dimension measurement scoring device, adjustment method and scoring method |
CN113222955A (en) * | 2021-05-24 | 2021-08-06 | 同济大学 | Gear size parameter automatic measurement method based on machine vision |
CN114708265A (en) * | 2022-06-06 | 2022-07-05 | 武汉工程大学 | High-speed rail motor train unit key part image recognition detection method and system |
CN114708265B (en) * | 2022-06-06 | 2022-08-23 | 武汉工程大学 | High-speed rail motor train unit key part image recognition detection method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111578838A (en) | Gear size visual measurement device and measurement method | |
CN110634140B (en) | Large-diameter tubular object positioning and inner wall defect detection method based on machine vision | |
CN107941808B (en) | 3D printing forming quality detection system and method based on machine vision | |
CN109489566B (en) | Lithium battery diaphragm material slitting width detection method, detection system and device | |
CN102221556B (en) | Device and method for online detection on appearance defect of minitype connecting part based on machine vision | |
CN110298840B (en) | Yarn defect detection method based on image | |
CN202916213U (en) | Gear defect detecting system based on computer vision | |
CN109978940B (en) | Visual measurement method for SAB safety airbag size | |
CN111612737B (en) | Artificial board surface flaw detection device and detection method | |
CN112132886A (en) | Circular hole center rapid positioning and roundness detection method for aviation part | |
CN106204610A (en) | Peg-in-hole assembly automatic centering system based on image procossing | |
CN103645573A (en) | Liquid crystal display (LCD) detection method and system based on machine vision | |
CN103424409A (en) | Vision detecting system based on DSP | |
CN109341570B (en) | Machine vision-based internal thread detection method and system | |
CN109211110A (en) | A kind of flat-type workpiece size detection system and method based on machine vision | |
CN105783723A (en) | Machine vision-based precise die surface processing precision detection device and method | |
CN113155043A (en) | System, method and device for measuring thickness of transparent material screen | |
CN111275665A (en) | Blade grinding and polishing processing vibration detection system and method based on vision | |
CN110738644A (en) | automobile coating surface defect detection method and system based on deep learning | |
CN205486309U (en) | Through whether correct device of test capacitor installation of shooing | |
CN109614868A (en) | Automobile tire decorative pattern graph line identifying system | |
CN115861217A (en) | System and method for detecting defects of circuit board of backlight plate based on vision | |
CN106989672A (en) | A kind of workpiece measuring based on machine vision | |
CN109557098A (en) | Metal surface detection system based on machine vision | |
CN113607058B (en) | Straight blade size detection method and system based on machine vision |
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 |