A target centroid positioning method and device based on an ultraviolet image, and a storage medium

By converting ultraviolet images into grayscale images and using the grayscale centroid to determine the model, the problem of inaccurate target centroid positioning in ultraviolet imaging is solved, and high-precision positioning of missile detection is achieved.

CN115439527BActive Publication Date: 2025-10-10ARMY AVIATION RES INST OF THE ARMY AVIATION ACAD OF THE CHINESE PEOPLES LIBERATION ARMY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210994861.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-18
Publication Date
2025-10-10
Estimated Expiration
2042-08-18

AI Technical Summary

Technical Problem

In the existing technology, when ultraviolet imaging is performed using MCP electron multiplication technology, the area of ​​the ultraviolet imaging bright spot increases, making it difficult to accurately extract the target center of mass, affecting the detection accuracy of the incoming missile's azimuth.

Method used

The ultraviolet image is converted into a grayscale image, the grayscale centroid position is determined using the grayscale centroid determination model, and the target centroid is located on the ultraviolet image. The positioning accuracy is improved through the grayscale spatial distribution characteristics.

Benefits of technology

It achieves the rapid and accurate determination of the center of mass of the ultraviolet image target and improves the accuracy of missile azimuth detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115439527B_ABST
    Figure CN115439527B_ABST
Patent Text Reader

Abstract

The application discloses a target mass center positioning method and device based on an ultraviolet image, a storage medium and a computer device, and the method comprises the following steps: converting the acquired ultraviolet image into a gray image, and determining first target data corresponding to each pixel point on the gray image, wherein the first target data comprises a first pixel point identifier, first pixel point position data and a first pixel point gray value; obtaining a mass center position corresponding to a gray mass center of the gray image based on the first target data and a gray mass center determination model; and positioning the target mass center on the ultraviolet image according to the mass center position corresponding to the gray mass center. The application can effectively improve the determination accuracy of the ultraviolet imaging target mass center.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of photoelectric detection technology, and in particular to a method and device for locating the centroid of a target based on ultraviolet images, a storage medium, and a computer device. Background Art

[0002] Flame radiation consists of gaseous radiation with a discrete spectrum and solid radiation with a continuous spectrum. To avoid interference from other signals, ultraviolet light with a wavelength less than 300nm is often used as a flame detection signal. UV detectors respond only to ultraviolet light within a narrow range and are insensitive to light in other spectral ranges. This makes them suitable for detecting ultraviolet light in missile flames. In fact, the UV band detected by UV detectors falls within the solar spectrum blind spot, allowing the system to avoid the complex background created by the powerful natural light source of the sun. This results in high reliability and widespread use in missile detection.

[0003] Currently, when detecting missiles with ultraviolet detectors, MCP electron multiplication technology is usually used to improve detection sensitivity. However, when electrons are multiplied by MCP electron multiplication technology, the area of ​​the ultraviolet imaging bright spot will increase. In this case, traditional ultraviolet target detection algorithms find it difficult to accurately extract the position of the target's center of mass, thereby affecting the detection accuracy of the incoming missile's direction.

[0004] Therefore, how to accurately determine the target center of mass of ultraviolet imaging to improve the detection accuracy of the incoming missile's azimuth has become a technical problem that needs to be solved urgently in this field. Summary of the Invention

[0005] In view of this, the present application provides a method and device for locating the target centroid based on ultraviolet images, a storage medium, and a computer device, which can effectively improve the accuracy of determining the target centroid of ultraviolet imaging.

[0006] According to one aspect of the present application, a method for locating a target centroid based on an ultraviolet image is provided, comprising:

[0007] Converting the acquired ultraviolet image into a grayscale image, and determining first target data corresponding to each pixel on the grayscale image, wherein the first target data includes a first pixel identifier, first pixel position data, and a first pixel grayscale value;

[0008] Based on the first target data and the grayscale centroid determination model, obtaining a centroid position corresponding to the grayscale centroid of the grayscale image;

[0009] The target centroid is located on the ultraviolet image according to the centroid position corresponding to the grayscale centroid.

[0010] According to another aspect of the present application, there is provided an ultraviolet image-based target centroid positioning device, comprising:

[0011] a target data determination module configured to convert the acquired ultraviolet image into a grayscale image and determine first target data corresponding to each pixel point on the grayscale image, wherein the first target data comprises a first pixel point identifier, first pixel point position data, and a first pixel point grayscale value;

[0012] a centroid position determination module configured to determine a centroid position corresponding to a grayscale centroid of the grayscale image based on the first target data and a grayscale centroid determination model;

[0013] a target centroid positioning module configured to position the target centroid on the ultraviolet image according to the centroid position corresponding to the grayscale centroid.

[0014] According to yet another aspect of the present application, there is provided a storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the above-described ultraviolet image-based target centroid positioning method.

[0015] According to still another aspect of the present application, there is provided a computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-described ultraviolet image-based target centroid positioning method when executing the program.

