A method, device and storage medium for detecting circular arc edge

By using the rotation and bending method of the fan-shaped region of interest in the machine vision system, the image is projected into a one-dimensional row vector map and edge detection is performed, the problem of insufficient arc feature extraction speed and accuracy in the prior art is solved, and efficient arc feature detection is achieved.

CN111709912BActive Publication Date: 2025-05-23BEIJING A&E TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010421139.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-18
Publication Date
2025-05-23
Estimated Expiration
2040-05-18

AI Technical Summary

Technical Problem

The prior art is difficult to simplify and accelerate the arc feature extraction process while ensuring speed and accuracy, especially in machine vision systems.

Method used

By setting and adjusting the sector-shaped region of interest, rotating and beating its angle, the image is projected into a one-dimensional row vector map, and detection is performed using an edge detection algorithm to determine arc features.

Benefits of technology

The speed and accuracy of arc feature extraction are improved, the edge detection process is simplified, and the precise positioning and detection of arc features is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111709912B_ABST
    Figure CN111709912B_ABST
Patent Text Reader

Abstract

The present invention discloses a circular arc edge detection method, device and storage medium. The circular arc edge detection method comprises: setting a first sector-shaped region of interest of a circular arc to be detected; rotating the first sector-shaped region of interest, and changing the angle of the first sector-shaped region of interest to obtain a second sector-shaped region of interest of the circular arc to be detected, wherein the second sector-shaped region of interest is concentric with the circular arc to be detected; projecting the second sector-shaped region of interest into a one-dimensional row vector graph; performing edge detection on the one-dimensional row vector graph, and determining the circular arc to be detected according to the result of the edge detection. The present invention projects a sector-shaped ROI image into a one-dimensional row vector graph by using a projection method, and then performs edge detection on the one-dimensional row vector graph by using an edge detection algorithm, thereby achieving accurate positioning and detection of circular arc features, simplifying and accelerating the circular arc edge detection process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine vision, and in particular to an arc edge detection method, device and storage medium. Background Art

[0002] In actual production applications, it is necessary to use a machine vision system to extract information about arc features (referring to circular structures on the surface of workpieces / articles, such as circular holes, cylinders, etc.) to guide production testing and realize the automation and intelligence of production operations. The machine vision system converts the captured target into an image signal (digital signal, digital image) through a machine vision product (i.e., image capture device, camera, etc.), and transmits it to a dedicated image processing system. The image processing system uses various image processing algorithms to extract features of the target, thereby obtaining information such as the shape and position of the captured target. The image processing system is generally digital image processing, that is, a large two-dimensional array obtained by shooting with industrial cameras, video cameras, scanners and other equipment. The elements of the array are called pixels, and their values ​​are called grayscale values. The image processing technologies used generally include image compression, enhancement and restoration.

[0003] To ensure production efficiency and detection accuracy, the arc feature extraction process needs to be fast and accurate enough. How to simplify and accelerate the deployment of visual algorithms and improve the speed and accuracy of arc feature extraction is an urgent problem to be solved. Summary of the invention

[0004] The present invention provides a circular arc edge detection method, device and storage medium, which can improve the speed and accuracy of circular arc feature extraction to a certain extent.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0006] A circular arc edge detection method comprises the following steps:

[0007] Set the first sector-shaped region of interest of the arc to be detected;

[0008] Rotate the first sector-shaped region of interest and change the angle of the first sector-shaped region of interest to obtain a second sector-shaped region of interest of the arc to be detected, wherein the second sector-shaped region of interest is concentric with the arc to be detected; project the second sector-shaped region of interest into a one-dimensional row vector diagram;

[0009] Perform edge detection on the one-dimensional row vector graph, and determine the arc to be detected according to the result of the edge detection.

[0010] The technical solution adopted by the present invention also includes: rotating the first sector-shaped region of interest includes:

[0011] transforming the first sector-shaped region of interest image into a first polar coordinate image;

[0012] Projecting the first polar coordinate image into a first one-dimensional row vector image;

[0013] Performing edge detection on the first one-dimensional row vector image to obtain an edge detection result; rotating the first sector-shaped region of interest image clockwise or counterclockwise by a preset angle, wherein the preset angle is smaller than a set rotation angle range of the first sector-shaped region of interest;

