Method and system for obtaining low-gray-value light bar sub-pixel edge of forging surface in large high-temperature forging image

By acquiring pixels in a circular area with the pixel-level edge center of the low-gray-value light bar in the high-temperature forging image and fitting straight lines, the accuracy and efficiency of the sub-pixel edge extraction of low-gray-value light bars in the high-temperature forging image is solved. Weigh the trade-offs to achieve efficient and accurate subpixel edge extraction.

CN119477951APending Publication Date: 2025-02-18DALIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411663323.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In high-temperature forging images, there is a trade-off between accuracy and efficiency in subpixel edge extraction of low-gray-valued light bars, making it difficult to achieve high-precision and rapid measurement in complex environments.

Method used

The pixels in the circular area are obtained by obtaining the pixel-level edge center of the low gray value bar in the high-temperature forging image, and fitting the straight line based on the grayscale and adjacent pixel-level edges of the region, and computing the circular area segmentation straight line is calculated based on the grayscale of the region and the edges of the adjacent pixel-level. and the equations of the pixel level to obtain the subpixel edge corresponding to the pixel level edge.

Benefits of technology

It realizes efficient and precise extraction of subpixel edges of low grayscale light bars in high-temperature forging images, meeting the needs of high-precision analysis and processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477951A_ABST
    Figure CN119477951A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for acquiring a low-gray-value light bar sub-pixel edge on the surface of a forging in a large high-temperature forging image, and relates to the technical field of computer vision detection. Comprising the following steps: in a high-temperature forging image, acquiring pixels in a circular area with the diameter of N pixels by taking the pixel-level edge center of a low-gray-value light bar as a central point; based on the gray level of pixels in the circular area and a plurality of pixel-level edges adjacent to the pixel-level edge of the low-gray-value light bar, obtaining the position of a circular area segmentation straight line and a straight line equation; straight lines which pass through the pixel-level edge center of the low-gray-value light bar and are perpendicular to the circular area segmentation straight line are obtained, and the intersection point of the two straight lines is a sub-pixel edge corresponding to the pixel-level edge. The method can effectively solve the problem that the extraction precision of the sub-pixel edge is reduced due to low brightness of the light bar in the high-temperature forging image, and is particularly suitable for accurately calculating the sub-pixel edge of the light bar with a low gray value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision detection, and in particular to a method and system for obtaining sub-pixel edges of light strips with low gray values ​​on the surface of a forging in an image of a large high-temperature forging. Background Art

[0002] During the free forging process, the temperature of the high-temperature forgings can reach more than one thousand degrees Celsius, thus radiating strong light. In order to accurately measure the size of these high-temperature forgings using a computer vision system, the existing technology has adopted measures such as installing a short-wave filter in front of the camera lens to eliminate the strong radiation light of the forgings and enhance the texture information on the forging surface. At the same time, light projection equipment such as projectors are also used to project light strips onto the surface of the forgings.

[0003] However, according to the radiation characteristics of high-temperature forgings, the spectral response characteristics of the camera, and the spectral radiation characteristics of the projector, it is found that although the short-wave filter can effectively filter out the infrared light radiated by the forgings, this also causes the projected light reflected by the forgings received by the camera to become relatively weak. Therefore, in the final image display, the grayscale value of these light strips is low, which is called low grayscale value light strips.

[0004] After obtaining the sub-pixel edges of the low gray value light strips in the high temperature forging image, the size of the high temperature forging can be obtained through further processing steps such as three-dimensional reconstruction and fitting. Therefore, in order to achieve the goal of non-contact measurement of forging size using a computer vision system, the key is to accurately obtain the sub-pixel edges of those low gray value light strips in the high temperature forging image, but in sub-pixel edge extraction, it is usually necessary to make a trade-off between extraction accuracy and efficiency. High-precision extraction often requires more complex algorithms and longer processing time, while high-efficiency extraction may sacrifice a certain degree of accuracy.

[0005] In applications such as high-temperature forging dimensional measurement, both high-precision edge information and fast measurement results are required, which makes the existing sub-pixel edge extraction method face challenges. Summary of the invention

[0006] The purpose of the present invention is to propose a method and system for obtaining the sub-pixel edge of a low gray value light strip on the surface of a forging in an image of a large high-temperature forging, which can identify the position of the pixel-level edge on the light strip and has the advantages of stable calculation process, high precision and fast speed.