[0016] By means of the above technical solutions, the present application provides an ultraviolet image-based target centroid positioning method and device, a storage medium, and a computer device. First, an ultraviolet image can be acquired and converted into a grayscale image. Then, first target data corresponding to each pixel point on the grayscale image can be determined based on the grayscale image. Here, the first target data can comprise first pixel point position data corresponding to the pixel point, and can also comprise a first pixel point grayscale value and a first pixel point identifier corresponding to the pixel point. Subsequently, a centroid position corresponding to a grayscale centroid of the grayscale image can be obtained based on the first target data corresponding to each pixel point and a grayscale centroid determination model. After determining the centroid position corresponding to the grayscale centroid, the target centroid can be positioned on the ultraviolet image according to the centroid position corresponding to the grayscale centroid. The present application converts the ultraviolet image into a grayscale image by utilizing the grayscale spatial distribution characteristics of ultraviolet imaging, and then positions the target centroid on the ultraviolet image according to the grayscale centroid of the grayscale image, so that the target centroid of the ultraviolet image can be accurately and quickly determined.

[0017] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1 A schematic diagram of a process for locating the target centroid based on ultraviolet images provided in an embodiment of the present application is shown;

[0020] Figure 2 A schematic diagram of a process for locating the centroid of an object based on ultraviolet images provided in an embodiment of the present application is shown;

[0021] Figure 3 A schematic diagram of positioning errors under different grayscale image samples provided by an embodiment of the present application is shown;

[0022] Figure 4 A schematic structural diagram of another target centroid positioning device based on ultraviolet images provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0023] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.

[0024] In this embodiment, a target centroid positioning method based on ultraviolet image is provided. Figure 1 As shown, the method includes:

[0025] Step 101: convert the acquired ultraviolet image into a grayscale image, and determine first target data corresponding to each pixel on the grayscale image, wherein the first target data includes a first pixel identifier, first pixel position data, and first pixel grayscale value;

[0026] The target centroid positioning method based on ultraviolet images provided in the embodiment of the present application can be applied to missile detection scenarios, and can quickly and accurately determine the target centroid in the ultraviolet image, thereby improving the accuracy of missile position judgment. The ultraviolet image can be acquired based on the ultraviolet sensor, and can be specifically acquired according to a preset frequency. First, the ultraviolet image can be acquired, and the acquired ultraviolet image can be converted into a grayscale image. Then, based on the grayscale image, the first target data corresponding to each pixel on the grayscale image can be determined. Here, the first target data can include the first pixel position data corresponding to the pixel. The ultraviolet image is a two-dimensional image. Therefore, the first pixel position data corresponding to each pixel can be the coordinates of the pixel, which can be represented by (x, y). In addition, the first target data can also include the first pixel grayscale value corresponding to the pixel and the first pixel identifier. Here, the first pixel identifier can refer to the sorting identifier of the pixel among all the pixels. For example, pixel A is located in the 4th row and the 6th column among all the pixels, then the first pixel identifier corresponding to pixel A can be A46, or A47. 46 wait.

[0027] Step 102: obtaining a centroid position corresponding to the grayscale centroid of the grayscale image based on the first target data and a grayscale centroid determination model;

[0028] In this embodiment, the first target data corresponding to each pixel and the grayscale centroid determination model can be used as a basis. Specifically, the first target data corresponding to all pixels can be input into the grayscale centroid determination model to obtain the center of mass position corresponding to the grayscale centroid of the grayscale image. The center of mass position here can specifically refer to the center of mass coordinate position. Because the spatial grayscale distribution of each frame of ultraviolet target radiation collected by the ultraviolet sensor conforms to a diffuse circular distribution, combined with the grayscale spatial distribution characteristics of ultraviolet imaging, the center of mass position of the ultraviolet image can be determined using the grayscale centroid determination model.

[0029] Step 103: locate the target centroid on the ultraviolet image according to the centroid position corresponding to the grayscale centroid.

[0030] In this embodiment, after determining the center of mass position corresponding to the grayscale center of mass, the target center of mass can be located on the ultraviolet image based on the center of mass position corresponding to the grayscale center of mass. Specifically, the coordinates of the target center of mass on the ultraviolet image can be first determined based on the center of mass position corresponding to the grayscale center of mass, and then the target center of mass can be located on the ultraviolet image based on the coordinates. Here, the grayscale center of mass on the grayscale image is the same as the target center of mass on the ultraviolet image.

[0031] By applying the technical solutions of the embodiment, firstly, the ultraviolet image can be acquired, and the acquired ultraviolet image is converted into a gray image. Then, based on the gray image, the first target data corresponding to each pixel point on the gray image can be determined. Here, the first target data can include the first pixel point position data corresponding to the pixel point, and can also include the first pixel point gray value and the first pixel point identifier corresponding to the pixel point. After that, based on the first target data corresponding to each pixel point and the gray centroid determination model, the centroid position corresponding to the gray centroid of the gray image can be obtained. After the centroid position corresponding to the gray centroid is determined, the target centroid can be located on the ultraviolet image according to the centroid position corresponding to the gray centroid. The embodiment of the application converts the ultraviolet image into a gray image by using the gray space distribution characteristics of ultraviolet imaging, and then locates the target centroid on the ultraviolet image according to the gray centroid of the gray image, so that the target centroid of the ultraviolet image can be accurately and quickly determined.

