Shaft part measuring method and device, medium and equipment
By combining a visible light source, an electric turntable, and a camera, the problem of rapid and accurate measurement of the three-dimensional contour and wall thickness of small shaft components was solved. This enabled the three-dimensional reconstruction and dimensional calculation of high-transmittance devices, avoiding the shortcomings of traditional methods and providing an efficient measurement solution.
Patent Information
- Application Number
- CN202511481665.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-10-16
AI Technical Summary
Existing optical inspection technologies struggle to quickly and accurately measure the three-dimensional contours and wall thicknesses of small shaft components, especially those made of transparent materials. These technologies suffer from problems such as low reflectivity due to high transmittance, low accuracy of multi-angle data stitching, and limited accuracy due to reliance on specific light sources.
A visible light source and an electric turntable are combined with a camera. Images are acquired at preset angle intervals by rotating shaft components. Three-dimensional point cloud contours are generated using Radon transform and inverse Radon transform. Combined with image expansion algorithm, the turntable error is corrected to achieve three-dimensional reconstruction and size calculation.
It enables rapid and accurate three-dimensional contour and wall thickness measurement of small shaft parts, avoiding destructive processing and complex optical processing of the parts, and improving measurement accuracy and applicability.
Smart Images

Figure CN120947528A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of optical measurement technology, and in particular to a method, apparatus, medium and device for measuring shaft components. Background Technology
[0002] Small shaft components, such as thin-walled hemispheres, cylinders, and cones made of glass or plastic, are widely used in aerospace, precision physics, defense science and technology, and optical engineering. For example, hemispherical shafts are typical small shaft components, as are dust covers for some sensors. Because the critical dimensions of small shaft components often affect their precise constraint on the pose of other devices and their modulation of the light field, the detection of their three-dimensional contours and thickness becomes the best basis for evaluating application effectiveness. Furthermore, the manufacturing processes of such components, such as injection molding and blow molding, have high uncertainties, resulting in poor shape consistency in mass-produced components. Therefore, rapid shape inspection is also necessary to screen out defective products.
[0003] Small shaft components typically possess characteristics such as high transmittance, complex shapes, and thin walls. Optical inspection technology is currently the most common high-precision non-destructive testing technique, and it generally belongs to the reflective measurement method, meaning it requires information contained in the reflected light from the shaft component under test. However, high transmittance makes it difficult to measure using optical inspection techniques because most of the incident light is refracted rather than reflected into the sensor. Currently, optical 3D contour measurement of transparent material devices mainly relies on enhancing the reflection process, such as by covering the surface with a Lambertian reflective coating, like talcum powder or matte paint, or immersing the device under test in a liquid, but these methods are prone to surface damage and are cumbersome. Another solution is to collect data from the shaft component under test from multiple angles, reconstruct the reflective areas at each angle, and achieve 3D reconstruction through stitching. For example, some studies use motion weaving to identify and calculate the 3D contour of transparent objects. This method involves moving the camera to simultaneously capture multiple images of the object, and then manually or through deep learning to mark feature points for calculation. However, the blind nature of this method leads to reduced accuracy and increased time consumption. Furthermore, ultraviolet light sources can enhance reflectivity. Some researchers have proposed using fluorescence generated on the surface of an object under ultraviolet laser irradiation to measure transparent devices. Line-structured light combining ultraviolet multispectral and optical triangulation can measure the three-dimensional contour of a highly transmissive outer surface, but it cannot measure the inner contour and wall thickness. Some studies use a transmission method, irradiating the device with backlight and photographing the projected contour from the other side, allowing for two-dimensional contour reconstruction. However, the superposition of contour projections causes aliasing and affects the measurement, and this method cannot measure three-dimensional contours. While techniques such as spectral confocal microscopy can measure the wall thickness of transparent devices, they are limited by range and angular characteristics, often requiring multi-degree-of-freedom measurements along local direction vectors, a complex process that requires local direction vectors as a prerequisite for path planning. In transmission optical detection techniques, X-ray-based computed tomography (CT) can measure the contour and wall thickness of transparent devices, but its relatively low resolution and radioactivity limit its widespread adoption. Based on the above analysis, current optical inspection technology lacks a fast and universal method that can simultaneously measure the three-dimensional profile and wall thickness of small shaft components. Summary of the Invention
[0004] To address the aforementioned technical problems, this application provides a method, apparatus, medium, and device for measuring shaft components, which at least partially solves the problems existing in the prior art.
[0005] In a first aspect of this application, a method for measuring shaft components is provided, applied to a shaft component measuring system, the shaft component measuring system including a visible light source, an electric rotary table, and a camera; the method includes: The shaft to be tested is placed on an electric turntable; wherein the position of the shaft to be tested on the electric turntable is such that the shaft to be tested does not exceed the field of view of the camera during rotation. During the rotation of the shaft under test by the electric turntable, an image of the shaft under test is captured by the camera at preset rotation angle intervals until the electric turntable rotates the shaft under test 360 degrees, at which point it stops, thus obtaining a number of images of the shaft under test; during the rotation of the shaft under test by the electric turntable, a visible light source continuously illuminates the shaft under test. If the rotation axis center of the electric turntable does not coincide with the image center of the image of the shaft component to be tested, the image of the shaft component to be tested is expanded and the grayscale information is translated according to the rotation angle, image length, pixel distance and the image length of the preset expanded image corresponding to each image of the shaft component to be tested, so as to obtain the three-dimensional point cloud contour of the shaft component to be tested; wherein, the pixel distance is obtained according to the eccentric distance and rotation angle; The dimensional information of the shaft component to be measured is calculated based on the 3D point cloud profile.
[0006] In a second aspect of this application, a shaft measuring device is provided, applied to a shaft measuring system, the shaft measuring system including a visible light source, an electric turntable, and a camera; the device includes: A placement unit is used to place the shaft-like component to be tested on an electric turntable; wherein the placement position of the shaft-like component to be tested on the electric turntable ensures that the shaft-like component to be tested does not exceed the field of view of the camera during rotation. The image acquisition unit is used to acquire an image of the shaft to be tested at preset rotation angle intervals during the rotation of the shaft to be tested by the electric turntable, until the electric turntable rotates the shaft to be tested 360 degrees, and then stops, so as to obtain a number of images of the shaft to be tested; wherein, during the rotation of the shaft to be tested by the electric turntable, a visible light source continuously illuminates the shaft to be tested. The point cloud acquisition unit is used to perform image expansion and grayscale information translation on the image of the shaft to be tested, based on the rotation angle, image length, pixel distance, and image length of a preset extended image, if the rotation axis center of the electric turntable does not coincide with the image center of the image of the shaft to be tested, so as to obtain the three-dimensional point cloud contour of the shaft to be tested; wherein, the pixel distance is obtained based on the eccentric distance and rotation angle; The dimension acquisition unit is used to calculate the dimension information of the shaft-type component to be measured based on the 3D point cloud contour.
[0007] In a third aspect of this application, a non-transitory computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored in the storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the aforementioned shaft component measurement method.
[0008] In a fourth aspect of this application, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0009] This application has at least the following beneficial effects: The shaft measurement method provided in this application places the shaft to be measured on an electric turntable, ensuring that it does not exceed the camera's field of view during rotation, thus guaranteeing complete image acquisition. Subsequently, under continuous visible light illumination while the workpiece rotates on the electric turntable, images are acquired at preset angle intervals, providing a multi-view data foundation for subsequent 3D reconstruction. When there is a deviation between the center of the electric turntable's axis and the image center, an image expansion algorithm is used to expand and translate grayscale information to correct the turntable error. This solves the problem of deviation between the image center acquired by the camera and the center of the electric turntable's axis caused by camera position deviation, without requiring camera position adjustment. Then, a three-dimensional point cloud contour is obtained based on the corrected image, making the obtained three-dimensional point cloud contour more accurate. Finally, the size information is calculated based on the three-dimensional point cloud contour. This method does not require the use of reflective coatings or liquid immersion to enhance reflection, which may damage the workpiece or is cumbersome, as in traditional methods. It also avoids the low accuracy and limited applicability of methods such as multi-angle data acquisition and splicing or reliance on specific light sources (such as ultraviolet light sources). It can quickly and universally realize the measurement of the three-dimensional contour and wall thickness of small shaft parts, effectively addressing the need for rapid detection and screening of such devices with high transmittance, complex shape, small wall thickness, and poor processing consistency. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart of a shaft measurement method provided in an embodiment of this application; Figure 2 Here is a structural diagram of the shaft-type component measurement system; Figure 3 The simulation results of the reconstruction using the inverse Lardon transform are shown; among them, Figure 3 (a) is the original image before Radon transform; Figure 3 (b) is the grayscale information image after Radon transform; Figure 3 (c) is the reconstructed image after the inverse Radon transform; Figure 4 This is a schematic diagram of the image expansion algorithm. Figure 5 This is a diagram illustrating the 3D reconstruction process of a non-transparent sphere based on the filtered back projection method; where, Figure 5(a) is a simulated standard sphere outline diagram; Figure 5 (b) is a reverse projection effect at a single height; Figure 5 (c) is a diagram showing the result of the 3D contour reconstruction; Figure 6 This is a 3D reconstruction image of a non-transparent sphere when the axis is misaligned; among them, Figure 6 (a) is a diagram showing the pose error of the axis of rotation; Figure 6 (b) is a simulated standard sphere outline diagram; Figure 6 (c) Reverse projection effect at a single height; Figure 6 (d) shows the result of the 3D contour reconstruction. Figure 7 This is a diagram showing the measurement results of a non-transparent standard sphere; among them, Figure 7 (a) is the standard sphere being measured; Figure 7 (b) is the acquired contour image; Figure 7 (c) shows the reverse projection effect at a single height; Figure 7 (d) shows the result of the three-dimensional contour reconstruction; Figure 8 The measurement results are for a transparent spherical shell; Figure 8 (a) is the spherical shell being measured; Figure 8 (b) is the acquired contour image; Figure 8 (c) Reverse projection effect at a single height; Figure 8 (d) shows the result of the three-dimensional contour reconstruction; Figure 9 This is a structural block diagram of the shaft measuring device provided in the embodiments of this application. Detailed Implementation
[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0013] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, apparatus, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatuses.
[0014] It should be noted that the following description covers various aspects of embodiments within the scope of the appended claims. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this application, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0015] Please refer to Figure 1 and Figure 2 As shown, embodiments of this application provide a method for measuring shaft components, applied to a shaft component measurement system, such as... Figure 2 As shown, the shaft component measurement system includes a visible light source, an electric turntable, and a camera. The electric turntable is used to place and rotate the component under test (i.e., the shaft component to be measured). Above the turntable, there is a real light source to provide illumination for the measurement. Directly in front of the turntable, a real camera is positioned to capture images of the component under test. Furthermore, on the left and right sides of the system, there are virtual cameras and virtual light sources, respectively. These virtual cameras and light sources may be used to simulate or assist the measurement process, working in conjunction with the real cameras and light sources from different angles to achieve a more comprehensive and accurate measurement of the component under test.
[0016] The method includes: S100, the shaft to be tested is placed on an electric turntable; wherein the position of the shaft to be tested on the electric turntable is such that the shaft to be tested does not exceed the field of view of the camera during rotation.
[0017] Specifically, the shaft-like components to be tested have characteristics such as high transmittance, complex shape, and thin wall thickness, such as thin-walled hemispheres, cylinders, cones, and other shells made of glass or plastic.
[0018] The industrial camera was calibrated using a checkerboard pattern, while the positioning accuracy of the turntable was calibrated using an interferometer. Based on the analysis of the calculations and errors, the part under test does not need to be placed in the center of the electric turntable in principle; it is only necessary to ensure that it does not deviate from the camera's field of view during rotation.
[0019] S200: During the rotation of the shaft to be tested by the electric turntable, an image of the shaft to be tested is captured by the camera at preset rotation angle intervals until the electric turntable rotates the shaft to be tested 360 degrees, at which point it stops, so as to obtain a number of images of the shaft to be tested; wherein, during the rotation of the shaft to be tested by the electric turntable, a visible light source continuously illuminates the shaft to be tested.
[0020] Specifically, as an example: the preset rotation angle interval can be 2°. Then, after the electric turntable drives the shaft to be tested to rotate 360 degrees, 180 photos with a resolution of 1024×1280 are obtained.
[0021] The transmitted grayscale information of light emitted from a visible light source after passing through the shaft under test is captured by a camera. Controlling the rotation of the shaft under test via a turntable can be considered as the camera and light source continuously rotating relative to the shaft, thus enabling image acquisition of the shaft under test at different angles. Transparent thin-walled materials absorb and reflect transmitted light, darkening its grayscale. Without considering the angle of refraction, this process approximates the Radon transform. Besides shafts under test (small shafts), this system can also measure the outer contours of some non-transparent devices.
[0022] The Radon transform process essentially involves projecting and superimposing the elements of a matrix along various angles. The Radon transform of an image is the projection and sum of the grayscale values of its pixels. As the angular interval decreases, the result of the Radon transform can contain richer numerical and positional information about the matrix elements.
[0023] As shown in formula (1), the projection intensity information of the Radon transform at angle α is R(S, α), which can be expressed as matrix element f(x, y) and impulse function. In the real number space R 2 The double integral of the inner quadratic over x and y, where s is the index of the intensity array; impulse function. The value is 1 only when formula (2) is satisfied, and 0 otherwise, which means that R(S, α) is summed only along a single line. Formulas (1) and (2) are as follows: (1) (2) Here, f(x,y) represents the contour information of the shaft component under test within a certain cross section XOY along the z direction, where x and y are the horizontal and vertical indices of the matrix, respectively, and specifically correspond to the actual x and y coordinate positions in the measurement coordinate system.
[0024] The inverse Radon transform is obtained by performing a two-dimensional inverse Fourier transform on R(S, α), and the derivation of this process is as follows: As shown in equation (3), a Fourier transform of R(S, α) with respect to s is performed, because the impulse function only exists on the straight line. The above condition holds true, so substituting this constraint into the formula yields the expression on the right side.
[0025] (3) Let k x =kcosα,k y =ksinα, we can get formula (4), which is exactly the two-dimensional Fourier transform of f(x,y). So the essence of the Radon transform in the frequency domain is the two-dimensional Fourier transform of f(x,y) along each angle. Then, the inverse Radon transform can be achieved by performing a two-dimensional inverse Fourier transform on the Radon transform result R(S,α) along each angle s in the frequency domain and summing the results.
[0026] (4) Directly implementing the inverse Fourier transform using the inverse Fourier transform method requires performing a Fourier transform and a two-dimensional inverse Fourier transform, which is time-consuming but highly accurate. In practice, direct backprojection and filtered backprojection methods are commonly used. Direct backprojection applies the same R(S, α) to each element along the projection line, which is fast but has the lowest accuracy and is prone to introducing additional noise. Filtered backprojection adds a filtering step to the direct backprojection method, filtering out some low frequencies and sharpening the edges. Filtered backprojection combines high efficiency and a high signal-to-noise ratio.
[0027] The Radon transform and inverse Radon transform were reproduced through simulation, and a square image was simulated (see...). Figure 3 (a) The reconstruction process after Radon transform and inverse Radon transform (see...) Figure 3 (b)). The grayscale information R(S, α) obtained at each angle after Radon transform is represented in columnar form and plotted together on [the graph]. Figure 3 (c) exhibits a periodic undulating shape similar to a sine curve. The length of the reconstructed square is the same as that of the original square.
[0028] S300, if the rotation axis center of the electric turntable does not coincide with the image center of the image of the shaft component to be tested, then the image of the shaft component to be tested is expanded and the grayscale information is translated according to the rotation angle, image length, pixel distance and the image length of the preset extended image corresponding to each image of the shaft component to be tested, so as to obtain the three-dimensional point cloud contour of the shaft component to be tested; wherein, the pixel distance is obtained according to the eccentric distance and rotation angle.
[0029] Specifically, such as Figure 4 The image expansion algorithm principle shown is as follows: if the rotation center of the motorized turntable does not coincide with the image center of the image of the shaft to be tested, this deviation is due to the fact that the straight line containing the camera's optical axis (the angle bisector of the field of view) does not pass through the rotation center of the motorized turntable, meaning there is a deviation in the camera's position. The result reflected in the image is that the rotation center of the motorized turntable does not coincide with the image center of the image of the shaft to be tested. In this case, the image of the shaft to be tested is expanded and its grayscale information is translated according to the rotation angle, image length, pixel distance, and the preset image length of the expanded image corresponding to each image of the shaft to be tested, to obtain the 3D point cloud contour of the shaft to be tested. Specifically, this includes: S310, if the rotation center of the electric turntable does not coincide with the image center of the image of the shaft component to be tested, then obtain the eccentricity distance corresponding to each image of the shaft component to be tested; wherein, the eccentricity distance is the distance between the image center of the corresponding image of the shaft component to be tested and the rotation center of the electric turntable. S320, based on the eccentricity distance and rotation angle corresponding to each shaft component image to be tested, the pixel distance between the image center of each shaft component image to be tested and the image center of the preset extended image is obtained; wherein, the image length of the preset extended image is greater than the image length of the shaft component image to be tested; S330, based on the rotation angle, image length, pixel distance, and image length of the preset extended image corresponding to each shaft component image to be tested, the pixel grayscale information of each shaft component image to be tested is translated to the corresponding position of the preset extended image to obtain the shaft component extended image corresponding to each shaft component image to be tested; wherein, each shaft component extended image to be tested contains all the grayscale information of the corresponding shaft component image to be tested; S340: Based on the extended image of the shaft component to be tested corresponding to each image of the shaft component to be tested, obtain the three-dimensional point cloud contour of the shaft component to be tested.
[0030] Here, as an example: obtain the eccentricity distance d corresponding to any image of the shaft-type component under test, which can be determined based on the motion trajectory of the component in the image. Since the trajectory is symmetrical about the turntable axis, the pixel index corresponding to the axis can be determined by taking the centroid of the projected contour of the component and calculating the rotation center, and then the eccentricity distance d corresponding to the image of the shaft-type component under test can be calculated.
[0031] The measurement area M is determined by mapping the image with the largest eccentricity at 0° or 90° of the shaft component under test onto the plane containing the shaft axis using a pinhole imaging model. First, the acquired image is expanded to a sufficient length (usually twice the length of the original image) to include all the grayscale information from the original image. For this purpose, the image center P of the shaft component under test needs to be calculated. c In the expanded image of the shaft component to be tested The pixel distance L between them. Let the rotation angle be θ, then the movement distance can be obtained by formula (5). When θ varies from 0° to 180°, L is positive, representing the pixel distance P in the image. c exist On the left, this bias is negative when θ is between 180° and 360°, representing P. c exist Right side.
[0032] (5) Expand the pixel grayscale of the image Compared to the pixel grayscale of the original image The relationship is: (6) Here, n i '=n i-Lcosθ This indicates the corresponding position of the pixel grayscale value in the image of the shaft component under test in the expanded image of the shaft component under test; n i =0 indicates the position of the black fill in the expanded image of the shaft component to be tested.
[0033] According to the above correction process, the image center of the expanded image of the shaft component under test coincides with the actual shaft center.
[0034] Therefore, this application expands the original image of each shaft component under test, ensuring that the image center of the expanded image coincides with the actual rotation center. This eliminates the need to move and reset the camera, thus achieving camera positioning correction. This saves time and resources and improves processing efficiency.
[0035] Further, obtaining the three-dimensional point cloud contour of the shaft-like component to be tested includes: S360, the extended image of each shaft component under test is divided into layers by row, and each layer is independently filtered and back-projected to obtain the projection data corresponding to each layer of the extended image of each shaft component under test.
[0036] S370, the projection data of each layer of the extended image of each shaft component under test is filtered and then reconstructed layer by layer to obtain the three-dimensional point cloud contour of the shaft component under test; wherein, the pixel distance is obtained according to the eccentric distance and the rotation angle.
[0037] Here, a measurement process involving rotating a non-transparent sphere 360° and taking images at 2° intervals resulted in a total of 180 photos with a resolution of 1024×1280. The outline of the standard sphere at 0° is shown below. Figure 5 As shown in (a), the reconstruction process based on inverse pull transform is performed layer by layer along the Z direction, with each layer defined by image rows. The resolution in the Z direction depends on the number of pixels per row of the camera's CCD. The contour of a certain layer reconstructed in the pixel coordinate system based on the filtered back projection method is shown below. Figure 5 As shown in (b), the unidirectional backprojection process affects the matrix elements traversed by each projection line, easily generating star-shaped artifact noise. This is particularly severe when using the direct backprojection method, while the filtered backprojection method can suppress this problem to some extent. Artifacts outside the sphere's contour can be effectively removed by thresholding, and the removal effect increases with the increase of the angle sampling interval. In the pixel coordinate system, the 3D reconstruction result of the sphere is as follows... Figure 5 As shown in (c), the spherical contour is well recovered. Since the camera is focused on a plane passing through the axis of the turntable, the mapping relationship between pixels and actual spatial distances can be calculated using checkerboard calibration.
[0038] If the center of the rotating axis of the electric turntable does not coincide with the image center of the image of the shaft to be measured, and no correction is performed, the back projection process needs to construct the mapping relationship between grayscale information R(S, α) and the corresponding matrix elements along the projection line at angle α. Therefore, the position error of the rotating axis during image acquisition will directly affect the position of the projection line on the matrix, thus causing errors in the mapping relationship. Because the turntable surface and the camera CCD can be leveled using a high-precision bubble level on the electric turntable (leveling accuracy better than 0.02mm / m), therefore... Figure 6 As shown in (a), the position error of the electric turntable is usually only manifested as the offset distance between the turntable axis and the CCD meridional plane. Figure 6 (b)-(d) show the reconstruction results of the non-transparent sphere under the simulated error. Because the sphere outline will be misaligned when back-projecting around the center of the image matrix, the reconstruction results have obvious ghosting point clouds.
[0039] After correction using the above method, simulations were performed on the correction strategy. In one embodiment, the original image size was set to 1024×1280, resulting in a measurement area of 1024×1024. Assuming d = 40, a series of simulated images were generated at sampling intervals of 10°. During the solution process, the expanded measurement area size was 2048×2048. After applying the correction strategy, the reconstruction of the rectangle, excluding artifacts, showed good results, and its size was consistent with the original size. In contrast, the reconstruction results without axis correction exhibited obvious ghosting, and the contrast of the reconstructed contours was poor.
[0040] S400 calculates the dimensional information of the shaft component to be measured based on the 3D point cloud profile.
[0041] Specifically, step S400 also includes: S410 performs polynomial fitting on the inner and outer contours to calculate the three-dimensional contour information of the shaft component under test. S420: Extract arbitrary cross-sections for local thickness evaluation to obtain local thickness information.
[0042] Specifically, step S410 can be obtained through the following steps: From the 3D point cloud data, the inner and outer boundary point sets of the shaft component under test are separated. For shaft components, the inner and outer contours of each layer can be extracted by projecting onto the XOY plane and performing edge detection. Data preprocessing: Outlier removal is performed, for example, using statistical filtering or radius filtering. The contour points are sorted in circumferential order to facilitate subsequent fitting. Polynomial fitting is performed: Least squares polynomial fitting is performed on the inner and outer contour point sets of each layer. Commonly used fitting functions are: circle fitting: suitable for ideal shaft components, fitting the center coordinates (x0, y0) and radius r; ellipse fitting: suitable for cases with slight deformation or measurement tilt; higher-order polynomial: suitable for complex cross-sectional contours. Finally, the dimensions are calculated: diameter: obtained by multiplying the radius of the fitted circle by 2; ellipticity: the difference between the major and minor axes of the ellipse; coaxiality: the offset of the centers of different layers in the axial direction (Z-axis); length: the range covered by the contour along the Z-axis.
[0043] Step S420 can be obtained through the following steps: First, select the cross-sectional location to be evaluated, such as: a cross-section at a fixed axial position (perpendicular to the Z-axis); or an oblique section at any tilt angle. Extract the point set of this cross-section from the 3D point cloud. Then, align the coordinates of the inner and outer contour point sets of the cross-section to ensure that the measurement results are from the same radial position. This is then achieved using least-squares alignment or centroid alignment methods. Finally, the calculation process involves calculating the Euclidean distance between corresponding points on the inner and outer contours, which is the local thickness at that point. The following methods can also be used to improve accuracy: sampling in multiple angular directions and calculating the average thickness; smoothing and filtering the thickness data to reduce measurement noise. Finally, a local thickness distribution curve or heatmap can be generated, and the maximum / minimum thickness, thickness deviation, and uniformity indicators can be calculated.
[0044] In one exemplary embodiment of this application, after step S300, the method further includes: S500 removes noise points from the 3D point cloud contour using the KD tree nearest neighbor filtering algorithm.
[0045] Specifically, the KD tree nearest neighbor filtering algorithm is used to remove noise points from the 3D point cloud contour.
[0046] In one exemplary embodiment of this application, after step S200, the method further includes: S600 performs binarization processing on the image of each shaft component to be tested and extracts the contour edges.
[0047] Specifically, to reduce the influence of ambient light, the image of each shaft component under test is binarized to extract the contour edges, and then reconstructed.
[0048] The method provided in this application is illustrated below through specific embodiments. Example 1
[0049] The industrial camera was calibrated using a checkerboard pattern, while the turntable's positioning accuracy was calibrated using an interferometer. Based on the analysis of the calculations and errors, the part under test does not need to be placed in the center of the motorized turntable; it only needs to be ensured that it does not deviate from the field of view during rotation. Key hardware parameters are shown in Table 1.
[0050] Table 1 Key parameters of the hardware device Devices Key parameters numerical values camera CCD resolution 1920×1440 Lens focal length 16mm turntable Angular positioning accuracy 0.01° angular interval 2° light source brightness 1000cd Measured such as Figure 7 (a) shows a non-transparent standard sphere with a nominal radius of 12.703 mm. The acquired image is as follows. Figure 7 As shown in (b). To reduce the influence of ambient light, the image is binarized and contours are extracted. The reconstructed standard sphere is as follows. Figure 7 As shown in (c)-(d), the fitted radius is 12.7043 mm, and the RMS of the surface shape deviation is 0.0235 mm. Although the inverse Lardon transform is prone to generating a certain amount of noise points during 3D reconstruction, the noise is uniform, so its impact on the evaluation of radius fitting and size fitting is relatively small. Example 2
[0051] The measurement process for a hemispherical shell is as follows: Figure 8 As shown in (a)-(d), due to the spherical shell being a low-precision industrial part, a large number of noise points appear in the reconstruction results. After calculation using a 3D point cloud filtering algorithm based on KD-tree nearest neighbor constraints, Figure 8 The internal structural features can be well reflected in the two-dimensional cross-sectional profile of (d).
[0052] Please refer to Figure 9 As shown, an embodiment of this application provides a shaft-type component measuring device 100, the device comprising: The placement unit 110 is used to place the shaft component to be tested on the electric turntable; wherein the placement position of the shaft component to be tested on the electric turntable is such that the shaft component to be tested does not exceed the field of view of the camera during rotation. The image acquisition unit 120 is used to acquire an image of the shaft to be tested by a camera at preset rotation angle intervals during the rotation of the shaft to be tested by the electric turntable, until the electric turntable rotates the shaft to be tested 360 degrees, and then stops, so as to obtain a number of images of the shaft to be tested; wherein, during the rotation of the shaft to be tested by the electric turntable, a visible light source continuously illuminates the shaft to be tested. The point cloud acquisition unit 130 is used to, if the rotation axis center of the electric turntable does not coincide with the image center of the image of the shaft component to be tested, perform image expansion and grayscale information translation on the image of the shaft component to be tested according to the rotation angle, image length, pixel distance and the image length of the preset extended image corresponding to each image of the shaft component to be tested, so as to obtain the three-dimensional point cloud contour of the shaft component to be tested; wherein, the pixel distance is obtained according to the eccentric distance and rotation angle; The dimension acquisition unit 140 is used to calculate the dimension information of the shaft-type part to be measured based on the three-dimensional point cloud contour.
[0053] Those skilled in the art will understand that various aspects of this application can be implemented as apparatus, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "apparatus."
[0054] An electronic device according to this embodiment of the present application. The electronic device is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.
[0055] Electronic devices are manifested in the form of general-purpose computing devices. The components of an electronic device may include, but are not limited to: at least one processor, at least one memory, and a bus connecting different device components (including memory and processor).
[0056] The memory stores program code that can be executed by a processor, causing the processor to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of this application.
[0057] The storage may include readable media in the form of volatile storage, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).
[0058] The storage device may also include a program / utility having a set (at least one) of program modules, including but not limited to: operating device, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0059] A bus can represent one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus that uses any of the various bus architectures.
[0060] The electronic device can also communicate with one or more external devices (such as keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (such as routers, modems, etc.). This communication can be performed via input / output (I / O) interfaces. Furthermore, the electronic device can communicate with one or more networks (such as local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter. As shown in the figure, the network adapter communicates with other modules of the electronic device via a bus. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID devices, tape drives, and data backup storage devices.
[0061] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this application.
[0062] In exemplary embodiments of this application, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible implementations, various aspects of this application may also be implemented as a program product including program code, which, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of this application described in the "Exemplary Methods" section above.
[0063] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0064] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in connection with an instruction execution device, apparatus, or apparatus.
[0065] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0066] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0067] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this application, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0068] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0069] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for measuring shaft-type components, characterized in that, An application to a shaft component measurement system, the shaft component measurement system comprising a visible light source, an electric rotary table, and a camera; the method comprising: The shaft to be tested is placed on an electric turntable; wherein the position of the shaft to be tested on the electric turntable is such that the shaft to be tested does not exceed the field of view of the camera during rotation. During the rotation of the shaft under test by the electric turntable, an image of the shaft under test is captured by the camera at preset rotation angle intervals until the electric turntable rotates the shaft under test 360 degrees, at which point it stops, thus obtaining a number of images of the shaft under test; during the rotation of the shaft under test by the electric turntable, a visible light source continuously illuminates the shaft under test. If the rotation axis center of the electric turntable does not coincide with the image center of the image of the shaft component to be tested, the image of the shaft component to be tested is expanded and the grayscale information is translated according to the rotation angle, image length, pixel distance and the image length of the preset expanded image corresponding to each image of the shaft component to be tested, so as to obtain the three-dimensional point cloud contour of the shaft component to be tested; wherein, the pixel distance is obtained according to the eccentric distance and rotation angle; The dimensional information of the shaft component to be measured is calculated based on the 3D point cloud profile.
2. The method for measuring shaft components according to claim 1, characterized in that, If the rotation axis center of the electric turntable does not coincide with the image center of the image of the shaft component to be tested, then the image of the shaft component to be tested is expanded and its grayscale information is translated according to the rotation angle, image length, pixel distance, and image length of the preset expanded image corresponding to each image of the shaft component to be tested, so as to obtain the three-dimensional point cloud contour of the shaft component to be tested, including: If the rotation center of the electric rotary table does not coincide with the image center of the image of the shaft component to be tested, then the eccentricity distance corresponding to each image of the shaft component to be tested is obtained; wherein, the eccentricity distance is the distance between the image center of the corresponding image of the shaft component to be tested and the rotation center of the electric rotary table. Based on the eccentricity distance and rotation angle corresponding to each shaft component image to be tested, the pixel distance between the image center of each shaft component image to be tested and the image center of the preset extended image is obtained; wherein, the image length of the preset extended image is greater than the image length of the shaft component image to be tested; Based on the rotation angle, image length, pixel distance, and image length of the preset extended image corresponding to each shaft component image to be tested, the pixel grayscale information of each shaft component image to be tested is translated to the corresponding position of the preset extended image to obtain the shaft component extended image corresponding to each shaft component image to be tested; wherein, each shaft component extended image to be tested contains all the grayscale information of the corresponding shaft component image to be tested. Based on the extended image of the shaft component to be tested corresponding to each image of the shaft component to be tested, the three-dimensional point cloud contour of the shaft component to be tested is obtained.
3. The method for measuring shaft components according to claim 2, characterized in that, The image length of the preset extended image is twice the image length of the image of the shaft component to be tested.
4. The method for measuring shaft components according to claim 2, characterized in that, The step of obtaining the 3D point cloud contour of the shaft component under test based on the extended image of the shaft component under test corresponding to each image of the shaft component under test includes: The extended image of each shaft component under test is divided into rows and layers. Each layer is independently filtered and back-projected to obtain the projection data corresponding to each layer of the extended image of each shaft component under test. After filtering the projection data of each layer of the extended image of each shaft component to be tested, layer-by-layer reconstruction is performed to obtain the three-dimensional point cloud contour of the shaft component to be tested; wherein, the pixel distance is obtained based on the eccentric distance and rotation angle.
5. The method for measuring shaft components according to claim 1, characterized in that, If the rotation axis center of the electric turntable does not coincide with the image center of the image of the shaft component to be tested, then the image of the shaft component to be tested is expanded and the grayscale information is translated according to the rotation angle, image length, pixel distance and the image length of the preset expanded image corresponding to each image of the shaft component to be tested, so as to obtain the three-dimensional point cloud contour of the shaft component to be tested. This also includes: Noise points in the 3D point cloud contour are removed using the KD tree nearest neighbor filtering algorithm.
6. The method for measuring shaft components according to claim 1, characterized in that, The calculation of the dimensional information of the shaft component to be measured based on the 3D point cloud contour includes: Polynomial fitting is performed on the inner and outer contours to calculate the three-dimensional contour information of the shaft component under test; Extract arbitrary cross-sections for local thickness assessment to obtain local thickness information.
7. The method for measuring shaft components according to claim 1, characterized in that, During the process of the electric turntable rotating the shaft to be tested, an image of the shaft to be tested is captured by a camera at preset rotation angle intervals, until the electric turntable rotates the shaft to be tested 360 degrees, at which point the process stops, thus obtaining a number of images of the shaft to be tested. This process also includes: The image of each shaft component to be tested is binarized to extract the contour edges.
8. A measuring device for shaft-like components, characterized in that, An apparatus for measuring shaft components, comprising a visible light source, an electric rotary table, and a camera; the apparatus includes: A placement unit is used to place the shaft-like component to be tested on an electric turntable; wherein the placement position of the shaft-like component to be tested on the electric turntable ensures that the shaft-like component to be tested does not exceed the field of view of the camera during rotation. The image acquisition unit is used to acquire an image of the shaft to be tested at preset rotation angle intervals during the rotation of the shaft to be tested by the electric turntable, until the electric turntable rotates the shaft to be tested 360 degrees, and then stops, so as to obtain a number of images of the shaft to be tested; wherein, during the rotation of the shaft to be tested by the electric turntable, a visible light source continuously illuminates the shaft to be tested. The point cloud acquisition unit is used to perform image expansion and grayscale information translation on the image of the shaft to be tested, based on the rotation angle, image length, pixel distance, and image length of a preset extended image, if the rotation axis center of the electric turntable does not coincide with the image center of the image of the shaft to be tested, so as to obtain the three-dimensional point cloud contour of the shaft to be tested; wherein, the pixel distance is obtained based on the eccentric distance and rotation angle; The dimension acquisition unit is used to calculate the dimension information of the shaft-type component to be measured based on the 3D point cloud profile.
9. A non-transitory computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the method as described in any one of claims 1-7.
10. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 9.
Citation Information
Patent Citations
Image measurement device and method for alignment-free axle center
CN108534713A
Three-dimensional data set acquisition and evaluation method and device with material universality
CN116295097A
Method and device for measuring surface texture and three-dimensional shape of cylinder
CN118362059A
Method for measuring three-dimensional contour and wall thickness of transparent thin-wall device
CN118533094A
Method and apparatus for inspecting defects of patterns
US20050110988A1