Image acquisition method for detecting defects on outer diameter cylindrical surface of small workpiece

By using grating-type rotating illumination and multi-frame image stitching technology, the problem of unstable imaging in the detection of defects on the outer diameter cylindrical surface of small workpieces was solved, and the acquisition of images with more obvious defect features and a larger proportion was achieved, thus improving the detection effect.

CN116500038BActive Publication Date: 2026-04-21XIANGTAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIANGTAN UNIV
Filing Date
2023-04-28
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In the detection of defects on the outer diameter cylindrical surface of small workpieces, the existing technology is easily affected by lighting, noise and material reflectivity, resulting in unclear defect features. In addition, small defects occupy a small area and have weak information, which is not conducive to subsequent detection.

Method used

The system employs grating-type rotating illumination to acquire omnidirectional, continuous multi-frame images. It uses cameras at four stations to image in bright field, dark field, and light-dark boundary field. By precisely locating and stitching together the detection area of ​​the multi-frame images, the proportion of defects in the images is increased.

Benefits of technology

It improves the stability and visibility of defect imaging, increases the proportion of defects in the image, and facilitates subsequent detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116500038B_ABST
    Figure CN116500038B_ABST
Patent Text Reader

Abstract

This invention discloses an image acquisition method for detecting defects on the outer diameter cylindrical surface of a small workpiece. The invention includes the following steps: 1. Under grating-type rotating illumination, cameras at four stations image the outer diameter cylindrical surface of the workpiece from all directions. Each camera continuously captures multiple frames, allowing the same position on the cylindrical surface to be imaged under bright field, dark field, and light-dark boundary field of view respectively. 2. The images at each station are positioned to determine the precise location of the detection area in the image. 3. At each station, the precise detection area of ​​each workpiece's multi-frame images at that station is subjected to affine transformation and stitched together into a single image, obtaining a stitched image of the detection area of ​​the workpiece at that station. The stitched image corresponds to a cylindrical surface area not less than 90 degrees of the workpiece's outer diameter. This invention makes the imaging of cylindrical surface defects more stable, the features more obvious and richer, and increases the proportion of defects in the image, which is beneficial for subsequent detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision defect detection technology, and in particular to an image acquisition method for detecting defects on the outer diameter cylindrical surface of a small workpiece. Background Technology

[0002] Detection of surface defects in workpieces is a crucial quality control function in manufacturing. By inspecting these defects, problems in the manufacturing process can be identified and repaired promptly, improving product quality, reducing defect rates, lowering production costs, and enhancing corporate competitiveness.

[0003] With the development of artificial intelligence and machine vision, visual inspection has become one of the main means of inspecting the appearance quality of products on industrial production lines. By imaging the appearance of the workpiece to be inspected through a vision system, defects can be detected and classified.

[0004] For the detection of defects on the outer diameter cylindrical surface of small workpieces, the main imaging methods are: (1) a bottom backlight is set under the workpiece to be detected, and a camera is set on the cylindrical side to acquire the image. However, the imaging process may be affected by lighting, noise, and reflectivity of different materials, resulting in the defects of the workpiece to be detected being indistinct; (2) the workpiece is illuminated by grating-type rotating lighting and the image is acquired. The image shows alternating bright and dark stripes, which can reduce background interference and highlight the defect features. However, the defects on the workpiece may be randomly imaged in the bright field, dark field, or bright-dark boundary field. At the same time, the area occupied by the small defects is relatively small, the information extracted is weak, which is not conducive to subsequent detection.

[0005] Therefore, providing an image acquisition method for detecting defects on the outer diameter cylindrical surface of small workpieces and improving the defect imaging effect is something that those skilled in the art urgently need to achieve. Summary of the Invention

[0006] This invention provides an image acquisition method for detecting defects on the outer diameter cylindrical surface of small workpieces. This method makes the imaging of cylindrical surface defects more stable, the features more obvious and richer, and increases the proportion of defects in the image, which is beneficial for subsequent detection.

[0007] The technical solution of the invention is as follows:

[0008] A method for image acquisition for detecting defects on the outer diameter cylindrical surface of a small workpiece, characterized by comprising the following steps:

