A circular target detection positioning method and system fusing color space enhancement
By integrating Lab and YUV color space enhancement processing and multiple segmentation weighted calculations, the problems of low detection efficiency of non-coded targets and resolution limitations of coded targets are solved, achieving high-precision target positioning, which is suitable for UAV navigation, structural monitoring and industrial vision measurement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU URBAN PLANNING & DESIGN SURVEY RES INST
- Filing Date
- 2026-04-03
- Publication Date
- 2026-06-19
Smart Images

Figure CN121962274B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual measurement technology, and in particular to a method and system for detecting and locating circular targets by incorporating color space enhancement. Background Technology
[0002] Combining artificial targets with corresponding detection and localization algorithms can effectively improve the reliability and robustness of image-based visual displacement measurement methods. Based on whether they carry distinguishable coded information, artificial targets can be divided into coded targets (CMs) and non-coded targets (NCMs). Non-coded targets only contain image features used for target detection and localization, and cannot distinguish between targets; most existing non-coded targets are designed based on black-and-white features, which are ubiquitous in natural scenes, easily leading to numerous false detections and thus reducing overall detection efficiency.
[0003] In addition to the features required for detection and localization, coded targets contain additional image coding information, giving each target a unique identifier and enabling rapid matching of the same target in different images. However, coding designs based on binary image features increase image complexity, and the target needs sufficiently high resolution in the image to accurately identify the coded information. In practical engineering applications, this requirement is often met by increasing the target size or shortening the shooting distance, which limits its application scope to some extent.
[0004] Therefore, it is necessary to provide a circular target detection and localization method and system that integrates color space enhancement to solve the above-mentioned technical problems. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for detecting and locating circular targets by incorporating color space enhancement. The specific technical solution is as follows:
[0006] A method for detecting and locating circular targets using color space enhancement includes the following steps:
[0007] S1. Obtain the original image of a circular target containing a preset color;
[0008] S2. Enhance the original image to generate an enhanced image; wherein the enhancement process is based on at least two different color spaces;
[0009] S3. Segment the enhanced image multiple times based on a preset image segmentation threshold to obtain multiple target segmentation images;
[0010] S4. Calculate the centroid coordinates of each target segmentation image to obtain the initial center coordinates of multiple targets;
[0011] S5. Calculate the circularity of the circular targets in the target segmentation image, and determine the weight of the initial center coordinates of each target based on the circularity.
[0012] S6. Perform a weighted calculation on the initial center coordinates of multiple targets to obtain the precise center coordinates of the targets.
[0013] Furthermore, the circular target is a circular pattern with a single color; the color of the circular pattern is set to (R:255, G:0, B:255).
[0014] Furthermore, step S2 specifically involves:
[0015] The original image was converted to Lab color space and YUV color space respectively;
[0016] extract aisle, aisle, passage and Image information of the channel;
[0017] Based on the above aisle, aisle, passage and The image information from each channel is fused and calculated to generate an enhanced image.
[0018] Furthermore, based on the above aisle, aisle, passage and The formula for fusing image information from different channels is as follows:
[0019] ;
[0020] in: The enhanced image is obtained by enhancing the original image of the circular target. Represents the YUV color space Channel image, Represents the YUV color space Channel image, and These are the colors in the Lab color space. Channel images and Channel image.
[0021] Furthermore, the enhanced image is segmented multiple times based on a preset image segmentation threshold, with the following segmentation rules:
[0022] ;
[0023] in, Represents image coordinates grayscale value at that location This represents the preset image segmentation threshold.
[0024] Furthermore, the specific steps for calculating the centroid coordinates of each target segmentation image are as follows:
[0025] ;
[0026] in: Indicates the centroid coordinates. Represents the zeroth-order spatial moment of the image. and It represents the first-order spatial moment of the image.
[0027] Furthermore, the formula for calculating the roundness of a circular target in a target segmentation image is as follows:
[0028] ;
[0029] in: Indicates roundness. Represents the area of a circle. Represents the circumference of a circle. It is pi (π).
[0030] Furthermore, the weights determined based on roundness are:
[0031] ;
[0032] in: Indicates the first Precision weights of initial center coordinates, , , Indicates the number of initial center coordinates; Indicates the first The roundness of the circular target in the target segmentation image corresponding to the initial center coordinates.
[0033] Furthermore, the precise center coordinates of the target for:
[0034] ;
[0035] in: Indicates the first An initial center coordinate.
[0036] A circular target detection and localization system incorporating color space enhancement, for implementing the method described above, includes:
[0037] The image acquisition module is used to acquire the original image of a circular target containing a preset color;
[0038] The image enhancement module is used to enhance the original image and generate an enhanced image;
[0039] The image segmentation module is used to segment the enhanced image multiple times based on a preset image segmentation threshold to obtain multiple target segmentation images;
[0040] The target positioning module is used to accurately locate the center of a circular target and obtain the precise center coordinates of the circular target.
[0041] The application of the technical solution of the present invention has at least the following beneficial effects:
[0042] This invention enhances the original image by fusing Lab and YUV color spaces, effectively amplifying the grayscale difference between the circular target and the background, significantly suppressing environmental interference, and laying the foundation for high-precision positioning. Based on this, a multi-image segmentation strategy is employed to obtain multiple target segmentation images, and the initial center coordinates are weighted and fused using a circularity index, ultimately yielding more accurate target center coordinates. The method of this invention not only significantly improves the robustness and positioning accuracy of target detection but also reduces the requirements for target size and imaging distance, enhancing adaptability under different lighting and background conditions. Furthermore, the target employs a color design rarely seen in natural environments, further reducing false detections and improving detection efficiency, making it widely applicable in fields such as UAV navigation, structural monitoring, and industrial vision measurement.
[0043] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description
[0044] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0045] Figure 1 This is a flowchart illustrating the circular target detection and localization method incorporating color space enhancement in an embodiment of the present invention.
[0046] Figure 2 This is a schematic diagram of a circular target in an embodiment of the present invention;
[0047] Figure 3 This is the original image of the circular target in the embodiment of the present invention;
[0048] Figure 4 This is a three-dimensional view of the original grayscale distribution of the circular target in an embodiment of the present invention;
[0049] Figure 5 The original image in Lab color space Channel image;
[0050] Figure 6 The original image in Lab color space Channel image;
[0051] Figure 7 It is the original image in the YUV color space Channel image;
[0052] Figure 8 It is the original image in the YUV color space Channel image;
[0053] Figure 9 This is the enhanced image obtained after enhancing the original image;
[0054] Figure 10 To enhance the three-dimensional view of image grayscale distribution;
[0055] Figure 11 The target segmentation image is obtained by segmenting the enhanced image, where: (a) represents the original image, and (b) represents... The segmented image at time (c) represents The segmented image at time (d) represents The segmented image at time (e) represents The segmented image at time (f) represents Segmented image at time. Detailed Implementation
[0056] 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 a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0057] Example:
[0058] See Figure 1 This invention proposes a method for detecting and locating circular targets by incorporating color space enhancement, comprising the following steps:
[0059] S1. Obtain the original image of a circular target containing a preset color; see [link / reference] Figure 2In this embodiment, the circular target is a circular pattern with a single color; preferably, the color of the circular pattern is set to (R:255, G:0, B:255), which is relatively rare in artificial structure environments and helps to significantly reduce the interference of environmental background on target detection.
[0060] S2. Enhance the original image to generate an enhanced image; wherein the enhancement process is based on at least two different color spaces; specifically:
[0061] The original image was converted to Lab color space and YUV color space respectively;
[0062] extract aisle, aisle, passage and Image information of the channel;
[0063] Based on the above aisle, aisle, passage and The image information from each channel is fused and calculated to generate an enhanced image. The calculation formula is as follows:
[0064] ; Formula 1)
[0065] in: The enhanced image is obtained by enhancing the original image of the circular target. Represents the YUV color space Channel image, Represents the YUV color space Channel image, and These are the colors in the Lab color space. Channel images and Channel image.
[0066] Taking the circular target used in this embodiment as an example, for obtaining its original image from a distance, see [link to example]. Figure 3 See the 3D view of the grayscale distribution of the original image. Figure 4 The original image was converted to Lab and YUV color spaces respectively, and then extracted. aisle, aisle, passage and See channel image information Figures 5-8 Enhancement processing is performed using formula 1), resulting in the enhanced image (see [reference]). Figure 9 See also the enhanced 3D view of the grayscale distribution of the image. Figure 10As can be seen from the figure, the target imaging is most significant after enhancement, and the concentration of grayscale distribution is improved after enhancement, indicating that the background is effectively suppressed and the target positioning accuracy can be improved.
[0067] S3. Segment the enhanced image multiple times based on a preset image segmentation threshold to obtain multiple target segmentation images;
[0068] First, preset the image segmentation threshold. Because multiple segmentations are required, the threshold needs to be set as a threshold range. Generally, a median threshold is set first, followed by a range variation step and upper and lower limits to complete the threshold setting. Since the difference between the target grayscale value and the background grayscale value is greatly amplified after image enhancement (the target grayscale value is brighter and the background grayscale value is darker), the median threshold is generally set to the median of the image grayscale value range [0, 255], which is 128 pixels. The range variation step is generally set to 5~10 pixels, and the variation range of the upper and lower limits is generally ±10~±30 pixels.
[0069] The enhanced image is segmented multiple times based on the preset image segmentation threshold, with the following segmentation rules:
[0070] ; Formula 2)
[0071] in, Represents image coordinates grayscale value at that location This represents the preset image segmentation threshold.
[0072] The enhanced image is segmented using formula 2), which amplifies the grayscale value of the bright circular target portion to 255, while the grayscale value of the darker target background is uniformly set to 0, thus facilitating the centroid positioning of the circular target.
[0073] S4. Calculate the centroid coordinates of each target segmentation image to obtain the initial center coordinates of multiple targets;
[0074] In this embodiment, the centroid coordinates of each target segmentation image are calculated based on image spatial moments. The calculation formula is as follows:
[0075] ; Formula 3)
[0076] in: Image coordinates Pixel value at that location, Indicates the number of rows in the image. Indicates the number of columns in the image;
[0077] As can be seen from Formula 3), the spatial moments of an image are related not only to the pixel value but also to the pixel position. At that time, there were:
[0078] ;Formula 4)
[0079] in: This is called the zeroth-order spatial moment of the image; as can be seen from Equation 4), the zeroth-order spatial moment of the image is actually the sum of all pixel values, and the value of the zeroth-order spatial moment is independent of the position of the pixel.
[0080] when , or , hour, , This is called the first spatial moment of the image. The first spatial moment of the image depends only on the row or column number of the pixel in terms of spatial location.
[0081] Based on the zeroth-order and first-order spatial moments of the image, the formula for calculating the centroid coordinates of each target segmentation image is defined as follows:
[0082] ; Formula 5)
[0083] in: Indicates the centroid coordinates. Represents the zeroth-order spatial moment of the image. and It represents the first-order spatial moment of the image.
[0084] Since the background pixel value of the circular target image is greatly reduced after enhancement, while the pixel value of the target itself is effectively enhanced, the centroid of the image calculated by formula 5) is exactly equal to the center point of the circular target within a certain image range; the calculated centroid coordinates are used as the initial center coordinates of the target.
[0085] S5. Calculate the circularity of the circular targets in the target segmentation image, and determine the weight of the initial center coordinates of each target based on the circularity.
[0086] The formula for calculating roundness is as follows:
[0087] ;Formula 6)
[0088] in: Indicates roundness. Represents the area of a circle. Represents the circumference of a circle. It is pi (π).
[0089] when When the value is 1, the shape represents a perfect circle; when... When the value approaches 0, the shape represents a polygon or rectangle that is close to a straight line.
[0090] In visual measurement, cameras typically approximate orthophotos of circular targets. Therefore, a higher circularity of the target indicates higher imaging or segmentation quality, and consequently, higher positioning accuracy. Consequently, it should have a higher weight in coordinate calculations. Based on this, the weights determined by circularity are:
[0091] ;Formula 7)
[0092] in: Indicates the first Precision weights of initial center coordinates, , , Indicates the number of initial center coordinates; Indicates the first The roundness of the circular target in the target segmentation image corresponding to the initial center coordinates.
[0093] S6. Perform a weighted calculation on the initial center coordinates of multiple targets to obtain the precise center coordinates of the targets;
[0094] Precise center coordinates of the target for:
[0095] ;Formula 8)
[0096] in: Indicates the first An initial center coordinate.
[0097] In this embodiment, a preset image segmentation threshold is used. The image segmentation threshold is set with a grayscale value of 108 (image grayscale value 0~255) as the lower limit and a grayscale value of 148 as the upper limit. Due to image segmentation threshold It is a set of interval values. In this invention, the interval step size is set to 10, that is... Image segmentation is performed according to formula 2). The enhanced image of each circular target yields five image segmentation results. See [link / reference]. Figure 11 (b)-(f) in the middle.
[0098] The initial center coordinates of the five targets can be calculated using formula 5), which are as follows: , , , and ;
[0099] according to Figure 11 The circularity of the five image segmentation results is shown in Table 1.
[0100] Table 1. Circularity corresponding to the segmentation results
[0101]
[0102] Weights are calculated based on roundness. , And calculate the precise center coordinates of the target. :
[0103] .
[0104] The center coordinates of the circular target are calculated using the method described above in this invention, and compared with the coordinates calculated by the conventional method (through one centroid positioning) and the true coordinates of the circular target, as shown in Table 2.
[0105] Table 2 Comparison of Circular Target Localization Results
[0106]
[0107] As can be seen from the comparison results in Table 2, the center coordinates of the circular target obtained by the method of the present invention are closer to the true coordinate values, which proves the effectiveness of the method of the present invention.
[0108] The present invention also provides a circular target detection and localization system that integrates color space enhancement, for implementing the method described above, comprising:
[0109] The image acquisition module is used to acquire the original image of a circular target containing a preset color;
[0110] The image enhancement module is used to enhance the original image and generate an enhanced image;
[0111] The image segmentation module is used to segment the enhanced image multiple times based on a preset image segmentation threshold to obtain multiple target segmentation images;
[0112] The target positioning module is used to accurately locate the center of a circular target and obtain the precise center coordinates of the circular target.
[0113] The above description is only a preferred embodiment of the present invention and does not limit the scope of the present invention. All equivalent structural transformations made under the inventive concept of the present invention using the contents of the present invention specification and drawings, or direct / indirect applications in other related technical fields, are included within the protection scope of the present invention.
Claims
1. A method for detecting and locating circular targets by incorporating color space enhancement, characterized in that, Includes the following steps: S1. Obtain the original image of a circular target containing a preset color; S2. Enhance the original image to generate an enhanced image; wherein the enhancement process is based on at least two different color spaces; specifically: The original image was converted to Lab color space and YUV color space respectively; extract aisle, aisle, passage and Image information of the channel; Based on the above aisle, aisle, passage and The image information from each channel is fused and calculated to generate an enhanced image; S3. Segment the enhanced image multiple times based on a preset image segmentation threshold to obtain multiple target segmentation images; S4. Calculate the centroid coordinates of each target segmentation image to obtain the initial center coordinates of multiple targets; S5. Calculate the circularity of the circular targets in the target segmentation image, and determine the weight of the initial center coordinates of each target based on the circularity. S6. Perform a weighted calculation on the initial center coordinates of multiple targets to obtain the precise center coordinates of the targets.
2. The method for detecting and locating a circular target using color space enhancement as described in claim 1, characterized in that, The circular target is a circular pattern with a single color; the color of the circular pattern is set to (R:255, G:0, B:255).
3. The circular target detection and localization method with color space enhancement as described in claim 2, characterized in that, Based on the above aisle, aisle, passage and The formula for fusing image information from different channels is as follows: ; in: The enhanced image is obtained by enhancing the original image of the circular target. Represents the YUV color space Channel image, Represents the YUV color space Channel image, and These are the colors in the Lab color space. Channel images and Channel image.
4. The method for detecting and locating a circular target using color space enhancement as described in claim 1, characterized in that, The enhanced image is segmented multiple times based on a preset image segmentation threshold, with the following segmentation rules: ; in, Represents image coordinates grayscale value at that location This represents the preset image segmentation threshold.
5. The circular target detection and localization method with color space enhancement according to claim 4, characterized in that, The specific steps for calculating the centroid coordinates of each target segmentation image are as follows: ; in: Indicates the centroid coordinates. Represents the zeroth-order spatial moment of the image. and It represents the first-order spatial moment of the image.
6. The method for detecting and locating a circular target using color space enhancement as described in claim 5, characterized in that, The formula for calculating the roundness of a circular target in a target segmentation image is as follows: ; in: Indicates roundness. Represents the area of a circle. Represents the circumference of a circle. It is pi (π).
7. The method for detecting and locating a circular target using color space enhancement as described in claim 6, characterized in that, The weights determined based on roundness are: ; in: Indicates the first Precision weights of initial center coordinates, , , Indicates the number of initial center coordinates; Indicates the first The roundness of the circular target in the target segmentation image corresponding to the initial center coordinates.
8. The method for detecting and locating a circular target using color space enhancement as described in claim 7, characterized in that, Precise center coordinates of the target for: ; in: Indicates the first An initial center coordinate.
9. A circular target detection and positioning system incorporating color space enhancement, used to implement the method as described in any one of claims 1-8, characterized in that, include: The image acquisition module is used to acquire the original image of a circular target containing a preset color; The image enhancement module is used to enhance the original image and generate an enhanced image; The image segmentation module is used to segment the enhanced image multiple times based on a preset image segmentation threshold to obtain multiple target segmentation images; The target positioning module is used to accurately locate the center of a circular target and obtain the precise center coordinates of the circular target.