[0014] Determine whether the cumulative rotation angle of the first sector-shaped region of interest is greater than the rotation angle range, if so, stop the rotation, if not, return to the step of transforming the first sector-shaped region of interest image into a first polar coordinate image;

[0015] After the rotation stops, the edge detection result with the largest contrast is selected from all the edge detection results obtained, and the best starting angle of the first sector-shaped region of interest is obtained according to the rotation angle corresponding to the edge detection result with the largest contrast;

[0016] The optimal starting angle is used as the starting angle of the second fan-shaped region of interest.

[0017] The technical solution adopted by the present invention also includes: rotating the first sector-shaped region of interest includes:

[0018] transforming the first sector-shaped region of interest image into a first polar coordinate image;

[0019] Projecting the first polar coordinate image into a first one-dimensional row vector image;

[0020] Performing edge detection on the first one-dimensional row vector graph to obtain an edge detection result;

[0021] Rotating the first sector-shaped region of interest image clockwise or counterclockwise according to a preset single rotation angle, and stopping the rotation when the cumulative number of rotations reaches a preset number of rotations;

[0022] After the rotation stops, the edge detection result with the largest contrast is selected from all the edge detection results obtained, and the best starting angle of the first sector-shaped region of interest is obtained according to the rotation angle corresponding to the edge detection result with the largest contrast;

[0023] The optimal starting angle is used as the starting angle of the second fan-shaped region of interest.

[0024] The technical solution adopted by the present invention also includes: the changing of the angle of the first sector-shaped region of interest includes:

[0025] transforming the first sector-shaped region of interest image into a second polar coordinate image;

[0026] Projecting the first polar coordinate image into a second one-dimensional row vector image;

[0027] Performing edge detection on the second one-dimensional row vector graph to obtain an edge detection result;

[0028] Bending the included angle of the first fan-shaped region of interest image clockwise or counterclockwise by a preset angle, wherein the bending preset angle refers to reducing the included angle by a preset angle, and the preset angle is smaller than a set bending angle range of the first fan-shaped region of interest;

[0029] Determine whether the cumulative bending angle of the first sector-shaped region of interest is greater than the bending angle range, if so, stop changing the angle of the first sector-shaped region of interest, if not, return to the step of transforming the first sector-shaped region of interest image into a second polar coordinate image;

[0030] After stopping changing the angle of the first sector-shaped region of interest, selecting an edge detection result with the largest contrast from all the obtained edge detection results, and obtaining the optimal angle of the first sector-shaped region of interest according to the bending angle corresponding to the edge detection result with the largest contrast;

[0031] The optimal angle is taken as the angle of the second fan-shaped region of interest.

[0032] The technical solution adopted by the present invention also includes: the changing of the angle of the first sector-shaped region of interest further includes:

[0033] transforming the first sector-shaped region of interest image into a second polar coordinate image;

[0034] Projecting the first polar coordinate image into a second one-dimensional row vector image;

[0035] Performing edge detection on the second one-dimensional row vector graph to obtain an edge detection result;

[0036] Bending the angle of the first fan-shaped region of interest image clockwise or counterclockwise according to a preset single bending angle, and stopping changing the angle of the first fan-shaped region of interest when the cumulative number of bending times reaches a preset number of bending times;

[0037] After stopping changing the angle of the first sector-shaped region of interest, selecting an edge detection result with the largest contrast from all the obtained edge detection results, and obtaining the optimal angle of the first sector-shaped region of interest according to the bending angle corresponding to the edge detection result with the largest contrast;

[0038] The optimal angle is used as the angle of the second sector-shaped region of interest. The technical solution adopted by the present invention also includes: determining the arc to be detected according to the edge detection result includes:

[0039] The position of the projection point of the arc to be detected is obtained according to the edge detection result, the radius value of the arc to be detected is determined according to the position of the projection point, the coordinates of the intersection of the arc to be detected and the first fan-shaped area of ​​interest, as well as the coordinates of the starting point of the arc to be detected are determined according to the radius value.

[0040] In order to solve the above technical problems, another technical solution adopted by the present invention is: a circular arc edge detection device, the device comprising:

[0041] An area of ​​interest setting module: used to set a first sector-shaped area of ​​interest of the arc to be detected;

[0042] An area of ​​interest adjustment module is used to rotate the first sector-shaped area of ​​interest and change the angle of the first sector-shaped area of ​​interest to obtain a second sector-shaped area of ​​interest of the arc to be detected, wherein the second sector-shaped area of ​​interest is concentric with the arc to be detected;