[0009] (1) Acquiring omnidirectional, continuous multi-frame images under grating-type rotating lighting.

[0010] Under the grating-type rotating lighting, the cameras at 4 stations image the outer diameter cylindrical surface of the workpiece from all directions. Each camera continuously captures multiple frames, so that the same position on the cylindrical surface is imaged under the bright field of view, dark field of view, and light-dark boundary field of view respectively.

[0011] (2) Precisely locate the detection area

[0012] The image at each workstation is localized to determine the precise location of the detection area in the image, while ignoring the background and non-detection areas.

[0013] (3) Precise detection area of ​​stitched multi-frame images

[0014] Each workstation performs affine transformation on the precise detection area of ​​each workpiece in the multi-frame image of that workstation and stitches them together into one image to increase the proportion of defects in the image.

[0015] In step (1), the process of acquiring omnidirectional, continuous multi-frame images is as follows:

[0016] The workpiece is illuminated by grating-type rotating lighting. Each station is equipped with an industrial camera with a telecentric lens to image the outer cylindrical surface of the tiny workpiece. The image of each station corresponds to a range of no less than 90 degrees of the outer cylindrical surface of the workpiece. Each camera continuously captures multiple frames, so that the same position of the cylindrical surface is imaged under the bright field of view, dark field of view, and light-dark boundary field of view respectively.

[0017] The angular velocity ω of the grid plate is determined based on the perforation angle α, the non-perforation angle β, the camera frame rate f, and the number of consecutive camera shots n.

[0018]

[0019] Each camera takes n consecutive photos while the grid plate rotates, resulting in n images of the same location captured in the bright field, dark field, and light-dark boundary field of view. A total of 4n images are obtained for each workpiece.

[0020] In step (2), the process of accurately locating the detection area is as follows:

[0021] The images at each workstation are localized, mainly including coarse localization and fine localization, to determine the precise location of the detection area in the image:

[0022] Coarse localization refers to determining the approximate location of the workpiece region to be detected in the image, as detailed below:

[0023] ① Select one image from each camera as a sample, and manually extract the area of ​​the workpiece to be inspected from the image as a template for the station where the camera is located;

[0024] ② Using this template, the approximate location of the workpiece area to be detected in multiple frames of images of each workpiece at this workstation is determined by template matching method;

[0025] Fine positioning refers to determining the precise location of the detection area, as detailed below:

[0026] ① Using the approximate position of the workpiece area to be inspected as the reference position, place a rectangular caliper with the same pixel size at the edge of the ellipse imaged on the bottom surface of the workpiece, perpendicular to the tangent of the edge point. For each rectangular caliper, the number of pixels on the long side is u, and the number of pixels on the short side is v. Divide the rectangle into u equal parts, each part containing v×1 pixels. Add the gray values ​​of the v pixels in each part to obtain a one-dimensional array containing u elements. Calculate the difference between two adjacent elements in the one-dimensional array and extract the position with the largest difference as the edge point of the ellipse.

[0027] ② Repeat step ① above to extract the elliptical edge points in all rectangular calipers;

[0028] ③Use the above edge points to fit an ellipse, so that E RMs Minimum, d i This is the sum of the distances from the edge point to the two foci of the ellipse. The specific process is as follows:

[0029]

[0030] ④ Establish a new reference position based on the fitted ellipse, and determine the precise detection area in the image, which is in the shape of an elliptical ring.

[0031] In step (3), the process of accurately detecting the region by stitching together multiple frames of images is as follows:

[0032] ① Convert the elliptical annular region of the image for each workstation into a rectangular region, and define the pixels within the elliptical annular region (el). x ,el y The pixels mapped to the rectangular area are (rect) x rect y ), length of rectangle rect l Equal to the outer ellipse arc length and width rect w The width of the elliptical annulus is equal to the semi-major axis of the outer ellipse, which a The semi-minor axis is el b The outer center of the ellipse (O) x O y Establish a polar coordinate system centered at θ1, with the starting angle of the elliptical ring being θ1 and the ending angle being θ2. Any pixel on the elliptical ring can be represented by el. r and el θ To illustrate, the specific process is as follows:

[0033]

[0034]