[0032] Further, as a refinement and expansion of the above embodiment, in order to completely describe the specific implementation process of the embodiment, another target centroid positioning method based on an ultraviolet image is provided, as shown in Figure 2 The method comprises:

[0033] Step 201, converting the acquired ultraviolet image into a gray image, and determining the first target data corresponding to each pixel point on the gray image, wherein the first target data includes a first pixel point identifier, first pixel point position data, and a first pixel point gray value;

[0034] In this embodiment, firstly, the ultraviolet image can be acquired, and the acquired ultraviolet image is converted into a gray image. Then, based on the gray image, the first target data corresponding to each pixel point on the gray image can be determined. Here, the first target data can include the first pixel point position data corresponding to the pixel point, and the ultraviolet image is a two-dimensional image, so the first pixel point position data corresponding to each pixel point can be the coordinates of the pixel point, which can be represented by (x, y). In addition, the first target data can also include the first pixel point gray value and the first pixel point identifier corresponding to the pixel point. Here, the first pixel point identifier can refer to the ranking identifier of the pixel point among all pixel points, for example, the A pixel point is located in the 4th row and the 6th column among all pixel points, so the first pixel point identifier corresponding to the A pixel point can be A46, or A 46 and the like.

[0035] Step 202, determining a background noise threshold based on the first target data; determining the gray centroid determination model according to a preset gray weight value, the background noise threshold, and an initial centroid determination model;

[0036] In this embodiment, after determining the first target data corresponding to each pixel in the grayscale image, a background noise threshold can be further determined based on the first target data. Using the background noise threshold, pixels other than background pixels in the grayscale image can be effectively identified, thereby making the determination of the grayscale centroid more accurate and rapid. The initial centroid determination model includes two variables: the background noise threshold and a preset grayscale weighting value. Therefore, the calculated background noise threshold and the preset grayscale weighting value can be substituted into the initial centroid determination model to ultimately obtain the grayscale centroid determination model.

[0037] Step 203: Input the first target data into the first sub-model of the grayscale centroid determination model to obtain the horizontal coordinate of the grayscale centroid in the grayscale image; input the first target data into the second sub-model of the grayscale centroid determination model to obtain the vertical coordinate of the grayscale centroid in the grayscale image; and obtain the centroid position corresponding to the grayscale centroid of the grayscale image based on the horizontal coordinate and the vertical coordinate.

[0038] In this embodiment, the grayscale centroid determination model may include two parts, one part is a first sub-model and the other part is a second sub-model. By inputting the first target data corresponding to each pixel point on the grayscale image into the first sub-model, the horizontal coordinate x corresponding to the grayscale centroid in the grayscale image can be obtained. By inputting the first target data corresponding to each pixel point on the grayscale image into the second sub-model, the vertical coordinate y corresponding to the grayscale centroid in the grayscale image can be obtained. By piecing together the horizontal coordinate x and the vertical coordinate y, the center of mass position (x, y) of the grayscale centroid can be obtained.

[0039] Here, the grayscale centroid determination model can be specifically Among them, the calculation model corresponding to u0 can be the first sub-model, and the calculation model corresponding to v0 can be the second sub-model. i1 is the row identifier corresponding to the first row of pixels in the grayscale image, i2 is the row identifier corresponding to the last row of pixels in the grayscale image, j1 is the column identifier corresponding to the first column of pixels in the grayscale image, j2 is the column identifier corresponding to the last column of pixels in the grayscale image, u i is the horizontal coordinate position, v j is the vertical coordinate position, f(u i , v j ) is the horizontal coordinate u i Position, vertical coordinate v j The grayscale value of the pixel at position , T is the background noise threshold, k is the preset grayscale weighting value, and u0 and v0 are the horizontal and vertical coordinate positions corresponding to the grayscale centroid. For the grayscale centroid determination model, k and T are fixed values, so the centroid position of the grayscale centroid can be obtained through the grayscale centroid determination model.

[0040] In step 204, the target centroid is located on the ultraviolet image according to the centroid position corresponding to the gray centroid.

[0041] In this embodiment, after the centroid position corresponding to the gray centroid is determined, the target centroid can be located on the ultraviolet image according to the centroid position corresponding to the gray centroid. Specifically, the coordinates of the target centroid on the ultraviolet image can be determined according to the centroid position corresponding to the gray centroid on the ultraviolet image, and then the target centroid is located on the ultraviolet image according to the coordinates. Here, the gray centroid on the gray image and the target centroid on the ultraviolet image are the same.

[0042] In the embodiment of the present application, before the step 202, the method further comprises: obtaining a gray image sample, determining second target data corresponding to each sample pixel point in the gray image sample, wherein the second target data comprises a second pixel point identifier, second pixel point position data and second pixel point gray value; determining the preset gray weighting value in the preset gray weighting value range based on the second target data, the preset background noise threshold, the preset gray weighting value range and the initial centroid determination model.

