CN117710235A - Image target enhancement method, device, computer equipment and storage medium - Google Patents

Image target enhancement method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117710235A
CN117710235A CN202410166567.XA CN202410166567A CN117710235A CN 117710235 A CN117710235 A CN 117710235A CN 202410166567 A CN202410166567 A CN 202410166567A CN 117710235 A CN117710235 A CN 117710235A
Authority
CN
China
Prior art keywords
image
pixel block
pixel
target
neighborhood
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410166567.XA
Other languages
Chinese (zh)
Other versions
CN117710235B (en
Inventor
李骏
高媛
陈振鑫
刘泉凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Huagan Technology Co ltd
Original Assignee
Zhejiang Huagan Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Huagan Technology Co ltd filed Critical Zhejiang Huagan Technology Co ltd
Priority to CN202410166567.XA priority Critical patent/CN117710235B/en
Priority claimed from CN202410166567.XA external-priority patent/CN117710235B/en
Publication of CN117710235A publication Critical patent/CN117710235A/en
Application granted granted Critical
Publication of CN117710235B publication Critical patent/CN117710235B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The application relates to an image target enhancement method, an image target enhancement device, computer equipment and a storage medium, wherein a differential image between two adjacent frames of images is acquired, the differential image is divided into a plurality of pixel blocks, target pixel blocks conforming to motion attributes in the pixel blocks are determined, target pixel points conforming to the motion attributes in the target pixel blocks are determined, a moving target object is determined in an image to be enhanced according to the determined target pixel points, enhancement processing is carried out on the moving target object, the image to be enhanced comprises any frame of image in the two adjacent frames of images, coarse detection and fine detection of the target pixel in the image to be enhanced are realized, only the moving target object in the image to be enhanced is enhanced, the problem that the accuracy of the moving target enhancement method in the related technology is lower is solved, and the accuracy of the image target enhancement method is improved.

Description

Image target enhancement method, device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image target enhancement method, an image target enhancement device, a computer device, and a storage medium.
Background
In the image target detection and recognition technology, the accuracy of a detection result is greatly influenced by the original input image video data used for detection besides being related to a detection algorithm. Under the condition that the input image data has poor target definition and low highlighting degree, the false detection rate and the omission rate of the detection result can be greatly improved, so that the input image data needs to be preprocessed to highlight the characteristics of the target in the image data. This preprocessing is commonly referred to as target enhancement of image data.
In the related art, a differential processing method is generally used to perform target enhancement on image data. However, the method does not consider the data fluctuation caused by the motion of the non-target area, but performs the indiscriminate enhancement operation on the image data, which can cause synchronous enhancement on the non-target data and the noise data and reduce the overall effect of the image. There are also methods to detect motion for moving pixels prior to target enhancement, and then to differential the background. However, the method performs motion detection on the target through the Gaussian mixture model, the detection effect depends on selection of Gaussian model parameters, the calculated amount is large, and the recognition accuracy of a slow moving object is low.
At present, aiming at the problem of lower accuracy of a moving object enhancement method in the related art, no effective solution has been proposed.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an image target enhancement method, apparatus, computer device, and storage medium capable of improving accuracy of a moving target enhancement method.
In a first aspect, the present application provides an image object enhancement method. The method comprises the following steps:
acquiring a differential image between two adjacent frames of images, and dividing the differential image into a plurality of pixel blocks;
determining a target pixel block conforming to the motion attribute in the plurality of pixel blocks;
determining target pixel points conforming to the motion attribute in the target pixel block;
according to the determined target pixel points, determining a moving target object in the image to be enhanced and enhancing the moving target object; wherein the image to be enhanced comprises any one frame of image among the two adjacent frames of images.
In one embodiment, determining a target pixel block of the plurality of pixel blocks that meets the motion attribute comprises:
judging whether the first pixel block is a target pixel block conforming to the motion attribute according to a neighborhood pixel block adjacent to the first pixel block; wherein the neighborhood pixel block comprises at least one of: the pixel blocks are adjacent to the pixel blocks in the row direction of the first pixel block, adjacent to the pixel blocks in the column direction of the first pixel block and adjacent to the pixel blocks in the row and column direction of the first pixel block.
In one embodiment, determining whether the first pixel block is a target pixel block conforming to a motion attribute according to a neighboring pixel block adjacent to the first pixel block includes:
determining the number of the neighborhood pixel blocks with the difference value exceeding a first preset value in a plurality of neighborhood pixel blocks;
and judging whether the first pixel block is a target pixel block conforming to the motion attribute according to the number of the neighborhood pixel blocks of which the differential values exceed a first preset value.
In one embodiment, according to the number of the neighborhood pixel blocks with the difference value exceeding a first preset value, determining whether the first pixel block is a target pixel block conforming to a motion attribute includes:
determining a first number of pixel blocks which are positioned in a neighborhood window of the first pixel block and belong to the row direction neighborhood pixel block in the neighborhood pixel block of which the difference value exceeds the first preset value;
determining a second number of pixel blocks which are positioned in the neighborhood window and belong to the neighborhood pixel blocks in the column direction in the neighborhood pixel blocks of which the difference value exceeds the first preset value;
judging whether the first pixel block is a target pixel block conforming to the motion attribute or not under the condition that the first number is larger than a first threshold value and the second number is larger than a second threshold value; or,
Determining a third number of pixel blocks in the neighborhood window, wherein the difference value exceeds a first preset value, in the neighborhood pixel blocks;
and judging whether the first pixel block is a target pixel block conforming to the motion attribute or not under the condition that the third number is larger than a third threshold value.
In one embodiment, determining the target pixel point in the target pixel block that meets the motion attribute includes:
acquiring motion attribute marking data of the image to be enhanced according to the target pixel block, wherein the motion attribute marking data are used for representing motion attributes of the pixel points at different positions, and the motion attributes comprise static and motion;
and judging whether the pixel point in the target pixel block is the target pixel point or not according to the motion attribute data corresponding to the pixel point and/or the differential data of the pixel point.
In one embodiment, according to the determined target pixel point, determining a moving target object in the image to be enhanced and performing enhancement processing on the moving target object includes:
counting the number of the target pixel points in a neighborhood window of a target pixel block;
morphological processing is carried out on the motion attribute marking data according to the number of the target pixel points in the neighborhood window;
And carrying out enhancement processing on the image to be enhanced according to the processed motion attribute marking data.
In one embodiment, the enhancing the image to be enhanced according to the processed motion attribute marking data includes:
correcting the differential data according to the motion attribute marking data;
setting an enhancement coefficient of each pixel point according to the characteristics of different pixel points;
processing the corrected differential data according to the enhancement coefficient;
and the processed differential data are added to the image data to be enhanced, so that enhanced image data are obtained.
In one embodiment, before acquiring the differential image between the two adjacent frames of images, the method further includes:
acquiring the two adjacent frames of images;
and filtering the two adjacent frames of images.
In a second aspect, the present application also provides an image target enhancement apparatus. The device comprises:
the differential module is used for acquiring a differential image between two adjacent frames of images and dividing the differential image into a plurality of pixel blocks;
a first determining module, configured to determine a target pixel block that accords with a motion attribute from the plurality of pixel blocks;
The second determining module is used for determining target pixel points which accord with the motion attribute in the target pixel block;
the enhancement module is used for determining a moving target object in the image to be enhanced according to the determined target pixel point and enhancing the moving target object; wherein the image to be enhanced comprises any one frame of image among the two adjacent frames of images.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
acquiring a differential image between two adjacent frames of images, and dividing the differential image into a plurality of pixel blocks;
determining a target pixel block conforming to the motion attribute in the plurality of pixel blocks;
determining a target pixel point which accords with the motion attribute in the target pixel block;
according to the determined target pixel points, determining a moving target object in the image to be enhanced and enhancing the moving target object; wherein the image to be enhanced comprises any one frame of image among the two adjacent frames of images.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Acquiring a differential image between two adjacent frames of images, and dividing the differential image into a plurality of pixel blocks;
determining a target pixel block conforming to the motion attribute in the plurality of pixel blocks;
determining a target pixel point which accords with the motion attribute in the target pixel block;
according to the determined target pixel points, determining a moving target object in the image to be enhanced and enhancing the moving target object; wherein the image to be enhanced comprises any one frame of image among the two adjacent frames of images.
According to the image target enhancement method, the device, the computer equipment and the storage medium, the differential image between two adjacent frames of images is acquired, the differential image is divided into the pixel blocks, the target pixel block which accords with the motion attribute in the pixel blocks is determined, the target pixel point which accords with the motion attribute in the target pixel block is determined, and the moving target object is determined in the image to be enhanced according to the determined target pixel point, wherein the image to be enhanced comprises any one frame of image among the two adjacent frames of images, so that coarse detection and fine detection of the target pixel in the image to be enhanced are realized, only the moving target object in the image to be enhanced is enhanced, the problem that the accuracy of the moving target enhancement method in the related art is lower is solved, and the accuracy of the image target enhancement method is improved.
Drawings
FIG. 1 is a diagram of an application environment for an image target enhancement method in one embodiment;
FIG. 2 is a flow diagram of a method of image object enhancement in one embodiment;
FIG. 3 is a flow chart of target pixel block detection in one embodiment;
FIG. 4 is a flow chart of target pixel detection in one embodiment;
FIG. 5 is a flow diagram of motion pixel enhancement in one embodiment;
FIG. 6 is a block diagram of an image object enhancement device in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The image target enhancement method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, etc. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, there is provided an image object enhancement method, which is described by taking an example that the method is applied to the terminal in fig. 1, and includes the following steps:
step S201, a differential image between two adjacent frames of images is acquired, and the differential image is divided into a plurality of pixel blocks.
The method comprises the steps of obtaining a differential image between two adjacent frames of images, wherein the step of obtaining the differential image and corresponding differential image data comprises the step of subtracting the image data of the previous frame from the image data of the current frame. Dividing the differential image into a plurality of pixel blocks includes partitioning the differential image. Specifically, the size of the differential image is m×n, the size of each pixel block is M rows by N columns, and the differential image is divided into x×y blocks altogether, where m=x×m, and n=y×n.
Step S202, determining a target pixel block conforming to the motion attribute from the plurality of pixel blocks.
Wherein the motion attribute of each pixel block can be determined by the absolute value of the differential image data of that pixel block. The motion attributes of the pixel blocks comprise static and motion, and the pixel blocks with different motion attributes are marked respectively. Illustratively, a moving pixel block may be labeled 1 and a stationary pixel block may be labeled 0. In this embodiment, the target pixel block conforming to the motion attribute is a motion pixel block, which is labeled 1.
In step S203, a target pixel point in the target pixel block that accords with the motion attribute is determined.
Wherein, determining the target pixel points meeting the motion attribute in the target pixel block comprises: and performing expansion operation on the marks of the pixel blocks, performing nearest neighbor difference after expansion to obtain motion attribute mark data of the pixel points in the motion block, and determining the motion attribute of each pixel point according to the motion attribute mark data. For example, the motion attribute of the motion pixel is marked with 1, the motion attribute of the still pixel is marked with 0, and in this embodiment, the target pixel is the motion pixel, so the pixel with the motion attribute marked with 1 is selected as the target pixel.
Step S204, according to the determined target pixel points, determining a moving target object in the image to be enhanced and enhancing the moving target object; the image to be enhanced comprises any one frame of image among two adjacent frames of images.
The enhancement processing of the image to be enhanced comprises the enhancement processing of the target pixel point, and the other pixel points are not subjected to the enhancement processing. An enhanced image in which only the moving object is enhanced can be obtained after the enhancement processing.
In the image target enhancement method, the differential image between two adjacent frames of images is acquired, the differential image is divided into a plurality of pixel blocks, the target pixel block which accords with the motion attribute in the plurality of pixel blocks is determined, the target pixel point which accords with the motion attribute in the target pixel block is determined, and the motion target object is determined in the image to be enhanced according to the determined target pixel point, and enhancement processing is carried out on the motion target object, wherein the image to be enhanced comprises any frame of image in the two adjacent frames of images, so that coarse detection and fine detection of the target pixel in the image to be enhanced are realized, only the motion target object in the image to be enhanced is enhanced, the problem that the accuracy of the motion target enhancement method in the related art is lower is solved, and the accuracy of the image target enhancement method is improved.
In one embodiment, determining a target pixel block of the plurality of pixel blocks that meets the motion attribute comprises: judging whether the first pixel block is a target pixel block conforming to the motion attribute according to a neighborhood pixel block adjacent to the first pixel block; wherein the neighborhood pixel block includes at least one of: a row direction neighborhood pixel block of the first pixel block, a column direction neighborhood pixel block of the first pixel block, a row direction neighborhood pixel block of the first pixel block.
Wherein the coordinates of the first pixel block are (i, j), where i is a row coordinate and j is a column coordinate. The row-direction neighborhood pixel block of the first pixel block comprises pixel blocks having coordinates (i, j-a), (i, j-a+1), …, (i, j), (i, j+1), …, (i, j+a), the number of pixel blocks in the neighborhood being (a×2+1) blocks, wherein a is the window radius of the row-direction neighborhood, i.e. the size of the row-direction neighborhood window is 1 row by (a×2+1) column. The column-direction neighborhood pixel block of the first pixel block includes pixel blocks having coordinates of (i-b, j), (i-b+1, j), …, (i, j), (i+1, j), …, (i+b, j), and the number of pixel blocks in the neighborhood is (bx 2+1) blocks, where b is a window radius of the column-direction neighborhood, i.e., a size of a column-direction lining window is (bx 2+1) rows by 1 column. The row and column direction neighborhood pixel block of the first pixel block comprises pixel blocks in a neighborhood window taking (i-c, j-c) as a starting point and (i+c, j+c) as an end point, wherein c is a window radius of the row and column direction neighborhood, namely, the size of the row and column direction neighborhood window is (c×2+1) row by (c×2+1) column. The motion properties of the first pixel block may be determined based on the property parameters of the pixel blocks in different neighborhoods.
In this embodiment, by counting attribute parameters of pixel blocks in a plurality of direction neighborhood windows, the judgment of the motion attribute of the first pixel block is realized, and the comprehensiveness and accuracy of the judgment of the pixel block data are improved.
In one embodiment, determining whether the first pixel block is a target pixel block conforming to the motion attribute based on a neighborhood pixel block adjacent to the first pixel block includes: determining the number of neighborhood pixel blocks with difference values exceeding a first preset value in a plurality of neighborhood pixel blocks; and judging whether the first pixel block is a target pixel block conforming to the motion attribute according to the number of the neighborhood pixel blocks with the difference value exceeding the first preset value.
Wherein the differential value includes a mean avg of absolute values of data differences between adjacent two frames of images. The higher the difference value of the neighborhood pixel block is, the larger the variation of the neighborhood pixel block between two adjacent frames of images is, and the larger the relative motion of the object corresponding to the neighborhood pixel block is possible in the process of acquiring the two adjacent frames of images. The greater the number of neighborhood pixel blocks whose difference value exceeds a first preset value, the higher the likelihood that the first pixel block is a target pixel block conforming to the motion attribute. In this embodiment, according to the number of neighboring pixel blocks whose differential value exceeds the first preset value, the judgment of whether the first pixel block is a target pixel block conforming to the motion attribute is implemented, and the judgment method is accurate, and the judgment process is simple and quick.
Optionally, determining whether the first pixel block is a target pixel block according to the number of neighboring pixel blocks whose difference value exceeds the first preset value, includes: determining a third number of pixel blocks in a neighborhood window of the first pixel block in a neighborhood pixel block with a difference value exceeding a first preset value; if the third number is determined to be greater than the third threshold, it is determined whether the first pixel block is a target pixel block conforming to the motion attribute.
Wherein the neighborhood window is a window in the neighborhood of the first pixel block. The size of the neighborhood window is (d×2+1) row by (d×2+1) column, and each pixel block occupies one row in the neighborhood window, wherein the size of d can be correspondingly set according to the actual motion detection requirement. Optionally, the pixel block at the center of the neighborhood window is the first pixel block. And in the neighborhood window, counting the number num3 of pixel blocks with avg values exceeding a first preset value. In the case of (num 3 > T3), the first pixel block may be determined to be a motion block, where num3 is a third number, T3 is a third threshold, and the size of T3 may be set correspondingly according to the actual motion detection requirement.
This is so arranged because the moving object often has a certain volume, which is correspondingly embodied in the image as a plurality of pixel blocks that are continuous in position. Therefore, if the number of pixel blocks in the neighborhood window of the first pixel block exceeds the first preset value, for example, if the third number is greater than the third threshold in this embodiment, it is indicated that the object corresponding to the pixel block in the neighborhood window has a greater possibility of including a moving object, and the first pixel block in the neighborhood window may be determined as the target pixel block conforming to the motion attribute.
However, in the case where the total number of pixels corresponding to the moving object in the image is too small, determining whether the first pixel block conforms to the motion attribute based on the third number may ignore the smaller moving object, and there is a false determination of the target pixel block.
In order to reduce the possibility of erroneous judgment, according to the number of neighborhood pixel blocks with the difference value exceeding a first preset value, judging whether the first pixel block is a target pixel block conforming to the motion attribute, including: determining a first number of pixel blocks which are positioned in a neighborhood window and belong to a row direction neighborhood pixel block in the neighborhood pixel blocks of which the difference value exceeds the first preset value; determining a second number of pixel blocks which are positioned in a neighborhood window and belong to a neighborhood pixel block in the column direction in the neighborhood pixel blocks with the difference value exceeding a first preset value; judging whether the first pixel block is a target pixel block conforming to the motion attribute or not under the condition that the first number is larger than a first threshold value and the second number is larger than a second threshold value;
in the neighborhood window, the number num1 of the first pixel blocks with the avg value exceeding a first preset value in the row direction neighborhood of the first pixel block and the number num2 of the second pixel blocks with the avg value exceeding the first preset value in the column direction neighborhood of the first pixel block are counted, and under the condition that num1 is larger than T1 and num2 is larger than T2, the first pixel blocks can be judged to be motion blocks, wherein T1 is a first threshold value, and T2 is a second threshold value. The sizes of T1, T2 and T2 can be correspondingly set according to the actual motion detection requirement.
By respectively judging the number of pixel blocks with the row direction difference value exceeding a first preset value in the neighborhood window and the number of pixel blocks with the row direction difference value exceeding the first preset value in the neighborhood window, the area for acquiring the number of pixel blocks is reduced, pixels corresponding to moving objects with smaller moving volumes are avoided from being omitted, and the accuracy of judging the first pixel blocks is improved. The statistical region is narrowed down to a row-direction neighborhood and a column-direction neighborhood of the first pixel, because in the differential image, there are cases where the differential value of the neighboring pixel blocks exceeds the first preset value due to external interference, and the number of the interfering pixel blocks is small and often appears in the same row or the same column. Therefore, when the pixel blocks counted by the neighborhood in the row direction are less than the second threshold value or the pixel blocks counted by the neighborhood in the column direction are less than the third threshold value, the first pixel block is judged to be not in accordance with the motion attribute, and the accuracy of pixel block data judgment is further improved.
As illustrated in fig. 3, the number of moving pixel blocks in the row direction, the column direction of the first pixel block and the pixel blocks in the neighborhood window are counted respectively, and if the number of moving pixel blocks in the row direction and the column direction satisfies the set condition, or if the number of moving pixel blocks in the neighborhood window satisfies the set condition, the first pixel block is determined to be a moving pixel block, otherwise, the first pixel block is a still pixel block.
In this embodiment, two judging modes are combined to count the number of pixel blocks with the difference average value exceeding a first preset value in the neighborhood windows in multiple directions, so that the judgment of the motion attribute of the first pixel block is realized, and the comprehensiveness and accuracy of the judgment of the pixel block data are improved.
In one embodiment, determining a target pixel point in the target pixel block that meets the motion attribute includes: acquiring motion attribute marking data of an image to be enhanced according to a target pixel block, wherein the motion attribute marking data are used for representing motion attributes of pixel points at different positions, and the motion attributes comprise stillness and motion; and judging whether the pixel point in the target pixel block is the target pixel point or not according to the motion attribute data corresponding to the pixel point and/or the difference data of the pixel point.
The motion attribute marking data is used for distinguishing whether the pixel block is a target pixel point or not. Optionally, according to the value of the motion attribute data corresponding to the pixel point and/or the difference data of the pixel point, whether the pixel point in the target pixel block is the target pixel point is judged. The marking method of the target pixel point can be set according to the actual marking requirement, in this embodiment, the moving pixel point is marked as 1, and the stationary pixel point is marked as 0. The motion attribute marking data of the pixel point can be calculated by the motion attribute of the target pixel block where the motion attribute marking data is located.
In this embodiment, by performing pixel-level object detection on the data in the pixel block, the accuracy of detection is improved, and the accuracy of the image object enhancement method is further improved.
In one embodiment, determining a moving target object in an image to be enhanced according to the determined target pixel point and performing enhancement processing on the moving target object comprises: counting the number of target pixel points in a neighborhood window of a target pixel block; morphological processing is carried out on the motion attribute marking data according to the number of target pixel points in the neighborhood window; and carrying out enhancement processing on the image to be enhanced according to the processed motion attribute marking data.
Wherein, for the target pixel block, the number num4 of the moving pixel points in the (d×2+1) neighborhood window is counted. If num4 is smaller than the fourth threshold T4, the motion attribute flag data of the target pixel is set to 0. This step can be achieved by convolving the motion attribute labeling data with a kernel of (dx2+1) by (dx2+1) size, with a value of all 1. The motion attribute marking data after the above processing also needs to be subjected to morphological processing, specifically including swelling and corrosion processing. The dilation process may cause the highlight region in the image to grow gradually and the erosion process may eliminate the boundary points of the highlight region. And obtaining final motion attribute marking data after morphological processing. And carrying out enhancement processing on a moving target in the image to be enhanced according to the final motion attribute marking data, wherein other pixel points are not subjected to enhancement processing.
Fig. 4 is a schematic flow chart of detection of a target pixel point according to the present embodiment, and after the motion attribute marking data is expanded, nearest neighbor interpolation processing is performed, motion attribute judgment is performed on the target pixel point according to the processed motion attribute marking data, the motion attribute marking data of the pixel point is updated according to the judgment result, and convolution, collision and corrosion processing are performed on the motion attribute marking data to obtain final motion attribute marking data, as shown in fig. 4.
In this embodiment, by performing a series of processing on the motion attribute marking data, noise of the image to be enhanced is reduced, accuracy of the motion attribute marking data of the image to be enhanced is improved, and accuracy of the image target enhancement method is further improved.
In one embodiment, performing enhancement processing on the image to be enhanced according to the processed motion attribute flag data includes: correcting the differential data according to the motion attribute marking data; setting the enhancement coefficient of each pixel point according to the characteristics of different pixel points; processing the corrected differential data according to the enhancement coefficient; and the processed differential data are added to the image data to be enhanced, so that enhanced image data are obtained.
Wherein, according to the motion attribute marking data, correcting the differential data includes: and if the motion attribute marking data corresponding to the pixel point is 0, correcting the differential data to be 0, otherwise, keeping the differential data unchanged. And filtering the corrected differential data to obtain more accurate differential data. The enhancement coefficient K may be a fixed value, that is, the enhancement intensity of each pixel is the same; or each pixel point corresponds to a different enhancement coefficient, namely the enhancement intensities of different areas and different pixel points are different according to the characteristics of the pixel points. Processing the modified differential data according to the enhancement coefficients includes multiplying the differential data by the enhancement coefficients. The finally Output enhancement data output=diffval×k+input, wherein diffval is differential data and Input is Input image data.
Fig. 5 is a schematic flow chart of motion pixel enhancement according to the present embodiment, and as shown in fig. 5, the differential data is filtered after being modified. And carrying out enhancement processing on the image to be enhanced according to the processed differential data, and outputting enhanced image data.
In the embodiment, the enhancement mode is selected through the coefficient, so that the enhancement mode can be enhanced in the same strength, the enhancement mode can be adaptively enhanced according to different characteristics of the pixel points, and the applicability and the accuracy of the image target enhancement method are improved.
In one embodiment, before acquiring the differential image between the two adjacent frames of images, the method further includes: acquiring two adjacent frames of images; and filtering the two adjacent frames of images.
The filtering processing mode comprises mean filtering, gaussian filtering, bilateral filtering, guiding filtering and the like. In order to reduce algorithm complexity and calculation amount, the embodiment adopts mean filtering to carry out filtering processing on the image.
In this embodiment, by performing filtering processing on the acquired image, noise of the image is suppressed, accuracy of the acquired image data is improved, and accuracy of the image target enhancement method is further improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiments of the present application also provide an image target enhancement apparatus for implementing the above-mentioned image target enhancement method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the image target enhancement device or devices provided below may be referred to the limitation of the image target enhancement method hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 6, there is provided an image target enhancement apparatus comprising: a difference module 61, a first determination module 62, a second determination module 63, and an enhancement module 64, wherein:
a difference module 61, configured to obtain a difference image between two adjacent frames of images, and divide the difference image into a plurality of pixel blocks;
a first determining module 62, configured to determine a target pixel block that accords with a motion attribute from the plurality of pixel blocks;
a second determining module 63, configured to determine a target pixel point in the target pixel block, where the target pixel point meets a motion attribute;
the enhancement module 64 is configured to determine a moving target object in the image to be enhanced according to the determined target pixel point and perform enhancement processing on the moving target object; wherein the image to be enhanced comprises any one frame of image among the two adjacent frames of images.
The respective modules in the above-described image target enhancement apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing image data to be enhanced. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an image object enhancement method.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
acquiring a differential image between two adjacent frames of images, and dividing the differential image into a plurality of pixel blocks;
determining a target pixel block which accords with the motion attribute in the pixel blocks;
determining a target pixel point which accords with the motion attribute in a target pixel block;
according to the determined target pixel points, determining a moving target object in the image to be enhanced and enhancing the moving target object; the image to be enhanced comprises any one frame of image among two adjacent frames of images.
In one embodiment, the processor when executing the computer program further performs the steps of:
judging whether the first pixel block is a target pixel block conforming to the motion attribute according to a neighborhood pixel block adjacent to the first pixel block; wherein the neighborhood pixel block includes at least one of: a row direction neighborhood pixel block of the first pixel block, a column direction neighborhood pixel block of the first pixel block, a row direction neighborhood pixel block of the first pixel block.
In one embodiment, the processor when executing the computer program further performs the steps of:
determining the number of neighborhood pixel blocks with difference values exceeding a first preset value in a plurality of neighborhood pixel blocks; and judging whether the first pixel block is a target pixel block conforming to the motion attribute according to the number of the neighborhood pixel blocks with the difference value exceeding the first preset value.
In one embodiment, the processor when executing the computer program further performs the steps of:
determining a third number of pixel blocks in a neighborhood window of the first pixel block in the neighborhood pixel blocks of which the difference value exceeds a first preset value; judging whether the first pixel block is a target pixel block conforming to the motion attribute or not under the condition that the third number is larger than a third threshold value; or determining a first number of pixel blocks which are positioned in a neighborhood window of the first pixel block and belong to the row direction neighborhood pixel block in the neighborhood pixel block with the difference value exceeding the first preset value; determining a second number of pixel blocks which are positioned in the neighborhood window and belong to the neighborhood pixel blocks in the column direction in the neighborhood pixel blocks of which the difference value exceeds the first preset value; and judging whether the first pixel block is a target pixel block conforming to the motion attribute or not under the condition that the first number is larger than a first threshold value and the second number is larger than a second threshold value.
In one embodiment, the processor when executing the computer program further performs the steps of:
acquiring motion attribute marking data of the image to be enhanced according to the target pixel block, wherein the motion attribute marking data are used for representing motion attributes of pixel points at different positions, and the motion attributes comprise static and motion; and judging whether the pixel point in the target pixel block is the target pixel point or not according to the motion attribute data corresponding to the pixel point and/or the differential data of the pixel point.
In one embodiment, the processor when executing the computer program further performs the steps of:
counting the number of the target pixel points in a neighborhood window of a target pixel block; morphological processing is carried out on the motion attribute marking data according to the number of the target pixel points in the neighborhood window; and carrying out enhancement processing on the image to be enhanced according to the processed motion attribute marking data.
In one embodiment, the processor when executing the computer program further performs the steps of:
correcting the differential data according to the motion attribute marking data; setting an enhancement coefficient of each pixel point according to the characteristics of different pixel points; processing the corrected differential data according to the enhancement coefficient; and the processed differential data are added to the image data to be enhanced, so that enhanced image data are obtained.
In one embodiment, the processor when executing the computer program further performs the steps of:
acquiring two adjacent frames of images; and filtering the two adjacent frames of images.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a differential image between two adjacent frames of images, and dividing the differential image into a plurality of pixel blocks;
determining a target pixel block which accords with the motion attribute in the pixel blocks;
determining a target pixel point which accords with the motion attribute in a target pixel block;
according to the determined target pixel points, determining a moving target object in the image to be enhanced and enhancing the moving target object; the image to be enhanced comprises any one frame of image among two adjacent frames of images.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging whether the first pixel block is a target pixel block conforming to the motion attribute according to a neighborhood pixel block adjacent to the first pixel block; wherein the neighborhood pixel block includes at least one of: a row direction neighborhood pixel block of the first pixel block, a column direction neighborhood pixel block of the first pixel block, a row direction neighborhood pixel block of the first pixel block.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining the number of neighborhood pixel blocks with difference values exceeding a first preset value in a plurality of neighborhood pixel blocks; and judging whether the first pixel block is a target pixel block conforming to the motion attribute according to the number of the neighborhood pixel blocks with the difference value exceeding the first preset value.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining a third number of pixel blocks in a neighborhood window of the first pixel block in a neighborhood pixel block with a difference value exceeding a first preset value; judging whether the first pixel block is a target pixel block conforming to the motion attribute or not under the condition that the third number is larger than a third threshold value; or determining a first number of pixel blocks which are positioned in a neighborhood window of the first pixel block and belong to a row direction neighborhood pixel block in a neighborhood pixel block with the difference value exceeding a first preset value; determining a second number of pixel blocks which are positioned in a neighborhood window and belong to a neighborhood pixel block in the column direction in the neighborhood pixel blocks with the difference value exceeding a first preset value; and judging whether the first pixel block is a target pixel block conforming to the motion attribute or not under the condition that the first number is larger than the first threshold value and the second number is larger than the second threshold value.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring motion attribute marking data of an image to be enhanced according to a target pixel block, wherein the motion attribute marking data are used for representing motion attributes of pixel points at different positions, and the motion attributes comprise stillness and motion; and judging whether the pixel point in the target pixel block is the target pixel point or not according to the motion attribute data corresponding to the pixel point and/or the difference data of the pixel point.
In one embodiment, the computer program when executed by the processor further performs the steps of:
counting the number of target pixel points in a neighborhood window of a target pixel block; morphological processing is carried out on the motion attribute marking data according to the number of target pixel points in the neighborhood window; and carrying out enhancement processing on the image to be enhanced according to the processed motion attribute marking data.
In one embodiment, the computer program when executed by the processor further performs the steps of:
correcting the differential data according to the motion attribute marking data; setting the enhancement coefficient of each pixel point according to the characteristics of different pixel points; processing the corrected differential data according to the enhancement coefficient; and the processed differential data are added to the image data to be enhanced, so that enhanced image data are obtained.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring two adjacent frames of images; and filtering the two adjacent frames of images.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (MagnetoresistiveRandom Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can take many forms, such as static Random access memory (Static Random Access Memory, SRAM) or Dynamic Random access memory (Dynamic Random AccessMemory, DRAM), among others. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (11)

1. A method of image target enhancement, the method comprising:
acquiring a differential image between two adjacent frames of images, and dividing the differential image into a plurality of pixel blocks;
determining a target pixel block conforming to the motion attribute in the plurality of pixel blocks;
determining target pixel points conforming to the motion attribute in the target pixel block;
according to the determined target pixel points, determining a moving target object in the image to be enhanced and enhancing the moving target object; wherein the image to be enhanced comprises any one frame of image among the two adjacent frames of images.
2. The image target enhancement method of claim 1, wherein determining a target pixel block of the plurality of pixel blocks that meets a motion attribute comprises:
judging whether the first pixel block is a target pixel block conforming to the motion attribute according to a neighborhood pixel block adjacent to the first pixel block; wherein the neighborhood pixel block comprises at least one of: the pixel blocks are adjacent to the pixel blocks in the row direction of the first pixel block, adjacent to the pixel blocks in the column direction of the first pixel block and adjacent to the pixel blocks in the row and column direction of the first pixel block.
3. The image target enhancement method according to claim 2, wherein determining whether the first pixel block is a target pixel block conforming to a motion attribute based on a neighborhood pixel block adjacent to the first pixel block comprises:
determining the number of the neighborhood pixel blocks with the difference value exceeding a first preset value in a plurality of neighborhood pixel blocks;
and judging whether the first pixel block is a target pixel block conforming to the motion attribute according to the number of the neighborhood pixel blocks of which the differential values exceed a first preset value.
4. The image target enhancement method according to claim 3, wherein determining whether the first pixel block is a target pixel block conforming to a motion attribute according to the number of the neighborhood pixel blocks whose difference value exceeds a first preset value comprises:
Determining a third number of pixel blocks in a neighborhood window of the first pixel block in the neighborhood pixel blocks of which the difference value exceeds a first preset value;
judging whether the first pixel block is a target pixel block conforming to the motion attribute or not under the condition that the third number is larger than a third threshold value; or,
determining a first number of pixel blocks which are positioned in a neighborhood window of the first pixel block and belong to the row direction neighborhood pixel block in the neighborhood pixel block of which the difference value exceeds the first preset value;
determining a second number of pixel blocks which are positioned in the neighborhood window and belong to the neighborhood pixel blocks in the column direction in the neighborhood pixel blocks of which the difference value exceeds the first preset value;
and judging whether the first pixel block is a target pixel block conforming to the motion attribute or not under the condition that the first number is larger than a first threshold value and the second number is larger than a second threshold value.
5. The image target enhancement method of claim 1, wherein determining a target pixel point in the target pixel block that meets a motion attribute comprises:
acquiring motion attribute marking data of the image to be enhanced according to the target pixel block, wherein the motion attribute marking data are used for representing motion attributes of pixel points at different positions, and the motion attributes comprise static and motion;
And judging whether the pixel point in the target pixel block is the target pixel point or not according to the motion attribute data corresponding to the pixel point and/or the differential data of the pixel point.
6. The image target enhancement method according to claim 5, wherein determining a moving target object in the image to be enhanced and performing enhancement processing on the moving target object according to the determined target pixel point comprises:
counting the number of the target pixel points in a neighborhood window of a target pixel block;
morphological processing is carried out on the motion attribute marking data according to the number of the target pixel points in the neighborhood window;
and carrying out enhancement processing on the image to be enhanced according to the processed motion attribute marking data.
7. The image target enhancement method according to claim 6, wherein the enhancement processing of the image to be enhanced according to the processed motion attribute flag data includes:
correcting the differential data according to the motion attribute marking data;
setting an enhancement coefficient of each pixel point according to the characteristics of different pixel points;
processing the corrected differential data according to the enhancement coefficient;
And the processed differential data are added to the image data to be enhanced, so that enhanced image data are obtained.
8. The image target enhancement method according to claim 1, wherein before acquiring the differential image between the adjacent two frames of images, the method further comprises:
acquiring the two adjacent frames of images;
and filtering the two adjacent frames of images.
9. An image object enhancement apparatus, comprising:
the differential module is used for acquiring a differential image between two adjacent frames of images and dividing the differential image into a plurality of pixel blocks;
a first determining module, configured to determine a target pixel block that accords with a motion attribute from the plurality of pixel blocks;
the second determining module is used for determining target pixel points which accord with the motion attribute in the target pixel block;
the enhancement module is used for determining a moving target object in the image to be enhanced according to the determined target pixel point and enhancing the moving target object; wherein the image to be enhanced comprises any one frame of image among the two adjacent frames of images.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the image object enhancement method according to any one of claims 1 to 8 when the computer program is executed.
11. A computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor realizes the steps of the image object enhancement method according to any of claims 1 to 8.
CN202410166567.XA 2024-02-06 Image target enhancement method, device, computer equipment and storage medium Active CN117710235B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410166567.XA CN117710235B (en) 2024-02-06 Image target enhancement method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410166567.XA CN117710235B (en) 2024-02-06 Image target enhancement method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117710235A true CN117710235A (en) 2024-03-15
CN117710235B CN117710235B (en) 2024-05-14

Family

ID=

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003045069A2 (en) * 2001-11-16 2003-05-30 Qualcomm Incorporated Block size assignment using local contrast ratio
US20110085084A1 (en) * 2009-10-10 2011-04-14 Chirag Jain Robust spatiotemporal combining system and method for video enhancement
CN102609907A (en) * 2012-01-12 2012-07-25 北京理工大学 Method for enhancing gas infrared image based on self-adaption time-domain filtering and morphology
CN103679641A (en) * 2012-09-26 2014-03-26 株式会社理光 Depth image enhancing method and apparatus
CN107483953A (en) * 2017-10-10 2017-12-15 司马大大(北京)智能***有限公司 Inter frame motion estimation method, apparatus and electronic equipment
CN107578424A (en) * 2017-08-04 2018-01-12 中山大学 A kind of dynamic background difference detecting method, system and device based on space-time classification
CN110738688A (en) * 2019-10-25 2020-01-31 中国人民解放军国防科技大学 novel infrared ultra-weak moving target detection method
CN111242128A (en) * 2019-12-31 2020-06-05 深圳奇迹智慧网络有限公司 Target detection method, target detection device, computer-readable storage medium and computer equipment
CN114373011A (en) * 2022-01-11 2022-04-19 中国科学院软件研究所 Method, device, computer equipment and medium for determining position of target object
CN117408886A (en) * 2023-09-11 2024-01-16 浙江华感科技有限公司 Gas image enhancement method, gas image enhancement device, electronic device and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003045069A2 (en) * 2001-11-16 2003-05-30 Qualcomm Incorporated Block size assignment using local contrast ratio
US20110085084A1 (en) * 2009-10-10 2011-04-14 Chirag Jain Robust spatiotemporal combining system and method for video enhancement
CN102609907A (en) * 2012-01-12 2012-07-25 北京理工大学 Method for enhancing gas infrared image based on self-adaption time-domain filtering and morphology
CN103679641A (en) * 2012-09-26 2014-03-26 株式会社理光 Depth image enhancing method and apparatus
CN107578424A (en) * 2017-08-04 2018-01-12 中山大学 A kind of dynamic background difference detecting method, system and device based on space-time classification
CN107483953A (en) * 2017-10-10 2017-12-15 司马大大(北京)智能***有限公司 Inter frame motion estimation method, apparatus and electronic equipment
CN110738688A (en) * 2019-10-25 2020-01-31 中国人民解放军国防科技大学 novel infrared ultra-weak moving target detection method
CN111242128A (en) * 2019-12-31 2020-06-05 深圳奇迹智慧网络有限公司 Target detection method, target detection device, computer-readable storage medium and computer equipment
CN114373011A (en) * 2022-01-11 2022-04-19 中国科学院软件研究所 Method, device, computer equipment and medium for determining position of target object
CN117408886A (en) * 2023-09-11 2024-01-16 浙江华感科技有限公司 Gas image enhancement method, gas image enhancement device, electronic device and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CE ZHU ET.AL.: ""Predictive fine granularity successive elimination for fast optimal block-matching motion estimation"", 《IEEE TRANSACTIONS ON IMAGE PROCESSING》, vol. 14, no. 2, 17 February 2005 (2005-02-17), pages 213, XP011124982, DOI: 10.1109/TIP.2004.840702 *
崔成: ""引入ORB改进Vibe算法的视频稳像及运动目标检测***研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑》, vol. 2022, no. 01, 15 January 2022 (2022-01-15), pages 138 - 1524 *
薛阳等: ""一种针对抖动视频序列的运动目标检测算法"", 《激光与光电子学进展》, vol. 55, no. 09, 10 September 2018 (2018-09-10), pages 091506 - 1 *

Similar Documents

Publication Publication Date Title
CN112837303A (en) Defect detection method, device, equipment and medium for mold monitoring
CN109784372B (en) Target classification method based on convolutional neural network
CN115759148B (en) Image processing method, device, computer equipment and computer readable storage medium
CN111739020B (en) Automatic labeling method, device, equipment and medium for periodic texture background defect label
JP2016115248A (en) Arithmetic processing apparatus
CN111709415B (en) Target detection method, device, computer equipment and storage medium
CN111882565B (en) Image binarization method, device, equipment and storage medium
CN111681165A (en) Image processing method, image processing device, computer equipment and computer readable storage medium
WO2023109008A1 (en) Method and system for restoring space-variant blurred image of aero-optic effect
CN114241388A (en) Video instance segmentation method and segmentation device based on space-time memory information
CN113918744A (en) Similar image retrieval method, similar image retrieval device, storage medium and computer program product
CN111340139B (en) Method and device for judging complexity of image content
CN117710235B (en) Image target enhancement method, device, computer equipment and storage medium
CN116612280A (en) Vehicle segmentation method, device, computer equipment and computer readable storage medium
CN114357958A (en) Table extraction method, device, equipment and storage medium
CN117710235A (en) Image target enhancement method, device, computer equipment and storage medium
CN115713769A (en) Training method and device of text detection model, computer equipment and storage medium
CN114511862A (en) Form identification method and device and electronic equipment
CN111160358B (en) Image binarization method, device, equipment and medium
CN107766863B (en) Image characterization method and server
CN111310824A (en) Multi-angle dense target detection inhibition optimization method and equipment
CN113538499B (en) Image threshold segmentation method, device, computer equipment and storage medium
CN113099217B (en) Video frame continuity detection method, device, equipment and storage medium
CN116030450B (en) Checkerboard corner recognition method, device, equipment and medium
CN114648527B (en) Urothelial cell slide image classification method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant