Micro-parts coaxiality measurement system and method based on HALCON
Through the HALCON technology coaxiality measurement system of micro-parts, the fast and accurate coaxiality measurement of micro-parts is achieved through image acquisition and processing, and the problems of low accuracy, low efficiency and high cost in the existing technology are solved. It is suitable for complex Measurement of shape and small size parts.
Patent Information
- Application Number
- CN202210649119.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-09
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2042-06-09
AI Technical Summary
The existing coaxial measurement technology for micro-parts has problems such as low accuracy, limited efficiency, high operational difficulty and high cost. Especially when facing complex shapes and small-sized parts, it is difficult to achieve fast and high-precision measurements.
Using the HALCON-based coaxial measurement system for micro-parts, including part support mechanism, visual image acquisition mechanism, fill light mechanism and image information processing mechanism, the non-contact and automated micro-parts are realized through image acquisition, feature extraction and coaxial calculation. Coaxial measurement of parts.
It realizes fast and accurate coaxial measurement of micro-parts, reduces measurement errors and costs, overcomes the shortcomings of manual measurement, and is suitable for industrial production needs.
Smart Images

Figure CN115420220B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of tiny parts measurement, and relates to the coaxiality measurement of tiny parts, and in particular to the coaxiality measurement of tiny parts based on HALCON technology. Background Art
[0002] With the development of aerospace and automobile manufacturing industries, the demand for advanced manufacturing technology continues to increase, and small and complex parts play an increasingly important role in various industrial fields. How to quickly and accurately assemble small parts has become one of the key factors in measuring the level of a country's manufacturing industry.
[0003] Coaxiality measurement is an important means to measure the assembly effect of tiny parts. Existing measurement technologies include traditional manual measurement and three-coordinate machine assembly measurement methods. The accuracy and efficiency of traditional manual measurement are extremely limited. As a milestone in the transition from manual measurement to modern automated measurement, the three-coordinate measuring machine not only effectively solves the measurement problem of tiny parts with complex shapes, but also ensures the measurement accuracy. Although the three-coordinate measuring machine can achieve high measurement accuracy, due to its contact measurement method, it takes a long time to measure. However, when facing the measurement difficulties of target parts with complex shapes and small sizes, the existing manual measurement and three-coordinate machine assembly measurement methods have the following problems:
[0004] (1) It is not possible to obtain measurement results intuitively and efficiently. The positioning of parts depends on the operator's visual inspection, which has high uncertainty, large errors and low measurement accuracy.
[0005] (2) The operation is difficult, there are tiny gaps in the parts, and due to the differences between individual parts, the measurement accuracy of the parts is discretely distributed;
[0006] (3) The commonly used three-coordinate measuring machine method is time-consuming and consumes a lot of manpower and material resources, and the measurement cost is too high. Summary of the invention
[0007] In view of the current technical status that there is a lack of methods for quickly and accurately measuring tiny parts, the purpose of the present invention is to provide a tiny parts coaxiality measurement system and method based on HALCON.
[0008] In order to achieve the above-mentioned invention object, the present invention adopts the following technical scheme:
[0009] The micro-part coaxiality measurement system based on HALCON provided by the present invention comprises:
[0010] Parts support mechanism, used to support tiny parts;
[0011] A visual image acquisition mechanism, which is located above the part support mechanism and is used to acquire images of tiny parts; the visual image acquisition mechanism includes an image acquisition unit and a lens connected to the image acquisition unit;
[0012] A fill light mechanism, used for filling light in the image acquisition range of the image acquisition mechanism, and arranged along the circumference of the lens window;
[0013] An image information processing mechanism is used to process the image collected by the image acquisition mechanism, extract the image of the tiny parts, and calculate the coaxiality of the collected image; the image information processing mechanism is communicatively connected with the visual image acquisition mechanism; the image information processing mechanism includes a HALCON image extraction unit and a coaxiality calculation unit; the HALCON image extraction unit is used to process the image collected by the image acquisition unit and extract the image of the tiny parts; the coaxiality calculation unit is used to calculate the coaxiality of the extracted tiny parts image;
[0014] The part support mechanism, the visual image acquisition mechanism and the fill light mechanism form an integrated design.
[0015] In the above-mentioned HALCON-based micro-part coaxiality measurement system, the part support mechanism includes a support plate and a connecting pillar arranged on the support plate, and the connecting pillar is used to connect the fill light mechanism located thereon. The support plate is also provided with a plurality of concentric limit grooves for limiting and calibrating the position of the micro-parts when they are placed. The micro-parts are placed in the limit grooves. The limit grooves coincide with the central axis of the lens and the image acquisition unit.
[0016] In the above-mentioned HALCON-based micro-part coaxiality measurement system, the image acquisition unit can adopt a CCD image acquisition unit, which acquires micro-parts and performs analog-to-digital conversion to obtain digital images. The lens can adopt a telecentric lens, which can accurately amplify the image of the micro-original and assist the image acquisition unit in obtaining a clear image. The limit groove coincides with the central axis of the telecentric lens and the CCD image acquisition unit; thereby ensuring that the coaxiality of the CCD image acquisition unit and the micro-parts assembled on the support plate is ≤0.025mm, and the maximum compatible CCD size of the telecentric lens unit is larger than the CCD target surface size of the camera.
[0017] In the above-mentioned HALCON-based micro-part coaxiality measurement system, the fill-light mechanism includes a first fill-light unit and a second fill-light unit; the first fill-light unit is installed at the bottom of the lens along the circumference of the lens window, and is used to provide a ring-shaped light source to the top of the micro-part during the image acquisition process, and fill-light the top of the micro-part; the second fill-light unit is used to provide a light source to the side wall of the micro-part during the image acquisition process, and fill-light the side wall of the micro-part; the number of the second fill-light units is more than two, which are evenly arranged along the circumference of the micro-part and fixed to the connecting plate through connecting pillars; the second fill-light unit is fixedly connected to the first fill-light unit through a bracket.
[0018] In the HALCON-based micro-part coaxiality measurement system, the image information processing mechanism is arranged in a computer with image processing function. A display unit connected to the computer displays the micro-part image and the coaxiality calculation result.
[0019] The present invention further provides a method for measuring the coaxiality of micro parts based on HALCON, and the measurement system is used to perform the following steps:
[0020] S1 places a tiny part assembled from two or more components on a part support mechanism;
[0021] S2 starts the fill light mechanism, then collects images of the tiny parts through the visual image collection mechanism, and sends the collected images to the image information processing mechanism;
[0022] The HALCON image extraction unit of the S3 image information processing mechanism performs feature extraction on the collected tiny parts images and extracts the target features corresponding to each component;
[0023] S4 selects the target features of any two components and uses the coaxiality calculation unit to calculate the coaxiality of the two components.
[0024] In the above step S1, the tiny parts are placed in the limiting grooves of the support plate to achieve rapid positioning of the tiny parts.
[0025] In the above step S2, the image of the tiny part located below is captured by the CCD image capture unit in the visual image capture mechanism, and in the process of capturing the image of the tiny part, the top of the tiny part is filled with light by the first fill light unit, and the side of the tiny part is synchronously filled with light by the second fill light unit, thereby improving the contrast of the defect color to highlight the defect characteristics shown in the image capture.
[0026] The purpose of the above step S3 is to extract the target features of each component respectively, including the following sub-steps:
[0027] S31 performs grayscale processing on the collected image;
[0028] S32 performs threshold binarization processing on the grayscale image obtained by grayscale processing by using a threshold segmentation method to separate tiny parts from the background;
[0029] S33 separates the grayscale value disconnected regions in the image after the threshold segmentation into multiple independent connected domains;
[0030] S34 extracts target features from the independent connected domains where each component is located;
[0031] S35 performs denoising processing on the extracted target features.
[0032] In the above step S32, a key technology in edge detection is the selection of the optimal threshold. If the selected threshold is too high, the target part will be divided into the background area; if the threshold is too low, some background will also be divided into the target part.
[0033] The present invention uses a histogram method to find a binarization threshold. The histogram is an important characteristic of an image. The histogram method selects a binarization threshold mainly to find the two highest peaks of the image in the selected area, and then the lower limit of the threshold value MinGray is at the lowest point of the valley between the two peaks, and the upper limit of the threshold value MaxGray is the maximum grayscale value of the image in the selected area; then based on the selected threshold range [MinGray, MaxGray], the grayscale image is binarized. The histogram method not only considers the pixel distribution and pixel value characteristics of the image, but also reduces the probability of object pixel or background pixel loss as much as possible.
[0034] Then, the threshold() operator can be used to select pixels with grayscale values in the threshold interval [MinGray, MaxGray] obtained previously from the input image after threshold segmentation, and return all pixels that meet the grayscale range as a region.
[0035] For example, the pixels that meet the grayscale range can be processed according to the following formula:
[0036]
[0037] Among them, MinGray represents the set minimum grayscale value, MaxGray represents the set maximum grayscale value, f(x, y) represents the grayscale image processed by step S31, and G(x, y) represents the image after threshold segmentation.
[0038] If the grayscale value intervals corresponding to the components of the assembled tiny parts are different, the above process can be repeated to obtain the threshold segmented images corresponding to each component, separate each component from the background, and complete edge detection.
[0039] In the above step S33, for the images segmented by threshold values corresponding to different elements, the connection() operator based on 8-neighborhood or 4-neighborhood can be used to separate the grayscale value disconnected areas in the edge detected image into multiple independent connected domains, so as to facilitate the processing of each connected domain.
[0040] In the above step S34, the connected domain can be extracted according to different target features, such as area, length, width, height, horizontal and vertical coordinates, roundness, rectangularity, etc. Circular and cylindrical parts usually use roundness or area for feature extraction. When extracting features based on roundness, it is impossible to distinguish between the outer circle and the inner circle because the roundness of each part of the part cannot be specifically grasped. The area difference between the inner circle and the outer circle is relatively obvious, so for circular and cylindrical tiny parts, the area is selected for feature extraction to obtain the target circle area and use it as the target feature. If it is a tiny part of other shapes, as long as the difference in the cross-sectional area of the two parts that need to calculate the coaxiality is relatively obvious, the area can be used for feature extraction.
[0041] In the above step S35, since the surface of the tiny parts is not smooth and the image is noisy, the extracted target features have noise points, which are usually manifested as holes in the extracted target area, resulting in the inability to form a regular target area, which will affect the subsequent coaxiality calculation accuracy. The present invention further fills the extracted target features to obtain a complete target area; for example, using the fill_up() operator can fill the holes in the selected area while keeping the number of connected domains unchanged, completing the denoising process and obtaining a complete target area.
[0042] The purpose of the above step S4 is to calculate the coaxiality of any two components. According to different parts, different target features can be selected for coaxiality calculation. For example, when the target feature is length, the length deviation can be used as the coaxiality; when roundness is selected as the target feature, the roundness deviation can be used as the coaxiality.
[0043] When the area is used as the target feature, its area and center point coordinates can be calculated based on the given target area, and the coaxiality is taken as twice the distance between the center point coordinates. The center point coordinates are calculated according to the following formula:
[0044]
[0045] In the formula, (x c ,y c ) is the center point coordinate, (x i ,y i ) is the coordinate of each pixel, and n represents the number of pixels in the target area.
[0046] Repeat step S4 to obtain the coaxiality of any two components.
[0047] Compared with the prior art, the micro-part coaxiality measurement system and method based on HALCON provided by the present invention has the following beneficial effects:
[0048] 1. The present invention first collects images of assembled micro-parts, then extracts target features from the collected images, and then calculates the coaxiality of the micro-parts based on the extracted target features, which is accurate and fast;
[0049] 2. The present invention can overcome the shortcomings of manual measurement that cannot be automatically measured in batches and has low accuracy during the coaxial measurement of tiny parts. It can measure the coaxiality of a class of tiny parts under non-contact conditions, and can extract the area parameters of the parts during the measurement process to meet production measurement requirements; at the same time, it can obtain high-precision, low-error, and low-cost measurement results, which has dual theoretical and practical feasibility significance. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 This is a schematic diagram of the structure of a micro-part coaxiality measurement system based on HALCON provided in Example 1 of the present invention.
[0051] Figure 2 A schematic flow chart of a method for measuring the coaxiality of tiny parts based on HALCON provided in Example 2 of the present invention.
[0052] Figure 3 for Figure 2 Schematic diagram of the step-by-step process of step S3.
[0053] Figure 4 This is the result of target feature extraction for cylindrical micro-parts in Example 2 of the present invention; (a) corresponds to the inner circle, and (b) corresponds to the outer circle.
[0054] Figure 5 The statistical results of the time taken to measure the coaxiality of cylindrical micro parts in Example 2 of the present invention.
[0055] In the figure, 1-part supporting mechanism, 11-supporting plate, 12-connecting pillar, 2-visual image acquisition mechanism, 21-image acquisition unit, 22-lens, 3-fill light mechanism, 31-first fill light unit, 32-second fill light unit, 33-bracket, 4-tiny parts. DETAILED DESCRIPTION
[0056] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and embodiments.
[0057] Example 1
[0058] This embodiment provides a micro-parts coaxiality measurement system based on HALCON. Figure 1 As shown, it includes: a part support mechanism 1 for supporting tiny parts, a visual image acquisition mechanism 2 for acquiring images of tiny parts, a fill light mechanism 3 for filling light in the image acquisition range of the image acquisition mechanism, and an image information processing mechanism for processing the image acquired by the image acquisition mechanism, extracting the image of tiny parts, and calculating the coaxiality of the acquired image. The part support mechanism 1, the visual image acquisition mechanism 2 and the fill light mechanism 3 form an integrated design.
[0059] The above-mentioned part support mechanism 1 includes a support plate 11 and a connecting pillar 12 arranged on the support plate, and the connecting pillar 12 is used to connect the fill light mechanism 3 located thereon. The support plate 11 is also provided with a plurality of concentric limiting grooves for limiting and calibrating the position of the tiny parts when they are placed.
[0060] The above-mentioned visual image acquisition mechanism 2 is located above the part support mechanism 1, and includes an image acquisition unit 21 and a lens 22 connected to the image acquisition unit. The image acquisition unit 21 can adopt a CCD image acquisition unit, which acquires tiny parts and performs analog-to-digital conversion to obtain a digital image. The lens 22 can adopt a telecentric lens, which can accurately magnify the image of tiny parts and assist the image acquisition unit in obtaining a clear image. The maximum compatible CCD size of the telecentric lens unit is larger than the CCD target size of the camera. The telecentric lens 22 is installed below the shooting window of the image acquisition unit, and the central axes of the two coincide.
[0061] The above-mentioned fill light mechanism 3 includes a first fill light unit 31 and a second fill light unit 32. The first fill light unit 31 is installed at the bottom of the lens along the circumference of the lens window, and is used to provide a ring light source to the top of the tiny part during the image acquisition process, and fill light to the top of the tiny part. The second fill light unit 32 is used to provide a light source to the side wall of the tiny part during the image acquisition process, and fill light to the side wall of the tiny part; the number of the second fill light units 32 is two, which are symmetrically arranged along the circumference of the tiny part, and are fixed to the connecting plate 11 through the connecting pillar 12. The second fill light unit 32 is fixedly connected to the first fill light unit 31 through the bracket 33.
[0062] In the above CCD image acquisition unit, the limit groove coincides with the central axis of the telecentric lens and the CCD image acquisition unit, thereby ensuring that the coaxiality of the CCD image acquisition unit and the tiny parts assembled on the support plate is ≤0.025mm.
[0063] The image information processing mechanism includes a HALCON image extraction unit and a coaxiality calculation unit. The image information processing mechanism is arranged in a computer with an image processing function. The image information processing mechanism is connected to the image acquisition mechanism through the computer. The HALCON image extraction unit is used to process the image acquired by the image acquisition unit and extract the image of the micro-part; the coaxiality calculation unit is used to calculate the coaxiality of the extracted micro-part image; the image extraction unit and the coaxiality calculation unit are also connected to the display unit; the display unit is used to display the image of the micro-part and the coaxiality calculation result.
[0064] The above-mentioned HALCON-based micro-part coaxiality measurement system, when measuring the coaxiality of micro-parts, first places the micro-part to be measured in the inner circle of the matching limiting groove on the top of the support plate 11. Since the limiting ring on the top of the support plate 11 and the center line of the CCD image acquisition unit 21 are located on the same vertical line, the micro-part to be measured is limited by the limiting groove on the top of the support plate 11 before measurement, so that the central axis of the micro-part and the central axis of the CCD image acquisition unit 11 can be kept within the error range during measurement.
[0065] Example 2
[0066] In this embodiment, the cylindrical micro-component 4 (such as Figure 1 Taking the micro-part coaxiality measurement method based on HALCON provided by the present invention as an example, the coaxiality measurement method of the micro-part based on HALCON is explained in detail.
[0067] like Figure 2-Figure 3 As shown, the micro-part coaxiality measurement method based on HALCON provided in this embodiment is performed by using the measurement system provided in Example 1 according to the following steps:
[0068] S1 places a micro part assembled from two or more components on the part support mechanism 1.
[0069] Here, the tiny part 4 assembled from two inner and outer components is placed in the limiting groove of the support plate to achieve rapid positioning of the tiny part.
[0070] S2 starts the fill light mechanism 3, then collects images of the tiny parts through the visual image collection mechanism 2, and sends the collected images to the image information processing mechanism.
[0071] The image of the tiny parts located below is captured by the CCD image capture unit in the visual image capture mechanism, and in the process of capturing the image of the tiny parts, the top of the tiny parts is filled with light by the first fill light unit 31, and the side of the tiny parts is synchronously filled with light by the second fill light unit 32, thereby improving the contrast of the defect color to highlight the defect characteristics shown in the image capture.
[0072] The HALCON image extraction unit of the S3 image information processing mechanism performs feature extraction on the collected tiny parts images and extracts target features from each component.
[0073] In this embodiment, since it is a cylindrical micro-part, the circular target area of the internal and external components is extracted, which specifically includes the following sub-steps:
[0074] S31 performs grayscale processing on the collected image.
[0075] Conventional grayscale processing can be used here.
[0076] S32 performs threshold binarization processing on the grayscale image obtained by grayscale processing by threshold segmentation method to separate tiny parts from the background.
[0077] In this embodiment, a histogram method is used for the outer circle and the inner circle respectively to find the binarization threshold ranges of the two regions, and then the grayscale image is binarized based on the selected threshold ranges.
[0078] According to the method given above, first in the outer circle area, the outer circle grayscale value threshold range [MinGray, MaxGray]1 is obtained as 84-158 by the histogram method; then in the inner circle area, the inner circle grayscale value threshold range [MinGray, MaxGray]2 is obtained as 128-255 by the histogram method.
[0079] Then, based on the obtained threshold range, the image is binarized to separate the parts from the background. This embodiment uses the threshold() operator. First, the interval [MinGray, MaxGray] is given, and then pixels with grayscale values in this interval are selected from the input image after threshold segmentation, and all pixels that meet the set grayscale range are returned as a region. Since there are two grayscale value intervals in this embodiment, two regions are returned.
[0080] According to the outer circle gray value threshold range [MinGray, MaxGray]1, the first image after threshold segmentation is obtained according to the following formula:
[0081]
[0082] Among them, MinGray1 and MaxGray1 represent the lower limit and upper limit of [MinGray,MaxGray]1 respectively, f(x,y) represents the image after grayscale processing, and G1(x,y) represents the first image after threshold segmentation.
[0083] According to the inner circle gray value threshold range [MinGray, MaxGray]2, the second image after threshold segmentation is obtained according to the following formula:
[0084]
[0085] Among them, MinGray2 and MaxGray2 represent the lower limit and upper limit of [MinGray, MaxGray]2 respectively, f(x, y) represents the image after grayscale processing, and G2(x, y) represents the second image after threshold segmentation.
[0086] S33 separates the grayscale value disconnected regions in the image after the threshold segmentation into multiple independent connected domains.
[0087] This embodiment uses the connection() operator based on 8-neighborhood to separate the areas with unconnected gray values in the two threshold segmented images (ie, the first image and the second image) after edge detection into multiple independent connected domains, so as to facilitate the processing of each connected domain.
[0088] S34 extracts target features from the independent connected domains where each component is located.
[0089] In this embodiment, the area is selected for feature extraction of cylindrical micro-parts to obtain the target circle area and use it as the target feature. Here, the select_shape() operator can be used to extract features of the independent connected domains where the outer circle and the inner circle are located. The select_shape() operator selects the connected domain in the set feature value interval as the output image, and the formula is as follows:
[0090] Min j ≤Feature j (object)≤Max j
[0091] In the formula, Feature j (object) represents the eigenvalue of the jth target, Min j Indicates the minimum value of the set characteristic value, Max j Indicates the maximum value of the set feature value.
[0092] Based on the above analysis, this embodiment obtains the target circle features of the inner circle and the outer circle respectively.
[0093] S35 performs denoising processing on the extracted target features.
[0094] In this embodiment, the fill_up() operator can be used to fill the holes in the selected area while keeping the number of connected domains unchanged, completing the denoising process and obtaining a complete target area. Figure 4 shown.
[0095] S4 selects the target features of any two components and uses the coaxiality calculation unit to calculate the coaxiality of the two components; repeating this step can obtain the coaxiality of the two components.
[0096] In this embodiment, the area and center point coordinates (here, the center coordinates) of the target circle area extracted are calculated, and the coaxiality is taken as twice the distance between the center point coordinates. The center point coordinates are calculated according to the following formula:
[0097]
[0098] In the formula, (x c ,y c ) is the center point coordinate, (x i ,y i ) is the coordinate of each pixel, and n represents the number of pixels in the target area.
[0099] Perform multiple measurements on tiny parts, collect multiple images, and then process them according to the above steps S3-S4 to obtain the corresponding circle center coordinate set.
[0100] The coordinate set of the center of the outer circle A = {(X (a1) ,Y (a1) ),(X (a2) ,Y (a2) ),...,(X (am) ,Y (am) ),...,(X (aM) ,Y (aM) )},m∈N * ;
[0101] The inner circle center coordinate set B = {(X (b1) ,Y (b1) ),(X (b2) ,Y (b2) ),...,(X (bm) ,Y (bm) ),...,(X (bM) ,Y (bM) )},m∈N * ;
[0102] M represents the total number of measurements, where M=30.
[0103] Based on the coordinates of the inner circle and the outer circle, the coaxiality can be calculated using the distance between the coordinates of the two center points according to the following formula:
[0104]
[0105] In the formula, (X (am),Y (am) )∈A,(X (bm) ,Y (bm) )∈B
[0106] Finally, the representative coaxiality measurement results of micro parts are shown in Table 1.
[0107] Table 1 Coaxiality measurement results
[0108]
[0109] The average value of the 30 coaxiality measurement results in this embodiment is 0.210 mm, and the average error is 0.005 mm. It can be seen that the micro-parts measurement method provided by the present invention is stable and meets the needs of industrial production.
[0110] The statistical results of all the time for each measurement of micro parts can be found in Figure 5 As shown, the average time consumption of the coaxiality measurement method provided in this embodiment is 1448.74ms. Therefore, the coaxiality detection system and method of micro parts based on HALCON of the present invention takes very short time, greatly shortens the time consumption, improves the measurement efficiency, and can realize fast micro instrument precision measurement.
[0111] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A micro-part coaxiality measurement system based on HALCON, characterized in that: include: A part support mechanism (1) for supporting tiny parts; A visual image acquisition mechanism (2) located above the part support mechanism (1) and used for acquiring images of tiny parts; the visual image acquisition mechanism comprises an image acquisition unit (21) and a lens (22) connected to the image acquisition unit; A fill light mechanism (3) is used to fill light in the image acquisition range of the image acquisition mechanism, and is arranged along the circumference of the lens window; the fill light mechanism (3) comprises a first fill light unit (31) and a second fill light unit (32); the first fill light unit (31) is installed at the bottom of the lens along the circumference of the lens window; the second fill light units are more than two in number, are evenly arranged along the circumference of the micro-part, and are fixed to the connection plate via a connecting support (12); the second fill light unit is fixedly connected to the first fill light unit (31) via a bracket (33); An image information processing mechanism is used to process the image collected by the image acquisition mechanism, extract the image of the tiny parts, and calculate the coaxiality of the collected image; the image information processing mechanism is communicatively connected with the visual image acquisition mechanism; the image information processing mechanism includes a HALCON image extraction unit and a coaxiality calculation unit; the HALCON image extraction unit is used to process the image collected by the image acquisition unit and extract the image of the tiny parts; the coaxiality calculation unit is used to calculate the coaxiality of the extracted tiny parts image; The part support mechanism, visual image acquisition mechanism and fill light mechanism form an integrated design; Follow these steps to use the measurement system: S1 places a tiny part assembled from two or more components on a part support mechanism (1); S2 starts the fill light mechanism (3), then collects images of the tiny parts through the visual image collection mechanism (2), and sends the collected images to the image information processing mechanism; S3 The HALCON image extraction unit of the image information processing mechanism performs feature extraction on the collected tiny parts image, and extracts the target features corresponding to each component respectively; step S3 includes the following sub-steps: S31 performs grayscale processing on the collected image; S32 performs threshold binarization processing on the grayscale image obtained by grayscale processing by threshold segmentation method to separate tiny parts from the background; The histogram method selects the binarization threshold mainly to find the two highest peaks of the image in the selected area, and then take the lower threshold value MinGray The upper threshold value is taken at the lowest point of the valley between the two peaks. MaxGray is the maximum grayscale value of the image in the selected area; then based on the selected threshold range [ MinGray , MaxGray ], perform binarization on the grayscale image, select pixels with grayscale values in this interval from the input image after threshold segmentation, and return all pixels that meet the grayscale range as a region; If the grayscale value intervals corresponding to the components of the assembled micro parts are different, the above process can be repeated to obtain the threshold segmented images corresponding to each component, separate each component from the background, and complete edge detection; S33 separates the grayscale value disconnected regions in the image after the threshold segmentation into multiple independent connected domains; S34 extracts target features from the independent connected domains where each component is located; S35 performs denoising on the extracted target features; S4 Select any two target features of the components and use the coaxiality calculation unit to calculate the coaxiality of the two components.
2. The HALCON-based micro-part coaxiality measurement system according to claim 1 is characterized in that: The part support mechanism (1) comprises a support plate (11) and a connecting pillar (12) arranged on the support plate, wherein the connecting pillar (12) is used to connect a fill light mechanism (3) located thereon.
3. The HALCON-based micro-part coaxiality measurement system according to claim 2 is characterized in that: The support plate (11) is also provided with a plurality of concentric limiting grooves; the micro parts are placed in the limiting grooves, and the limiting grooves coincide with the central axis of the lens and the image acquisition unit.
4. The HALCON-based micro-part coaxiality measurement system according to claim 1 is characterized in that: In step S35, the target feature is area, length, width, height, horizontal and vertical coordinates, roundness or rectangularity.
5. The HALCON-based micro-part coaxiality measurement system according to claim 4 is characterized in that: When the tiny parts are circular or cylindrical, roundness or area is used for feature extraction.
6. The HALCON-based micro-part coaxiality measurement system according to claim 5 is characterized in that: When the area is used as the target feature, the center point coordinates are calculated according to the given target area, and twice the distance between the center point coordinates is taken as the coaxiality.
7. The HALCON-based micro-part coaxiality measurement system according to claim 6 is characterized in that: The center point coordinates are calculated using the following formula: In the formula, is the center point coordinate, is the coordinate of each pixel, n Indicates the number of pixels in the target area.