[0043] An area of ​​interest projection module: used for projecting the second sector-shaped area of ​​interest into a one-dimensional row vector graph;

[0044] Edge detection module: used to perform edge detection on the one-dimensional row vector graph, and determine the arc to be detected according to the result of the edge detection.

[0045] In order to solve the above technical problems, another technical solution adopted by the present invention is: to provide an arc edge detection device, comprising a processor and a memory coupled to the processor, wherein:

[0046] The memory stores program instructions for implementing the arc edge detection method described above;

[0047] The processor is used to execute the program instructions stored in the memory to perform edge detection on the arc to be detected.

[0048] In order to solve the above technical problem, another technical solution adopted by the present invention is: a storage medium storing program instructions executable by a processor, wherein the program instructions are used to execute the above arc edge detection method.

[0049] The beneficial effect of the present invention is as follows: the present invention projects the fan-shaped ROI image into a one-dimensional row vector image by adopting a projection method, and then uses an edge detection algorithm to perform edge detection on the one-dimensional row vector image, thereby realizing accurate positioning and detection of arc features, and finally obtaining parameter information such as the center coordinates, radius value, and starting point coordinates of the arc features, thereby simplifying and speeding up the edge detection process. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a schematic diagram of the first sector ROI;

[0051] Figure 2 is a schematic flow chart of a circular arc edge detection method according to a first embodiment of the present invention;

[0052] Figure 3 is a schematic flow chart of a circular arc edge detection method according to a second embodiment of the present invention;

[0053] Figure 4 is a flow chart of an optimal starting angle algorithm for the first sector ROI in the arc edge detection method of the second embodiment of the present invention;

[0054] Figure 5 is the first one-dimensional row vector graph in the arc edge detection method of the second embodiment of the present invention;

[0055] Figure 6 is a flow chart of the optimal angle calculation method of the fan-shaped ROI' in the arc edge detection method of the second embodiment of the present invention;

[0056] Figure 7 is a schematic diagram of an edge detection process in a circular arc edge detection method according to a second embodiment of the present invention;

[0057] Figure 8 is a first structural schematic diagram of an arc edge detection device according to an embodiment of the present invention;

[0058] Fig. 9 is a second structural schematic diagram of the arc edge detection device according to an embodiment of the present invention;

[0059] Fig.10 It is a schematic diagram of the storage medium structure of an embodiment of the present invention. DETAILED DESCRIPTION

[0060] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0061] The terms "first", "second" and "third" in the present invention are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second" and "third" can explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. All directional indications (such as up, down, left, right, front, back...) in the embodiments of the present invention are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0062] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0063] The arc edge detection method of the present invention adopts a fan-shaped ROI, specifically as follows Figure 1 As shown in the figure, the upper sector is the boundary of the ROI, the black line in the sector ROI is the arc to be detected, and the parameters of the sector ROI include: sector center coordinates (x, y), sector start angle α, sector angle θ, sector ROI inner circle radius Ri and outer circle radius R e ; Then, the image in the sector ROI is projected into a one-dimensional row vector by a projection method, and the row vector is edge detected by edge detection principle, so as to realize feature location and detection of the arc to be detected. The following embodiment will specifically describe the arc edge detection process.

[0064] Embodiment 1

[0065] See also Figure 2 , is a schematic flow chart of a circular arc edge detection method according to a first embodiment of the present invention. The circular arc edge detection method according to the first embodiment of the present invention comprises the following steps:

[0066] S100: Setting a first sector ROI of the arc to be detected;

[0067] S110: rotating the first sector-shaped region of interest and changing the angle of the first sector-shaped region of interest to obtain a second sector-shaped region of interest of the arc to be detected, the second sector-shaped region of interest being concentric with the arc to be detected;

[0068] In this step, the first sector ROI is firstly transformed into polar coordinates, and then the transformed first sector ROI is projected into a one-dimensional row vector image by a projection method. Edge detection is performed on the one-dimensional row vector image, and a series of edge detection results are screened. The final optimal starting angle of the first sector ROI is obtained according to the rotation angle Δα corresponding to the edge detection result with the largest contrast; then, the first sector ROI is rotated to the optimal starting angle to obtain the second sector region of interest of the arc to be detected.