[0007] According to a first aspect of an embodiment of the present disclosure, a method for obtaining sub-pixel edges of light strips with low gray values ​​on the surface of a forging in an image of a large high-temperature forging is provided, comprising the following steps:

[0008] In the high-temperature forging image, the pixels in the circular area with a diameter of N pixels are obtained with the center of the pixel-level edge of the low gray value light strip as the center point;

[0009] Based on the grayscale of the pixels in the circular area and a number of pixel-level edges adjacent to the pixel-level edge of the light strip with low grayscale value, the position of the circular area segmentation line and the equation of the line are obtained;

[0010] A straight line passing through the center of the pixel-level edge of the low grayscale light strip and perpendicular to the circular area segmentation straight line is obtained, and the intersection of the two straight lines is the sub-pixel edge corresponding to the pixel-level edge.

[0011] In one embodiment, the center of the low gray value light strip pixel level edge P (i, j) is used as the origin o of the coordinate system, the horizontal direction is the x-axis, and the vertical direction is the y-axis to establish a coordinate system oxy; the pixel is a square, the length is ε, the radius of the circular area is r, and the pixel Grayscale express;

[0012] Get several pixel-level edges adjacent to the pixel-level edge P(i,j) of the low gray value light strip, get their coordinates in the coordinate system oxy, and fit them into a straight line l t ; The fitting straight line l t The angle between the positive x-axis and the positive x-axis is θ.

[0013] In one embodiment, there is a circular region corresponding to the fitting straight line l t Parallel straight lines g , the straight line l g The expression is y=ax+b, where a and b are coefficients to be determined; the straight line l g Divide the circular area into regions D 1 and region D 2 , the region D 1 and region D 2 The grayscale inside is gD 1 and gD 2 Indicates that, and gD 1 <gD 2 .

[0014] In one embodiment, obtain the C numbered in the circular area. 1 Column and C 2 Column pixels, respectively and Indicates that the grayscale of pixels is expressed as and Indicates; among them, Then get the R with marked serial number in the circular area 1 Row and R 2 Row pixels, respectively and Indicates that the grayscale of pixels is expressed as and express.

[0015] In one embodiment, according to gD 1 and gD 2 The value of the coordinate origin o to the straight line l g The distance ξ, get the straight line l g After calculating the coefficients a and b of the expression, we get the equation passing through the origin o and the straight line l g Vertical straight line g ', the straight line l g With straight line l g The intersection of ' is the sub-pixel edge P corresponding to the pixel-level edge P(i,j). 0 .

[0016] In one embodiment, gD is determined 1 and gD 2 When the value of is, there are the following cases:

[0017] When θ∈[-45°,45°]: If and but in, like and but like and but like and but

[0018] When θ∈(45°, 135°): If and but like and but like and but like and but

[0019] In one embodiment, using gD 1 and gD 2 Get the area D in the circular area 1 and region D 2 Grayscale and:

[0020]

[0021] gray D1,D2 =gray D1 +gray D2

[0022]

[0023] In one embodiment, based on region D 1 and region D 2 The grayscale and distance ξ, coefficient a and coefficient b are obtained as follows:

[0024]

[0025] According to a second aspect of an embodiment of the present disclosure, a system is provided for obtaining sub-pixel edges of light strips with low gray values ​​on the surface of a forging in an image of a large high-temperature forging, comprising:

[0026] The circular area acquisition module acquires pixels in a circular area with a diameter of N pixels in the high-temperature forging image, taking the pixel-level edge center of the low gray value light strip as the center point;

[0027] A segmentation module, based on the grayscale of the pixels in the circular area and a number of pixel-level edges adjacent to the pixel-level edge of the light strip with low grayscale value, obtains the position of the circular area segmentation line and the equation of the line;

[0028] The sub-pixel edge acquisition module acquires a straight line that passes through the center of the pixel-level edge of the low grayscale light strip and is perpendicular to the circular area segmentation straight line. The intersection of the two straight lines is the sub-pixel edge corresponding to the pixel-level edge.

[0029] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored and running on the memory, wherein when the processor executes the program, a method for obtaining sub-pixel edges of light strips with low gray values ​​on the surface of a forging in an image of a large high-temperature forging is implemented.

[0030] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, a method for obtaining sub-pixel edges of low grayscale value light strips on the surface of a forging in an image of a large high-temperature forging is implemented.

