A method and system for detecting the center of a fuzzy boundary ring
By using grayscale and inversion processing and two-dimensional convolution operations, a circular feature convolution kernel is generated. Image moments are then filtered and calculated, solving the accuracy problem of detecting the center of blurred boundary circular rings in harsh environments and achieving sub-pixel level center positioning accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XI AN JIAOTONG UNIV
- Filing Date
- 2022-12-05
- Publication Date
- 2026-07-17
AI Technical Summary
In harsh environments, existing technologies struggle to accurately detect the center of fuzzy boundary rings, resulting in low positioning accuracy and impacting industrial production efficiency and success rates.
A set of circular features of different sizes are generated by grayscale and inversion processing as convolution kernels. Possible center positions are selected through two-dimensional convolution operations, and sub-pixel level center coordinates are calculated using image moments.
It achieves sub-pixel level center detection accuracy in harsh environments, improves the accuracy and robustness of center positioning, and is suitable for ring detection under complex or harsh conditions.
Smart Images

Figure CN115908566B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing technology, specifically relating to a method and system for detecting the center of a blurred boundary ring. Background Technology
[0002] In industrial production, machine vision applications for unloading and assembly often require calibration plates for assisted positioning. The accuracy of positioning significantly impacts efficiency and success rate. Calibration plates with circular features are relatively common, making the accuracy of circle center detection particularly crucial. However, in harsh environments, vision systems often experience various complex noise interferences, including dark current, shot noise, and dust, which severely affect the image accuracy of the original camera image, posing a challenge to the accuracy of circle center detection.
[0003] The accuracy of general circle center detection algorithms is determined by the accuracy of circle edge detection. One fast and robust circle detection method uses isosceles triangle sampling. It leverages the geometric properties of isosceles triangles to find relevant edge pixels of the circle, thereby estimating the circle's center and radius. Another improved Hough transform circle detection algorithm converts the three-dimensional space used in standard Hough transform circle detection into a one-dimensional space. It calculates the circle's center using the geometric features of a circle as a centrally symmetric figure, and then accumulates the radius through a one-dimensional Hough transform to obtain the circle's radius.
[0004] However, these methods are often designed for circular features with clear boundaries. When external environmental interference is severe or when image features are lost or distorted due to harsh environments, they are prone to detection errors or even fail to detect. They are ineffective for circular features with unclear boundaries and relatively slow gradient changes. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method and system for detecting the center of a fuzzy boundary ring, which addresses the shortcomings of the prior art. This method and system solve the problem of low workpiece positioning accuracy caused by poor image quality and low center detection accuracy due to deformation and distortion of the ring when using man-made markers with a ring shape for target positioning.
[0006] The present invention adopts the following technical solution:
[0007] A method for detecting the center of a fuzzy boundary ring includes the following steps:
[0008] S1. Select the region of interest (ROI) in the original image that contains the image to be detected, generate a set of circular features of different sizes, and perform grayscale and inversion processing on the image of the ROI.
[0009] S2. Using the circular feature obtained in step S1 as the convolution kernel, perform a two-dimensional convolution operation on the grayscale and the inverted region of interest to obtain the convolution result.
[0010] S3. Set a center determination threshold, filter the convolution results in step S2 that are greater than the center determination threshold, and superimpose the convolution results of circular features of different sizes to form a coarsely located center pixel block.
[0011] S4. Stack all the coarse positioning center pixel blocks obtained in step S3 to form a coarse positioning center geometry, calculate the centroid position of the coarse positioning center geometry, obtain the center position coordinates under harsh environment, and complete the center detection.
[0012] Specifically, in step S1, the inversion process is as follows:
[0013] The RGB image captured by the camera is converted into a grayscale image, with the pixel value range of 0 to 255. The original image is obtained by subtracting the maximum pixel value of 255 from the original image, which maps the black pixel area representing the ring in the original image to the white pixel area. Then, the pixel value of the image is normalized from the range of [0, 255] to the range of [0, 1].
[0014] Specifically, in step S2, the two-dimensional convolution operation is performed as follows:
[0015]
[0016] Where K(i,o) is the circular convolution kernel, i represents the pixel range of the inner diameter of the convolution kernel, o represents the pixel range of the outer diameter of the convolution kernel, and H is the convolution result.
[0017] Specifically, in step S3, the convolution result H is thresholded by setting a minimum threshold that can activate the center position, and the result is filtered with an initial threshold of 0.8.
[0018] Specifically, in step S3, if the center pixel block is not calculated, the threshold is adjusted and recalculated from high to low.
[0019] Specifically, in step S4, the coordinates of the center position x under harsh conditions are... c y c for:
[0020]
[0021] Where, m 10 The first moment of the coarse positioning circle is used to determine the pixel center position in the x-direction, m. 01 The first moment of the coarse positioning circle is used to determine the pixel center position in the y-direction, m. 00 The zeroth moment is the coarse positioning center, representing the sum of the image pixel values.
[0022] Furthermore, the centroid position m of the coarsely located circular geometric figure is determined. pg for:
[0023]
[0024] Where M and N are the image dimensions; p and q are the orders of the geometric moments; x and y are the pixel coordinates; and f is a function of the pixel values of the image itself.
[0025] Secondly, embodiments of the present invention provide a system for detecting the center of a fuzzy boundary ring, comprising:
[0026] The processing module selects the region of interest (ROI) in the original image that contains the image to be detected, generates a set of circular features of different sizes, and performs grayscale and inversion processing on the image of the ROI.
[0027] The convolution module uses the circular features obtained from the processing module as the convolution kernel to perform two-dimensional convolution operations on the grayscale and the inverted region of interest to obtain the convolution result.
[0028] The filtering module sets a center determination threshold and filters convolution results from the convolution module that are larger than the center determination threshold. It then superimposes the convolution results of circular features of different sizes to form a coarsely located center pixel block.
[0029] The positioning module superimposes all the coarse positioning center pixel blocks obtained by the filtering module to form a coarse positioning center geometry, calculates the centroid position of the coarse positioning center geometry, obtains the center position coordinates under harsh environment, and completes the center detection.
[0030] Thirdly, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described fuzzy boundary ring center detection method.
[0031] Fourthly, embodiments of the present invention provide a computer-readable storage medium including a computer program, which, when executed by a processor, implements the steps of the above-described method for detecting the center of a fuzzy boundary ring.
[0032] Compared with the prior art, the present invention has at least the following beneficial effects:
[0033] A method for detecting the center of a blurred boundary ring is proposed, which demonstrates good detection performance in practical engineering scenarios involving blurred boundaries, such as circular boundaries with relatively indistinct gradients or elliptical shapes formed by tilting circles. It achieves sub-pixel accuracy in center detection. The method generates a series of ring convolution kernels and performs convolution search with the original image to obtain the positions of all possible center points. Based on all statistical results, it calculates the image moments to obtain the center coordinates with sub-pixel precision. The method is fast, highly accurate, and robust, making it suitable for various complex or challenging image ring center detection tasks.
[0034] Furthermore, based on the structural characteristics of the actual circular positioning plate, the ring structure in the low-pixel region (black) is mapped to the high-pixel region (white) by inversion. The generated ring convolution kernel also has a high pixel value in the ring region. Multiplication in structurally similar regions can yield an even higher convolution value, which can then be used for subsequent coarse circle center positioning.
[0035] Furthermore, by designing a two-dimensional circular convolution kernel that corresponds to the two-dimensional structure of the original single-channel image, the two can complete the convolution calculation. In the original image, the circular structure with a higher similarity to the designed circular convolution kernel can obtain a higher calculation value during the convolution calculation. The higher the value of the convolution calculation, the more likely this position is to be the accurate position of the center of the circle.
[0036] Furthermore, after obtaining the convolution result of the entire image, a higher calculated value represents a more likely center position. The pixel values of the image range from [0, 1]. When a part of the image completely overlaps with the shape of the convolution kernel, the maximum value that the convolution calculation can obtain is 1. It is foreseeable that it is difficult to encounter a situation where they completely overlap in practice. Therefore, the initial value of the threshold is set to 0.8 to avoid unnecessary filtering calculations.
[0037] Furthermore, when image brightness varies, the convolution calculation results for the possible center position may appear in lower pixel regions, and an excessively high threshold setting will cause the center detection to fail. However, the center will always appear in the position represented by higher convolution results. Therefore, the threshold setting is changed from high to low to filter out the results with lower probability as much as possible, so as to avoid interfering with the more accurate results in subsequent processes.
[0038] Furthermore, after obtaining all possible center positions, the summation of all results will form a pixel block near the actual center position. Positions that appear more frequently will have higher values. It's conceivable that pixel blocks closer to the center and appearing more frequently during the summation process are more likely to be at the correct center position. Therefore, considering these factors, the centroid position of the pixel block is calculated to obtain the correct center result.
[0039] Furthermore, taking into account the superposition results of the coarse positioning circle centers, the zero-order moment and the first-order moment of the coarse positioning circle are calculated respectively, thereby obtaining the sub-pixel level circle center position.
[0040] It is understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.
[0041] In summary, this invention utilizes a positioning plate with a circular structure commonly used in visual engineering projects. It demonstrates excellent detection performance for situations encountered in practical engineering where boundaries are relatively ambiguous, such as circular boundaries with indistinct gradients or elliptical shapes resulting from tilted circles. It achieves sub-pixel level accuracy in center detection. The entire method is fast, computationally accurate, and robust, making it suitable for various complex or challenging image ring center detection tasks.
[0042] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0043] Figure 1 This is a flowchart of the present invention;
[0044] Figure 2 Images of the circular calibration plate and processing flow used in the method of the present invention are shown, wherein (a): the original image acquired by the camera in a harsh environment; (b): the ROI image of the calibration plate; (c): the image after inverting the pixels of the ROI image of the calibration plate; (d): the feature map of the center of the blurred boundary ring in a harsh environment; (e): the result image of the coarse positioning of the center of the blurred boundary ring in a harsh environment; and (f): the final image of the center detection of the blurred boundary ring in a harsh environment. Detailed Implementation
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0046] In the description of this invention, it should be understood that the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0047] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0048] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this document generally indicates that the preceding and following objects have an "or" relationship.
[0049] It should be understood that although terms such as first, second, third, etc., may be used in the embodiments of the present invention to describe the preset range, these preset ranges should not be limited to these terms. These terms are only used to distinguish the preset ranges from one another. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.
[0050] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0051] The accompanying drawings illustrate various structural schematic diagrams according to embodiments disclosed in this invention. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.
[0052] This invention provides a method for detecting the center of a blurred boundary ring. First, it uses grayscale inversion to calculate and preserve as many visual features as possible from the original image. Then, it extracts candidate center points by generating a series of convolution kernels and performing convolutions, avoiding gradient calculation errors caused by insignificant image gradient changes. Simultaneously, it significantly reduces interference from image noise and background environment. Using the candidate center points, it extracts the most probable center coordinates, thereby determining the center position and improving the accuracy of locating the center of a blurred boundary ring.
[0053] Please see Figure 1 The present invention provides a method for detecting the center of a fuzzy boundary ring, comprising the following steps:
[0054] S1. Select the region of interest (ROI) in the original image, that is, the part that contains the image to be detected, and then perform grayscale and inversion processing on the ROI.
[0055] Binarization is not performed on the ROI region image. When the gradient change at the circular feature boundary of the image is small, an inappropriate binarization threshold can lead to the loss of original image features. The RGB image captured by the camera is converted to a grayscale image, with grayscale pixel values ranging from 0 to 255. Subtracting the original image from the maximum pixel value of 255 yields the inverted image, mapping the black pixel region representing the ring in the original image to a white pixel region. Then, the pixel values of the image are normalized from the range [0, 255] to the range [0, 1].
[0056] S2. Generate a series of circular features of different sizes, and use the circular features as convolution kernels to perform two-dimensional convolution operations on the ROI image obtained in step S1.
[0057] Normalized circular features are generated, and the generated circular features are used to perform a two-dimensional convolution operation on the ROI.
[0058] Let there be a circular convolution kernel K(i,o) convolving the image I:
[0059]
[0060] Where i represents the pixel range of the inner diameter of the convolution kernel; o represents the pixel range of the outer diameter of the convolution kernel.
[0061] A circular convolution kernel is identified by its inner and outer diameters. Combining the inner and outer diameter ranges will generate a large number of circular convolution kernels with different inner and outer diameters.
[0062] like Figure 2As shown in (d), the convolution kernel is square with a size of (99, 99). The pixels in the circular region are set to 1 (white), and the pixels in other regions are set to 0 (black). Then, the entire convolution kernel is normalized, meaning that the pixel values of the entire convolution kernel are summed to 1.
[0063] The convolution result H represents the weight of the region with the most annular features in the image, and the input image I will always encounter a circular convolution kernel K(i) that best matches its inner and outer diameters. ′ ,o ′ The maximum value will appear at the center coordinates of the circle corresponding to the convolution result.
[0064] S3. Set a center determination threshold, filter out the convolution results in step S2 that are greater than the center determination threshold, and superimpose the convolution results of circular features of different sizes to form a coarsely located center pixel block; if the center pixel block is not calculated, adjust the threshold and recalculate the threshold from high to low.
[0065] Convolutional kernels of similar size may produce maximum values. Therefore, the convolution result H is thresholded by setting a minimum threshold that can activate the center position and filtering the result. The initial threshold is 0.8.
[0066] Due to the influence of ambient light, the overall brightness of the image is affected. If a central pixel patch is not formed, the threshold parameter is reduced, and the process returns to the initial stage of step S3. Convolution calculation and threshold pass determination are performed again until a central pixel patch is formed.
[0067] S4. Calculate the geometric center position of the coarse positioning center pixel block obtained in step S3 to obtain the center coordinates of the circle with relatively high accuracy, and complete the detection of the circle center.
[0068] Using a threshold significantly reduces the search space for the circle's center, but the center position is still a whole patch area rather than a single point. A circular patch consists of a large area of pixels, and its centroid can be used to represent its unique pixel location. The centroid is calculated using HU moments:
[0069]
[0070] Where M and N represent the image dimensions; p and q represent the orders of the geometric moments; x and y represent the pixel coordinates; and f represents a function of the pixel values of the image itself.
[0071] For the centroid, the calculation method is as follows:
[0072]
[0073]
[0074] The centroid position of the center pixel block is the final center coordinate.
[0075] In another embodiment of the present invention, a fuzzy boundary ring center detection system is provided. This system can be used to implement the above-mentioned fuzzy boundary ring center detection method. Specifically, the fuzzy boundary ring center detection system includes a processing module, a convolution module, a filtering module, and a positioning module.
[0076] The processing module selects the region of interest (ROI) in the original image that contains the image to be detected, generates a set of circular features of different sizes, and performs grayscale and inversion processing on the image of the ROI.
[0077] The convolution module uses the circular features obtained from the processing module as the convolution kernel to perform two-dimensional convolution operations on the grayscale and the inverted region of interest to obtain the convolution result.
[0078] The filtering module sets a center determination threshold and filters convolution results from the convolution module that are larger than the center determination threshold. It then superimposes the convolution results of circular features of different sizes to form a coarsely located center pixel block.
[0079] The positioning module superimposes all the coarse positioning center pixel blocks obtained by the filtering module to form a coarse positioning center geometry, calculates the centroid position of the coarse positioning center geometry, obtains the center position coordinates under harsh environment, and completes the center detection.
[0080] In another embodiment of the present invention, a terminal device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used for the operation of a fuzzy boundary ring center detection method, including:
[0081] The process involves selecting regions of interest (ROIs) containing the image to be detected from the original image, generating a set of circular features of different sizes, and performing grayscale and inversion processing on the ROI images. Using the circular features as convolution kernels, a two-dimensional convolution operation is performed on the grayscale and inverted ROIs to obtain the convolution result. A center detection threshold is set, and convolution results larger than the threshold are filtered out. The convolution results of circular features of different sizes are then superimposed to form coarsely located center pixel blocks. All coarsely located center pixel blocks are superimposed to form a coarsely located center geometry. The centroid position of the coarsely located center geometry is calculated to obtain the center coordinates under harsh conditions, thus completing the center detection.
[0082] In another embodiment of the present invention, a storage medium is also provided, specifically a computer-readable storage medium (memory). This computer-readable storage medium is a memory device in a terminal device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and extended storage media supported by the terminal device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device.
[0083] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the fuzzy boundary ring center detection method in the above embodiments; one or more instructions in the computer-readable storage medium are loaded and executed by the processor in the following steps:
[0084] The process involves selecting regions of interest (ROIs) containing the image to be detected from the original image, generating a set of circular features of different sizes, and performing grayscale and inversion processing on the ROI images. Using the circular features as convolution kernels, a two-dimensional convolution operation is performed on the grayscale and inverted ROIs to obtain the convolution result. A center detection threshold is set, and convolution results larger than the threshold are filtered out. The convolution results of circular features of different sizes are then superimposed to form coarsely located center pixel blocks. All coarsely located center pixel blocks are superimposed to form a coarsely located center geometry. The centroid position of the coarsely located center geometry is calculated to obtain the center coordinates under harsh conditions, thus completing the center detection.
[0085] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0086] Example
[0087] An image of the annular calibration plate used in a method for detecting the center of a fuzzy boundary annulus suitable for harsh environments is shown below. Figure 2 As shown in (b), the calibration board is a rectangular block commonly used in vision projects, consisting of four black rings of different sizes.
[0088] First, select the region of interest (ROI) in image 2(a), which is the portion of the image containing the circular calibration plate, such as... Figure 2 (b) Then, perform grayscale and inversion processing on the ROI region to obtain... Figure 2 (c) At this point, the white pixel area represented by the ring has a larger pixel value.
[0089] Secondly, convolution calculations are performed on the ROI image using circular features of different sizes; convolution kernels with a greater matching degree to the circular features of the ROI image yield higher convolution result values. A center detection threshold is pre-set; values exceeding the threshold indicate that the calculated result is more likely to be the center position. If no center pixel block appears, the threshold is adjusted from high to low, and the calculation is repeated. Then, a series of convolution results exceeding the threshold are linearly superimposed to obtain all possible center pixel blocks. Finally, the centroid position of the center pixel block is calculated to obtain high-precision center coordinates; the flowchart is as follows. Figure 2 As shown.
[0090] During the preprocessing of the ROI region, the black pixels containing the ring are mapped to white pixels. At this point, the white area, i.e., the pixels containing the ring, has a higher pixel value compared to the surrounding pixels. Since the boundary of the ring in the image is not obvious at the pixel scale, to ensure that the original image features are not lost to the greatest extent, we do not use thresholding binarization to process the image.
[0091] For the subsequent center extraction part, the first step is to generate normalized circular features, such as... Figure 2 As shown in (d), the convolution kernel is square with a size of (99, 99). The pixels in the circular region are set to 1 (white), and the pixels in other regions are set to 0 (black). The entire convolution kernel is then normalized, meaning the sum of all kernel pixel values is 1. The generated circular features are then used to perform a two-dimensional convolution operation on the ROI.
[0092] Let there be a circular convolution kernel K(i,o) convolving the image I:
[0093]
[0094] Where i represents the pixel range of the inner diameter of the convolution kernel; o represents the pixel range of the outer diameter of the convolution kernel. A circular convolution kernel can be identified by the inner and outer diameters. Combining the inner and outer diameter ranges will produce a large number of circular convolution kernels with different inner and outer diameters.
[0095] The convolution result H represents the weight of the region with the most annular features in the image, and the input image I will always encounter a circular convolution kernel K(i) that best matches its inner and outer diameters. ′ ,o ′ The maximum value will appear at the center coordinates of the circle corresponding to the convolution result.
[0096] For each circular convolution kernel, we obtain a convolution result image. We can pre-set a threshold; if the convolution result is greater than the pre-set threshold, we save that pixel as a candidate circle center coordinate. After all generated convolution kernels have completed their operations, we superimpose all the candidate circle center coordinates to obtain a distribution map of all candidate circle centers in the image. Regions with concentrated candidate circle centers form pixel patches. We can use the centroid of these pixel patches as the most likely circle center coordinate location, such as... Figure 2 As shown in (e), the brightness of the image is affected by the ambient light. If a central pixel patch is not formed, the threshold parameter is adjusted, and the convolution calculation and threshold pass determination are performed again until a central pixel patch is formed. The initial threshold value is generally set to 0.8, and then gradually reduced according to the determination result.
[0097] Calculate the centroid using HU moments:
[0098]
[0099] In the formula: M and N represent image dimensions; p and q represent the order of geometric moments; x and y represent pixel coordinates; and f represents the image itself. The centroid is calculated as follows:
[0100]
[0101]
[0102] Finally, the obtained center coordinates are mapped onto the original image, thus completing the center detection of the ring.
[0103] In summary, the present invention provides a method and system for detecting the center of a blurred boundary ring. Utilizing a positioning plate with a ring structure commonly used in visual engineering projects, it demonstrates excellent detection performance for blurred boundaries encountered in practical engineering, such as circular boundaries with relatively indistinct gradients or elliptical edges resulting from circular tilting. It achieves sub-pixel level center detection accuracy. The method of this invention features a clear structure, fast detection speed, high computational accuracy, and strong robustness, making it suitable for various complex or relatively challenging image ring center detection tasks, and facilitating implementation and application.
[0104] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0105] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0106] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0107] In the embodiments provided by this invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0108] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0109] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0110] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0111] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0112] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0113] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0114] The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.
Claims
1. A method for detecting the center of a fuzzy boundary ring, characterized in that, Includes the following steps: S1. Select the region of interest (ROI) in the original image that contains the image to be detected, generate a set of circular features of different sizes, and perform grayscale and inversion processing on the image of the ROI. S2. Using the circular feature obtained in step S1 as the convolution kernel, perform a two-dimensional convolution operation on the grayscale and the inverted region of interest to obtain the convolution result. S3. Set a center determination threshold, filter the convolution results in step S2 that are greater than the center determination threshold, and linearly superimpose the convolution results of circular features of different sizes to form a coarse positioning center pixel block; if no coarse positioning center pixel block is calculated, adjust the center determination threshold, and recalculate the center determination threshold from high to low. S4. Superimpose all the coarse positioning center pixel blocks obtained in step S3 to form a coarse positioning center geometry. Calculate the centroid position of the coarse positioning center geometry to obtain the center position coordinates under harsh conditions, thus completing the center detection. , for: in, The first moment is used to coarsely locate the center of the circle, and is used to determine the pixel center position in the x-direction. The first moment is used to coarsely locate the center of the circle, and is used to determine the pixel center position in the y-direction. The zeroth moment of the coarsely located center represents the sum of the image pixel values; Coarsely locate the centroid position of the geometric figure for: in, , Image size; , Let be the order of the geometric moments; These are pixel coordinates; It is a function of the pixel values of the image itself.
2. The method for detecting the center of a fuzzy boundary ring according to claim 1, characterized in that, In step S1, the inversion process is specifically as follows: The RGB image captured by the camera is converted into a grayscale image, with the pixel value range of 0 to 255. The original image is obtained by subtracting the maximum pixel value of 255 from the original image, which maps the black pixel area representing the ring in the original image to the white pixel area. Then, the pixel value of the image is normalized from the range of [0, 255] to the range of [0, 1].
3. The method for detecting the center of a fuzzy boundary ring according to claim 1, characterized in that, In step S2, the two-dimensional convolution operation is performed as follows: in, It is a circular convolution kernel. Indicates the pixel range of the convolution kernel's inner diameter; Represents the pixel range of the outer diameter of the convolution kernel. For the convolution result, This is the image after grayscale and inversion processing.
4. The method for detecting the center of a fuzzy boundary ring according to claim 1, characterized in that, In step S3, the convolution result is processed. Thresholding is performed by setting a minimum center determination threshold for the activation center position, and then applying this threshold to the convolution result. The filtering process is performed, and the minimum center determination threshold is 0.
8.
5. A system for detecting the center of a fuzzy boundary ring, characterized in that, include: The processing module selects the region of interest (ROI) in the original image that contains the image to be detected, generates a set of circular features of different sizes, and performs grayscale and inversion processing on the image of the ROI. The convolution module uses the circular features obtained from the processing module as the convolution kernel to perform a two-dimensional convolution operation on the grayscale and the inverted region of interest to obtain the convolution result. The filtering module sets a center determination threshold and filters convolution results in the convolution module that are greater than the center determination threshold. The convolution results of circular features of different sizes are linearly superimposed to form a coarse positioning center pixel block. If no coarse positioning center pixel block is calculated, the center determination threshold is adjusted and recalculated from high to low. The positioning module superimposes all the coarse positioning center pixel blocks obtained by the filtering module to form a coarse positioning center geometry. It then calculates the centroid position of this geometry to obtain the center coordinates under harsh conditions, thus completing the center detection and obtaining the center coordinates under harsh conditions. , for: in, The first moment is used to coarsely locate the center of the circle, and is used to determine the pixel center position in the x-direction. The first moment is used to coarsely locate the center of the circle, and is used to determine the pixel center position in the y-direction. The zeroth moment of the coarsely located center represents the sum of the image pixel values; Coarsely locate the centroid position of the geometric figure for: in, , Image size; , Let be the order of the geometric moments; These are pixel coordinates; It is a function of the pixel values of the image itself.
6. A computer-readable storage medium for storing one or more programs, characterized in that, The one or more programs include instructions that, when executed by a computing device, cause the computing device to perform the method of any one of claims 1 to 4.
7. A computing device, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including steps for performing the method of any one of claims 1 to 4.