[0069] S120: Projecting the second sector-shaped region of interest into a one-dimensional row vector image;

[0070] In this step, the second sector-shaped region of interest is firstly transformed into polar coordinates, and the transformed second sector-shaped region of interest is projected into a one-dimensional row vector diagram using a projection method, so that the arc to be detected is projected as a point.

[0071] S130: Perform edge detection on the one-dimensional row vector graph, and determine the arc to be detected according to the result of the edge detection;

[0072] In this step, edge detection is performed on the one-dimensional row vector graph to obtain the position of the projection point of the arc to be detected, determine the radius value of the arc to be detected, and determine all parameters of the arc to be detected based on the radius value.

[0073] See also Figure 3 , is a schematic flow chart of a circular arc edge detection method according to a second embodiment of the present invention. The circular arc edge detection method according to the second embodiment of the present invention comprises the following steps:

[0074] S200: Using a projection method to obtain an optimal starting angle of a first sector ROI of the arc to be detected;

[0075] In S200, the algorithm flow for obtaining the best starting angle of the first sector ROI is as follows: Figure 4 As shown, it specifically includes the following steps:

[0076] S201: Setting algorithm parameters, including: setting the sector center coordinates (x, y), sector start angle α, sector angle θ, sector ROI inner circle radius R i And the outer radius R e , qualified threshold T, rotation / bending angle range δ, etc.;

[0077] S202: converting the first sector ROI image into a first polar coordinate image;

[0078] In this step, the image transformation method is specifically as follows: transform the fan-shaped coordinate image in the Cartesian coordinate system into the polar coordinate system; suppose the image in the Cartesian coordinate system is I(x, y), and the image transformed into the polar coordinate system is I′(r, β), then I′(r, β) is a pair of θ*(R e -R i +1), and:

[0079] I'(r,β)=I(rcosβ,rsinβ) (1)

[0080] Where: r∈[0,R 2 -R 1 ],β∈[0,θ-1].

[0081] S203: Projecting the first polar coordinate image into a first one-dimensional row vector image by using a projection method, that is, averaging the pixel values ​​of each column of the polar coordinate image to obtain a row vector, where each pixel value of the vector is the average value of all pixel values ​​of the corresponding column;

[0082] The first one-dimensional row vector graph obtained through the above steps is as follows Figure 5 shown.

[0083] S204: performing edge detection on the first one-dimensional row vector image using an edge detection algorithm in image processing, wherein the edge detection process includes convolution operation, threshold processing, non-extreme value suppression, etc.;

[0084] S205: judging whether the first sector ROI needs to be rotated according to the set rotation / bending angle range δ, and if so, executing S206; otherwise, executing S207;

[0085] S206: rotating the center of the first sector ROI clockwise / counterclockwise according to the set single rotation angle or rotation times, and re-execute S202 to S205;

[0086] In this step, assuming that the single rotation angle is set to 1°, a total of 2δ rotations are required, and the process from S202 to S205 is repeated (2δ+1) times. Specifically, the single rotation angle is usually not more than 10°, because the larger the angle range, the more complicated the calculation process, the longer the time consumption and the worse the calculation accuracy.

[0087] In this step, the number of rotations of the first sector-shaped ROI may be set according to the rotation angle range of the first sector-shaped ROI. When the number of rotations of the first sector-shaped ROI reaches a preset number of rotations, the rotation is stopped.

[0088] S207: Obtain a series of edge detection results of the arc to be detected according to the (2δ+1) edge detection processes, and select the detection result with the largest contrast from the series of edge detection results. According to the rotation angle Δα corresponding to the detection result, the final optimal starting angle of the first sector ROI is obtained as (α+Δα).

[0089] S210: Rotate the first sector ROI according to the optimal starting angle to obtain a sector ROI';

[0090] S220: Calculate the best angle of the sector ROI' by using a projection method, and bend the sector ROI' according to the best angle to obtain a second sector ROI with a changed shape, wherein the second sector ROI is concentric with the arc to be detected;

[0091] In this step, the optimal angle calculation method of the fan-shaped ROI' is as follows: Figure 6 As shown, it is similar to the process of determining the best starting angle of the first sector ROI, and specifically includes the following steps:

[0092] S221: converting the fan-shaped ROI' image into a second polar coordinate image;

[0093] S222: Projecting the second polar coordinate image into a second one-dimensional row vector image;