[0031] Compared with the prior art, the above technical solution adopted by the present invention has the following advantages: the method is particularly suitable for processing light strips with low grayscale values ​​in high-temperature forging images, and based on the pixel-level edges of these light strips, the corresponding sub-pixel edge positions are further calculated; and the entire calculation process shows high stability, accuracy and speed. The advantage of this method is that it can effectively cope with the challenges brought by the low brightness of light strips in a complex high-temperature forging image environment, ensure the extraction accuracy of sub-pixel edges, and thus meet the needs of high-precision analysis and processing of high-temperature forging images. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The drawings in the specification, which constitute a part of the present application, are used to provide further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.

[0033] Figure 1 A coordinate system established with the pixel-level edge as the center and the pixels within the circular area;

[0034] Figure 2 For the straight line l g Schematic diagram of the principle of segmenting a circular area;

[0035] Figure 3 For region D 1 and region D 2 Schematic diagram of inner grayscale. DETAILED DESCRIPTION

[0036] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.

[0037] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0038] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0039] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and systems according to various embodiments of the present disclosure. It should be noted that each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code may include one or more executable instructions for implementing the logical functions specified in each embodiment. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the flowchart and / or block diagram, and the combination of boxes in the flowchart and / or block diagram can be implemented using a dedicated hardware-based system that performs a specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0040] Embodiment 1:

[0041] This embodiment provides a method for obtaining the sub-pixel edge of a light strip with low gray value on the surface of a forging in an image of a large high-temperature forging, comprising the following steps:

[0042] S1. In the high temperature forging image, the pixels in the circular area with a diameter of N pixels are obtained with the center of the pixel-level edge of the low gray value light strip as the center point;

[0043] Specifically, the high-temperature forging image is an image taken after a short-wave filter is installed in front of the camera and a light strip projection device is used to project light strips onto the surface of the forging. Since the short-wave filter filters out the radiation light of the forging and part of the projected light strips reflected by the forging, the light strips in the image are low-grayscale light strips;

[0044] After using a Gaussian filter to filter out the noise in the high-temperature forging image, identify the position of the low-grayscale light strip and obtain the pixel-level edge of the light strip, take the center of the pixel-level edge P(i,j) as the center point and select the pixels in a circular area with a diameter of N (for example, 7) pixels in the high-temperature forging image. The pixel numbers are as follows: Figure 1 shown. Figure 1 Medium pixel Indicates that the pixel numbered 21 is P y (21) is the pixel where the pixel-level edge P(i,j) is located.

[0045] S2. Based on the grayscale of the pixels in the circular area and the pixel-level edges adjacent to the pixel-level edge of the low grayscale light strip, the position of the circular area segmentation line and the equation of the line are obtained;

[0046] Specifically, the center of the pixel-level edge P(i, j) is taken as the origin o of the coordinate system, the horizontal direction is the x-axis, and the vertical direction is the y-axis to establish the coordinate system oxy; the pixel is assumed to be a square, the length is ε, and ε=1 is set in this embodiment; the radius of the circular area is denoted by r, and the pixel Grayscale express.

[0047] In order to obtain the sub-pixel edge corresponding to the pixel-level edge P(i,j), suppose there is a straight line l in the circular area g ,like Figure 2 Straight line l g The expression is y = ax + b, where a and b are the coefficients to be determined. g Divide the circular area into two areas, and use D 1 and D 2 Indicates that the grayscale in the region is uniformly distributed. Region D 1 and region D 2 The grayscale inside is gD 1 and gD 2 Indicates that, and gD 1 <gD 2 ;

[0048] Figure 2 Middle Area D 1 and region D 2 The grayscale and pixel-level edge P(i,j) position on the light strip and the straight line l g The inclination angle θ is related to Figure 1 C in the middle circle area with serial number 1 Column and C 2 Column pixels, respectively and Indicates that the grayscale of pixels is expressed as and Indicates. Among them, but

[0049] Likewise, get Figure 1 The numbered R in the middle circular area 1 Row and R 2 Row pixels, respectively and Indicates that the grayscale of pixels is expressed as and Indicates. Among them, but

[0050] Take several (e.g. 5) pixel-level edges adjacent to the pixel-level edge P(i,j), obtain the coordinates of each point in the coordinate system oxy, and fit them into a straight line l t ; Fitting straight line l t The angle between gD and the positive half axis of x-axis is θ. Then gD 1 and gD 2 The value of is determined in the following cases:

[0051] (1) When Φ∈[-45°,45°]:

[0052] like and but in, like and but like and but like and but

[0053] (2) When Φ∈(45°, 135°)

