A step-shaped machine vision measurement correction module and correction method

By using a stepped correction module in the machine vision measurement system, the measurement error problem caused by object deviation from the correction plane in the prior art is solved, and accurate measurement of fish bodies with different body thicknesses is achieved, and measurement accuracy is improved.

CN110672015BActive Publication Date: 2025-03-21河南省水产科学研究院
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910831246.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-04
Publication Date
2025-03-21
Estimated Expiration
2039-09-04

AI Technical Summary

Technical Problem

Existing machine vision measurement correction methods can only measure objects on the correction plane. If the object deviates from the plane, it will cause large errors. Especially in aquatic scientific research, the error is unacceptable when measuring fish bodies of different body thicknesses.

Method used

A step-shaped machine vision measurement correction module is adopted, which includes a plurality of step planes of different heights. A multiple pattern and height identifier of a set size are set on each step plane. The calibration image is obtained through the image acquisition device, the actual distance of each pixel is calculated, and a fitting equation is established to obtain pixel-distance correction values ​​of different heights.

Benefits of technology

Through the three-dimensional step correction module, planes of different heights can be corrected, which can accurately measure fish bodies of different body thicknesses, reduce measurement errors and improve measurement accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110672015B_ABST
    Figure CN110672015B_ABST
Patent Text Reader

Abstract

The present invention provides a step-shaped machine vision measurement correction module and correction method, wherein the correction module includes a plurality of step planes of different heights, each of which is provided with a plurality of patterns of set sizes and a height mark of each step plane, and the plurality of step planes form a correction pattern. The invention also includes a shooting platform, on which the correction module is provided, and an image acquisition device is provided above the correction module. The correction module is placed on the shooting platform, and the image acquisition device acquires a calibration image of the correction pattern on the upper side of the correction module; the actual size of the correction pattern and the number of pixels of the correction image in the calibration image are used to calculate the pixel-distance correction value of each pixel; and the pixel-distance correction value corresponding to the object to be measured at the height is acquired according to the pixel-distance correction value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of machine vision, and in particular relates to a step-shaped machine vision measurement correction module and a correction method. Background Art

[0002] The existing measurement and correction templates for machine vision are generally black and white plane graphics. After capturing an image of the black and white template, the actual distance represented by the pixels is calculated. When measuring the actual object, the pixel value is converted into the actual size to complete the measurement. This correction method can only measure objects on the correction plane. If the object deviates from the plane, it will cause a large error.

[0003] In aquatic science research, machine vision technology is used to measure and analyze the length, height, width, and surface characteristics of fish.

[0004] Existing machine vision measurement and correction mainly rely on plane patterns such as black and white squares and circles of certain size. After being photographed by the camera, the machine vision software processes it to obtain parameters such as lens distortion and pixel correction distance in this state (the distance between the camera lens and the object to be measured is determined). Then the object to be measured is photographed, and the machine vision software calculates the actual size of the measured object based on the lens distortion, pixel correction distance and other parameters in this state to complete the measurement. However, this scheme has its defects. When the plane of the object to be measured deviates from the original correction plane, the correction parameters, especially the pixel distance parameters, change. If the original parameters are used, the calculated deviation of the size of the object to be measured will become larger. For example, when using machine vision technology to take pictures and measure fish bodies, there is only one correction plane, but the thickness of each fish body is different, and the distance between the side of the fish body and the camera lens is different. When the side of the fish body deviates greatly from the original correction plane, the error will be unacceptable and the measurement will fail. Summary of the invention

[0005] The present invention provides a step-shaped machine vision measurement correction module and a correction method to solve the problems existing in the prior art.

[0006] The present invention adopts the following technical solutions:

[0007] A step-shaped machine vision measurement and correction module comprises a plurality of step planes of different heights, each of which is provided with a plurality of patterns of set sizes and a height mark of each step plane, and the plurality of step planes form a correction pattern.

[0008] The correction module mentioned above also includes a shooting platform, on which the correction module is arranged, and above which an image acquisition device is arranged.

[0009] In certain implementations of the above module, the patterns on the stepped plane are arranged adjacent to each other, and the patterns are square or circular patterns of a set size.

[0010] In some implementations of the above module, each of the step planes is provided with a black square pattern and a white square pattern that are spaced apart from each other, and the patterns of the multiple step planes form a correction pattern of a black and white grid.