[0094] S223: performing edge detection on the second one-dimensional row vector image using an edge detection algorithm in image processing, wherein the edge detection process includes convolution operation, threshold processing, non-extreme value suppression, etc.;

[0095] S224: judging whether to bend the sector ROI' according to the set rotation / bending angle range δ, that is, judging whether the angle of the sector ROI' is greater than the set rotation / bending angle range δ; if so, the angle of the sector ROI' needs to be changed (reduced), and executing S225; otherwise, executing S226;

[0096] S225: bending the sector ROI' clockwise / counterclockwise with the center of the sector ROI' according to the set single bending angle, and re-execute S221 to S224;

[0097] In this step, it is assumed that the single bending angle is 1°, so a total of 2δ bends are required, and S211 to S214 (2δ+1) times are repeated; the single bending angle is consistent with the single rotation angle, usually not exceeding 10°, because the larger the angle range, the more complicated the calculation process, the more time-consuming it becomes, and the calculation accuracy will also deteriorate.

[0098] In this step, the bending times of the first sector ROI may be set according to the bending angle range of the first sector ROI. When the bending times of the first sector ROI reaches the preset bending times, the angle of the sector ROI′ is stopped from being changed.

[0099] S226: Obtain a series of edge detection results of the arc to be detected according to the (2δ+1) edge detection process, and select the detection result with the largest contrast from the series of edge detection results, and determine the final optimal angle of the fan-shaped ROI' as (θ+Δθ) according to the bending angle Δθ corresponding to the detection result.

[0100] After the above steps, the position and shape of the first sector-shaped ROI have changed, and the changed second sector-shaped ROI is concentric with the arc to be detected.

[0101] S230: projecting the second fan-shaped ROI into a one-dimensional row vector image using a projection method, and performing edge detection on the one-dimensional row vector image using an edge detection algorithm;

[0102] In this step, the edge detection process is as follows: Figure 7 As shown, it specifically includes the following steps:

[0103] S231: converting the second sector ROI image into a third polar coordinate image;

[0104] S232: Projecting the third polar coordinate image into a third one-dimensional row vector image, where the arc to be detected is projected as a point;

[0105] S233: performing edge detection on the third one-dimensional row vector image using an edge detection algorithm in image processing, wherein the edge detection process includes convolution operation, threshold processing, non-extreme value suppression, etc., obtaining the position of the projection point of the arc to be detected, and determining the radius value of the arc to be detected;

[0106] S234: using the radius value of the arc to be detected to determine the coordinates of the intersection of the arc to be detected and the first sector ROI, and determining the coordinates of the starting point of the arc to be detected, completing the determination of all parameters of the arc to be detected, and realizing the positioning and detection of arc features.

[0107] See also Figure 8 , Figure 8 The first structural diagram of the arc edge detection device according to an embodiment of the present invention is shown. The device 40 comprises:

[0108] An area of ​​interest setting module 41 is used to set a first sector-shaped area of ​​interest of a circular arc to be detected;

[0109] The region of interest adjustment module 42 is used to rotate the first sector-shaped region of interest and change the angle of the first sector-shaped region of interest to obtain a second sector-shaped region of interest of the arc to be detected, and the second sector-shaped region of interest is concentric with the arc to be detected;

[0110] The region of interest projection module 43 is used to project the second sector-shaped region of interest into a one-dimensional row vector image;

[0111] The edge detection module 44 is used to perform edge detection on the one-dimensional row vector graph and determine the arc to be detected according to the result of the edge detection.

[0112] See also Fig. 9 , Fig. 9 The second structural schematic diagram of the arc edge detection device of the present invention is shown. Fig. 9 As shown, the device 50 includes a processor 51 and a memory 52 coupled to the processor 51 .

[0113] The memory 52 stores program instructions for implementing the above-mentioned arc edge detection method.

[0114] The processor 51 is used to execute the program instructions stored in the memory 52 to perform edge detection on the arc to be detected.

[0115] The processor 51 may also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip having the ability to process signals. The processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0116] See also Fig.10 , Fig.10Schematic diagram of the structure of the storage medium of the embodiment of the present invention. The storage medium of the embodiment of the present invention stores a program file 61 that can implement all the above methods, wherein the program file 61 can be stored in the above storage medium in the form of a software product, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes, or terminal devices such as computers, servers, mobile phones, tablets, etc.