[0035] el x =O x +el r ×cos(elθ (5)

[0036] el y =O y +el r ×sin(el θ (6)

[0037] ② Each station stitches together multiple rectangular regions obtained from multiple frames of images of each workpiece at that station to obtain a stitched image of the detection area of ​​the workpiece at that station. The area corresponding to the stitched image is not less than the cylindrical surface within a 90-degree range of the outer diameter of the workpiece.

[0038] The beneficial effects of this invention are as follows:

[0039] The method proposed in this invention improves the defect imaging effect in the problem of detecting defects on the outer diameter cylindrical surface of small workpieces, which is beneficial to subsequent defect detection. Specifically, it is manifested in the following ways: (1) Compared with shooting one frame, this invention adopts the method of shooting multiple frames at the same position, and the outer diameter cylindrical surface of the workpiece is imaged under bright field, dark field, and light-dark boundary field, making the features more obvious and better capturing the defects of the workpiece; (2) Compared with traditional defect detection methods, the detection area is accurately located and the detection areas of multiple frames are stitched together into one image, increasing the proportion of defects in the image, making the defects more obvious and prominent, which is beneficial to subsequent detection. Attached Figure Description

[0040] Figure 1 This is a flowchart of an image acquisition method for detecting defects on the outer diameter cylindrical surface of a small workpiece according to the present invention.

[0041] Figure 2 This is a schematic diagram of a grating-type rotating lighting structure.

[0042] Figure 3 The workpiece to be tested is shown in this embodiment of the invention.

[0043] Figure 4 This is a diagram illustrating the image processing procedure of a single camera in an embodiment of the present invention.

[0044] Figure 5 A comparison diagram of the imaging results obtained by the image acquisition method provided by this invention and other methods. Detailed Implementation

[0045] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. The described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] Unless otherwise defined, all technical terms used herein have the same meaning as commonly understood by those skilled in the art. The technical terms used herein are for the purpose of describing particular embodiments only and are not intended to limit the scope of the invention.

[0047] Example 1:

[0048] like Figure 1 Figure 2 As shown, this invention provides an image acquisition method for detecting defects on the outer diameter cylindrical surface of a small workpiece. The specific steps are as follows:

[0049] Step (1) involves acquiring omnidirectional, continuous multi-frame images under grating-type rotating lighting, as detailed below:

[0050] The tiny workpiece to be inspected, such as Figure 3 As shown, the workpiece has an outer diameter of 3.35 mm, a height of 1.225 mm, a thin edge outer diameter thickness of 0.2 mm, and a thick edge outer diameter of 0.375 mm.

[0051] First, such as Figure 2 As shown, a hardware platform for acquiring continuous multi-frame images under grating-type rotating lighting was constructed. The grating plate has a 10° cutout angle, an 8° non-cutout angle, a 70mm outer diameter for the cutout, and an overall structural outer diameter of 80mm. The camera has 1.3 megapixels and a frame rate of 60fps. The telecentric lens has a magnification of 1.0, an object-side telecentricity of less than 0.1°, and an object-side working distance of 110mm. The light source is a blue bottom backlight with a power of 5.3W and a luminous surface length of 58mm.

[0052] Then, to ensure that the location of the defect can be imaged within the bright field of view, dark field of view, and the boundary between bright and dark fields of view, this embodiment sets each camera to continuously capture 4 images at a frame rate of 60fps, with an interval of 17ms between images, and the grid plate rotates at an angle of approximately 5°. The calculated angular velocity ω of the grid plate is 5.133rad / s.

[0053] It should be noted that during the imaging process, the bottom surface light source is momentarily blocked by the grid plate, resulting in alternating black and white stripes on the reflective surface of the workpiece. Light reflected from the workpiece surface appears as bright stripes on the industrial camera. When there are defects on the surface, the light may be reflected in other directions, forming dark areas. Adjacent areas are blocked by the grid plate, resulting in dark stripes. When there are defects on the surface, light from other areas may be reflected to the camera, forming bright areas.

[0054] Finally, when the workpiece is moved to the center of the grating plate via the glass stage, the workpiece remains stationary while the grating rotates, triggering each camera to take four consecutive pictures. Each of the four stations obtains one set of images, with four pictures in each set.

[0055] The specific process for locating the detection area in step (2) is as follows:

[0056] The image of each station is positioned to determine the precise location of the detection area in the image. The cylindrical surface of the workpiece's outer diameter is imaged as an elliptical ring in the image. In step (1), each camera takes 4 consecutive photos to obtain 4 images. Each image needs to accurately locate the two elliptical rings imaged by the thin and thick outer diameters. The image processing procedure for each station is as follows: Figure 4 As shown:

[0057] 401. Select one image from the images taken at this workstation as a sample.

[0058] 402. Extract the area of ​​the workpiece to be detected in the image as a template for the station where the camera is located. By using the template matching method, determine the approximate position of the area of ​​the workpiece to be detected in the multi-frame images of each workpiece at the station, thereby achieving coarse localization of the area of ​​the workpiece to be detected in the image.

[0059] 403. Establish a reference position based on the approximate position of the area of ​​the workpiece to be inspected in the image.

[0060] 404. Use calipers to determine the edge points of the ellipse and perform ellipse fitting on the edge points to achieve precise positioning and establish a new reference position.

[0061] It should be noted that the image shape of the workpiece's bottom surface is an ellipse. The position of the ellipse's edge is determined at the reference position established at 403. Sixty calipers are continuously set along the ellipse's edge, with a length of 45 and a width of 10, to determine 60 edge points. Ellipse fitting is then performed on these 60 edge points to obtain the precise position of the workpiece's bottom surface in the image and establish a new reference position.

[0062] 405. Determine the elliptical annular region imaged by the thin edge to be inspected in the image at the reference position established in 404.

[0063] 406. Determine the elliptical annular region imaged by the thick edge to be inspected in the image at the reference position established in 404.

[0064] Repeat steps 403 to 406; the four images from this station can yield eight detection areas.

[0065] Each of the four workstations produces one set of images, with eight detection areas in each set.

[0066] The specific process of stitching together multiple images to accurately detect the region is as follows:

[0067] First, convert the elliptical annular region of the image for each workstation into a rectangular region, and then define the pixels within the elliptical annular region (el). x ,el y The point mapped to the pixel within the rectangular region is (rect)x ,rect y The grayscale value of each pixel within the rectangular area is calculated according to the following mapping formula.

[0068]

[0069]

[0070] el x =O x +el r ×cos(el θ (3)

[0071] el y =O y +el r ×sin(el θ (4)

[0072] Then, each station stitches together multiple rectangular regions from consecutive frames of images of each workpiece at that station. First, the elliptical ring regions formed by the thin edges of the four images are stitched together in sequence, and then the elliptical ring regions formed by the thick edges of the four images are stitched together in sequence to obtain a stitched image of the detection area of ​​the workpiece at that station.

[0073] Finally, each of the four workstations obtains a stitched image of the inspection area, and the area corresponding to each stitched image is no less than a cylindrical surface within a 90-degree range of the workpiece's outer diameter.

[0074] At this point, the image acquisition for detecting defects on the outer diameter cylindrical surface of a tiny workpiece is complete.

[0075] A comparison diagram of the image acquisition method provided by this invention and the imaging results obtained by other methods is shown below. Figure 5 As shown, this method uses multiple frames taken at the same location to image the outer cylindrical surface of the workpiece under bright field, dark field, and light-dark boundary field, making the obtained image more feature-rich and better capturing the defects of the workpiece. At the same time, the detection areas of multiple frames are stitched together into one image, increasing the proportion of defects in the image and making the defects more obvious and prominent, which is beneficial for subsequent detection.

Claims

1. An image acquisition method for detecting defects on the outer diameter cylindrical surface of a small workpiece, characterized in that... Includes the following steps: (1) Acquiring omnidirectional, continuous multi-frame images under grating-type rotating lighting; Under the grating-type rotating lighting, the cameras at 4 stations image the outer diameter cylindrical surface of the workpiece from all directions. Each camera continuously captures multiple frames, so that the same position on the cylindrical surface is imaged under the bright field of view, dark field of view, and light-dark boundary field of view respectively. (2) Precisely locate the detection area; The image at each workstation is localized to determine the precise location of the detection area in the image, while ignoring the background and non-detection areas. (3) Accurate detection area by stitching together multiple frames of images; Each workstation performs affine transformation on the precise detection area of ​​each workpiece in the multi-frame image of that workstation and stitches them together into one image to increase the proportion of defects in the image. The characteristic of step (1) is the acquisition of omnidirectional, continuous multi-frame images, as follows: The workpiece is illuminated by grating-type rotating lighting. Each of the four stations is equipped with an industrial camera with a telecentric lens to image the outer cylindrical surface of the tiny workpiece from all directions. The image of each station corresponds to a range of no less than 90 degrees of the outer cylindrical surface of the workpiece. Each camera continuously captures multiple frames, so that the same position of the cylindrical surface is imaged in the bright field, dark field, and light-dark boundary field of view. The angular velocity ω of the grid plate is determined based on the perforation angle α, the non-perforation angle β, the camera frame rate f, and the number of consecutive camera shots n. Each camera takes n consecutive photos while the grid plate rotates, resulting in n images of the same location captured in the bright field, dark field, and light-dark boundary field of view. A total of 4n images are obtained for each workpiece.

2. The image acquisition method for detecting defects on the outer diameter cylindrical surface of a micro workpiece according to claim 1, characterized in that... Step 2: Precisely locate the detection area through coarse and fine positioning; Coarse localization refers to determining the approximate location of the workpiece region to be detected in the image, as detailed below: ① Select one image from each camera as a sample, and manually extract the area of ​​the workpiece to be inspected from the image as a template for the station where the camera is located; ② Using this template, the approximate location of the workpiece area to be detected in multiple frames of images of each workpiece at this workstation is determined by template matching method; Fine positioning refers to determining the precise location of the detection area, as detailed below: ① Using the approximate position of the workpiece area to be inspected as the reference position, place a rectangular caliper with the same pixel size at the edge of the ellipse imaged on the bottom surface of the workpiece, perpendicular to the tangent of the edge point. For each rectangular caliper, the number of pixels on the long side is u, and the number of pixels on the short side is v. Divide the rectangle into u equal parts, each part containing v×1 pixels. Add the gray values ​​of the v pixels in each part to obtain a one-dimensional array containing u elements. Calculate the difference between two adjacent elements in the one-dimensional array and extract the position with the largest difference as the edge point of the ellipse. ② Repeat step ① above to extract all the elliptical edge points in the calipers; ③Use the above edge points to fit an ellipse, so that E RMS Minimum, d i This is the sum of the distances from the edge point to the two foci of the ellipse. The specific process is as follows: ④ Establish a new reference position based on the fitted ellipse to determine the precise detection area in the image.

3. The image acquisition method for detecting defects on the outer diameter cylindrical surface of a micro workpiece according to claim 1, characterized in that... Step 3: For each workstation, the precise detection area from multiple frames of images of each workpiece at that workstation is subjected to affine transformation and stitched together into a single image, as detailed below: The elliptical annular region of the image obtained from each workstation is converted into a rectangular region, and the pixels within the elliptical annular region (el... x ,el y The pixels mapped to the rectangular area are (rect) x ,rect y ), length of rectangle rect l Equal to the outer ellipse arc length and width rect w The width of the elliptical annulus is equal to the semi-major axis of the outer ellipse, which a The semi-minor axis is el b The outer center of the ellipse (O) x O y Establish a polar coordinate system centered at θ1, with the starting angle of the elliptical ring being θ1 and the ending angle being θ2. Any pixel on the elliptical ring can be represented by el. r and el θ To illustrate, the specific process is as follows: he x =O x +the r ×cos(the θ ) (5) he y =O y +the r ×sin(the θ ) (6) Each workstation stitches together multiple rectangular regions obtained from multiple frames of images of each workpiece at that workstation to obtain a stitched image of the detection area of ​​the workpiece at that workstation. The area corresponding to the stitched image is not less than the cylindrical surface within a 90-degree range of the outer diameter of the workpiece.

Citation Information

Patent Citations

  • System for visually detecting workpiece appearance defects based on image processing

    CN106053479A

  • Image splicing method for large-diameter optical crystal surface micro-defect detection

    CN108760766A