[0054] like and but like and but like and but like and but

[0055] Using gD 1 and gD 2 Get the circular area D 1 and D 2 The grayscale sum of the region is:

[0056]

[0057] gray D1,D2 =gray D1 +gray D2

[0058]

[0059] According to the above formula, and in the fitting straight line l t and the desired straight line lg Under the parallel conditions, ξ, a and b are:

[0060]

[0061] S3. Obtain a straight line that passes through the center of the pixel-level edge of the low grayscale light strip and is perpendicular to the circular area segmentation straight line, and the intersection of the two straight lines is the sub-pixel edge corresponding to the pixel-level edge.

[0062] Figure 3 D 1 and D 2 Grayscale diagram in the area, straight line l g ' is through the origin o and is connected to the straight line l g Vertical straight line, l g 'with l g The intersection point P 0 is a sub-pixel edge point. 0 The distance is represented by ξ. g 'The angle between the vertical axis and the vertical axis y is represented by θ, then θ is also the straight line l g The angle with the x-axis.

[0063] By repeating the above steps, the sub-pixel edge SP(i, j) corresponding to each pixel-level edge P(i, j) on the light strip with low gray value can be obtained.

[0064] This method can effectively solve the problem of decreased sub-pixel edge extraction accuracy due to low brightness of light strips in high-temperature forging images, and is particularly suitable for accurately calculating the sub-pixel edges of these low-grayscale value light strips.

[0065] Embodiment 2:

[0066] This embodiment provides a system for obtaining sub-pixel edges of light strips with low gray values ​​on the surface of a large high-temperature forging in an image of a forging, including:

[0067] The circular area acquisition module acquires pixels in a circular area with a diameter of N pixels in the high-temperature forging image, taking the pixel-level edge center of the low gray value light strip as the center point;

[0068] A segmentation module, based on the grayscale of the pixels in the circular area and a number of pixel-level edges adjacent to the pixel-level edge of the light strip with low grayscale value, obtains the position of the circular area segmentation line and the equation of the line;

[0069] The sub-pixel edge acquisition module acquires a straight line that passes through the center of the pixel-level edge of the low grayscale light strip and is perpendicular to the circular area segmentation straight line. The intersection of the two straight lines is the sub-pixel edge corresponding to the pixel-level edge.

[0070] Embodiment three:

[0071] An electronic device includes a memory, a processor, and a computer program stored and running on the memory, wherein the processor implements the above-mentioned method for obtaining the sub-pixel edge of a light strip with low gray value on the surface of a forging in an image of a large high-temperature forging when executing the program, including:

[0072] In the high-temperature forging image, the pixels in the circular area with a diameter of N pixels are obtained with the center of the pixel-level edge of the low gray value light strip as the center point;

[0073] Based on the grayscale of the pixels in the circular area and a number of pixel-level edges adjacent to the pixel-level edge of the light strip with low grayscale value, the position of the circular area segmentation line and the equation of the line are obtained;

[0074] A straight line passing through the center of the pixel-level edge of the low grayscale light strip and perpendicular to the circular area segmentation straight line is obtained, and the intersection of the two straight lines is the sub-pixel edge corresponding to the pixel-level edge.

[0075] Embodiment 4:

[0076] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned method for obtaining the sub-pixel edge of a light strip with low gray value on the surface of a forging in an image of a large high-temperature forging, comprising:

[0077] In the high-temperature forging image, the pixels in the circular area with a diameter of N pixels are obtained with the center of the pixel-level edge of the low gray value light strip as the center point;

[0078] Based on the grayscale of the pixels in the circular area and a number of pixel-level edges adjacent to the pixel-level edge of the light strip with low grayscale value, the position of the circular area segmentation line and the equation of the line are obtained;

[0079] A straight line passing through the center of the pixel-level edge of the low grayscale light strip and perpendicular to the circular area segmentation straight line is obtained, and the intersection of the two straight lines is the sub-pixel edge corresponding to the pixel-level edge.

[0080] Those skilled in the art should understand that the modules or steps of the present disclosure can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present disclosure is not limited to any specific combination of hardware and software.

[0081] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0082] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Technical personnel in the relevant field should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.

Claims