[0011] In certain implementations of the above module, the multiple stepped planes of different heights of the correction module are stepped planes with successively increasing heights.

[0012] The present invention also provides a correction method using the correction module, comprising:

[0013] Step 1: Place the correction module on the shooting platform, and the image acquisition device arranged above the correction module acquires the calibration image of the correction pattern on the upper side of the correction module;

[0014] Step 2: Calculate the actual distance of each pixel in the calibration image, i.e., the pixel-distance correction value of each pixel, according to the actual size of the calibration pattern on the calibration module and the number of pixels of the calibration image in the calibration image;

[0015] Step 3: According to the pixel-distance correction value of each step plane in the correction module obtained in step 2, a fitting equation of the height and pixel-distance correction value of all step planes in the correction module is established: y=ax+b, where y represents the pixel-distance correction value when the height is x, and a and b are constants;

[0016] Step 4: placing the object to be measured on the shooting platform, and obtaining the actual image of the object to be measured currently placed by the image acquisition device;

[0017] Step 5: When the height of the object to be measured is known, the pixel-distance correction value corresponding to the object to be measured at the height is obtained.

[0018] In step 5, the shape parameters of the object to be measured can be obtained according to the obtained pixel-distance correction value corresponding to the object to be measured at the height and the actual image of the object to be measured, and the shape parameters include length and width.

[0019] The object to be tested is a fish body.

[0020] Beneficial effects of the present invention: The present invention corrects planes at different heights through a three-dimensional stepped correction module, so that fish bodies with different body thicknesses can be measured more accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a structural schematic diagram of the present invention.

[0022] Figure 2 This is a schematic diagram of the correction module.

[0023] Figure 3 This is a fish body measurement chart.

[0024] Figure 4 A correction diagram of a correction module of the present invention is shown in FIG. Figure 1 .

[0025] Figure 5 A correction diagram of a correction module of the present invention is shown in FIG. Figure 2 .

[0026] Figure 6 A correction diagram of a correction module of the present invention is shown in FIG. Figure 3 .

[0027] Figure 7 A correction diagram of a correction module of the present invention is shown in FIG. Figure 4 .

[0028] Figure 8 A correction diagram of a correction module of the present invention is shown in FIG. Figure 5 .

[0029] Fig. 9 A schematic diagram of a correction result of the present invention.

[0030] Fig.10 A correction module of the present invention is shown in FIG. Figure 1 .

[0031] Fig.11 A correction module of the present invention is shown in FIG. Figure 1 .

[0032] Fig.12 A correction module of the present invention is shown in FIG. Figure 1 . DETAILED DESCRIPTION

[0033] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0034] The present invention provides a stepped machine vision measurement and correction module, which can correct planes at different heights, so that fish bodies with different body thicknesses can be measured more accurately.

[0035] like Figure 1 As shown, the present invention includes a shooting platform 3 , a correction module 2 is arranged on the shooting platform 3 , and an image acquisition device 1 is arranged above the correction module 2 .

[0036] like Figure 2As shown, the correction module 2 includes a plurality of stepped planes 4, each of which is provided with a plurality of patterns of a set size, and the plurality of stepped planes form a correction pattern.

[0037] The patterns on the stepped plane 4 are arranged adjacently, and the patterns are square or circular patterns of a set size. Each stepped plane 4 is provided with at least one row of adjacent circular or square patterns, such as Figure 3 As shown, a row of adjacent patterns is shown, that is, each step plane 4 is provided with a black square pattern and a white square pattern that are spaced apart, and the patterns of multiple step planes form a correction pattern of black and white grids.

[0038] In the present invention, the number of patterns on each stepped plane can be different. For example, if the pattern of the set size is a square, the pattern on each stepped plane can be a single row of multiple squares, or multiple rows of squares. The single row or multiple rows of square patterns are formed by squares of different colors arranged at intervals, and the correction patterns of adjacent stepped planes are also arranged by squares of different colors at intervals when viewed from above. The same applies to circular patterns or patterns of other shapes.