[0043] In this embodiment, before the gray centroid determination model is determined, the preset gray weighting value can be determined first. Here, the preset gray weighting value is determined based on the gray image sample. First, the gray image sample is obtained, which can include multiple. Then, the second target data corresponding to each sample pixel point in each gray image sample can be determined. Here, the second target data can include the second pixel point identifier, and can also include the second pixel point position data and the second pixel point gray value. The second pixel point position data can be the coordinates of the pixel point, which can be represented by (x, y). In addition, the second pixel point identifier can refer to the ranking identifier of the pixel point in all pixel points. Then, the preset gray weighting value can be found in the preset gray weighting value range according to the second target data, the preset background noise threshold, the preset gray weighting value range and the initial centroid determination model. Here, the preset background noise threshold can be 0, or can be calculated by the above method, which is not specified here. The preset gray weighting value range can be [0, 8], and when the k value and the T value in the gray centroid determination model are unknown, the corresponding model is the initial centroid determination model.

[0044] In an embodiment of the present application, optionally, the "determining the preset grayscale weighted value within the preset range of grayscale weighted values ​​based on the second target data, the preset background noise threshold, the preset range of grayscale weighted values, and the initial centroid determination model" specifically includes: determining the initial grayscale weighted value within the preset range of grayscale weighted values, determining the first centroid determination model based on the initial grayscale weighted value, the preset background noise threshold, and the initial centroid determination model, and inputting the second target data into the first centroid determination model to obtain the centroid position corresponding to the first target centroid; determining the grayscale weighted update value based on the preset step size and the initial grayscale weighted value, and determining the grayscale weighted update value based on the grayscale weighted update value, the preset background noise threshold, and the initial centroid determination model. Model, determine the second centroid determination model, and input the second target data into the second centroid determination model to obtain the centroid position corresponding to the second target centroid, and judge whether the grayscale weighted update value belongs to the preset range of the grayscale weighted value; when the result is yes, repeatedly update the grayscale weighted update value according to the preset step size and the grayscale weighted update value, and return to the step of determining the second centroid determination model according to the grayscale weighted update value, the preset background noise threshold and the initial centroid determination model; when the result is no, determine the preset grayscale weighted value according to the centroid position corresponding to the first target centroid, the centroid positions corresponding to each of the second target centroids and the centroid position corresponding to the theoretical centroid of the grayscale image sample.

[0045] In this embodiment, an initial gray weight value can be determined in a preset range of gray weight values first, for example, the preset range of gray weight values is [0, 8], and then the initial gray weight value can be set as 1. Then, a corresponding first centroid determination model can be determined based on the initial gray weight value, the preset background noise threshold and the initial centroid determination model, and a centroid position corresponding to a first target centroid can be determined according to the second target data and the first centroid determination model. Then, the initial gray weight value can be updated according to a preset step to obtain an updated gray weight value, for example, the initial gray weight value is 1 and the preset step is 1, and then the updated gray weight value is 2. A corresponding second centroid determination model can be determined based on the updated gray weight value, the preset background noise threshold and the initial centroid determination model, and a centroid position corresponding to a second target centroid can be determined according to the second target data and the second centroid determination model. After the centroid position corresponding to the second target centroid is determined, it can be further judged whether the updated gray weight value is in the preset range of gray weight values, so as to determine whether the operation is ended. If the updated gray weight value is still in the preset range of gray weight values, the updated gray weight value can be updated according to the preset step to obtain an updated updated gray weight value, for example, the preset step is 1 and the updated gray weight value is 2, and then the updated updated gray weight value is 3. Then, the corresponding second centroid determination model can be determined again using the updated updated gray weight value, and the centroid position corresponding to the second target centroid can be calculated again, until the updated updated gray weight value is no longer in the preset range of gray weight values. At this time, a preset gray weight value can be determined from the preset range of gray weight values according to the centroid position corresponding to the first target centroid, the centroid positions corresponding to the second target centroids, and the centroid position corresponding to the theoretical centroid of the gray image sample. Since the centroid position corresponding to the last second target centroid is calculated when the updated updated gray weight value is not in the preset range of gray weight values, the centroid position of the last second target centroid can be directly removed and no longer be subjected to the following steps. The centroid position corresponding to the theoretical centroid can be the position of the ultraviolet light source set when the gray image is generated. When the gray image sample includes multiple gray image samples, a preset gray weight value corresponding to each gray image sample can be calculated, and finally a final preset gray weight value can be obtained according to the multiple preset gray weight values. For example, the preset gray weight value corresponding to each gray image sample can be determined, and then a value close to each preset gray weight value can be finally determined as the final preset gray weight value according to the preset gray weight values.

[0046] In the embodiments of the present application, the preset gray weight value is 2.