1. A method for obtaining the sub-pixel edge of a low gray value light strip on the surface of a large high-temperature forging in an image of a forging, characterized in that: The following steps are involved: In the high-temperature forging image, the pixels in the circular area with a diameter of N pixels are obtained with the center of the pixel-level edge of the low gray value light strip as the center point; Based on the grayscale of the pixels in the circular area and a number of pixel-level edges adjacent to the pixel-level edge of the light strip with low grayscale value, the position of the circular area segmentation line and the equation of the line are obtained; A straight line passing through the center of the pixel-level edge of the low grayscale light strip and perpendicular to the circular area segmentation straight line is obtained, and the intersection of the two straight lines is the sub-pixel edge corresponding to the pixel-level edge.

2. According to the method of claim 1, the method is characterized in that: The center of the low gray value light strip pixel edge P(i,j) is taken as the origin o of the coordinate system, the horizontal direction is the x-axis, and the vertical direction is the y-axis to establish the coordinate system oxy; let the pixel be a square, the length is ε, the radius of the circular area is r, and the pixel Grayscale express; Get several pixel-level edges adjacent to the pixel-level edge P(i,j) of the low gray value light strip, get their coordinates in the coordinate system oxy, and fit them into a straight line l t ; The fitting straight line l t The angle between the positive semi-axis and the x-axis is θ; there is a circular area with the fitting straight line l t Parallel straight lines g , the straight line l g The expression is y=ax+b, where a and b are coefficients to be determined; the straight line l g The circular area is divided into area D1 and area D2, the grayscales in area D1 and area D2 are represented by gD1 and gD2, and gD1<gD2.

3. According to claim 2, a method for obtaining the sub-pixel edge of a low gray value light strip on the surface of a large high-temperature forging in an image of a forging, characterized in that: Get the numbered pixels in columns C1 and C2 in the circular area, respectively. and Indicates that the grayscale of pixels is expressed as and Indicates; among them, Then get the numbered pixels in rows R1 and R2 in the circular area, and use and Indicates that the grayscale of pixels is expressed as and express.

4. According to claim 2, a method for obtaining the sub-pixel edge of a low gray value light strip on the surface of a large high-temperature forging in an image of a forging, characterized in that: According to the values ​​of gD1 and gD2, we can get the coordinates from the origin o to the straight line l. g The distance ξ, get the straight line l g After calculating the coefficients a and b of the expression, we get the equation passing through the origin o and the straight line l g Vertical straight line g ', the straight line l g With straight line l g The intersection of ' is the sub-pixel edge P0 corresponding to the pixel-level edge P(i,j).

5. According to claim 3, a method for obtaining the sub-pixel edge of a low gray value light strip on the surface of a large high-temperature forging in an image of a forging, characterized in that: When determining the values ​​of gD1 and gD2, there are several cases: When θ∈[-45°,45°]: If and but in, like and but like and but like and but When θ∈(45°, 135°): If and but like and but like and but like and but 6. A method for obtaining sub-pixel edges of low grayscale light strips on the surface of a large high-temperature forging in an image of a large high-temperature forging according to claim 5, characterized in that: Use gD1 and gD2 to get the grayscale sum of area D1 and area D2 in the circular area: gray D1,D2 =gray D1 +gray D2 7. A method for obtaining sub-pixel edges of low grayscale light strips on the surface of a large high-temperature forging in an image of a large high-temperature forging according to claim 6, characterized in that: Based on the grayscale sum of area D1 and area D2, the distance ξ, coefficient a and coefficient b are obtained as follows:

8. A system for obtaining sub-pixel edges of low grayscale light strips on the surface of a large high-temperature forging in an image of a forging, characterized in that: include: The circular area acquisition module acquires pixels in a circular area with a diameter of N pixels in the high-temperature forging image, taking the pixel-level edge center of the low gray value light strip as the center point; A segmentation module, based on the grayscale of the pixels in the circular area and a number of pixel-level edges adjacent to the pixel-level edge of the light strip with low grayscale value, obtains the position of the circular area segmentation line and the equation of the line; The sub-pixel edge acquisition module acquires a straight line that passes through the center of the pixel-level edge of the low grayscale light strip and is perpendicular to the circular area segmentation straight line. The intersection of the two straight lines is the sub-pixel edge corresponding to the pixel-level edge.

9. An electronic device comprising a memory, a processor and a computer program stored and running on the memory, wherein when the processor executes the program, it implements a method for obtaining sub-pixel edges of low grayscale value light strips on the surface of a forging in an image of a large high-temperature forging as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for obtaining sub-pixel edges of low grayscale value light strips on the surface of a forging in an image of a large high-temperature forging as described in any one of claims 1 to 7.