[0039] The multiple stepped planes 4 have different heights relative to each other, and the different height distributions are set as required, such as Figure 1 , Figure 2 As shown, the correction modules are of increasing heights in sequence, and can also be set as pyramid-shaped correction modules, such as Figures 4 to 8 , Figures 10-12 As shown, the highest step plane is in the middle of the calibration pattern, and then the stepped planes around it are successively lowered, or the highest step plane is at the edge of the calibration pattern, and then the stepped planes inward are successively lowered. The design of the specific stepped plane is determined according to the shape of the object to be measured. Selecting a calibration module with a higher similarity to the shape of the object to be measured can obtain a higher detection result.

[0040] As shown in the accompanying drawings, a commonly used pattern shape for a stepped plane is a square, which is a square arranged in alternating black and white.

[0041] The height differences between multiple step planes can be the same or different, and the side of each step plane is marked with the height of the current step from the shooting platform. For example, if the height of each step is 10 mm, one end of the step is marked with 0, 10, 20, 30... until the highest step ends.

[0042] Based on the above-mentioned correction module, the present invention provides a correction method, which can more accurately obtain other parameters of the object to be measured when the thickness of the object to be measured is known.

[0043] The steps of the present invention include:

[0044] Step 1: After the image acquisition device 1 and the shooting platform 3 are set up, the black and white calibration pattern of the calibration module 2 is oriented toward the image acquisition device, and the image acquisition device 1 arranged above the calibration module 2 acquires a calibration image of the calibration pattern on the upper side of the calibration module 2;

[0045] Step 2: Calculate the actual distance of each pixel in the calibration image, that is, the pixel-distance correction value of each pixel, according to the actual size of the calibration pattern on the correction module 2 and the number of pixels of the calibration image in the calibration image;

[0046] Step 3: According to the pixel-distance correction value of each step plane in the correction module 2 obtained in step 2, a fitting equation of the height and pixel-distance correction value of all step planes in the correction module is established: , where y represents the pixel-distance correction value when the height is x, and a and b are constants;

[0047] In this step, height x is the height of the object to be measured, and y is the pixel-distance correction value when the height of the object to be measured is x. The fitting method of the fitting equation is fitted according to the existing equation fitting method, and the parameters constituting the fitting equation are the data obtained in step 2.

[0048] Specifically, after the computer obtains the calibration image through the image acquisition device, it obtains the pixel value of the side length of the black and white square in each step plane, and at the same time calculates the actual length represented by the pixel in each step plane based on the actual length of the correction pattern corresponding to the calibration pattern. Then, through the step height series value and the corresponding per-pixel length series value, a linear equation of the per-pixel length value related to the height value is obtained through linear fitting to complete the calibration in this state.

[0049] When performing straight line fitting, only one pixel-distance correction value is selected for each step plane. Therefore, when calculating the pixel-distance correction value of each step plane, the actual length represented by each pixel in each step plane can be calculated by dividing the size of the actual correction pattern by the number of pixels corresponding to the size.

[0050] Step 4: placing the object 7 to be measured on the shooting platform 3, and obtaining the actual image of the object 7 currently placed thereon through the image acquisition device 1;

[0051] Step 5: When the height of the object to be measured 7 is known, the pixel-distance correction value corresponding to the object to be measured 7 at the height is obtained, and the shape parameters of the object to be measured can be calculated according to the pixel-distance correction value.

[0052] When the above method of the present invention is applied to fish body detection, the fish body thickness is measured by the existing fish body thickness measurement method, and then the fish body whose thickness has been measured is placed on the shooting plane for shooting, and the fish body image is obtained. According to the linear fitting equation formed by fitting, the fish body thickness is substituted as the x value to obtain the pixel correction length representing the fish body, that is, the pixel-distance correction value. With this pixel-distance correction value, multiple characteristic parameters of the fish body such as body length, body height, eye diameter, tail peduncle length, etc. can be measured according to the range occupied by the fish body. For example, when measuring the body length, the actual distance can be obtained according to the pixel length of the fish body in the obtained fish body image, the pixel length of the fish body in the image and the pixel-distance correction value.

[0053] Since the above-mentioned calculation of the pixel-distance correction value is based on the fitting curve, generally speaking, the thickness difference between the head, tail and middle part of the fish body is not large, so the calculated data is more accurate than the existing calculation method; when the thickness difference between the head, tail and middle part of some fish bodies to be tested is large, the data has certain inaccuracies, and other methods can be used for calculation at this time.

