A dynamic dimension measurement method for bars
By using a side camera and an upper camera in bar measurement, combining offset distance compensation and multiple measurement averages, the measurement inaccuracy problem caused by a single viewing angle of bar size measurement in the prior art is solved, and a higher measurement accuracy is achieved.
Patent Information
- Application Number
- CN202411719942.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-28
AI Technical Summary
The existing bar size measurement angle is single, which leads to inaccurate measurement results, especially when displacement occurs during bar movement, and the bar size cannot be accurately measured.
The side camera and the upper camera are used for measurement, data compensation is performed by calculating the offset distances of different viewing angles, the actual bar size is calculated, and the average value is obtained through multiple measurements to improve the measurement accuracy.
Accurate measurement of the upper and lower bars and waterline dimensions is achieved, and the accuracy of the measurement results is improved and errors are reduced through data compensation and average calculation.
Smart Images

Figure CN119187246B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of bar measurement, and in particular to a dynamic dimension measurement method of a bar. Background Art
[0002] In the steel industry, the production of bars includes multiple steps. The bars are manufactured and formed in the rolling mill. At the exit of the rolling mill, their dimensions need to be measured to determine whether the bar products are qualified. There are many methods for measuring their dimensions, but the existing dimension measurement systems often only use cameras with a single perspective, resulting in inaccurate measurement results. In particular, when displacement occurs during the movement of the bar, the bar size cannot be accurately measured, resulting in losses. Summary of the invention
[0003] The technical problem to be solved by the present invention is that the existing bar size measurement has a single viewing angle and inaccurate measurement results.
[0004] In order to solve the above technical problems, the technical solution of the present invention is to provide a dynamic dimension measurement method of a bar, which uses a side camera and an upper camera for measurement, and includes the following steps:
[0005] S1. Place the bar sample on the roller measuring position, set up cameras above and on the side of the measuring position, set the side camera on the side of the bar sample to measure the upper and lower dimensions of the bar, set the upper camera above the bar sample to measure the waterline dimension of the bar, and record the actual dimension of the bar sample measured by the upper camera as D3 and the actual dimension of the bar sample measured by the side camera as D4;
[0006] S2. Collect images from the side camera and the top camera at the same time, identify the two edge segments of the bar, calculate the midpoint of one edge segment, and then find the perpendicular segment from the midpoint to the other edge segment to obtain the pixel distance of the perpendicular segment, where the pixel distance of the perpendicular segment of the top camera is the waterline pixel size of the corresponding bar sample, recorded as D1, and the pixel distance of the perpendicular segment of the side camera is the upper and lower pixel sizes of the corresponding bar sample, recorded as D2. The waterline calibration ratio relationship corresponding to the top camera is obtained as B1=D3 / D1, and the upper and lower calibration ratio relationship corresponding to the side camera is obtained as B2=D4 / D2;
[0007] S3, take out the bar sample and produce the bar. During the production process, the side camera detects the distance X1 of the bar's upper and lower offsets, and recalculates the bar's waterline calibration ratio B3 based on the upper and lower offset distance X1, thereby calculating the actual bar waterline size Act1;
[0008] S4, the upper camera detects the left and right offset distance X2 of the bar, and recalculates the upper and lower calibration ratios B4 of the bar according to the left and right offset distance X2, thereby calculating the actual upper and lower dimensions Act2 of the bar;
[0009] S5. Repeat steps S3 and S4, calculate multiple times and take the average value as the final measurement result.
[0010] Optionally, step S3 includes the following steps:
[0011] S31, the side camera detects the distance X1 of the bar's upper and lower deviation;
[0012] S32, calculating the actual long side field of view FOV of the upper camera after the offset according to the offset distance X1 HNew ;
[0013] S33, the actual long side field of view FOV of the upper camera after offset HNew Calculate the actual bar waterline size Act1.
[0014] Optionally, in step S31, X1 is calculated as follows:
[0015] X1=pixel distance of the rod up and down offset×B2;
[0016] Among them, X1 is measured by the side camera, and the positive or negative value is determined by the offset direction of the bar. If the offset direction is close to the upper camera, X1 is a negative value, otherwise it is a positive value.
[0017] Optionally, in step S32, the long side field of view FOV of the upper camera HNew The calculation formula is:
[0018] FOV HNew =(D+X1)×S H / F = D × S H / F+ X1×S H / F;
[0019] Where D is the working distance from the center point of the lens surface to the center line of the rod; S H is the long side size of the camera target surface; F is the focal length of the camera lens.
[0020] Optionally, in step S33, according to the actual long side field of view FOV of the upper camera after the offset HNew , calculate the new waterline calibration ratio relationship B3 corresponding to the upper camera, and the actual bar waterline size Act1 is calculated as: Act1=B3×actual waterline pixel length of the bar;
[0021] Where B3 = FOV HNew / Resolution of the long side of the camera. The actual waterline pixel length of the rod is measured by the upper camera.
[0022] Optionally, step S4 includes:
[0023] S41, the upper camera detects the distance X2 of the left and right deviation of the bar;
[0024] S42, calculating the actual short side field of view FOV of the side camera after the offset according to the offset distance X2 WNew ;
[0025] S43, actual side camera short side field of view FOV after offset WNew Calculate the actual upper and lower dimensions of the bar Act2.
[0026] Optionally, in S41, X2 is calculated as follows:
[0027] X2 = the pixel distance of the bar’s left and right offset × B1;
[0028] Among them, X2 is measured by the upper camera, and the positive or negative value is determined by the offset direction of the bar. If the offset direction is close to the side camera, X2 is a negative value, otherwise it is a positive value.
[0029] Optional, in S42, side camera short side field of view FOV WNew The calculation formula is:
[0030] FOV WNew =(D+X2)×S W / F = D × S W / F+ X2×S W / F;
[0031] Where D is the working distance from the center point of the lens surface to the center line of the rod; S W is the short side size of the camera target surface; F is the focal length of the camera lens.
[0032] Optionally, in S43, according to the actual short side field of view FOV of the side camera after the offset WNew , calculate the upper and lower calibration ratio relationship B4 corresponding to the new side camera, and the calculation method of the actual bar waterline size Act2 is:
[0033] Act2=B4×actual upper and lower pixel length of the bar;
[0034] Where B4 = FOV WNew / Resolution of the short side of the camera. The actual upper and lower pixel length of the bar is measured by the side camera.
[0035] In summary, the present invention sets two cameras, one of which is installed above the rod measurement position, and the other is installed on the side of the rod measurement position. By processing images from different perspectives, the system can accurately calculate the upper and lower and waterline dimensions of the rod. At the same time, it can perform data compensation according to the offset distance of the rod and calculate the average value of the measurement results, thereby further improving the measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a schematic diagram of the rod of the present invention when it deviates upward;
[0037] Figure 2 This is a schematic diagram of the rod of the present invention when it is offset toward the side camera. DETAILED DESCRIPTION
[0038] The following combination Figure 1 The present invention is described in further detail.
[0039] like Figure 1 As shown in the figure, the side camera detects that the bar is shifted toward the upper camera, causing the diameter of the bar detected by the upper camera to increase. Bars of the same specification occupy more pixels, but the resolution of the camera remains unchanged. Figure 2 As shown, the upper camera detects that the bar is offset toward the side of the side camera, resulting in a larger diameter of the bar detected by the side camera. The bars of the same specification occupy more pixels, but the resolution of the camera remains unchanged. At this time, it is necessary to recalculate the calibration data of the offset position of the bar. If the original sample bar calibration data is used, the actual size is with measurement errors. Therefore, the present invention discloses a dynamic size measurement method for the bar, which uses a side camera and an upper camera for measurement, and performs offset distance correction to eliminate errors, including the following steps:
[0040] S1. Place the bar sample on the roller measuring position, set up cameras above and on the side of the measuring position, set the side camera on the side of the bar sample to measure the upper and lower dimensions of the bar, set the upper camera above the bar sample to measure the waterline dimension of the bar, and record the actual dimension of the bar sample measured by the upper camera as D3 and the actual dimension of the bar sample measured by the side camera as D4;
[0041] S2. Collect images from the side camera and the top camera at the same time, identify the two edge segments of the bar, calculate the midpoint of one edge segment, and then find the perpendicular segment from the midpoint to the other edge segment to obtain the pixel distance of the perpendicular segment, where the pixel distance of the perpendicular segment of the top camera is the waterline pixel size of the corresponding bar sample, recorded as D1, and the pixel distance of the perpendicular segment of the side camera is the upper and lower pixel sizes of the corresponding bar sample, recorded as D2. The waterline calibration ratio relationship corresponding to the top camera is obtained as B1=D3 / D1, and the upper and lower calibration ratio relationship corresponding to the side camera is obtained as B2=D4 / D2;
[0042] S3, take out the bar sample and produce the bar. During the production process, the side camera detects the distance X1 of the bar's upper and lower offsets, and recalculates the bar's waterline calibration ratio B3 based on the upper and lower offset distance X1, thereby calculating the actual bar waterline size Act1;
[0043] S31, the side camera detects the distance X1 of the bar's upper and lower deviation;
[0044] Specifically, X1 is calculated as follows:
[0045] X1=pixel distance of the rod up and down offset×B2;
[0046] Among them, X1 is measured by the side camera, and the positive or negative value is determined by the offset direction of the bar. If the offset direction is close to the upper camera, X1 is negative, otherwise it is positive;
[0047] S32, calculating the actual long side field of view FOV of the upper camera after the offset according to the offset distance X1 HNew ;
[0048] Specifically, the long side field of view FOV of the upper camera HNew The calculation formula is:
[0049] FOV HNew =(D+X1)×S H / F = D × S H / F+ X1×S H / F;
[0050] Where D is the working distance from the center point of the lens surface to the center line of the rod; S H is the long side size of the camera target surface; F is the focal length of the camera lens;
[0051] S33, the actual long side field of view FOV of the upper camera after offset HNew Calculate the actual bar waterline size Act1;
[0052] Specifically, according to the actual long side field of view FOV of the upper camera after the offset HNew , calculate the new waterline calibration ratio relationship B3 corresponding to the upper camera, and the actual bar waterline size Act1 is calculated as: Act1=B3×actual waterline pixel length of the bar;
[0053] Where B3 = FOV HNew / Camera long side resolution, the actual waterline pixel length of the rod is measured by the upper camera;
[0054] S4, the upper camera detects the left and right offset distance X2 of the bar, and recalculates the upper and lower calibration ratios B4 of the bar according to the left and right offset distance X2, thereby calculating the actual upper and lower dimensions Act2 of the bar;
[0055] S41, the upper camera detects the distance X2 of the left and right deviation of the bar;
[0056] Specifically, X2 is calculated as follows:
[0057] X2 = the pixel distance of the bar’s left and right offset × B1;
[0058] Among them, X2 is measured by the upper camera, and the positive or negative value is determined by the offset direction of the bar. If the offset direction is close to the side camera, X2 is negative, otherwise it is positive;
[0059] S42, calculating the actual short side field of view FOV of the side camera after the offset according to the offset distance X2 WNew ;
[0060] Specifically, the side camera short side field of view FOV WNew The calculation formula is:
[0061] FOV WNew =(D+X2)×S W / F = D × S W / F+ X2×S W / F;
[0062] Where D is the working distance from the center point of the lens surface to the center line of the rod; S W is the short side size of the camera target surface; F is the focal length of the camera lens;
[0063] S43, the actual side camera short side field of view FOV after offset WNew Convert to actual upper and lower dimensions of the bar Act2;
[0064] Specifically, according to the actual side camera short side field of view FOV after offset WNew , calculate the upper and lower calibration ratio relationship B4 corresponding to the new side camera, and the calculation method of the actual upper and lower dimensions Act2 of the bar is: Act2=B4×actual upper and lower pixel length of the bar;
[0065] Where B4 = FOV WNew / Resolution of the short side of the camera, the actual upper and lower pixel length of the bar is measured by the side camera;
[0066] S5, repeat steps S3 and S4, calculate multiple times and take the average value as the final measurement result;
[0067] Specifically, the number of times N to calculate the average value is set, and real-time measurement results and the average results of the most recent N measurements are provided.
[0068] Example
[0069] In this embodiment, a FA lens is used, the focal length of the lens is F=75 mm, and the camera is a 5-megapixel industrial camera with a resolution of 2448×2048 and a pixel size of 3.45µm×3.45µm.
[0070] The long side size of the camera target surface S H= 3.45×2448 / 1000=8.4456mm;
[0071] The short side size S of the camera target surface w = 3.45×2048 / 1000=7.0656mm;
[0072] S1. Place the bar sample at the roller bar measurement position. The bar sample is a cylinder. The bar sample specification is similar to the bar size to be measured. Set up cameras above and to the side of the bar measurement position. The side camera is set on the side of the bar sample to measure the upper and lower dimensions of the bar sample. The upper camera is set above the bar sample to measure the waterline dimension of the bar sample. The side camera can be adjusted within a distance of 1.5m from the roller bar. The upper camera can be adjusted up and down by 1.5-2.5m and left and right by 2m. Record the actual size of the bar sample measured by the upper camera as D3 and the actual size of the bar sample measured by the side camera as D4.
[0073] S2. Use the edge search algorithm to identify the two edge segments of the bar, calculate the midpoint of one edge segment, and then find the perpendicular segment from the midpoint to the other edge segment to obtain the pixel distance of the perpendicular segment, which is used to calculate the pixel size of the bar. This is used during calibration. Collect images from the side camera and the top camera at the same time, measure the waterline pixel size of the bar sample corresponding to the top camera and record it as D1, and the upper and lower pixel sizes of the bar sample corresponding to the side camera and record them as D2. The waterline calibration ratio of the top camera is B1=D3 / D1, and the upper and lower calibration ratio of the side camera is B2=D4 / D2.
[0074] S3. During the production process, due to the use of FA lens, the field of view changes with the change of working distance. The up and down movement of the bar in the roller will cause errors in the waterline size measured by the upper camera. The principle of large near and small far, if the bar only deviates up and down, it will not affect the upper and lower dimensions measured by the side camera, because the distance between the bar and the lens has not changed. The error caused by the offset needs to be compensated for the error. The displacement calculation is performed according to the center line of the sample bar calculated during calibration, and the error produced by the offset is subtracted from the offset close to the camera side. The unit is mm. Assuming that the side camera measurement calculation shows that the bar is offset in the direction close to the upper camera, and the offset distance measured by the side camera is X1, then the new working distance D of the upper camera after the offset is the initial working distance + offset distance;
[0075] According to the formula F / D =S H / FOV H , where FOV H is the initial long side field of view of the upper camera, and the actual long side field of view FOV of the upper camera after the offset is calculated HNew =(D+X1)×S H / F = D × S H / F+ X1×S H / F,D×S H / F is the initial fixed value, close to the upper camera offset, X1 is negative, so the actual long side field of view FOV of the upper camera after offset HNew =D×S H / F-X1×S H / F;
[0076] According to the principle of constant camera resolution, the new calibration data of the bar waterline size measured by the upper camera is B3=FOV HNew / 2448, then the actual bar waterline size Act1 = B3 × bar waterline pixel length = FOV HNew / 2448×pixel length of the rod waterline.
[0077] S4. Since the FA lens is used, the field of view changes with the change of working distance. The left and right movement of the bar in the roller will cause errors in the upper and lower dimensions measured by the side camera. The principle of near is large and far is small. If the bar is only offset to the left and right, it will not affect the waterline size measured by the upper camera, because the distance between the bar and the lens has not changed. The error caused by the offset needs to be compensated. The displacement calculation is performed according to the center line of the sample bar calculated during calibration. The offset close to the camera side minus the error caused by the offset, the unit is mm. Assuming that the upper camera detects that the bar is offset in the direction close to the side camera, the offset distance measured by the upper camera is X2, then the new working distance after the offset is equal to the initial working distance + offset distance. According to the formula F / D =S W / FOV W , where FOV W is the initial short side field of view of the side camera, and the actual short side field of view FOV of the side camera after offset is calculated WNew =(D+X2)×S W / F = D × S W / F+ X2×S W / F,D×S W / F is the initial fixed value, close to the side camera offset, X2 is negative, so the actual side camera short side field of view FOV after offset WNew =D×S W / F-X2×S W / F;
[0078] According to the principle of constant camera resolution, the new calibration data of the upper and lower dimensions of the bar measured by the side camera is B4=FOV WNew / 2048, then the actual upper and lower dimensions of the bar Act2 = B4 × the pixel length of the bar waterline = FOV WNew / 2048×pixel length of the bar waterline.
[0079] S5. Repeat steps S3 and S4 to obtain the most recent N measurement results and calculate the average value. Specifically, N can be set freely according to the first-in-first-out principle of the data queue. For example, the average value of the most recent 5 measurements is set to be calculated. At the start, the data queue is cleared, and then the first 5 measurement results are saved to the data queue and accumulated. It is determined that the calculation is greater than or equal to 5 times, and the accumulated result divided by 5 is equal to the average value of the most recent 5 measurement results. The sixth measurement result will replace the first measurement result to ensure that the average value of the current measurement is the most recent 5 measurement results as the final measurement result.
[0080] The present invention uses dual cameras for measurement and corrects the measurement results by calculating the offset distances in different directions. It is applied to the bar line and the exit area of the roughing and medium rolling mills in the steel plant. It can accurately measure the bar size and is suitable for online size detection in the production of steel bars.
[0081] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for dynamic dimension measurement of a bar, characterized in that: Measuring with the side camera and the top camera includes the following steps: S1. Place the bar sample on the roller measuring position, set up cameras above and on the side of the measuring position, set the side camera on the side of the bar sample to measure the upper and lower dimensions of the bar, set the upper camera above the bar sample to measure the waterline dimension of the bar, and record the actual dimension of the bar sample measured by the upper camera as D3 and the actual dimension of the bar sample measured by the side camera as D4; S2. Collect images from the side camera and the top camera at the same time, identify the two edge segments of the bar, calculate the midpoint of one edge segment, and then find the perpendicular segment from the midpoint to the other edge segment to obtain the pixel distance of the perpendicular segment, where the pixel distance of the perpendicular segment of the top camera is the waterline pixel size of the corresponding bar sample, recorded as D1, and the pixel distance of the perpendicular segment of the side camera is the upper and lower pixel sizes of the corresponding bar sample, recorded as D2. The waterline calibration ratio relationship corresponding to the top camera is obtained as B1=D3 / D1, and the upper and lower calibration ratio relationship corresponding to the side camera is obtained as B2=D4 / D2; S3, take out the bar sample and produce the bar. During the production process, the side camera detects the distance X1 of the bar's upper and lower offsets, and recalculates the bar's waterline calibration ratio B3 based on the upper and lower offset distance X1, thereby calculating the actual bar waterline size Act1; S4, the upper camera detects the left and right offset distance X2 of the bar, and recalculates the upper and lower calibration ratios B4 of the bar according to the left and right offset distance X2, thereby calculating the actual upper and lower dimensions Act2 of the bar; S5. Repeat steps S3 and S4, calculate multiple times and take the average value as the final measurement result.
2. The dynamic dimension measurement method of a bar according to claim 1, characterized in that: Step S3 includes the following steps: S31, the side camera detects the distance X1 of the bar's upper and lower deviation; S32, calculating the actual long side field of view FOV of the upper camera after the offset according to the offset distance X1 HNew ; S33, the actual long side field of view FOV of the upper camera after offset HNew Calculate the actual bar waterline size Act1.
3. The dynamic dimension measurement method of a bar according to claim 2, characterized in that: In step S31, X1 is calculated as follows: X1=pixel distance of the rod’s upper and lower offset×B2; Among them, X1 is measured by the side camera, and the positive or negative value is determined by the offset direction of the bar. If the offset direction is close to the upper camera, X1 is a negative value, otherwise it is a positive value.
4. The method for dynamic dimension measurement of a bar according to claim 3, characterized in that: In step S32, the upper camera long side field of view FOV HNew The calculation formula is: FOV HNew =(D+X1)×S H / F= D×S H / F+ X1×S H / F; Where D is the working distance from the center point of the lens surface to the center line of the rod; S H is the long side size of the camera target surface; F is the focal length of the camera lens.
5. The method for dynamic dimension measurement of a bar according to claim 4, characterized in that: In step S33, according to the actual long side field of view FOV of the upper camera after the offset HNew , calculate the new waterline calibration ratio relationship B3 corresponding to the upper camera, and the actual bar waterline size Act1 is calculated as: Act1=B3×actual waterline pixel length of the bar; Where B3 = FOV HNew / Resolution of the long side of the camera. The actual waterline pixel length of the rod is measured by the upper camera.
6. The method for dynamic dimension measurement of a bar according to claim 1, characterized in that: Step S4 includes: S41, the upper camera detects the distance X2 of the left and right deviation of the bar; S42, calculating the actual short side field of view FOV of the side camera after the offset according to the offset distance X2 WNew ; S43, actual side camera short side field of view FOV after offset WNew Calculate the actual upper and lower dimensions of the bar Act2.
7. The method for dynamic dimension measurement of a bar according to claim 6, characterized in that: In S41, X2 is calculated as: X2 = the pixel distance of the bar’s left and right offset × B1; Among them, X2 is measured by the upper camera, and the positive or negative value is determined by the offset direction of the bar. If the offset direction is close to the side camera, X2 is a negative value, otherwise it is a positive value.
8. The method for dynamic dimension measurement of a bar according to claim 7, characterized in that: In S42, the side camera short side field of view FOV WNew The calculation formula is: FOV WNew =(D+X2)×S W / F= D×S W / F+ X2×S W / F; Where D is the working distance from the center point of the lens surface to the center line of the rod; S W is the short side size of the camera target surface; F is the focal length of the camera lens.
9. The method for dynamic dimension measurement of a bar according to claim 8, characterized in that: In S43, according to the actual side camera short side field of view FOV after the offset WNew , calculate the upper and lower calibration ratio relationship B4 corresponding to the new side camera, and the calculation method of the actual bar waterline size Act2 is: Act2=B4×actual upper and lower pixel length of the bar; Where B4 = FOV WNew / Resolution of the short side of the camera. The actual upper and lower pixel length of the bar is measured by the side camera.
Citation Information
Patent Citations
Object dimension measuring method and device
CN108036724A
Object size measuring method, apparatus and system
CN108240793A