A method, apparatus, computer device, and medium for determining the location of a target object.
Through the method of signal enhancement and motion area determination of target images in space-based space detection, the problem of inaccurate location determination of ultra-long-distance target objects is solved, and detection accuracy and contrast are improved.
Patent Information
- Application Number
- CN202210028045.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-11
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2042-01-11
AI Technical Summary
During space-based space detection, due to factors such as atmospheric scattering, refraction, optical defocusing and lens deformation, the signal intensity of the ultra-long distance target object is dark, resulting in inaccurate determination of the target object position.
By acquiring consecutive multiple frames of images containing the target image, signal enhancement is performed on pixels whose pixel values are greater than the background threshold, and the position of the target object in the multiple frames of images is used to determine its motion area, thereby improving the accuracy of the target object's position.
The accuracy of determining the position of the target object in the target image is improved, and the contrast between the target object and the background is enhanced, making the target object easier to identify.
Smart Images

Figure CN114373011B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, apparatus, computer equipment and medium for determining a position of a target object. Background Art
[0002] With the development of science and technology, human exploration of space is becoming more and more frequent, and space target detection is of great significance for perceiving space situation and maintaining the safety of space environment.
[0003] Space target detection is mainly divided into two categories: ground-based and space-based. Compared with traditional ground-based space target detection, space-based space target detection has a wide detection coverage and strong detection capability, and has become the key development direction of various countries in recent years. However, in the process of space-based space detection, due to the influence of atmospheric scattering, refraction, optical defocusing, lens deformation, etc., when the target object at a very long distance is received by the detector, the signal strength is weak, and even invisible to the naked eye, resulting in inaccurate determination of the target object's position. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a method, apparatus, computer equipment and medium for determining the position of a target object, so as to improve the accuracy of determining the position of a target object at an ultra-long distance during space-based space detection.
[0005] In a first aspect, an embodiment of the present application provides a method for determining a position of a target object, the method comprising:
[0006] Acquire a plurality of continuous frames of images containing a target image; the target image includes a target object;
[0007] Performing signal enhancement on a first pixel in the target image; wherein the first pixel is a pixel whose pixel value is greater than a first background threshold, and the first background threshold is a pixel value of a pixel corresponding to a background area in the target image;
[0008] Determine a first motion region of the target object in the continuous multiple frames of images by using the position of the target object in the continuous multiple frames of images;
[0009] The position of the second pixel point in the target image is determined as the position of the target object in the target image; the second pixel point is a pixel point whose pixel value is greater than a second background threshold; the second background threshold is the pixel value of the pixel point corresponding to the background area in the first motion area.
[0010] Optionally, performing signal enhancement on the first pixel in the target image includes:
[0011] Calculating an enhancement factor for each pixel according to a maximum pixel value of the pixel in the target image, a pixel value of each pixel, and a first background threshold;
[0012] The signal of the first pixel in the target image is enhanced by using the enhancement factor.
[0013] Optionally, calculating the enhancement factor of each pixel point according to the maximum pixel value of the pixels in the target image, the pixel value of each pixel point and a first background threshold includes:
[0014] The pixel value with the largest number obtained by counting in the target image is taken as the first background threshold;
[0015] Determine a maximum pixel value from the pixel values of all pixels in the target image that are greater than the first background threshold;
[0016] An enhancement factor for each pixel is calculated according to the maximum pixel value, the pixel value of each pixel and the first background threshold.
[0017] Optionally, the determining a first motion region of the target object in the continuous multiple frames of images by using the position of the target object in the continuous multiple frames of images includes:
[0018] Determining a second motion region of the target object in the two consecutive image frames according to a pixel difference of corresponding pixel points in the two consecutive image frames;
[0019] A first motion region of the target object in the continuous multiple frames of images is formed according to the second motion region in each of the two continuous frames of images.
[0020] Optionally, the method further includes:
[0021] Determining a pixel point corresponding to the target object in the target image according to the position of the target object;
[0022] The pixel values of the pixels corresponding to the target object in the target image are adjusted to a preset pixel threshold to obtain the target image displayed to the user.
[0023] In a second aspect, an embodiment of the present application provides a device for determining a position of a target object, the device comprising:
[0024] An acquisition module, used for acquiring a plurality of continuous frames of images containing a target image; the target image includes a target object;
[0025] An enhancement module, configured to perform signal enhancement on a first pixel in the target image; wherein the first pixel is a pixel having a pixel value greater than a first background threshold, and the first background threshold is a pixel value corresponding to a pixel in a background area in the target image;
[0026] A first determining module, configured to determine a first motion region of the target object in the continuous multiple frames of images by using the position of the target object in the continuous multiple frames of images;
[0027] The second determination module is used to determine the position of the second pixel point in the target image as the position of the target object in the target image; the second pixel point is a pixel point whose pixel value is greater than a second background threshold; the second background threshold is the pixel value of the pixel point corresponding to the background area in the first motion area.
[0028] Optionally, the enhancement module includes:
[0029] A calculation unit, used to calculate an enhancement factor for each pixel point according to a maximum pixel value of the pixel points in the target image, a pixel value of each pixel point and a first background threshold;
[0030] An enhancement unit is used to enhance the signal of the first pixel in the target image by using the enhancement factor.
[0031] Optionally, the computing unit includes:
[0032] A first determining subunit is used to use the pixel value with the largest number obtained by counting in the target image as a first background threshold;
[0033] A second determining subunit, configured to determine a maximum pixel value from pixel values of all pixels in the target image that are greater than the first background threshold;
[0034] The calculation subunit is used to calculate the enhancement factor of each pixel point according to the maximum pixel value, the pixel value of each pixel point and the first background threshold.
[0035] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the method.
[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method are executed.
[0037] The method for determining the position of a target object proposed in an embodiment of the present application is based on a visual contrast mechanism to enhance the signal of pixels whose pixel values are greater than a first background threshold, that is, the background clutter of the target image is also suppressed. At the same time, the position of the target object in the continuous multi-frame image is used to determine the first motion area of the target object in the continuous multi-frame image. Under the guidance of the first motion area, the accuracy of further determining the position of the target object in the target image is improved, and the target object contained in the target image can be fully detected.
[0038] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A schematic diagram showing a flow chart of a method for determining a position of an object provided in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of a flow chart of a method for calculating an enhancement factor provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of a flow chart of a device for determining a position of an object provided in an embodiment of the present application;
[0043] Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0045] With the development of science and technology, human exploration of space is becoming more and more frequent, and space target detection is of great significance for perceiving space situation and maintaining the safety of space environment.
[0046] Space target detection is mainly divided into two categories: ground-based and space-based. Compared with traditional ground-based space target detection, space-based space target detection has a wide detection coverage and strong detection capability, and has become the key development direction of various countries in recent years. However, in the process of space-based space detection, due to the influence of atmospheric scattering, refraction, optical defocusing, lens deformation, etc., when the target object at a very long distance is received by the detector, the signal strength is weak, and even invisible to the naked eye, resulting in inaccurate determination of the target object's position.
[0047] In view of this, in order to improve the accuracy of determining the position of a target object, embodiments of the present application provide a method, apparatus, computer device, and medium for determining the position of a target object, which are described below through embodiments.
[0048] Figure 1 A flow chart of a method for determining the position of an object provided in an embodiment of the present application is shown, wherein the method can be implemented through steps S101-S105:
[0049] S101, acquiring a plurality of continuous frames of images including a target image; the target image includes a target object;
[0050] S102, performing signal enhancement on a first pixel in the target image; wherein the first pixel is a pixel having a pixel value greater than a first background threshold, and the first background threshold is a pixel value corresponding to a pixel in a background area in the target image;
[0051] S103, determining a first motion region of the target object in the continuous multiple frames of images by using the position of the target object in the continuous multiple frames of images;
[0052] S104, determining the position of the second pixel point in the target image as the position of the target object in the target image; the second pixel point is a pixel point whose pixel value is greater than a second background threshold; the second background threshold is the pixel value of the pixel point corresponding to the background area in the first motion area.
[0053] In the above step S101, the target image refers to a space image taken outside the atmosphere using a space-based optical imaging system, wherein the target image contains a target object; the target object may be an artificial spacecraft orbiting the earth outside the atmosphere, or other natural celestial bodies such as stars and planets. Since the target object can only be captured by the camera in space by the reflection of the sun, and the shooting distance is far, the energy is weak, and the appearance on the imaging surface of the optical system is a point target. Continuous multi-frame images include multiple single-frame images, and multiple single-frame images are continuous multiple single-frame images acquired at fixed time intervals. A single-frame image is a still picture, and multiple continuous single-frame images constitute an image animation.
[0054] In specific implementation, the present application is mainly for determining the target object in the target image. Therefore, only after the target image is acquired can the subsequent steps S102 to S105 be executed.
[0055] In the above step S102, the first pixel point is a pixel point in the target image whose pixel value is greater than the first background threshold value, and the first background threshold value is the pixel value of the pixel point corresponding to the background area in the target image. The pixel point corresponding to the background area is the pixel value with the largest number obtained by statistics in the target image. The image is composed of a plurality of pixels, and each pixel point has a corresponding pixel value. The target image includes a target object and a background area. The pixel value range of the pixel point corresponding to the background area in the target image is the first background threshold value. Signal enhancement is used to adjust the pixel value of the target object in the target image and increase the pixel value of the pixel point so that the target object is displayed more clearly in the target image.
[0056] When a target image containing a target object is acquired through a space-based optical imaging system, the signal strength of the target object is weak due to the long distance, and the target object cannot be clearly identified in the target image. Therefore, the first pixel point whose pixel value is greater than the first background threshold is signal enhanced, thereby improving the contrast between the target object and the background area in the target image, making the target object easier to identify.
[0057] In the above step S103, the first motion region is the region corresponding to the motion trajectory of the target object in the target image, wherein the motion trajectory of the target object is determined based on the position of the target object in multiple consecutive frames of images.
[0058] In a specific implementation, in the process of increasing the pixel value of a pixel point in a target image by an enhancement factor, the pixel value of a pixel point that is higher than the first background threshold is adjusted, but the pixel points in the target image whose pixel value is higher than the first background threshold also include noise points that confuse the target object. Therefore, it is necessary to further determine the area of the target object in the target image, that is, the first motion area. Determining the target object based on the guidance of the first motion area can improve the accuracy of determining the location of the target object. The embodiment of the present application can estimate the first motion area of the target object by Farneback (sparse optical flow tracking algorithm).
[0059] In the above step S104, the second background threshold is the pixel value corresponding to the pixel points in the background area in the first motion area. Since the pixel points in the first motion area mainly represent the target object and the image near the target object, due to the influence of the target object (the target object emits light source), in the first motion area, the pixel values of the pixel points near the target object may be greater than the first background threshold. Therefore, the second background threshold determined in the first motion area may also be greater than the first background threshold.
[0060] In a specific implementation, the area where the target object is located is determined in the target image through the first motion area. The first motion area is a smaller area relative to the target image, and the target object and the background are included in the first motion area. Therefore, in the first motion area, as long as the pixel value is greater than the pixel value of the background area, the pixel point can be identified as the pixel point corresponding to the target object, that is, in a smaller area (the first motion area), the background threshold (the second background threshold) is used to further determine the position of the target object, thereby improving the accuracy of determining the position of the target object. The embodiment of the present application can extract pixel points as the target object in the area corresponding to the first motion area in the target image through an adaptive threshold segmentation method, and then determine the position of the target object.
[0061] The above five steps of the embodiment of the present application, based on the visual contrast mechanism, perform signal enhancement on pixel points whose pixel values are greater than the first background threshold, thereby improving the contrast between the target object and the background; then, the position of the target object in the continuous multi-frame images is used to determine the first motion area of the target object in the continuous multi-frame images. Under the guidance of the first motion area, the noise in the background of the target image is filtered, thereby improving the accuracy of further determining the position of the target object in the target image, and the target object contained in the target image can be comprehensively detected.
[0062] In this application, the signal enhancement of the first pixel in the target image is to improve the contrast between the target object and the background in the target image. The pixel value of the first pixel can be enhanced in the following manner:
[0063] Step 1021, calculating an enhancement factor for each pixel in the target image according to the maximum pixel value of the pixels, the pixel value of each pixel and a first background threshold;
[0064] Step 1022: perform signal enhancement on the first pixel in the target image using the enhancement factor.
[0065] With respect to the above step 1021, the enhancement factor is used to perform signal enhancement on the pixel value of the pixel point.
[0066] Specifically, in order to understand the process of determining the enhancement factor in more detail, Figure 2 A schematic diagram of a method for calculating an enhancement factor provided in an embodiment of the present application is shown. Figure 2 As shown, the process of determining the enhancement factor can be implemented through steps S201-S203:
[0067] S201, taking the pixel value with the largest number obtained by counting in the target image as the first background threshold;
[0068] S202, determining a maximum pixel value from pixel values of all pixels in the target image that are greater than the first background threshold;
[0069] S203: Calculate an enhancement factor for each pixel according to the maximum pixel value, the pixel value of each pixel, and the first background threshold.
[0070] In the above step S201, the image histogram is used to describe the distribution characteristics of the pixel values of the pixel points in the target image, and the number of pixel points corresponding to each pixel value is counted. Therefore, the pixel value with the largest number can be obtained through the image histogram statistics. Since most of the space images taken by the space-based optical imaging system are observation backgrounds, the pixel value with the largest statistical value of the image histogram of the target image is selected as the first background threshold. In a specific implementation, the first background threshold can be expressed by the following formula:
[0071] T backgroud = max(imhist(I));
[0072] Among them, T backgroud represents the first background threshold; I is the input target image, imhist() is the image histogram of the target image; max(imhist(I)) is the pixel value with the maximum value of the image histogram.
[0073] In the above step S202, since the first background threshold represents the pixel value of the observed background in the space image, the overall brightness is low, and the pixel value of the target object is slightly stronger than the first background threshold, after obtaining the first threshold, all pixel points greater than the first background threshold are screened out from the target image, and a maximum pixel value is determined based on the pixel values of all the screened pixels.
[0074] In the above step S203, the enhancement factor is obtained by calculating the ratio between the product of the maximum pixel value and the pixel value of each pixel point and the first background threshold. Specifically, the enhancement factor can be expressed by the following formula:
[0075]
[0076] Among them, K is the enhancement factor, max(I>T backgroud ) is the maximum pixel value of the pixels in the target image that are higher than the first background threshold, is the pixel value of the pixel in the i-th row and j-th column in the target image, T backgroud is the first background threshold.
[0077] Through the above steps S201-S203, the present application adaptively calculates the enhancement factor based on the difference between the pixel value of the target object and the first background threshold, thereby improving the contrast of the local pixels of the target object itself and enhancing its own signal strength, making it more clearly distinguishable from the observed background.
[0078] In the above step 1022, the pixel points in the target image that are higher than the first background threshold are enhanced by the enhancement factor to better distinguish the target object from the observed background, thereby improving the accuracy of identifying the target object. In a specific implementation, the embodiment of the present application can output the pixel values of all pixel points that are less than or equal to the first background threshold as is by multiplying the pixel values of the pixel points in the target image that are greater than the first background threshold by the enhancement factor, so as to achieve the purpose of adjusting the pixel value of each pixel point in the target image.
[0079] As an optional embodiment, after obtaining the enhancement factor, the embodiment of the present application will adjust the pixel value of each pixel point of the target image to make the target object more prominent compared with the observed background, thereby improving the detection rate of the target object. Specifically, the above step 1023 can be implemented through steps 10231-10232:
[0080] Step 10231, selecting pixels to be adjusted in the target image according to the first background threshold;
[0081] Step 10232: For each pixel to be adjusted, adjust the pixel value of the pixel to be adjusted according to the enhancement factor corresponding to the pixel to be adjusted.
[0082] In the above step 10231, the pixel to be adjusted refers to a pixel whose pixel value is greater than the first background threshold. For example, the pixel to be adjusted may be a target object or other noise point.
[0083] In the above step 10232, for the pixel to be adjusted, it will be multiplied by the enhancement factor to give the pixel to be adjusted a certain weight value, improve the contrast of its local pixel, and improve the detection rate. For the pixel that does not need to be adjusted, that is, the pixel whose pixel value is less than or equal to the first background threshold, it will be output as it is. In the specific implementation, after obtaining the enhancement factor K and the first background threshold T backgroud After that, the overall local contrast of the target image can be adjusted by the following formula:
[0084]
[0085] Where, if / (i, j)>T background is the pixel value greater than the first background threshold, else I(i, j)≤T background is the pixel value that is less than or equal to the first background threshold.
[0086] In order to avoid overexposure of the pixel value of the pixel point when adjusting the pixel value of the pixel point I(i,j) in the target image, a limit value is set to constrain the enhancement of the pixel points of the target image. Specifically, the constraint on the enhancement of the pixel point signal of the target image can be expressed by the following formula:
[0087] I(i, j) = min(I(i, j), T critiCal );
[0088] Among them, T critical To strengthen the limit value of the constraint, it can be set to 200; min(I(i,j),T critical ) are pixels in the target image whose pixel values are greater than 200.
[0089] In order to further distinguish the target object from other noise points in the adjusted pixel points, the embodiment of the present application determines the first motion area through the motion trajectory of the target object, and determines the target object based on the guidance of the first motion area, thereby improving the accuracy of determining the target object. Specifically, the above step 103 can be implemented through steps 1031-1032:
[0090] Step 1031, determining a second motion region of the target object in two consecutive image frames according to a pixel difference between corresponding pixels in two consecutive image frames;
[0091] Step 1032: compose a first motion region of the target object in the continuous multiple frames of images according to the second motion region in each of the two continuous frames of images.
[0092] In the above step 1031, there may be multiple second motion regions, which represent the regions where the motion trajectory of the target object in two adjacent frames of images is located. The process of determining the second motion region can be divided into four steps. For example, in the first step, based on the acquired continuous multiple frames of images containing the target image, a 3D matrix is created, and a spatiotemporal sequence matrix of the continuous multiple frames is constructed; in the second step, each frame of the spatiotemporal sequence matrix of the continuous multiple frames is subjected to the Farneback optical flow method to obtain an optical flow map of the spatiotemporal sequence. The optical flow map contains a black and white color space, where white represents the moving area in the image, black represents that the pixel value has not changed, and the gray area represents that the pixel has a small displacement; in the third step, the optical flow map is smoothed by the median filtering method; in the fourth step, the difference between the optical flow motion maps is used to estimate the second motion region.
[0093] In the above step 1032, after a plurality of second motion regions are obtained, each second motion region is combined and estimated to determine a first motion region containing the motion track of the target object.
[0094] Through the above steps 1031-1032, the Farneback optical flow method is used to estimate the first motion area of the target object, which can effectively eliminate noise points and improve the accuracy of determining the target object.
[0095] After determining the first motion region of the target object, in order to further extract the target object in the region corresponding to the first motion region in the target image, as an optional embodiment, the above step 104 can be implemented through steps 1041-1042:
[0096] Step 1041, determining a second background threshold value according to the number of pixel points corresponding to each pixel value in the first motion area; the second background threshold value is the pixel value of the pixel point corresponding to the background area in the first motion area;
[0097] Step 1042: Determine the position of the target object according to the positions of the pixels in the first motion area whose pixel values are greater than the second background threshold.
[0098] In the above step 1051, since the observed background still occupies a large part of the area corresponding to the first motion area in the target image, the embodiment of the present application uses the pixel value of the pixel point with the largest number of pixel values in the area as the second background threshold. In a specific implementation, the second background threshold can be expressed by the following formula:
[0099] Threshold region =mod(I(ΔX));
[0100] Among them, I is the target image, Threshold region is the second background threshold, ΔX is the first motion area, and mod() is a function that counts the number of times the pixel value of the pixel point in the target image appears the most.
[0101] In the above step 1052, after obtaining the second background threshold, the pixel points in the area corresponding to the first motion area in the target image that are greater than the second background threshold are determined as the target object. In a specific implementation, in order to improve the display distinctiveness of the target object, the embodiment of the present application will adjust the pixel values of the corresponding pixel points at the position of the identified target object to make the target object easier for the user to observe. For example, the pixel values of the corresponding pixel points at the position of the target object can be adjusted to 255 to obtain the target image, and the target image is displayed to the user. Therefore, as an optional embodiment, the embodiment of the present application provides a method for determining the target image, which is convenient for the user to observe, and the method may include:
[0102] Step 106, determining the pixel point corresponding to the target object in the target image according to the position of the target object;
[0103] Step 107: adjusting the pixel values of the pixels corresponding to the target object in the target image to a preset pixel threshold, so as to obtain the target image displayed to the user.
[0104] In the above step 106, based on the position of the target object, the pixel point corresponding to the target object is found in the target image, and the embodiment of the present application will extract the coordinate value of the position of the target object to a local document for storage.
[0105] In the above step 107, the pixel point corresponding to the target object can be found based on the saved coordinate value, and the pixel value of the pixel point is adjusted to a preset pixel threshold, such as 255, to obtain the target image displayed to the user. In a specific implementation, the pixel value of the pixel point in the target image can be adjusted by the following formula:
[0106]
[0107] Among them, I(ΔX) is the target image, Thresholdregion is the second background threshold, and 255 is the pixel threshold.
[0108] Through the above steps 106-107, the pixel values of the pixels corresponding to the target object are adjusted, that is, the pixel values of the pixels of the target object are adjusted to 255 (the maximum pixel value), and the pixel values of other pixels remain unchanged, so as to obtain the target image displayed to the user, so that the target object can be more easily observed by the user in the target image.
[0109] The embodiment of the present application provides a method based on visual contrast mechanism, which calculates the enhancement factor by the difference between the first background threshold of the target image and the pixel value of the target object, and improves the local contrast of the target object itself through the enhancement factor, thereby suppressing the background clutter of the target image. At the same time, the position of the target object in the continuous multi-frame image is used to determine the first motion area of the target object in the continuous multi-frame image. Under the guidance of the first motion area, the accuracy of further determining the position of the target object in the target image is improved, and the target object contained in the target image can be fully detected.
[0110] Figure 3 A schematic diagram of a device for determining a position of an object provided in an embodiment of the present application is shown, wherein the device comprises:
[0111] The acquisition module 301 is used to acquire a plurality of continuous frames of images containing a target image; the target image includes a target object;
[0112] The enhancement module 302 is used to perform signal enhancement on a first pixel in the target image; wherein the first pixel is a pixel whose pixel value is greater than a first background threshold, and the first background threshold is a pixel value of a pixel corresponding to a background area in the target image;
[0113] A first determination module 303 is used to determine a first motion region of the target object in the continuous multiple frames of images by using the position of the target object in the continuous multiple frames of images;
[0114] The second determination module 304 is used to determine the position of the second pixel point in the target image as the position of the target object in the target image; the second pixel point is a pixel point whose pixel value is greater than a second background threshold; the second background threshold is the pixel value of the pixel point corresponding to the background area in the first motion area.
[0115] Optionally, the enhancement module 302 includes:
[0116] A calculation unit, used to calculate an enhancement factor for each pixel point according to a maximum pixel value of the pixel points in the target image, a pixel value of each pixel point and a first background threshold;
[0117] An enhancement unit is used to enhance the signal of the first pixel in the target image by using the enhancement factor.
[0118] Optionally, the computing unit includes:
[0119] A first determining subunit is used to use the pixel value with the largest number obtained by counting in the target image as a first background threshold;
[0120] A second determining subunit, configured to determine a maximum pixel value from pixel values of all pixels in the target image that are greater than the first background threshold;
[0121] The calculation subunit is used to calculate the enhancement factor of each pixel point according to the maximum pixel value, the pixel value of each pixel point and the first background threshold.
[0122] Optionally, the first determining module 303 includes:
[0123] A first determining unit, configured to determine a second motion region of the target object in two consecutive image frames according to a pixel difference between corresponding pixels in two consecutive image frames;
[0124] The second determining unit is used to form a first motion region of the target object in the continuous multiple frames of images according to the second motion region in each of the two continuous frames of images.
[0125] Optionally, the device further comprises:
[0126] A third determination module, used to determine the pixel point corresponding to the target object in the target image according to the position of the target object;
[0127] The fourth determination module is used to adjust the pixel value of the pixel point corresponding to the target object in the target image to a preset pixel threshold value to obtain the target image displayed to the user.
[0128] Corresponds to Figure 1 A method for determining a location of a target object in the present application embodiment further provides a computer device 400, such as Figure 4 As shown, the device includes a memory 401, a processor 402, and a computer program stored in the memory 401 and executable on the processor 402, wherein the processor 402 implements the method for determining the position of the target object when executing the computer program.
[0129] Specifically, the above-mentioned memory 401 and processor 402 can be general-purpose memory and processor, which are not specifically limited here. When the processor 402 runs the computer program stored in the memory 401, it can execute the above-mentioned method for determining the opposite position of the target, thereby solving the problem of low accuracy in determining the position of target objects at ultra-long distances in the prior art.
[0130] Corresponds to Figure 1 A method for determining the position of a target object in the embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method for determining the position of a target object are executed.
[0131] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned method for determining the position of the target object, which solves the problem of low accuracy in determining the position of the target object at a very long distance in the prior art. The present application obtains a continuous multi-frame image containing a target image; calculates the enhancement factor of each pixel point according to the maximum pixel value of the pixel point in the target image, the pixel value of each pixel point and the first background threshold; adjusts the pixel value of each pixel point using the enhancement factor of each pixel point in the target image and the first background threshold; determines the first motion area of the target object in the continuous multi-frame image using the position of the target object in the continuous multi-frame image; determines the position of the target object in the target image based on the position of the pixel point of the adjusted pixel value in the first motion area in the target image. The present application enhances the local contrast of the target object itself in the target image by calculating the enhancement factor of each pixel point, thereby improving the accuracy of determining the position of the target object.
[0132] In the embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0133] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0134] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0135] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0136] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0137] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for determining the position of a target object, characterized in that: include: Acquire a plurality of continuous frames of images containing a target image; the target image includes a target object; Performing signal enhancement on a first pixel in the target image; wherein the first pixel is a pixel whose pixel value is greater than a first background threshold, and the first background threshold is a pixel value of a pixel corresponding to a background area in the target image; Determine a first motion region of the target object in the continuous multiple frames of images by using the position of the target object in the continuous multiple frames of images; The position of a second pixel in the target image is determined as the position of the target object in the target image; the second pixel is a pixel whose pixel value is greater than a second background threshold; the second background threshold is a pixel value corresponding to a pixel in a background area within the first motion area; Performing signal enhancement on a first pixel in the target image includes: Calculating an enhancement factor for each pixel according to a maximum pixel value of the pixel in the target image, a pixel value of each pixel, and a first background threshold; Using the enhancement factor, performing signal enhancement on the first pixel point in the target image; Calculating an enhancement factor for each pixel point according to a maximum pixel value of the pixel points in the target image, a pixel value of each pixel point, and a first background threshold value, including: The pixel value with the largest number obtained by counting in the target image is taken as the first background threshold; Determine a maximum pixel value from the pixel values of all pixels in the target image that are greater than the first background threshold; The enhancement factor of each pixel is calculated according to the maximum pixel value, the pixel value of each pixel and the first background threshold; the enhancement factor can be expressed by the following formula: K=max(I>T backgroud )×I i j / T backgroud ; Among them, K is the enhancement factor, max(I>T backgroud ) is the maximum pixel value of the pixels in the target image that are higher than the first background threshold, is the pixel value of the pixel in the i-th row and j-th column in the target image, T backgroud is the first background threshold.
2. The method according to claim 1, characterized in that The determining a first motion region of the target object in the continuous multiple frames of images by using the position of the target object in the continuous multiple frames of images comprises: Determining a second motion region of the target object in the two consecutive image frames according to a pixel difference of corresponding pixel points in the two consecutive image frames; A first motion region of the target object in the continuous multiple frames of images is formed according to the second motion region in each of the two continuous frames of images.
3. The method according to claim 1, characterized in that The method further comprises: Determining a pixel point corresponding to the target object in the target image according to the position of the target object; The pixel values of the pixels corresponding to the target object in the target image are adjusted to a preset pixel threshold to obtain the target image displayed to the user.
4. A device for determining the position of a target object, characterized in that: include: An acquisition module, used for acquiring a plurality of continuous frames of images containing a target image; the target image includes a target object; An enhancement module, configured to perform signal enhancement on a first pixel in the target image; wherein the first pixel is a pixel having a pixel value greater than a first background threshold, and the first background threshold is a pixel value corresponding to a pixel in a background area in the target image; A first determining module, configured to determine a first motion region of the target object in the continuous multiple frames of images by using the position of the target object in the continuous multiple frames of images; A second determination module is used to determine the position of a second pixel point in the target image as the position of the target object in the target image; the second pixel point is a pixel point whose pixel value is greater than a second background threshold; the second background threshold is a pixel value of a pixel point corresponding to a background area in the first motion area; The enhancement module comprises: A calculation unit, used to calculate an enhancement factor for each pixel point according to a maximum pixel value of the pixel points in the target image, a pixel value of each pixel point and a first background threshold; an enhancement unit, configured to perform signal enhancement on the first pixel point in the target image by using the enhancement factor; The computing unit comprises: A first determining subunit is used to use the pixel value with the largest number obtained by counting in the target image as a first background threshold; A second determining subunit, configured to determine a maximum pixel value from pixel values of all pixels in the target image that are greater than the first background threshold; The calculation subunit is used to calculate the enhancement factor of each pixel point according to the maximum pixel value, the pixel value of each pixel point and the first background threshold; the enhancement factor can be expressed by the following formula: K=max(I>T backgroud )×I i j / T backgroud ; Among them, K is the enhancement factor, max(I>T backgroud ) is the maximum pixel value of the pixels in the target image that are higher than the first background threshold, is the pixel value of the pixel in the i-th row and j-th column in the target image, T backgroud is the first background threshold.
5. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 are implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are performed.
Citation Information
Patent Citations
Image background area detection method and device, storage medium and X-ray system
CN110163857A