[0054] As an implementation method, Figure 2 In the stepped module shown, each black and white square is 25 mm, and the height of each layer is 20 mm. The number (0, 20, 40, 60, 80) in the upper left corner of the image is the distance between the step layer and the shooting plane. The picture is taken directly above it, and the pixel value of each height is calibrated by machine vision software. Linear fitting is performed to obtain the equation. When measuring objects such as fish, the thickness of the fish body (the distance from the shooting platform) is known, and the thickness value is substituted into the equation to obtain the pixel correction value at this height. The body length, height and other traits of the fish can be measured more accurately through machine vision software.

[0055] like Figure 4~Figure 8 FIG. 1 is an embodiment of the present invention, wherein the left side of the figure is a correction template, and the right side is an interface for the correction module to calculate the actual distance per pixel.

[0056] like Fig. 9 In the illustrated embodiment, the parameters are as shown in Table 1, that is, the pixel correction value of the step module with a height of 0 mm is 0.404858 mm\pix, the pixel correction value of the step module with a height of 20 mm is 0.381676 mm\pix, the pixel correction value of the step module with a height of 40 mm is 0.362319 mm\pix, the pixel correction value of the step module with a height of 60 mm is 0.342466 mm\pix, and the pixel correction value of the step module with a height of 80 mm is 0.318471 mm\pix.

[0057]

[0058] The linear fitting equation of the above data is y=-0.0011x+0.4044 (R^2=0.9985), where x represents the height and y represents the pixel correction value at a certain height value.

[0059] In the description of this specification, specific features, structures, materials or characteristics may be combined in an appropriate manner in any one or more embodiments or examples.

[0060] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a technician familiar with the field within the scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A correction method for a step-shaped machine vision measurement correction module, characterized in that: The correction module (2) comprises a plurality of stepped planes (4) of different heights, each stepped plane (4) being provided with a plurality of patterns of set sizes and a height mark of each stepped plane (4), the plurality of stepped planes forming a correction pattern; It also comprises a shooting platform (3), a correction module (2) is arranged on the shooting platform (3), and an image acquisition device (1) is arranged above the correction module (2); The patterns on the stepped plane (4) are arranged adjacent to each other, and the patterns are square or circular patterns of a set size; Each of the stepped planes (4) is provided with a black square pattern and a white square pattern that are arranged at intervals, and the patterns of the multiple stepped planes form a correction pattern of black and white grids; The multiple stepped planes (4) of different heights of the correction module (2) are stepped planes with successively increasing heights; The correction method using the step-shaped machine vision measurement correction module includes: Step 1: placing the correction module (2) on the shooting platform (3), and an image acquisition device (1) arranged above the correction module (2) acquires a calibration image of the correction pattern on the upper side of the correction module (2); Step 2: Calculate the actual distance of each pixel in the calibration image, i.e., the pixel-distance correction value of each pixel, according to the actual size of the calibration pattern on the calibration module (2) and the number of pixels of the calibration image in the calibration image; Step 3: Based on the pixel-distance correction value of each step plane in the correction module (2) obtained in step 2, a fitting equation of the height and pixel-distance correction value of all step planes in the correction module is established: y=ax+b, where y represents the pixel-distance correction value when the height is x, and a and b are constants; Step 4: placing the object to be measured (7) on the shooting platform (3), and obtaining an actual image of the object to be measured (7) currently placed thereon through the image acquisition device (1); Step 5: When the height of the object to be measured (7) is known, obtain the pixel-distance correction value corresponding to the object to be measured (7) at the height.

2. The correction method of a step-shaped machine vision measurement correction module according to claim 1, characterized in that: In step 5, the shape parameters of the object to be measured can be obtained based on the obtained pixel-distance correction value corresponding to the object to be measured (7) at the height and the actual image of the object to be measured (7), and the shape parameters include length and width.

3. The correction method of a step-shaped machine vision measurement correction module according to claim 1, characterized in that: The object to be tested is a fish body.

Citation Information

Patent Citations

  • Stepped machine vision measurement correction module

    CN210893013U

  • Three-dimensional shape measuring device, method for correction therefor, program, and computer-readable recording medium

    JP2008170279A