[0047] For example, as Figure 3As shown, for different grayscale image samples, the same initial grayscale weighted value and grayscale weighted value preset range are set, and different grayscale weighted update values ​​are obtained by adjusting according to the preset step size. The positioning errors corresponding to the initial grayscale weighted value and different grayscale weighted update values ​​are calculated, and the minimum positioning error is near the grayscale weighted update value of 2. Therefore, the preset grayscale weighted value can be set to 2.

[0048] In an embodiment of the present application, optionally, before "obtaining a grayscale image sample", the method further includes: obtaining an ultraviolet image sample, determining the second pixel point position data corresponding to each of the sample pixel points in the ultraviolet image sample; inputting the second pixel point position data and the center of mass position corresponding to the theoretical center of mass into a preset grayscale value determination model to obtain the second pixel point grayscale value corresponding to each of the sample pixel points; replacing the color value corresponding to each of the sample pixel points in the ultraviolet image sample based on the second pixel point grayscale value to obtain the grayscale image sample corresponding to the ultraviolet image sample.

[0049] In this embodiment, before obtaining the grayscale image sample, the ultraviolet image sample can be obtained first, and the second pixel position data corresponding to each sample pixel in the ultraviolet image sample can be determined. Here, each second pixel position data can be represented by (u, v). Then, the second pixel position data and the centroid position corresponding to the theoretical centroid can be input into the preset grayscale value determination model to calculate the second pixel grayscale value corresponding to each sample pixel. The preset grayscale value determination model can be Where: G is the maximum grayscale value of the spot image, which is 255, (u p ,v p ) is the centroid position of the theoretical centroid of the spot image; σ x , σ y is the mean square error of the horizontal and vertical directions of the coordinate axis, and the value can be set to Then, after deformation, we can get g(u, v) is the calculated second pixel grayscale value corresponding to the sample pixel. Once the second pixel grayscale values ​​corresponding to all sample pixels in the UV image sample are determined, the corresponding color values ​​in the UV image sample can be replaced with the second pixel grayscale values ​​corresponding to each sample pixel, thereby obtaining a grayscale image sample corresponding to the UV image sample. This embodiment of the present application can rapidly convert UV image samples into grayscale image samples.

[0050] In an embodiment of the present application, optionally, the "determining the background noise threshold based on the first target data" in step 202 specifically includes: identifying the third target data of the grayscale image from the first target data, wherein the third target data includes the pixel grayscale values ​​corresponding to the first row of pixels and the last row of pixels, the pixel grayscale values ​​corresponding to the first column of pixels and the last column of pixels, the number of row pixels and the number of column pixels; based on the third target data, determining the background pixel grayscale mean and the background pixel grayscale standard deviation corresponding to the grayscale image; based on the background pixel grayscale mean and the background pixel grayscale standard deviation, determining the background noise threshold.

[0051] In this embodiment, the first target data may include a first pixel identification, first pixel position data and a first pixel grayscale value. Specifically, the pixel grayscale values ​​of each pixel in the first row of the grayscale image and the pixel grayscale values ​​of each pixel in the last row, the pixel grayscale values ​​corresponding to each pixel in the first column and the pixel grayscale values ​​corresponding to each pixel in the last column can be identified from the first target data. In addition, the total number of pixels in each row of the grayscale image, that is, the number of row pixels, and the total number of pixels in each column, that is, the number of column pixels, can also be identified. These identified data can be referred to as third target data. Afterwards, the background pixel grayscale mean and the background pixel grayscale standard deviation corresponding to the grayscale image can be determined based on the third target data. For example, the background pixel grayscale mean can be calculated by the following formula:

[0052] Where E is the grayscale value of the background pixel, U is the number of row pixels, V is the number of column pixels, f(x, 1) is the grayscale value of the pixel in the 1st column and the xth row, f(x, V) is the grayscale value of the pixel in the Vth column and the xth row, f(1, y) is the grayscale value of the pixel in the 1st row and the yth column, and f(U, y) is the grayscale value of the pixel in the Uth row and the yth column. The above formula can be used to quickly determine the grayscale mean of the background pixels in a grayscale image. The standard deviation of the background pixel grayscale can be calculated using the following formula:

[0053] Where σ is the standard deviation of the background pixel grayscale. Finally, the background noise threshold can be determined based on the background pixel grayscale mean and the background pixel grayscale standard deviation. Specifically, the background noise threshold can be T = E + 2σ. Since the third target data corresponding to a configured UV sensor rarely changes, the background noise threshold can be determined only upon initial use and then directly used subsequently without repeated determination.

[0054] In an embodiment of the present application, optionally, the "determining the preset grayscale weighting value based on the center of mass position corresponding to the first target center of mass, the center of mass positions corresponding to each second target center of mass, and the center of mass position corresponding to the theoretical center of mass of the grayscale image sample" specifically includes: calculating the first positioning error based on the center of mass position corresponding to the first target center of mass and the center of mass position corresponding to the theoretical center of mass of the grayscale image sample; calculating the second positioning error corresponding to each second target center of mass based on the center of mass position corresponding to each second target center of mass and the center of mass position corresponding to the theoretical center of mass of the grayscale image sample; determining the minimum positioning error from the first positioning error and the second positioning error, and determining the preset grayscale weighting value based on the minimum positioning error.