[0117] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0118] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units. The above is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the specification and drawings of the present invention, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present invention.

Claims

1. A circular arc edge detection method, It is characterized in that The following steps are involved: Set the first sector-shaped region of interest of the arc to be detected; Rotate the first sector-shaped region of interest and change the angle of the first sector-shaped region of interest to obtain a second sector-shaped region of interest of the arc to be detected, wherein the second sector-shaped region of interest is concentric with the arc to be detected; project the second sector-shaped region of interest into a one-dimensional row vector diagram; Performing edge detection on the one-dimensional row vector graph, and determining the arc to be detected according to the result of the edge detection; Wherein, rotating the first sector-shaped region of interest comprises: transforming the first sector-shaped region of interest image into a first polar coordinate image; Projecting the first polar coordinate image into a first one-dimensional row vector image; Performing edge detection on the first one-dimensional row vector graph to obtain an edge detection result; Rotate the first sector-shaped region of interest image clockwise or counterclockwise by a preset angle; When the accumulated rotation angle is greater than the set rotation angle range of the first sector-shaped region of interest or the accumulated rotation times reaches a preset rotation times, the rotation is stopped, otherwise the process returns to the step of transforming the first sector-shaped region of interest image into a first polar coordinate image; After the rotation stops, the edge detection result with the largest contrast is selected from all the edge detection results obtained, and the best starting angle of the first sector-shaped region of interest is obtained according to the rotation angle corresponding to the edge detection result with the largest contrast; Taking the optimal starting angle as the starting angle of the second fan-shaped region of interest; And, the step of changing the angle of the first sector-shaped region of interest includes: transforming the first sector-shaped region of interest image into a second polar coordinate image; Projecting the first polar coordinate image into a second one-dimensional row vector image; Performing edge detection on the second one-dimensional row vector graph to obtain an edge detection result; Bending the angle of the first fan-shaped region of interest image clockwise or counterclockwise by a preset angle; When the accumulated bending angle of the first sector-shaped region of interest is greater than the bending angle range of the first sector-shaped region of interest or the accumulated bending times reaches a preset bending times, stop changing the angle of the first sector-shaped region of interest, otherwise return to the step of transforming the first sector-shaped region of interest image into a second polar coordinate image; After stopping changing the angle of the first sector-shaped region of interest, selecting an edge detection result with the largest contrast from all the obtained edge detection results, and obtaining the optimal angle of the first sector-shaped region of interest according to the bending angle corresponding to the edge detection result with the largest contrast; The optimal angle is taken as the angle of the second fan-shaped region of interest.

2. The arc edge detection method according to claim 1, It is characterized in that Determining the arc to be detected according to the edge detection result comprises: The position of the projection point of the arc to be detected is obtained according to the edge detection result, the radius value of the arc to be detected is determined according to the position of the projection point, the coordinates of the intersection of the arc to be detected and the first fan-shaped area of ​​interest, as well as the coordinates of the starting point of the arc to be detected are determined according to the radius value.

3. A circular arc edge detection device, It is characterized in that The device is used to implement the arc edge detection method according to claim 1 or 2, and the device comprises: An area of ​​interest setting module: used to set a first sector-shaped area of ​​interest of the arc to be detected; An area of ​​interest adjustment module is used to rotate the first sector-shaped area of ​​interest and change the angle of the first sector-shaped area of ​​interest to obtain a second sector-shaped area of ​​interest of the arc to be detected, wherein the second sector-shaped area of ​​interest is concentric with the arc to be detected; An area of ​​interest projection module: used for projecting the second sector-shaped area of ​​interest into a one-dimensional row vector graph; Edge detection module: used to perform edge detection on the one-dimensional row vector graph, and determine the arc to be detected according to the result of the edge detection.

4. A circular arc edge detection device, It is characterized in that The device comprises a processor and a memory coupled to the processor, wherein: The memory stores program instructions for implementing the arc edge detection method according to claim 1 or 2; The processor is used to execute the program instructions stored in the memory to perform edge detection on the arc to be detected.

5. A storage medium, It is characterized in that Program instructions executable by a processor are stored, and the program instructions are used to execute the arc edge detection method described in claim 1 or 2.

Citation Information

Patent Citations

  • Brake block dimension detecting method and device based on machine vision

    CN108460776A

  • Image processing device, image processing method, and computer program product thereon

    US20180040127A1