[0055] In this embodiment, each calculated center of mass position can be calculated to obtain a corresponding positioning error. Specifically, the first positioning error can be obtained by calculating the center of mass position corresponding to the first target center of mass and the center of mass position corresponding to the theoretical center of mass. In addition, the second positioning error can be obtained by calculating the center of mass position corresponding to the second target center of mass and the center of mass position corresponding to the theoretical center of mass. For example, the center of mass position corresponding to the first target center of mass or the second target center of mass is recorded as (u1, v1), and the center of mass position corresponding to the theoretical center of mass is recorded as (u p ,v p ), then the positioning error can be calculated by the following formula: After calculating the positioning errors corresponding to each target's centroid, the sizes of the positioning errors can be compared, and the preset grayscale weighting value can be determined based on the minimum positioning error. For example, if the initial grayscale weighting value is 1, the corresponding positioning error calculated is 0.01, and the grayscale weighting update value is 2, the corresponding positioning error calculated is 0.012, then the initial grayscale weighting value can be used as the preset grayscale weighting value.

[0056] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a target centroid positioning device based on ultraviolet image, such as Figure 4 As shown, the device includes:

[0057] a target data determination module, configured to convert the acquired ultraviolet image into a grayscale image, and determine first target data corresponding to each pixel point on the grayscale image, wherein the first target data includes a first pixel point identifier, first pixel point position data, and first pixel point grayscale value;

[0058] a centroid position determination module, configured to obtain a centroid position corresponding to the grayscale centroid of the grayscale image based on the first target data and a grayscale centroid determination model;

[0059] The target centroid positioning module is used to locate the target centroid on the ultraviolet image according to the centroid position corresponding to the grayscale centroid.

[0060] Optionally, the center of mass position determination module is specifically configured to:

[0061] Input the first target data into the first sub-model of the grayscale centroid determination model to obtain the horizontal coordinate of the grayscale centroid in the grayscale image; input the first target data into the second sub-model of the grayscale centroid determination model to obtain the vertical coordinate of the grayscale centroid in the grayscale image; based on the horizontal coordinate and the vertical coordinate, obtain the centroid position corresponding to the grayscale centroid of the grayscale image.

[0062] Optionally, the device further comprises:

[0063] A background noise threshold determination module is configured to determine a background noise threshold based on the first target data before obtaining a centroid position corresponding to the grayscale centroid of the grayscale image based on the first target data and the grayscale centroid determination model;

[0064] The grayscale centroid determination model determination module is used to determine the grayscale centroid determination model based on a preset grayscale weighted value, the background noise threshold and the initial centroid determination model.

[0065] Optionally, the device further comprises:

[0066] The target data determination module is further configured to obtain a grayscale image sample before determining the grayscale centroid determination model based on the preset grayscale weighted value, the background noise threshold, and the initial centroid determination model, and determine second target data corresponding to each sample pixel in the grayscale image sample, wherein the second target data includes a second pixel identifier, second pixel position data, and a second pixel grayscale value;

[0067] A preset grayscale weighted value determination module is used to determine the preset grayscale weighted value in the grayscale weighted value preset range based on the second target data, the preset background noise threshold, the grayscale weighted value preset range and the initial centroid determination model.

[0068] Optionally, the preset grayscale weighted value determination module specifically includes:

[0069] a first determination unit, configured to determine an initial grayscale weighted value within a preset range of the grayscale weighted value, determine a first centroid determination model based on the initial grayscale weighted value, the preset background noise threshold, and the initial centroid determination model, and input the second target data into the first centroid determination model to obtain a centroid position corresponding to the first target centroid;

[0070] a second determination unit, configured to determine a grayscale weighted update value based on a preset step size and the initial grayscale weighted value, determine a second centroid determination model based on the grayscale weighted update value, the preset background noise threshold, and the initial centroid determination model, input the second target data into the second centroid determination model, obtain a centroid position corresponding to the second target centroid, and determine whether the grayscale weighted update value falls within a preset range of the grayscale weighted value;

[0071] an updating unit, configured to, when the result is yes, repeatedly update the grayscale weighted update value according to the preset step size and the grayscale weighted update value, and return to the step of determining a second centroid determination model according to the grayscale weighted update value, the preset background noise threshold, and the initial centroid determination model;

[0072] A preset grayscale weighted value determination unit is used to determine the preset grayscale weighted value based on the center of mass position corresponding to the first target center of mass, the center of mass positions corresponding to each of the second target centers of mass, and the center of mass position corresponding to the theoretical center of mass of the grayscale image sample when the result is no.

[0073] Optionally, the device further comprises:

[0074] a sample acquisition module, configured to acquire an ultraviolet image sample before acquiring the grayscale image sample, and determine the second pixel point position data corresponding to each of the sample pixel points in the ultraviolet image sample;

[0075] a pixel grayscale value determination module, configured to input the second pixel position data and the centroid position corresponding to the theoretical centroid into a preset grayscale value determination model to obtain the second pixel grayscale value corresponding to each of the sample pixels;

[0076] The grayscale image sample determination module is configured to replace the color value corresponding to each sample pixel in the ultraviolet image sample based on the grayscale value of the second pixel point to obtain the grayscale image sample corresponding to the ultraviolet image sample.

[0077] Optionally, the background noise threshold determination module is specifically configured to:

[0078] Identify third target data of the grayscale image from the first target data, wherein the third target data includes pixel grayscale values ​​corresponding to the first row of pixels and the last row of pixels, pixel grayscale values ​​corresponding to the first column of pixels and the last column of pixels, the number of row pixels and the number of column pixels; based on the third target data, determine the background pixel grayscale mean and the background pixel grayscale standard deviation corresponding to the grayscale image; determine the background noise threshold based on the background pixel grayscale mean and the background pixel grayscale standard deviation.

[0079] Optionally, the preset grayscale weighted value determining unit is specifically configured to:

[0080] A first positioning error is calculated based on the center of mass position corresponding to the first target center of mass and the center of mass position corresponding to the theoretical center of mass of the grayscale image sample; a second positioning error corresponding to each second target center of mass is calculated based on the center of mass position corresponding to each second target center of mass and the center of mass position corresponding to the theoretical center of mass of the grayscale image sample; a minimum positioning error is determined from the first positioning error and the second positioning error, and the preset grayscale weighted value is determined based on the minimum positioning error.

[0081] It should be noted that for other corresponding descriptions of the functional units involved in the target centroid positioning device based on ultraviolet image provided in the embodiment of the present application, please refer to Figures 1 to 2 The corresponding description in the method will not be repeated here.

[0082] Based on the above Figures 1 to 2 The method shown in FIG. 1 is a method for performing the above-mentioned operation. Accordingly, the embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned operation is performed. Figures 1 to 2 The target centroid positioning method based on ultraviolet image is shown.

[0083] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0084] Based on the above Figures 1 to 2 The method shown, and Figure 4 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figures 1 to 2 The target centroid positioning method based on the ultraviolet image shown.

[0085] Optionally, the computer device can further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface can include a display screen, an input unit such as a keyboard, and the like. The optional user interface can further include a USB interface, a card reader interface, and the like. The network interface can optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), and the like.

[0086] Those skilled in the art can understand that the computer device structure provided by the embodiment does not constitute a limitation on the computer device, and can include more or fewer components, or combine certain components, or different component arrangements.

[0087] The storage medium can further include an operating system and a network communication module. The operating system is a program for managing and saving computer device hardware and software resources, and supports the running of information processing programs and other software and / or programs. The network communication module is used to realize communication between the components in the storage medium and communication with other hardware and software in the entity device.

[0088] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary general hardware platforms, or by hardware. First, the ultraviolet image can be acquired, and the acquired ultraviolet image can be converted into a gray-scale image. Then, the first target data corresponding to each pixel point on the gray-scale image can be determined based on the gray-scale image. Here, the first target data can include the first pixel point position data corresponding to the pixel point, and can also include the first pixel point gray-scale value and the first pixel point identifier corresponding to the pixel point. After that, the centroid position corresponding to the gray-scale centroid of the gray-scale image can be obtained based on the first target data corresponding to each pixel point and the gray-scale centroid determination model. After the centroid position corresponding to the gray-scale centroid is determined, the target centroid can be positioned on the ultraviolet image according to the centroid position corresponding to the gray-scale centroid. The present application embodiment converts the ultraviolet image into a gray-scale image by utilizing the gray-scale space distribution characteristics of ultraviolet imaging, and then positions the target centroid on the ultraviolet image according to the gray-scale centroid of the gray-scale image. The target centroid of the ultraviolet image can be accurately and quickly determined.

[0089] Those skilled in the art will understand that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required to implement the present application. Those skilled in the art will understand that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple sub-modules.

[0090] The serial numbers of the above application are for descriptive purposes only and do not represent the advantages or disadvantages of the implementation scenarios. The above disclosure only discloses several specific implementation scenarios of the present application, but the present application is not limited thereto. Any changes that can be conceived by those skilled in the art should fall within the scope of protection of the present application.

Claims

1. A target centroid positioning method based on ultraviolet image, characterized in that: include: Converting the acquired ultraviolet image into a grayscale image, and determining first target data corresponding to each pixel on the grayscale image, wherein the first target data includes a first pixel identifier, first pixel position data, and a first pixel grayscale value; Based on the first target data and the grayscale centroid determination model, obtaining a centroid position corresponding to the grayscale centroid of the grayscale image; Locating the target centroid on the ultraviolet image according to the centroid position corresponding to the grayscale centroid; Before obtaining the centroid position corresponding to the grayscale centroid of the grayscale image based on the first target data and the grayscale centroid determination model, the method further includes: determining a background noise threshold based on the first target data; Determining the grayscale centroid determination model according to a preset grayscale weighted value, the background noise threshold, and an initial centroid determination model; Before determining the grayscale centroid determination model based on the preset grayscale weighted value, the background noise threshold, and the initial centroid determination model, the method further includes: Acquire a grayscale image sample, and determine second target data corresponding to each sample pixel in the grayscale image sample, wherein the second target data includes a second pixel identifier, second pixel position data, and a second pixel grayscale value; Determining an initial grayscale weighted value within a preset range of grayscale weighted values, determining a first centroid determination model based on the initial grayscale weighted value, a preset background noise threshold, and the initial centroid determination model, and inputting the second target data into the first centroid determination model to obtain a centroid position corresponding to the first target centroid; Determining a grayscale weighted update value based on a preset step size and the initial grayscale weighted value, determining a second centroid determination model based on the grayscale weighted update value, the preset background noise threshold, and the initial centroid determination model, inputting the second target data into the second centroid determination model, obtaining a centroid position corresponding to the second target centroid, and determining whether the grayscale weighted update value falls within a preset range of the grayscale weighted value; When the result is yes, repeatedly updating the grayscale weighted update value according to the preset step size and the grayscale weighted update value, and returning to the step of determining the second centroid determination model according to the grayscale weighted update value, the preset background noise threshold and the initial centroid determination model; When the result is no, the preset grayscale weighted value is determined according to the center of mass position corresponding to the first target center of mass, the center of mass positions corresponding to each second target center of mass, and the center of mass position corresponding to the theoretical center of mass of the grayscale image sample.

2. The method according to claim 1, characterized in that The obtaining, based on the first target data and the grayscale centroid determination model, a centroid position corresponding to the grayscale centroid of the grayscale image specifically includes: Inputting the first target data into the first sub-model of the grayscale centroid determination model to obtain the horizontal coordinate of the grayscale centroid in the grayscale image; Inputting the first target data into the second sub-model of the grayscale centroid determination model to obtain the vertical coordinate of the grayscale centroid in the grayscale image; Based on the abscissa and the ordinate, a centroid position corresponding to the grayscale centroid of the grayscale image is obtained.

3. The method according to claim 1, characterized in that Before obtaining the grayscale image sample, the method further includes: Acquire an ultraviolet image sample, and determine the second pixel point position data corresponding to each of the sample pixel points in the ultraviolet image sample; Inputting the second pixel point position data and the centroid position corresponding to the theoretical centroid into a preset grayscale value determination model to obtain the second pixel point grayscale value corresponding to each of the sample pixels; The color value corresponding to each sample pixel point in the ultraviolet image sample is replaced based on the second pixel point grayscale value to obtain the grayscale image sample corresponding to the ultraviolet image sample.

4. The method according to claim 1, wherein The determining of the background noise threshold based on the first target data specifically includes: Identifying third target data of the grayscale image from the first target data, wherein the third target data includes grayscale values ​​of pixels corresponding to the first row and the last row, grayscale values ​​of pixels corresponding to the first column and the last column, the number of pixels in the row, and the number of pixels in the column; Based on the third target data, determining the grayscale mean and grayscale standard deviation of the background pixels corresponding to the grayscale image; The background noise threshold is determined based on the background pixel grayscale mean and the background pixel grayscale standard deviation.

5. The method according to claim 1, wherein The determining of the preset grayscale weighted value according to the center of mass position corresponding to the first target center of mass, the center of mass positions corresponding to the centers of mass of each second target, and the center of mass position corresponding to the theoretical center of mass of the grayscale image sample specifically includes: Calculating a first positioning error based on a center of mass position corresponding to the first target center of mass and a center of mass position corresponding to a theoretical center of mass of the grayscale image sample; Calculating a second positioning error corresponding to each second target centroid according to a centroid position corresponding to each second target centroid and a centroid position corresponding to a theoretical centroid of the grayscale image sample; A minimum positioning error is determined from the first positioning error and the second positioning error, and the preset grayscale weighted value is determined based on the minimum positioning error.

6. The method according to claim 1, characterized in that The preset grayscale weighting value is 2.

7. A target centroid positioning device based on ultraviolet image, characterized in that: The target centroid positioning device is used to implement the method according to any one of claims 1 to 6, and the device includes: a target data determination module, configured to convert the acquired ultraviolet image into a grayscale image, and determine first target data corresponding to each pixel point on the grayscale image, wherein the first target data includes a first pixel point identifier, first pixel point position data, and first pixel point grayscale value; a centroid position determination module, configured to obtain a centroid position corresponding to the grayscale centroid of the grayscale image based on the first target data and a grayscale centroid determination model; The target centroid positioning module is used to locate the target centroid on the ultraviolet image according to the centroid position corresponding to the grayscale centroid.

8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. A computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Insulator pollution state evaluation method based on ultraviolet spectrum

    CN113065484A

  • Ultraviolet image corona identification and positioning method and system based on image fusion

    CN113870174A