WO2023143193A1 - 一种热成像图像校正方法和装置 - Google Patents

一种热成像图像校正方法和装置 Download PDF

Info

Publication number
WO2023143193A1
WO2023143193A1 PCT/CN2023/072402 CN2023072402W WO2023143193A1 WO 2023143193 A1 WO2023143193 A1 WO 2023143193A1 CN 2023072402 W CN2023072402 W CN 2023072402W WO 2023143193 A1 WO2023143193 A1 WO 2023143193A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
preset
corrected
thermal image
difference
Prior art date
Application number
PCT/CN2023/072402
Other languages
English (en)
French (fr)
Inventor
闫羽
贾海威
金浩文
唐杰
Original Assignee
杭州微影软件有限公司
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 杭州微影软件有限公司 filed Critical 杭州微影软件有限公司
Publication of WO2023143193A1 publication Critical patent/WO2023143193A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10048Infrared image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

Definitions

  • the present application relates to the technical field of image processing, in particular to a thermal imaging image correction method and device.
  • Infrared thermal imaging equipment generally has the problem of non-uniform response, which is mainly manifested in the serious interference of fixed pattern noise in the image. Therefore, it is very necessary to correct the non-uniformity of the image.
  • the process of non-uniform correction method for images is as follows: for images collected by infrared thermal imaging equipment in a moving state, edge detection operators are used to detect the edges of the images, and the detected edges are used as target contours. The target contour is misintroduced into the correction result, all edge positions are not calculated with fixed pattern noise, and a correction matrix that can offset the fixed pattern noise is obtained in the form of each image iteration, and the correction matrix is superimposed on the original image to achieve non-uniform correction.
  • the infrared thermal imaging device For the image collected by the infrared thermal imaging device in a static state, calculate the grayscale difference between each pixel of the image and its surrounding pixels, and fix the graphic noise between the pixels with the grayscale difference in the preset interval and their corresponding neighboring pixels Calculation, the correction matrix that can offset the fixed graphic noise is obtained in the iterative form of each frame image, and the correction matrix is superimposed on the original image to achieve non-uniform correction.
  • the above-mentioned image correction method is to calculate the gray scale difference for each pixel of the entire image without difference, it is easy to cause the calculated correction matrix to include the target information in the image, which in turn leads to ghosting in the corrected image.
  • the accuracy of image correction is low because the fixed pattern noise calculation is performed on pixels whose gray scale difference is within a preset interval and their corresponding neighboring pixels. Therefore, the current image non-uniformity correction method has the problem of low image correction accuracy.
  • the purpose of the embodiments of the present application is to provide a thermal imaging image correction method and device, so as to improve the accuracy of image correction.
  • the embodiment of the present application provides a thermal imaging image correction method, including:
  • the target screening conditions corresponding to the motion state to determine noise interference pixels from the thermal image to be corrected; wherein, the target screening conditions corresponding to different motion states are different;
  • the thermal image to be corrected is corrected according to the noise interference pixels.
  • the method also includes:
  • the target screening conditions corresponding to different motion states have different requirements on the neighbor difference between the noise interference pixel and its neighboring pixels.
  • the motion state includes at least two of the following motion states: a high-speed motion state, a low-speed motion state, and a static state;
  • the target screening conditions include: the gray scale of the pixel in the thermal image to be corrected and the pixel gray scale corresponding to the thermal image of the reference frame represent different targets, and the adjacent difference of the pixel in the thermal image to be corrected is different from that of the thermal image of the reference frame If the difference between adjacent differences of pixels at the corresponding position is less than the preset difference threshold, the pixel at the corresponding position in the thermal image to be corrected is determined as a noise interference pixel;
  • the target screening conditions corresponding to the different motion states have different requirements on the neighbor difference between the noise interference pixel and its adjacent pixels, including: the preset difference threshold corresponding to the high-speed motion state is greater than the preset difference corresponding to the low-speed motion state value threshold, and/or, the preset difference threshold corresponding to the low-speed motion state is greater than the preset difference threshold corresponding to the stationary state.
  • the target screening condition corresponding to the high-speed motion state further includes: the grayscale of the pixel in the thermal image to be corrected and the pixel grayscale of the corresponding position in the thermal image of the reference frame indicate the same target, and the thermal image to be corrected If the difference between the adjacent difference of the pixel in the image and the adjacent difference of the pixel at the corresponding position of the thermal image of the reference frame is less than the preset difference threshold, the pixel at the corresponding position in the thermal image to be corrected is determined as a noise interference pixel ;
  • the pixel gray level in the thermal image to be corrected and the pixel gray level corresponding to the thermal image of the reference frame represent different targets, and the corresponding preset difference threshold is greater than the same target. Preset difference threshold.
  • the target screening condition further includes: the sum of the neighboring difference of the pixel in the thermal image to be corrected and the neighboring difference of the pixel corresponding to the thermal image of the reference frame is less than a preset sum value threshold;
  • the target screening conditions corresponding to the different motion states have different requirements on the neighbor difference between the noise interference pixel and its adjacent pixels, including: the preset sum value threshold corresponding to the high-speed motion state is greater than the preset sum value threshold corresponding to the low-speed motion state value threshold, and/or, the preset sum value threshold corresponding to the low-speed motion state is greater than the preset sum value threshold corresponding to the stationary state.
  • the target screening conditions corresponding to the high-speed motion state further include:
  • the pixel grayscale in the thermal image to be corrected and the pixel grayscale corresponding to the reference frame thermal image represent a different target and the corresponding preset sum value threshold is greater than the same target. Preset and value thresholds.
  • the correcting the thermal image to be corrected according to the noise interference pixels includes:
  • the noise interference pixel is a pixel to be corrected; wherein, the preset difference condition indicates that the pixel and the noise interference pixel in its neighborhood correspond to the same target, and the pixels corresponding to different motion states
  • the preset difference conditions are different;
  • the pixel to be corrected is corrected according to the correction parameter to obtain a corrected thermal image.
  • the preset difference condition includes that the adjacent difference is not greater than a preset difference threshold
  • the different preset difference conditions corresponding to different motion states include: the preset difference threshold corresponding to the high-speed motion state is greater than the The preset difference threshold corresponding to the low-speed motion state, and/or, the preset difference threshold corresponding to the low-speed motion state is greater than the preset difference threshold corresponding to the stationary state.
  • the determining the correction parameter corresponding to the pixel to be corrected based on the adjacent difference includes:
  • a correction parameter corresponding to the pixel to be corrected is determined according to the adjacent difference and a preset correction degree parameter corresponding to the motion state; wherein, the preset correction degree parameters corresponding to different motion states are different.
  • the different preset correction degree parameters corresponding to different motion states include: the value of the preset correction degree parameter corresponding to the high-speed motion state is greater than the value of the preset correction degree parameter corresponding to the low-speed motion state, and /or, the value of the preset correction degree parameter corresponding to the low-speed motion state is greater than the value of the preset correction degree parameter corresponding to the static state.
  • the determining the motion state of the thermal imaging device corresponding to the thermal image to be corrected includes:
  • each set of angular velocities includes at least one angular velocity of swing angular velocity, tilt angular velocity, and flip angular velocity;
  • the motion state of the thermal imaging device is a high-speed motion state, a low-speed motion state, or a static state.
  • determining the motion state of the thermal imaging device as a high-speed motion state, a low-speed motion state, or a static state based on the extreme difference and the sum value includes:
  • the motion state of the thermal imaging device is not less than a first preset range threshold and the sum is not less than a first preset sum threshold, determining the motion state of the thermal imaging device as a high-speed motion state;
  • the motion state of the thermal imaging device is determined as a low-speed motion state; wherein, the first preset extreme difference threshold is greater than the second preset extreme difference threshold, and the first preset the sum value threshold is greater than the second preset sum value threshold;
  • the motion state of the thermal imaging device is determined as a static state.
  • the thermal image to be corrected is a target thermal image that needs to be processed, or the thermal image to be corrected is a preliminary corrected thermal image obtained by performing preliminary correction on the target thermal image.
  • the method also includes:
  • Preliminary correction is performed on the target thermal image based on the accumulated correction parameters to obtain the preliminary corrected thermal image.
  • the embodiment of the present application provides a thermal imaging image correction device, including:
  • a motion state determination module configured to determine the motion state of the thermal imaging device corresponding to the thermal image to be corrected
  • the interference pixel determination module is used to determine noise interference pixels from the thermal image to be corrected by using the target screening conditions corresponding to the motion state; wherein, the target screening conditions corresponding to different motion states are different;
  • An image correction module configured to correct the thermal image to be corrected according to the noise interference pixels.
  • the device also includes:
  • the adjacent difference determination module is used to determine the adjacent difference of each pixel in the thermal image to be corrected relative to its adjacent pixels; the requirements for the adjacent difference of the noise interference pixel relative to its adjacent pixels are different in the target screening conditions corresponding to different motion states;
  • the motion state includes at least two of the following motion states: a high-speed motion state, a low-speed motion state, and a static state;
  • the target screening conditions include: the gray scale of the pixel in the thermal image to be corrected and the pixel gray scale corresponding to the thermal image of the reference frame represent different targets, and the adjacent difference of the pixel in the thermal image to be corrected is different from that of the thermal image of the reference frame If the difference between adjacent differences of pixels at the corresponding position is less than the preset difference threshold, the pixel at the corresponding position in the thermal image to be corrected is determined as a noise interference pixel;
  • the target screening conditions corresponding to the different motion states have different requirements on the neighbor difference between the noise interference pixel and its adjacent pixels, including: the preset difference threshold corresponding to the high-speed motion state is greater than the preset difference corresponding to the low-speed motion state value threshold, and/or, the preset difference threshold corresponding to the low-speed motion state is greater than the preset difference threshold corresponding to the stationary state;
  • the target screening conditions corresponding to the high-speed motion state further include: the pixel grayscale in the thermal image to be corrected and the pixel grayscale in the corresponding position of the thermal image in the reference frame represent the same target, and the pixel grayscale in the thermal image to be corrected
  • the difference between the adjacent difference of the adjacent difference and the adjacent difference of the pixel at the corresponding position of the thermal image of the reference frame is less than the preset difference threshold, then the pixel at the corresponding position in the thermal image to be corrected is determined as a noise interference pixel;
  • the pixel gray level in the thermal image to be corrected and the pixel gray level corresponding to the thermal image of the reference frame represent different targets, and the corresponding preset difference threshold is greater than the same target.
  • Preset difference threshold
  • the target screening condition also includes: the sum of the adjacent difference of the pixel in the thermal image to be corrected and the adjacent difference of the pixel corresponding to the thermal image of the reference frame is less than a preset sum value threshold;
  • the target screening conditions corresponding to the different motion states have different requirements on the neighbor difference between the noise interference pixel and its adjacent pixels, including: the preset sum value threshold corresponding to the high-speed motion state is greater than the preset sum value threshold corresponding to the low-speed motion state value threshold, and/or, the preset sum value threshold corresponding to the low-speed motion state is greater than the preset sum value threshold corresponding to the static state;
  • the target screening conditions corresponding to the high-speed motion state also include:
  • the pixel grayscale in the thermal image to be corrected and the pixel grayscale corresponding to the reference frame thermal image represent a different target and the corresponding preset sum value threshold is greater than the same target. preset and value thresholds;
  • the image correction module includes:
  • the difference determination sub-module is used to determine, for each pixel in the thermal image to be corrected, that there is a noise interference pixel in its neighborhood, the adjacent difference between the pixel and the noise interference pixel in its neighborhood;
  • a pixel determination sub-module configured to determine that the noise interference pixel is a pixel to be corrected if the adjacent difference satisfies a preset difference condition; wherein, the preset difference condition indicates that the pixel and the noise interference pixel in its neighborhood correspond to the same The target, the preset difference conditions corresponding to different exercise states are different;
  • a correction parameter determination submodule configured to determine a correction parameter corresponding to the pixel to be corrected based on the adjacent difference
  • An image correction sub-module configured to correct the pixel to be corrected according to the correction parameter to obtain a corrected thermal image
  • the preset difference condition includes that the adjacent difference is not greater than a preset difference threshold, and the different preset difference conditions corresponding to different motion states include: the preset difference threshold corresponding to the high-speed motion state is greater than the preset difference threshold corresponding to the low-speed motion state and/or, the preset difference threshold corresponding to the low-speed motion state is greater than the preset difference threshold corresponding to the stationary state;
  • the correction parameter determination submodule is specifically configured to determine the correction parameter corresponding to the pixel to be corrected according to the proximity difference and the preset correction degree parameter corresponding to the motion state; wherein, the preset correction parameters corresponding to different motion states The degree parameters are different;
  • the different preset correction degree parameters corresponding to different motion states include: the preset correction degree parameters corresponding to the high-speed motion state The value of the number is greater than the value of the preset correction degree parameter corresponding to the low-speed motion state, and/or, the value of the preset correction degree parameter corresponding to the low-speed motion state is greater than the preset correction degree parameter corresponding to the static state value;
  • the motion state determination module is specifically configured to acquire multiple sets of angular velocities of the thermal imaging device corresponding to the thermal image to be corrected, wherein each set of angular velocities includes at least one angular velocity of swing angular velocity, tilt angular velocity, and flip angular velocity; Calculate the extreme difference and the sum value between each type of angular velocity; based on the extreme difference and the sum value, determine that the motion state of the thermal imaging device is a high-speed motion state, a low-speed motion state or a static state;
  • the motion state determining module is specifically configured to determine the motion state of the thermal imaging device as High-speed motion state; if the range is less than the first preset range threshold and the sum value is less than the first preset sum value threshold, when the range is greater than the second preset range threshold and the sum value is greater than In the case of the second preset sum value threshold, the motion state of the thermal imaging device is determined as a low-speed motion state; wherein, the first preset extreme difference threshold is greater than the second preset extreme difference threshold, and the The first preset sum value threshold is greater than the second preset sum value threshold; if the range is not greater than the second preset range threshold and the sum value is not greater than the second preset sum value threshold, the The motion state of the thermal imaging device is determined as a static state;
  • the thermal image to be corrected is a target thermal image that needs to be processed, or the thermal image to be corrected is a preliminary corrected thermal image obtained by performing preliminary correction on the target thermal image;
  • the device also includes:
  • a preliminary correction module configured to acquire an accumulated correction parameter obtained by accumulating the correction parameters corresponding to each frame of thermal image before the target thermal image; perform preliminary correction on the target thermal image based on the accumulated correction parameter to obtain the preliminary Correct thermal images.
  • an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
  • the processor is configured to implement the method steps described in any one of the above-mentioned first aspects when executing the program stored in the memory.
  • an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned first aspects can be implemented. Method steps.
  • an embodiment of the present application provides a computer program product including instructions, and when the computer program product is executed by a computer, the method steps described in any one of the above first aspects are implemented.
  • the motion state of the thermal imaging device corresponding to the thermal image to be corrected uses the target screening condition corresponding to the motion state to determine noise interference pixels from the thermal image to be corrected; according to the noise
  • the interfering pixels correct the thermal image to be corrected.
  • the target screening conditions corresponding to different motion states are different, that is, the corresponding noise interference pixels can be determined for different motion states of the thermal imaging equipment, and then the noise interference pixels corresponding to the motion state can be used to correct the thermal image to be corrected, so that different
  • the effect of accurate correction of the thermal image to be corrected in the moving state improves the accuracy of image correction.
  • any product or method of the present application does not necessarily need to achieve all the above-mentioned advantages at the same time.
  • FIG. 1 is a flow chart of a thermal imaging image correction method provided in an embodiment of the present application
  • Fig. 2 is a flow chart of correcting the thermal image to be corrected provided by the embodiment of the present application
  • Fig. 3 is a schematic diagram of each pixel in the thermal image to be corrected
  • Fig. 4 is a schematic diagram of thermal imaging image correction
  • Figure 5(a) is an outdoor thermal image to be corrected
  • Figure 5(b) is the corrected thermal image obtained by correcting the outdoor thermal image to be corrected shown in Figure 5(a) by applying the thermal imaging image correction method provided by the present application;
  • Figure 6(a) is another outdoor thermal image to be corrected
  • Figure 6(b) is the application of the thermal imaging image correction method provided by this application to correct the outdoor thermal image to be corrected shown in Figure 6(a) The resulting corrected thermal image;
  • FIG. 7 is a structural diagram of a thermal imaging image correction device provided in an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • thermal imaging equipment such as infrared thermal imaging cores and thermal imaging cameras perform infrared imaging
  • there may be inconsistent responses of each pixel caused by non-uniform response, uneven lens transmittance, or body radiation.
  • the fixed pattern noise of the output infrared images is also particularly serious.
  • the fixed image noise of the image generally appears as pits or vertical lines floating on the image surface. Therefore, it is very necessary to correct the fixed pattern noise of the image.
  • embodiments of the present application provide a thermal imaging image correction method, device, electronic equipment, computer-readable storage medium, and computer program product.
  • the thermal imaging image correction method provided in the embodiment of the present application is firstly introduced below.
  • the thermal imaging image correction method provided in the embodiment of the present application can be applied to any electronic device with an image processing function, which is not specifically limited here.
  • Fig. 1 is a flow chart of the thermal imaging image correction method provided by the embodiment of the present application. As shown in Fig. 1, the method includes:
  • the target screening conditions corresponding to different motion states are different.
  • the motion state of the thermal imaging device corresponding to the thermal image to be corrected is determined by using the method provided in the embodiment of the present application; the noise interference pixel is determined from the thermal image to be corrected by using the target screening condition corresponding to the motion state; according to the The noise interference pixels are used to correct the thermal image to be corrected.
  • the target screening conditions corresponding to different motion states are different, that is, the corresponding noise interference pixels can be determined for different motion states of the thermal imaging equipment, and then the noise interference pixels corresponding to the motion state can be used to correct the thermal image to be corrected, so that different The effect of accurate correction of the thermal image to be corrected in the moving state improves the accuracy of image correction.
  • the thermal image to be corrected may be a target thermal image that needs to be processed, or the thermal image to be corrected may also be a preliminary corrected thermal image obtained by performing preliminary correction on the target thermal image.
  • the target thermal image may be an unprocessed original thermal image collected by the thermal imaging device, or the target thermal image may also be an image obtained after preliminary image processing on the original thermal image collected by the thermal imaging device.
  • the preliminary image processing may include image enhancement processing, image restoration processing, image segmentation processing, etc., which are not specifically limited here.
  • the change in the angular velocity of the thermal imaging device can reflect the movement of the thermal imaging device, the change in the angular velocity of the thermal imaging device can be obtained, and the change in angular velocity can be used to determine the corresponding thermal image to be corrected.
  • the motion state of the thermal imaging device generally includes a high-speed motion state, a medium-speed motion state, a low-speed motion state, and a static state.
  • step A1-step A3 the above-mentioned steps of determining the motion state of the thermal imaging device corresponding to the thermal image to be corrected may include step A1-step A3:
  • Step A1 Obtain multiple sets of angular velocities of the thermal imaging device corresponding to the thermal image to be corrected.
  • the thermal imaging device corresponding to the thermal image to be corrected is a thermal imaging device that collects the original thermal image corresponding to the thermal image to be corrected.
  • Each set of angular velocities may include at least one of a swing angular velocity, a tilt angular velocity and a roll angular velocity.
  • an angular velocity detection device such as a gyroscope, may be used to detect various angular velocities of the thermal imaging device, such as three types of angular velocities of swing angular velocity, tilt angular velocity and flip angular velocity.
  • the swing angular velocity reflects the angular velocity of the thermal imaging device's "left and right swing” movement direction
  • the tilt angular velocity reflects the angular velocity of the thermal imaging device's "left and right tilt” movement direction
  • the flip angular velocity reflects the thermal imaging device's "front and back flip" angular velocity of the movement direction.
  • multiple sets of angular velocities detected by the gyroscope and detected by the thermal imaging device within the time period from the acquisition of the previous thermal image corresponding to the original thermal image corresponding to the thermal image to be corrected to the acquisition of the original thermal image can be acquired .
  • thermal imaging equipment captures The time to the previous thermal image of the original thermal image is t1, the time when the thermal imaging device collects the original thermal image is t2, and the gyroscope detects three sets of angular velocities of the thermal imaging device within the time period [t1, t2]. Then this step can obtain multiple sets of angular velocities of the thermal imaging device within the time period [t1, t2]. ⁇ 3), where ⁇ 1- ⁇ 3 is the swing angular velocity, ⁇ 1- ⁇ 3 is the tilt angular velocity, and ⁇ 1- ⁇ 3 is the flip angular velocity.
  • Step A2 Calculate the range and sum of each type of angular velocity.
  • the difference between the same type of angular velocities in the two groups can be calculated, and then the maximum difference of each type is determined as the extreme difference between the types of angular velocities.
  • the differences can be calculated for the swing angular velocity: ( ⁇ 1- ⁇ 2), ( ⁇ 1- ⁇ 3) and ( ⁇ 2- ⁇ 3), and the largest difference can be determined as the extreme difference corresponding to the swing angular velocity;
  • the difference can be calculated for the tilt angular velocity Values: ( ⁇ 1- ⁇ 2), ( ⁇ 1- ⁇ 3) and ( ⁇ 2- ⁇ 3), and determine the largest difference as the extreme difference corresponding to the tilt angular velocity;
  • the difference can be calculated for the flip angular velocity: ( ⁇ 1- ⁇ 2), ( ⁇ 1- ⁇ 3) and ( ⁇ 2- ⁇ 3), and determine the largest difference among them as the extreme difference corresponding to the flip angular velocity.
  • multiple angular velocities of this type can be added to obtain the sum of multiple angular velocities of this type.
  • the sum of swing angular velocity can be calculated as: ( ⁇ 1+ ⁇ 2+ ⁇ 3)
  • the sum of tilt angular velocity can be calculated as: ( ⁇ 1+ ⁇ 2+ ⁇ 3)
  • the sum of flip angular velocity can be calculated as: ( ⁇ 1 + ⁇ 2+ ⁇ 3).
  • Step A3 Based on the extreme difference and the sum value, determine whether the motion state of the thermal imaging device is a high-speed motion state, a low-speed motion state or a static state.
  • the extreme difference can reflect the maximum change in angular velocity during the period from the previous thermal image of the original thermal image to the acquisition of the original thermal image, and the sum value can reflect the distance traveled by the core of the thermal imaging device within the period of acquiring two frames of images.
  • the motion state of the thermal imaging device is determined as a high-speed motion state
  • the motion state of the thermal imaging device is determined as a low-speed motion state
  • the motion state of the thermal imaging device is determined as a static state.
  • the first preset extreme difference threshold, the second preset extreme difference threshold, the first preset sum threshold and the second preset sum threshold can all be set according to actual application conditions , not specifically limited here, and the first preset range threshold is greater than the second preset range threshold, and the first preset sum threshold is greater than the second preset sum threshold.
  • the thermal imaging device it is possible to first determine whether the motion state of the thermal imaging device is a high-speed motion state according to the first preset extreme difference threshold and the first preset sum threshold, and if not, continue according to the second
  • the preset extreme difference threshold and the second preset sum threshold determine whether the motion state of the thermal imaging device is a low-speed motion state and whether it is a static state.
  • the motion state of the thermal imaging device can be divided into three types: high-speed motion state, low-speed motion state and static state, not only can it be determined that the thermal imaging device is in a motion state or non-moving state, and can also determine the speed of the thermal imaging device's movement, which can realize high-precision judgment of the motion state of the thermal imaging device.
  • high-speed motion state for the situation that does not meet the conditions for determining the high-speed motion state but the actual motion speed has reached a high speed, that is, the missed detection data of the high-speed motion state, its high probability will meet the subsequent determination conditions for the low-speed motion state.
  • the thermal image to be corrected can also be corrected according to the low-speed motion state to achieve a certain correction effect.
  • the noise interference pixels screened out by the target screening conditions corresponding to the state are corrected to correct the thermal image to be corrected to achieve a certain correction effect and ensure the correct rate of correction.
  • the noise interference pixels can be determined from the thermal image to be corrected by using the target screening condition corresponding to the motion state.
  • the target screening conditions corresponding to different motion states are different. Due to the different motion states of the thermal imaging equipment, the difficulty of screening the fixed image noise interference pixels in the corresponding thermal images to be corrected is different. Correct noise interfering pixels in thermal images. Therefore, the accurate noise interference pixels can be determined from the thermal image to be corrected by using the target screening conditions corresponding to the motion state.
  • the above step S103 may be performed, that is, to correct the thermal image to be corrected according to the noise interference pixels.
  • due to the difference in the gray value between the noise interference pixel and its adjacent pixels has certain rules, for example, for a fixed graphic noise interference pixel, whether it is caused by the movement of the thermal imaging device
  • the position of the fixed pattern noise interference pixel is always fixed, and the difference in gray value between the pixel where the fixed pattern noise interference pixel is located and the adjacent pixels is small. Therefore, noise interference pixels can be selected by the change of the gray value of each pixel in the frame before and after the thermal image to be corrected, and the change of the adjacent difference between it and adjacent pixels. Therefore, in order to accurately screen out noise interference pixels, the neighbor difference of each pixel in the thermal image to be corrected relative to its neighboring pixels can be determined, and the noise interference pixels can be determined from the thermal image to be corrected by using the neighbor difference and the target screening condition.
  • the thermal imaging device when the thermal imaging device is in a high-speed motion state, the scene changes greatly, and the noise interference pixel selection is relatively difficult and reliable.
  • the thermal imaging device When the thermal imaging device is in a low-speed motion state, the scene changes are small, and the reliability of noise interference pixel selection is reduced.
  • the scene changes slightly, noise interference pixel selection is difficult and the reliability is low. That is, the scene changes in different motion states.
  • the noise interference pixels in the thermal images to be corrected are also different in different motion states. Therefore, the noise interference pixels in the target screening conditions corresponding to different motion states are relative to their neighbors. The neighbor difference requirements for pixels are also different.
  • the gray level difference of each pixel in the thermal image to be corrected relative to its adjacent pixels may be determined as the adjacent difference of each pixel in the thermal image to be corrected relative to its adjacent pixels.
  • the method described in the following steps B1-B2 can also be used to determine the adjacent difference of each pixel in the thermal image to be corrected relative to its adjacent pixels:
  • Step B1 Preset an adjacent difference matrix of all zeros; traverse the pixels of the thermal image to be corrected, and calculate the difference between the pixel values of the currently traversed pixel and its neighboring pixels, which are adjacent to the currently traversed pixel
  • the sum of element value differences between the corresponding element in the difference matrix and its neighboring elements is used as the pixel difference between the currently traversed pixel and its neighboring pixels.
  • Neighboring pixels of a pixel may be neighboring pixels of the pixel, for example, neighboring pixels of a pixel may be its 4-neighboring or 8-neighboring pixels, and the like.
  • the adjacent pixels of a pixel can also be pixels within a preset pixel distance range from the pixel, wherein the preset pixel distance can be set as the distance between two adjacent pixels or the distance between two adjacent pixels. Twice the spacing, etc., which are not specifically limited here.
  • Neighboring pixels of the currently traversed pixel may be: each four-neighborhood pixel of the currently traversed pixel, that is, the nearest neighbors to the left, right, top, and bottom of the currently traversed pixel.
  • Neighborhood elements can be: each four-neighborhood element adjacent to the element corresponding to the pixel currently traversed in the difference matrix, that is, the left, right, top, and bottom of the element corresponding to the pixel currently traversed in the adjacent difference matrix the nearest element.
  • the following formula can be used to calculate the difference between the pixel value between the currently traversed pixel and its neighbor pixels, and the element corresponding to the currently traversed pixel in the neighboring difference matrix and its neighbor.
  • the sum of element value differences between elements is used as the pixel difference between the currently traversed pixel and its neighbor pixels:
  • dif is the pixel difference
  • Y(i,j) is the pixel value of the currently traversed pixel (i,j) in the thermal image to be corrected
  • Correct_noise is the adjacent difference matrix
  • Y neighbor is the currently traversed pixel (i,j)
  • Correct_noise(i, j) is the value of the element corresponding to the currently traversed pixel in the adjacent difference matrix
  • Correct_noise neighbor is the neighborhood of the element corresponding to the currently traversed pixel in the adjacent difference matrix The value of the element.
  • Step B2 Based on the pixel difference, update the value of the element corresponding to the neighborhood pixel in the neighborhood difference matrix to obtain the updated neighborhood difference matrix until all the pixels of the thermal image to be corrected are traversed to obtain The target adjacent difference matrix, then determine the adjacent difference of each pixel in the thermal image to be corrected relative to its adjacent pixels as the value of the corresponding element in the target adjacent difference matrix.
  • the following formula may be used to update the value of the element corresponding to the neighboring pixel in the neighboring difference matrix based on the pixel difference:
  • the updated target adjacent difference matrix Correct_noise can be obtained, and then the adjacent difference of each pixel in the thermal image to be corrected relative to its adjacent pixels can be determined as the target adjacent difference matrix The value of the corresponding element.
  • noise interference pixels may be screened from the thermal image to be corrected by using the target screening condition corresponding to the motion state.
  • the position of the fixed pattern noise is always fixed, whether the movement of the movement of the thermal imaging device causes the scene to change or the object in the scene moves when the movement is stationary, and the position of the fixed pattern noise is consistent with the surrounding pixels
  • the grayscale difference changes little. Therefore, on the basis that the grayscale of the pixel in the thermal image to be corrected changes with the grayscale of the pixel corresponding to the thermal image of the reference frame, the The pixel of the corrected thermal image should be transferred from one target to another. If the temperature of the two targets is different, the pixel gray level in the thermal image to be corrected will change from the gray level of the pixel corresponding to the thermal image in the reference frame. This pixel of the thermal image is determined to be a noise interference pixel.
  • the target screening conditions may include: the pixel grayscale in the thermal image to be corrected and the pixel grayscale in the corresponding position of the thermal image in the reference frame represent different targets, and the adjacent difference of the pixel in the thermal image to be corrected is different from the thermal image in the reference frame. If the difference between adjacent differences of pixels at corresponding positions in the image is less than a preset difference threshold, the pixel at the corresponding position in the thermal image to be corrected is determined as a noise interference pixel.
  • the thermal image of the reference frame may generally be the thermal image of the previous frame of the thermal image to be corrected.
  • the grayscale difference between two pixels in the same target in the thermal image to be corrected is always within the normal grayscale difference range, if the grayscale of the pixel in the thermal image to be corrected is the same as that of the pixel corresponding to the thermal image of the reference frame If the grayscale difference between the grayscales is greater than the preset grayscale difference threshold, it means that the grayscale difference between the pixel at the corresponding position in the thermal image to be corrected and the pixel at the corresponding position in the thermal image of the reference frame exceeds the normal grayscale difference range, That is, it can be determined that the pixel corresponding to the position in the thermal image to be corrected and the pixel corresponding to the thermal image of the reference frame are located in different targets.
  • the gray scale difference range is the preset gray scale difference threshold.
  • the gray scale difference between the pixel gray scale in the thermal image to be corrected and the pixel gray scale corresponding to the reference frame thermal image is greater than the preset gray scale corresponding to the motion state
  • the difference threshold it can be determined that the pixel grayscale in the thermal image to be corrected and the pixel grayscale at the corresponding position of the reference frame thermal image represent different targets.
  • the position of the fixed pattern noise interference pixel of each frame of the thermal image to be corrected corresponding to the thermal imaging device is always fixed, and the difference in gray value between the pixel where the fixed pattern noise interference pixel is located and the adjacent pixel is relatively small. Small, that is, the difference between adjacent differences between pixels at corresponding positions between two frames of images is also within a certain difference range.
  • the difference range is the preset difference threshold.
  • the pixel in the thermal image to be corrected can be determined as a noise interference pixel.
  • the thermal imaging device since the thermal imaging device is in a high-speed motion state, the scene changes greatly, and the noise interference pixel selection is relatively difficult and reliable, and the pixels corresponding to the thermal image to be corrected and the thermal image of the reference frame can easily correspond to different targets. Therefore, the preset gray level difference threshold corresponding to the high-speed motion state can be set smaller, so that more noise interference pixels can be determined and the accuracy of image correction can be improved.
  • the thermal imaging device is in the low-speed motion state, the scene changes little, and the reliability of noise interference pixel selection is reduced.
  • the preset gray level difference threshold corresponding to the low-speed motion state can be set to be larger, and the threshold for selecting noise interference pixels is increased to ensure The selection accuracy of the threshold of noise interference pixels avoids the problem of wrong selection of noise interference pixels, thereby ensuring the accuracy of image correction.
  • Threshold to ensure the selection accuracy of the threshold of noise interference pixels, to avoid the problem of wrong selection of noise interference pixels, and to ensure the accuracy of image correction.
  • the preset gray level difference thresholds corresponding to different motion states are different. Moreover, since the scene changes greatly when the thermal imaging device is in a high-speed motion state, the selection of noise interference pixels is relatively difficult and reliable. When the thermal imaging device is in a low-speed motion state, the scene changes are small, and the reliability of noise interference pixel selection is reduced. In the state, the scene changes slightly, and the selection of noise interference pixels is difficult and the reliability is low.
  • the different preset grayscale difference thresholds corresponding to different motion states may include: the preset grayscale difference threshold corresponding to the static state is greater than the preset grayscale difference threshold corresponding to the low-speed motion state, and/or the preset grayscale difference threshold corresponding to the low-speed motion state The gray-scale difference threshold is greater than the preset gray-scale difference threshold corresponding to the high-speed motion state.
  • the specific values of the preset gray level difference thresholds corresponding to different motion states may be set according to empirical values in practical applications, and are not specifically limited here.
  • the thermal imaging device since the thermal imaging device is in a high-speed motion state, the scene changes greatly, and the difference between the adjacent differences between the pixels at the corresponding position between the thermal image to be corrected and the pixel at the corresponding position of the thermal image of the reference frame is usually also relatively large Therefore, the preset difference threshold corresponding to the high-speed motion state can be set larger, so that more noise interference pixels can be determined and the accuracy of image correction can be improved.
  • the low-speed motion can be
  • the preset difference threshold corresponding to the state is set smaller, which increases the threshold for selecting noise interference pixels, avoids the problem of mistakenly selecting noise interference pixels, and ensures the accuracy of image correction.
  • the thermal imaging device is in a static state, the scene changes slightly, and the difference between the adjacent differences between the pixels in the corresponding position between the thermal image to be corrected and the pixel in the corresponding position of the thermal image in the reference frame is usually smaller. Therefore, the stationary state can be
  • the corresponding preset difference threshold is set to be smaller, which further increases the threshold for selecting noise interference pixels, avoids the problem of mistakenly selecting noise interference pixels, and ensures the accuracy of image correction.
  • the preset difference thresholds corresponding to different motion states are different, and the target screening conditions corresponding to different motion states have different requirements on the adjacent difference between the noise interference pixel and its adjacent pixels, which may include: the preset value corresponding to the high-speed motion state
  • the difference threshold is greater than the preset difference threshold corresponding to the low-speed motion state, and/or, the preset difference threshold corresponding to the low-speed motion state is greater than the preset difference threshold corresponding to the stationary state.
  • Specific values of the preset difference thresholds corresponding to different motion states may be set according to empirical values in practical applications, and are not specifically limited here.
  • the thermal imaging device in a high-speed motion state, when the pixel grayscale of the pixel in the thermal image to be corrected is the same as the pixel grayscale of the corresponding position in the thermal image of the reference frame
  • the grayscale difference between is within the preset grayscale difference threshold range corresponding to the high-speed motion state, it may be that the pixel is still moving on a larger and more uniform target, or it may be that the thermal image to be corrected and the reference frame Thermal image acquisition targets emit a similar amount of radiation.
  • the target screening conditions corresponding to the high-speed motion state may also include: the grayscale of pixels in the thermal image to be corrected and the pixel grayscale of the corresponding position in the thermal image of the reference frame represent the same target, and the thermal image to be corrected If the difference between the adjacent difference of the pixel and the adjacent difference of the pixel corresponding to the thermal image of the reference frame is less than a preset difference threshold, the pixel at the corresponding position in the thermal image to be corrected is determined as a noise interference pixel.
  • the target in the thermal image to be corrected is a gray background with a large area.
  • the pixel grayscale of the pixel in the thermal image to be corrected is different from that of the corresponding position in the thermal image of the reference frame.
  • the grayscale difference between pixel grayscales is also within the preset grayscale difference threshold range corresponding to the high-speed motion state. Then when the difference between the adjacent difference of the pixel in the thermal image to be corrected and the adjacent difference of the pixel in the corresponding position of the thermal image of the reference frame is less than the preset difference threshold, the pixel in the corresponding position in the thermal image to be corrected can be determined as noise Noise pixels.
  • the two grayscale values are relatively close, and the adjacent difference between the two pixels and their adjacent pixels is also relatively close. Therefore, when the thermal image to be corrected When the grayscale of the pixel in the center and the pixel grayscale at the corresponding position of the thermal image of the reference frame represent the same target, the difference between the adjacent difference of the corresponding position in the thermal image to be corrected and the adjacent difference of the pixel at the corresponding position of the thermal image of the reference frame is also relatively small of. When two pixels correspond to different targets, the difference between the two grayscale values is large, and the adjacent difference between the two pixels and their adjacent pixels is also large.
  • the corresponding preset difference threshold is greater than that of the same target. The corresponding preset difference threshold.
  • the target filter condition can also include: the sum of the adjacent difference of the pixel in the thermal image to be corrected and the adjacent difference of the pixel corresponding to the thermal image of the reference frame Less than the preset sum value threshold.
  • the adjacent difference between the pixels at the corresponding position between the thermal image to be corrected and the pixel at the corresponding position of the thermal image of the reference frame is usually also relatively large, so , the sum of the adjacent difference of the pixel in the thermal image to be corrected and the adjacent difference of the pixel corresponding to the thermal image of the reference frame is also larger, and the preset sum value threshold corresponding to the high-speed motion state can be set to be larger, so that More noise interference pixels can be determined and the accuracy of image correction can be improved.
  • the thermal imaging device When the thermal imaging device is in a low-speed motion state, the scene changes little, and the adjacent difference between the pixels in the corresponding position between the thermal image to be corrected and the corresponding pixel in the reference frame thermal image is usually small. Therefore, the proximity of the pixel in the thermal image to be corrected The sum of the adjacent differences between the difference and the pixels corresponding to the corresponding position of the reference frame thermal image is also small, and the preset sum value threshold corresponding to the low-speed motion state can be set smaller, so as to improve the threshold for selecting noise interference pixels and avoid misselection The problem of noise interference pixels ensures the accuracy of image correction.
  • the thermal imaging device when the thermal imaging device is in a static state, the scene changes slightly, and the adjacent difference of the pixel at the corresponding position between the thermal image to be corrected and the pixel at the corresponding position of the thermal image of the reference frame is smaller. Therefore, the adjacent difference of the pixel in the thermal image to be corrected.
  • the sum of the adjacent differences of the pixels corresponding to the thermal image of the reference frame is also smaller, and the preset sum value threshold corresponding to the static state can be set smaller, so as to further increase the threshold for selecting noise interference pixels and avoid false selection of noise
  • the problem of interfering pixels ensures the accuracy of image correction.
  • the preset sum value thresholds corresponding to different motion states are different, and the target screening conditions corresponding to the different motion states have different requirements for the neighbor difference of the noise interference pixel relative to its adjacent pixels, including: the preset value corresponding to the high-speed motion state
  • the sum value threshold is greater than the preset sum value threshold corresponding to the low-speed motion state, and/or, the preset sum value threshold corresponding to the low-speed motion state is greater than the static state corresponding preset and value thresholds.
  • the specific values of presets and value thresholds corresponding to different motion states can be set according to empirical values in practical applications, and are not specifically limited here.
  • the adjacent differences between the two pixels and their neighboring pixels are relatively small.
  • the sum of the adjacent difference between the corresponding position in the thermal image to be corrected and the adjacent difference of the pixel at the corresponding position in the reference frame thermal image is also relatively small.
  • the adjacent difference between the two pixels and their adjacent pixels is relatively large. Therefore, when the pixel gray level in the thermal image to be corrected and the pixel gray level corresponding to the thermal image of the reference frame represent different targets When , the sum value between the adjacent difference of the corresponding position in the thermal image to be corrected and the adjacent difference of the pixel corresponding to the reference frame thermal image is larger.
  • the target screening condition corresponding to the high-speed motion state may also include: in the target screening condition corresponding to the high-speed motion state, the gray scale of the pixel in the thermal image to be corrected is different from the pixel gray scale at the corresponding position of the thermal image in the reference frame.
  • the corresponding preset and value thresholds when the target is greater than the corresponding preset and value thresholds when representing the same target.
  • the motion state is a high-speed motion state
  • the pixel (i, j) in the thermal image to be corrected satisfies the following condition (1) or condition (2), it is determined that the pixel is a noise interference pixel.
  • abs() means to take the absolute value operation
  • Y(i,j) is the pixel value (i.e. pixel grayscale) of the pixel (i,j) in the thermal image to be corrected
  • Y'(i,j) is the reference
  • Correct_noise (i, j) is the adjacent difference of the pixel
  • Correct_noise' (i, j) is the adjacent difference of the pixel corresponding to the reference frame thermal image
  • n 11 is the The pixel grayscale in the corrected thermal image and the pixel grayscale corresponding to the reference frame thermal image represent the preset difference threshold corresponding to the high-speed motion state of different targets
  • the pixel grayscale at the corresponding position of the image represents the preset sum threshold corresponding to the high-speed motion state for different targets
  • n 13 is the preset gray-scale difference
  • the grayscale difference between the pixel grayscale of the pixel in the thermal image to be corrected and the pixel grayscale of the corresponding position in the thermal image of the reference frame is greater than the preset grayscale difference threshold corresponding to the high-speed motion state, that is, abs(Y(i,j )-Y′(i,j))>n 13 , it can be determined that the pixel in the thermal image to be corrected and the pixel corresponding to the thermal image in the reference frame represent different targets.
  • the pixel in the thermal image to be corrected The absolute value of the difference between the adjacent difference and the adjacent difference of the pixel corresponding to the thermal image of the reference frame is less than the preset difference threshold n 11 , and the adjacent difference of the pixel in the thermal image to be corrected is different from the thermal image of the reference frame. If the absolute value of the sum of adjacent differences of pixels corresponding to the image is less than the preset sum value threshold n 12 , the pixel in the thermal image to be corrected can be determined as a noise interference pixel.
  • n 21 is the preset difference threshold corresponding to the high-speed motion state when the pixel grayscale in the thermal image to be corrected and the pixel grayscale in the corresponding position of the reference frame thermal image represent the same target
  • n 22 is the thermal image to be corrected
  • the pixel grayscale in the middle pixel grayscale and the pixel grayscale corresponding to the thermal image of the reference frame represent the preset sum threshold value corresponding to the high-speed motion state when the same target
  • n 23 is the preset gray scale difference threshold value corresponding to the high-speed motion state
  • n 11 >n 21 is the preset difference threshold corresponding to the high-speed motion state
  • the grayscale difference between the pixel grayscale of the pixel in the thermal image to be corrected and the pixel grayscale of the corresponding position in the reference frame thermal image is within the preset grayscale difference threshold corresponding to the high-speed motion state, that is When abs(Y(i,j)-Y′(i,j)) ⁇ n 23 , it can be determined that the pixel in the thermal image to be corrected and the pixel corresponding to the thermal image of the reference frame represent the same target.
  • the adjacent difference of the pixel in the thermal image to be corrected is The difference between the difference and the adjacent difference of the pixel corresponding to the thermal image of the reference frame If the absolute value of the sum is less than the preset sum value threshold n 22 , then the pixel in the thermal image to be corrected can be determined as a noise interference pixel.
  • the motion state is a low-speed motion state
  • the pixel (i, j) in the thermal image to be corrected satisfies the following condition (3), it can be determined that the pixel is a noise interference pixel.
  • n 31 is the preset difference threshold corresponding to the low-speed motion state
  • n 32 is the preset sum threshold corresponding to the low-speed motion state
  • n 33 is the preset gray scale difference threshold corresponding to the low-speed motion state
  • n 13 n 23 .
  • the low-speed motion state does not allow pixels with small gray-scale differences to be noise interference pixels.
  • the corresponding preset gray level difference threshold that is, when abs(Y(i,j)-Y'(i,j))>n 33 , the pixel in the corresponding position of the pixel in the thermal image to be corrected and the thermal image of the reference frame can be determined represent different targets, and at the same time, when the absolute value of the difference between the adjacent difference of the pixel in the thermal image to be corrected and the adjacent difference of the pixel corresponding to the thermal image of the reference frame is less than the preset difference threshold n 31 , and , the absolute value of the sum of the adjacent difference of the pixel in the thermal image to be corrected and the adjacent difference of the pixel corresponding to the thermal image of the reference frame is less than the preset sum value threshold n 32 , then the pixel in the thermal image to be corrected can be Determined as noise interference pixels.
  • the motion state is a static state
  • the pixel (i, j) in the thermal image to be corrected satisfies the following condition (4), it can be determined that the pixel is a noise interference pixel.
  • n 41 is the preset difference threshold corresponding to the stationary state
  • n 42 is the preset sum threshold corresponding to the stationary state
  • n 43 is the preset gray scale difference threshold corresponding to the stationary state
  • the motion state is a static state
  • the pixel satisfies the above condition (4), it means that only weak fixed pattern noise can be corrected in a static state, and the change of the gray level difference here is caused by the target motion.
  • the grayscale difference between the pixel grayscale of the pixel in the thermal image to be corrected and the pixel grayscale of the corresponding position in the thermal image of the reference frame is greater than the preset grayscale difference threshold corresponding to the static state, that is, abs(Y(i,j) When -Y'(i,j))>n 43 , it can be determined that the pixel in the thermal image to be corrected and the pixel corresponding to the thermal image in the reference frame represent different targets.
  • the pixel in the thermal image to be corrected when the pixel in the thermal image to be corrected is adjacent to The absolute value of the difference between the difference and the adjacent difference of the pixel at the corresponding position of the thermal image of the reference frame is less than the preset difference threshold n 41 , and the adjacent difference of the pixel in the thermal image to be corrected is different from the thermal image of the reference frame If the absolute value of the sum of adjacent differences of pixels at the corresponding position is less than the preset sum value threshold n 42 , then the pixel in the thermal image to be corrected can be determined as a noise interference pixel.
  • the three motion states of the thermal imaging device correspond to different target screening conditions.
  • the pixels in the thermal image to be corrected that have noise interfering pixels in the neighborhood and their neighbors can be used
  • the adjacent difference between the noise interference pixels further screens out the pixels to be corrected from the noise interference pixels, and then, the corresponding correction parameters can be determined for the pixels to be corrected, and then the correction parameters are used to correct the pixels to be corrected, and the corrected thermal image is obtained.
  • the correction parameter is a grayscale parameter that can correct the grayscale value of the pixel to be corrected.
  • the adjacent differences between pixels in the same target in the thermal image to be corrected are always within the preset Assuming that within the difference threshold, when the adjacent difference between the pixel and the noise interfering pixel in its neighborhood is greater than a preset difference threshold, it means that the pixel and the noise interfering pixel in its neighborhood are not located on the same target. Therefore, the large difference of the neighborhood difference between the noisy pixel and its neighbors is not due to fixed image noise, but because the pixel and its neighbors are located in different targets, and the noise interferes with The pixel is actually misjudged as a noise interference pixel, and there is no need to correct the noise interference pixel.
  • the neighbor difference between the pixel and the noise interference pixel in its neighborhood is not greater than the preset difference threshold, it means that the pixel and the noise interference pixel in its neighborhood correspond to the same target. Therefore, the excessive difference of the adjacent difference between the noise interference pixel and the pixel in its neighborhood is caused by fixed image noise, so the noise interference pixel is determined as the pixel to be corrected, and the pixel to be corrected needs to be corrected subsequently .
  • Fig. 2 is a flow chart of correcting the thermal image to be corrected provided by the embodiment of the present application.
  • the correction of the thermal image to be corrected according to the noise interference pixels may include :
  • a matrix of all zero correction parameters may be defined in advance. For each pixel in the thermal image to be corrected that has a noise interference pixel in its neighborhood, the pixel difference between the pixel and the noise interference pixel in its neighborhood can be calculated, and the corresponding position element in the correction parameter matrix and its The sum of element differences between neighboring elements is used as the neighboring difference between the pixel and the noise interfering pixel in its neighborhood.
  • the preset difference condition indicates that the pixel and the noise interference pixel in its neighborhood correspond to the same target, and the preset difference conditions corresponding to different motion states are different.
  • the adjacent difference between each pixel in the same target in the thermal image to be corrected is always within a certain difference range, if the adjacent difference between the pixel and the noise interference pixel in its neighborhood is not within the difference range , which means that the noisy pixel and its neighbors are not located on the same target, that is, the large difference in the neighborhood difference between the noisy pixel and its neighbors is not due to fixed image noise
  • the noise interference pixel is actually misjudged as a noise interference pixel because the noise interference pixel of the pixel and its neighbors are located at different targets.
  • the difference range is the preset difference threshold, so the preset difference condition may include that the adjacent difference is not greater than the preset difference threshold.
  • the preset difference threshold corresponding to the high-speed motion state can be set to a larger value In this way, more interference pixels to be corrected can be determined, that is, more pixels to be corrected can be corrected, and the accuracy of image correction can be improved.
  • the preset difference threshold corresponding to the low-speed motion state can be set smaller to improve Screen the threshold of pixels to be corrected to ensure the accuracy of image correction.
  • the preset difference threshold corresponding to the static state can be set smaller to further improve Screen the threshold of pixels to be corrected to ensure the accuracy of image correction. Therefore, the preset difference condition may include that the adjacent difference is not greater than a preset difference threshold, and the different preset difference conditions corresponding to different motion states include: the preset difference threshold corresponding to the high-speed motion state is greater than the low speed The preset difference threshold corresponding to the motion state, and/or, the preset difference threshold corresponding to the low-speed motion state is greater than the preset difference threshold corresponding to the stationary state. Specific values of the preset difference thresholds corresponding to different motion states may be set according to empirical values in practical applications, and are not specifically limited here.
  • the adjacent difference between each pixel in the same target in the thermal image to be corrected is always within the preset difference threshold, when the adjacent difference between the pixel and the noise interference pixel in its neighborhood is greater than the preset difference threshold, it means that the pixel The noise interfering pixel with its neighbors is not on the same target. Therefore, the large difference of the neighborhood difference between the noisy pixel and its neighbors is not due to fixed image noise, but because the pixel and its neighbors are located in different targets, and the noise interferes with The pixel is actually misjudged as a noise interference pixel, and there is no need to correct the noise interference pixel.
  • the neighbor difference between the pixel and the noise interference pixel in its neighborhood is not greater than the preset difference threshold, it means that the pixel and the noise interference pixel in its neighborhood correspond to the same target. Therefore, the excessive difference of the adjacent difference between the noise interference pixel and the pixel in its neighborhood is caused by fixed image noise, so the noise interference pixel is determined as the pixel to be corrected, and the pixel to be corrected needs to be corrected subsequently .
  • the correction parameter is a grayscale parameter that can correct the grayscale value of the pixel to be corrected.
  • the adjacent difference between each pixel in the same target in the thermal image to be corrected and its own neighborhood is within a certain range
  • the adjacent difference between the normal pixel and its own neighborhood pixel is usually located in the adjacent difference range, and the to-be-corrected
  • the adjacent difference between the corrected pixel and its neighboring pixels is larger than the neighboring difference between the normal pixel and its own neighboring pixels, and is outside the neighboring difference range. Therefore, the adjacent difference between the pixel to be corrected and its neighboring pixels can be used to determine the corresponding correction parameters for correcting the gray value of the pixel to be corrected, so that the neighboring difference between the pixel to be corrected and its neighboring pixels can reach normal within the range of adjacent differences.
  • the adjacent difference between the pixel and the noise interference pixel in its neighborhood reflects the gray level difference between the noise interference pixel and the normal pixel, so, for each pixel to be corrected, the adjacent difference and
  • the product of the preset coefficient and the sum of the value of the corresponding position element in the correction parameter matrix is determined as the correction parameter corresponding to the pixel to be corrected.
  • the preset coefficient can be specifically set according to the actual application scenario, for example, it can be set to 0.5 or 0.6.
  • each neighboring pixel of the pixel to be corrected If there are a plurality of neighboring pixels in each neighboring pixel of the pixel to be corrected and the neighboring difference between the pixel to be corrected satisfies the preset difference condition, then it can be calculated according to the sequence of the neighboring difference between the pixel and its neighboring noise interfering pixels In order, the correction parameters corresponding to the pixels to be corrected are updated sequentially. Neighboring differences between each neighboring pixel that satisfies the preset difference condition and the pixel to be corrected all participate in the calculation or update of the correction parameter corresponding to the pixel to be corrected.
  • FIG. 3 is a schematic diagram of each pixel in the thermal image to be corrected.
  • pixel e is a noise interference pixel
  • pixels a, b, c, and d are neighboring pixels of noise interference pixel e.
  • the noise-interfering pixel e may be the pixel to be corrected.
  • the adjacent difference between pixel a and noise interference pixel e, the adjacent difference between pixel b and noise interference pixel e, the adjacent difference between pixel c and noise interference pixel e, and the adjacent difference between pixel d and noise interference pixel e all satisfy Preset the difference condition, that is, the noise interference pixel e is the pixel to be corrected, and at the same time, the adjacent difference between each pixel and the noise interference pixel e in its neighborhood is calculated sequentially according to the order of pixel a, pixel b, pixel c, and pixel d, then it can be After calculating the adjacent difference between pixel a and pixel e to be corrected, the correction parameters corresponding to pixel e to be corrected are determined based on the adjacent difference between pixel a and pixel e to be corrected, and then the adjacent difference between pixel b and pixel e to be corrected is calculated Then, update the correction parameters corresponding to the pixel e to be corrected based on the adjacent difference between the pixel
  • the sum of the correction parameter and the pixel value of the pixel to be corrected may be used as the corrected pixel value of the corresponding pixel in the thermal image to be corrected. After the pixel value of each pixel to be corrected in the thermal image to be corrected is replaced with the corrected pixel value, a corrected thermal image is obtained.
  • the determining the correction parameter corresponding to the pixel to be corrected based on the adjacent difference includes: determining the Correction parameters corresponding to pixels to be corrected.
  • the preset correction degree parameter can be set to a smaller value, and the correction accuracy is given priority.
  • the thermal imaging device is in a static state, the scene changes slightly, and the selection of noise interference pixels is difficult and the reliability is low.
  • the preset correction degree parameters can be set smaller, and the correction accuracy is given priority.
  • the preset correction degree parameters corresponding to different motion states are different, and the value of the preset correction degree parameter is larger when the thermal imaging device is in a high-speed motion state, and the preset correction degree parameter is moderate when the thermal imaging device is in a low-speed motion state.
  • the preset correction degree parameter is extremely small when the thermal imaging device is in a stationary state.
  • the product of the adjacent difference, the preset coefficient and the preset correction degree parameter may be determined as the correction parameter corresponding to the pixel to be corrected.
  • Step C1 defining a matrix of all zero correction parameters.
  • Step C2 traversing each pixel in the thermal image to be corrected that has noise interference pixels in its neighborhood, and using the following formula to calculate the adjacent difference between the currently traversed pixel and the noise interference pixels in its neighborhood:
  • dif is the adjacent difference between the currently traversed pixel and the noise interference pixel in its neighborhood
  • Y(i,j) is the pixel value of the currently traversed pixel (i,j) of the thermal image to be corrected
  • Y neighbor is the current
  • Correct1 is a matrix of correction parameters
  • Correct1(i, j) is the value of the element corresponding to the currently traversed pixel in the matrix of correction parameters
  • Correct1 neighbor is the value of the element corresponding to the noise interference pixel in the neighborhood of the currently traversed pixel (i, j) in the correction parameter matrix.
  • Step C3 determine whether the adjacent difference is greater than the preset difference threshold corresponding to the motion state, if yes, execute step C4, otherwise execute step C5.
  • Step C4 setting the preset difference threshold to 0.
  • Step C5 using the following formula to update the correction parameter matrix according to the preset difference threshold and the preset correction degree parameter corresponding to the motion state:
  • dif is the adjacent difference between the currently traversed pixel and the noise interference pixel in its neighborhood
  • lr is the preset correction degree parameter corresponding to the motion state
  • Correct1 neighbor on the right side of the equation is the matrix of correction parameters
  • the value of the position element corresponding to the noise interference pixel, and the Correct1 neighbor on the right side of the equation is the matrix of the updated correction parameters.
  • the non-zero dif value can be calculated only when there are noise interference pixels in the neighborhood pixels of the currently traversed pixel, and the value of the neighborhood element of the Correct1 matrix can be updated, otherwise the value of the neighborhood element of the Correct1 matrix cannot be updated. Therefore, in this embodiment, it is possible to find out the pixels with noise interference pixels in the neighborhood of the thermal image to be corrected based on the noise interference pixels, and perform traversal, which reduces the amount of calculation for calculating the target correction matrix.
  • Step C6 when all the pixels in the thermal image to be corrected that have noise interfering pixels in their neighborhood are traversed, the final updated target matrix of the correction parameters can be obtained.
  • the correction parameter of the pixel to be corrected is the element value of the corresponding position in the target matrix.
  • the preset correction degree parameters corresponding to different exercise states are different.
  • the different preset correction degree parameters corresponding to the different motion states may include: the value of the preset correction degree parameter corresponding to the high-speed motion state is greater than the value of the preset correction degree parameter corresponding to the low-speed motion state, and /or, the value of the preset correction degree parameter corresponding to the low-speed motion state is greater than the value of the preset correction degree parameter corresponding to the static state.
  • the correction effects corresponding to each frame of the thermal image to be corrected can be accumulated, that is, the correction effect of the current thermal image to be corrected will affect the correction of the next frame of the thermal image to be corrected, therefore, as the corrected image
  • the increase in the number of the thermal image to be corrected needs to reduce the value of the preset correction degree parameter, so as to reduce the correction effect of the thermal image to be corrected on the correction effect of the thermal image to be corrected in the next frame, and avoid the correction effect of the thermal image to be corrected on the next frame to be corrected. If the correction effect of the corrected thermal image is too large, the image correction accuracy of the next frame of the thermal image to be corrected will be affected.
  • the preset correction degree parameter can be attenuated as the number of corrected images increases; Attenuation as the number increases, when the thermal imaging device is in a static state, the preset correction degree parameters usually do not attenuate.
  • the preset correction degree parameter can be attenuated with the increase in the number of corrected images.
  • the degree parameter can be attenuated to 1/2 of the original value, usually it can be attenuated up to 3 times.
  • the preset correction degree parameters can be attenuated as the number of corrected images increases.
  • the attenuation is 1/2 of the original, and usually can be attenuated up to 3 times.
  • the calculation of the correction parameters utilizes the motion state of the thermal imaging device, the upper limit of the dif value in the high-speed motion state and the high-speed motion state is large, and the upper limit of the dif in the static state is small, and each dif value exceeds the upper limit.
  • correction degree parameter calculation also uses noise interference pixels, that is, pixels with noise interference pixels in the neighborhood can be updated, and the center pixel does not need to be noise interference pixels, which further reduces the calculation amount of calculation correction parameters and improves Image Correction Efficiency.
  • the step of performing preliminary correction on the target thermal image to obtain the preliminary corrected thermal image may include the following steps D1-D2:
  • Step D1 Obtain an accumulated correction parameter obtained by accumulating correction parameters corresponding to frames of thermal images preceding the target thermal image.
  • Step D2 Preliminary correction is performed on the target thermal image based on the accumulated correction parameters to obtain the preliminary corrected thermal image.
  • FIG. 4 is a schematic diagram of thermal imaging image correction.
  • the thermal image to be corrected is the preliminary corrected thermal image obtained by preliminary correction of the target thermal image, as shown in Figure 4, then for the preliminary corrected thermal image Y1, the noise interference pixels can be selected to calculate the correction parameter Correct1, and then the correction parameter can be used Correct1 correction preliminarily corrects the thermal image Y1, and obtains the output of the corrected thermal image Y2.
  • the correction parameter Correct1 can also be added to the cumulative correction parameter Correct to update the cumulative correction parameter Correct, and then the updated cumulative correction parameter Correct can be used for preliminary correction of the next frame of the thermal image to be corrected. Correction.
  • each motion state updates the cumulative correction parameter Correct with a lower correction degree parameter, so as to monitor the newly added fixed pattern noise and continuously optimize the image.
  • the adjacent difference between the current corrected thermal image Y2 and the pixels of each player in the preliminary corrected thermal image Y1 needs to be reserved for use in determining the noise interference pixels of the next thermal image to be corrected.
  • the difference between the neighboring difference and the correction parameter can also be determined as the difference between the corresponding pixel and its neighboring pixels in the corrected thermal image Neighboring difference, used to determine the noise interference pixels in the thermal image to be corrected in the next frame.
  • the correction parameters calculated by each frame of the thermal image to be corrected are accumulated and used for preliminary correction of the next frame of the thermal image to be corrected, which not only improves the error tolerance rate, but also corrects the previous correction error , which ensures the correctness of the general direction of correction.
  • the motion state and the target screening conditions are combined to jointly determine the noise interference pixels of the preliminary corrected thermal image, and then use the noise interference pixels of the preliminary corrected thermal image to perform fine correction on the preliminary corrected thermal image, which greatly improves the image quality. Calibration accuracy.
  • Figure 5(a) is an outdoor thermal image to be corrected
  • Figure 5(b) is the corrected outdoor thermal image to be corrected shown in Figure 5(a) by applying the thermal imaging image correction method provided by this application.
  • thermal image Comparing Fig. 5(a) and Fig. 5(b), it can be seen that the corrected thermal image shown in Fig. 5(b) has less fixed patterns such as pitting and vertical lines than the thermal image to be corrected shown in Fig. 5(a). Noise is corrected out.
  • Figure 6(a) is another outdoor thermal image to be corrected
  • Figure 6(b) is the correction obtained by applying the thermal imaging image correction method provided by this application to correct the outdoor thermal image to be corrected shown in Figure 6(a) After thermal image. Comparing Figure 6(a) and Figure 6(b), it can be seen that compared with the thermal image to be corrected shown in Figure 6(a), the corrected thermal image shown in Figure 6(b) has fixed patterns such as pits and vertical lines Noise is corrected out.
  • an embodiment of the present application further provides a thermal imaging image correction device.
  • the thermal imaging image correction device provided by the embodiment of the present application is introduced below. As shown in Figure 7, a thermal imaging image correction device, the device includes:
  • a motion state determination module 701 configured to determine the motion state of the thermal imaging device corresponding to the thermal image to be corrected
  • Interference pixel determination module 702 configured to determine from the thermal image to be corrected by using the target screening condition corresponding to the motion state Noise interference pixels; among them, the target screening conditions corresponding to different motion states are different;
  • An image correction module 703, configured to correct the thermal image to be corrected according to the noise interference pixels.
  • the device determine the motion state of the thermal imaging device corresponding to the thermal image to be corrected; use the target screening condition corresponding to the motion state to determine noise interference pixels from the thermal image to be corrected; according to the noise
  • the interfering pixels correct the thermal image to be corrected.
  • the target screening conditions corresponding to different motion states are different, that is, the corresponding noise interference pixels can be determined for different motion states of the thermal imaging equipment, and then the noise interference pixels corresponding to the motion state can be used to correct the thermal image to be corrected, so that different
  • the effect of accurate correction of the thermal image to be corrected in the moving state improves the accuracy of image correction.
  • the device also includes:
  • Adjacent difference determining module (not shown in Fig. 7), is used for determining the adjacent difference of each pixel in the thermal image to be corrected relative to its neighboring pixels; in the target screening conditions corresponding to different motion states, the noise interference pixel relative to its Neighboring disparity requirements are different for neighboring pixels.
  • the motion state includes at least two of the following motion states: a high-speed motion state, a low-speed motion state, and a static state;
  • the target screening conditions include: the gray scale of the pixel in the thermal image to be corrected and the pixel gray scale corresponding to the thermal image of the reference frame represent different targets, and the adjacent difference of the pixel in the thermal image to be corrected is different from that of the thermal image of the reference frame If the difference between adjacent differences of pixels at the corresponding position is less than the preset difference threshold, the pixel at the corresponding position in the thermal image to be corrected is determined as a noise interference pixel;
  • the target screening conditions corresponding to the different motion states have different requirements on the neighbor difference between the noise interference pixel and its adjacent pixels, including: the preset difference threshold corresponding to the high-speed motion state is greater than the preset difference corresponding to the low-speed motion state value threshold, and/or, the preset difference threshold corresponding to the low-speed motion state is greater than the preset difference threshold corresponding to the stationary state.
  • the target screening condition corresponding to the high-speed motion state further includes: the grayscale of the pixel in the thermal image to be corrected and the pixel grayscale of the corresponding position in the thermal image of the reference frame indicate the same target, and the thermal image to be corrected If the difference between the adjacent difference of the pixel in the image and the adjacent difference of the pixel at the corresponding position of the thermal image of the reference frame is less than the preset difference threshold, the pixel at the corresponding position in the thermal image to be corrected is determined as a noise interference pixel ;
  • the pixel gray level in the thermal image to be corrected and the pixel gray level corresponding to the thermal image of the reference frame represent different targets, and the corresponding preset difference threshold is greater than the same target. Preset difference threshold.
  • the target screening condition further includes: the sum of the neighboring difference of the pixel in the thermal image to be corrected and the neighboring difference of the pixel corresponding to the thermal image of the reference frame is less than a preset sum value threshold;
  • the target screening conditions corresponding to the different motion states have different requirements on the neighbor difference between the noise interference pixel and its adjacent pixels, including: the preset sum value threshold corresponding to the high-speed motion state is greater than the preset sum value threshold corresponding to the low-speed motion state value threshold, and/or, the preset sum value threshold corresponding to the low-speed motion state is greater than the preset sum value threshold corresponding to the stationary state.
  • the target screening conditions corresponding to the high-speed motion state further include:
  • the pixel grayscale in the thermal image to be corrected and the pixel grayscale corresponding to the reference frame thermal image represent a different target and the corresponding preset sum value threshold is greater than the same target. Preset and value thresholds.
  • the image correction module 703 includes:
  • a difference determination sub-module (not shown in FIG. 7 ), which is used to determine the adjacent difference between the pixel and the noise interference pixel in its neighborhood for each pixel in the thermal image to be corrected that has a noise interference pixel in its neighborhood;
  • a pixel determination sub-module (not shown in FIG. 7 ), configured to determine that the noise interference pixel is a pixel to be corrected if the adjacent difference satisfies a preset difference condition; wherein, the preset difference condition indicates that the pixel and its neighbors The noise interference pixels in the domain correspond to the same target, and the preset difference conditions corresponding to different motion states are different;
  • a correction parameter determination submodule (not shown in FIG. 7 ), configured to determine a correction parameter corresponding to the pixel to be corrected based on the adjacent difference;
  • the image correction sub-module (not shown in FIG. 7 ) is configured to correct the pixel to be corrected according to the correction parameter to obtain a corrected thermal image.
  • the preset difference condition includes that the adjacent difference is not greater than a preset difference threshold
  • the different preset difference conditions corresponding to different motion states include: the preset difference threshold corresponding to the high-speed motion state is greater than the The preset difference threshold corresponding to the low-speed motion state, and/or, the preset difference threshold corresponding to the low-speed motion state is greater than the preset difference threshold corresponding to the stationary state.
  • the correction parameter determination submodule is specifically configured to perform preset corrections corresponding to the proximity difference and the motion state
  • the degree parameter is used to determine the correction parameter corresponding to the pixel to be corrected; wherein, the preset correction degree parameters corresponding to different motion states are different.
  • the different preset correction degree parameters corresponding to different motion states include: the value of the preset correction degree parameter corresponding to the high-speed motion state is greater than the value of the preset correction degree parameter corresponding to the low-speed motion state, and /or, the value of the preset correction degree parameter corresponding to the low-speed motion state is greater than the value of the preset correction degree parameter corresponding to the static state.
  • the motion state determination module 701 is specifically configured to acquire multiple sets of angular velocities of the thermal imaging device corresponding to the thermal image to be corrected, wherein each set of angular velocities includes swing angular velocity, tilt angular velocity and flip angular velocity at least one angular velocity; calculating the extreme difference and the sum value between each type of angular velocity; based on the extreme difference and the sum value, determining the motion state of the thermal imaging device as a high-speed motion state, a low-speed motion state or a static state state.
  • the motion state determination module 701 is specifically configured to, if the range is not less than a first preset range threshold and the sum value is not less than a first preset sum threshold, set the thermal imaging device to The motion state of is determined to be a high-speed motion state; if the range is less than the first preset range threshold and the sum is less than the first preset sum threshold, when the range is greater than the second preset range threshold and When the sum value is greater than a second preset sum value threshold, the motion state of the thermal imaging device is determined as a low-speed motion state; wherein, the first preset extreme difference threshold is greater than the second preset extreme difference threshold difference threshold, the first preset sum threshold is greater than the second preset sum threshold; if the range is not greater than the second preset range threshold and the sum is not greater than the second preset sum Threshold, determining the motion state of the thermal imaging device as a static state.
  • the thermal image to be corrected is a target thermal image that needs to be processed, or the thermal image to be corrected is a preliminary corrected thermal image obtained by performing preliminary correction on the target thermal image.
  • the device also includes:
  • a preliminary correction module (not shown in FIG. 7 ), which is used to obtain the cumulative correction parameters obtained by accumulating the correction parameters corresponding to the thermal images of each frame before the thermal image of the target; based on the cumulative correction parameters, the target thermal image Preliminary correction is performed to obtain the preliminary corrected thermal image.
  • the embodiment of the present application also provides an electronic device, as shown in FIG. 8 , including a processor 801, a communication interface 802, a memory 803, and a communication bus 804. complete the mutual communication,
  • the processor 801 is configured to implement the steps of the thermal imaging image correction method described in any one of the above-mentioned embodiments when executing the program stored in the memory 803 .
  • the communication bus mentioned above for the electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus or the like.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the electronic device and other devices.
  • the memory may include a random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
  • RAM Random Access Memory
  • NVM non-Volatile Memory
  • the memory may also be at least one storage device located far away from the aforementioned processor.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processor, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • CPU Central Processing Unit
  • NP Network Processor
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • a computer-readable storage medium is also provided.
  • a computer program is stored in the computer-readable storage medium.
  • the computer program is executed by a processor, any of the above-mentioned thermal imaging images can be realized.
  • the steps of the calibration method can be realized.
  • a computer program product including instructions is also provided, and when it is run on a computer, it causes the computer to execute any one of the thermal imaging image correction methods in the above embodiments.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, all or part of the process or function.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a Solid State Disk (SSD)).
  • SSD Solid State Disk

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Studio Devices (AREA)
  • Radiation Pyrometers (AREA)

Abstract

一种热成像图像校正方法和装置,方法包括:确定待校正热图像所对应热成像设备的运动状态;利用所述运动状态对应的目标筛选条件从所述待校正热图像中确定噪声干扰像素;根据所述噪声干扰像素对所述待校正热图像进行校正。不同运动状态对应的目标筛选条件不同,即可以针对热成像设备的不同运动状态确定出对应的噪声干扰像素,再利用该运动状态对应的噪声干扰像素对待校正热图像进行校正,达到了可以对不同运动状态下的待校正热图像进行准确校正的效果,提高了图像校正的正确率。

Description

一种热成像图像校正方法和装置
本申请要求于2022年1月29日提交中国专利局、申请号为202210109939.6、发明名称为“一种热成像图像校正方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理技术领域,特别是涉及一种热成像图像校正方法和装置。
背景技术
红外热成像设备普遍存在非均匀响应问题,主要表现为图像的固定图形噪声干扰情况比较严重。因此,针对图像的非均匀校正十分必要。目前,对图像进行非均匀校正的方法的过程为:针对红外热成像设备处于运动状态下所采集的图像,利用边缘检测算子对图像进行边缘检测,检测到的边缘作为目标轮廓,为避免将目标轮廓误引入校正结果中,所有边缘位置不进行固定图形噪声计算,并以每帧图像迭代形式得到可抵消固定图形噪声的校正矩阵,将校正矩阵叠加到原始图像上实现非均匀校正。
对于红外热成像设备处于静止状态下所采集的图像,计算图像的各个像素与其四邻域像素的灰阶差异,将灰阶差异处于预设的区间内的像素与其对应的邻域像素进行固定图形噪声计算,以每帧图像迭代形式得到可抵消固定图形噪声的校正矩阵,将校正矩阵叠加到原始图像上实现非均匀校正。
然而,针对上述运动状态对应的图像,如果场景内存在高温目标,会导致低温区域的图像边缘不易检测到,存在图像边缘漏检问题,如果场景整体温度偏低,则会导致检测出图像的过多边缘,存在图像边缘多检问题,而图像边缘多检问题和图像边缘漏检问题都会导致所计算的校正矩阵误差较大,导致图像校正错误。并且,由于上述图像校正方法是对整幅图像的各个像素无差别进行灰阶差异计算,这很容易导致计算得到的校正矩阵中包括图像中的目标信息,进而导致校正后的图像出现鬼影。针对上述静止状态对应的图像,由于是对灰阶差异处于预设的区间内的像素与其对应的邻域像素进行固定图形噪声计算,图像校正的准确率较低。因此,目前的图像非均匀校正方法存在图像校正准确率不高的问题。
发明内容
本申请实施例的目的在于提供一种热成像图像校正方法和装置,以提高图像校正的准确率。
第一方面,本申请实施例提供了一种热成像图像校正方法,包括:
确定待校正热图像所对应热成像设备的运动状态;
利用所述运动状态对应的目标筛选条件从所述待校正热图像中确定噪声干扰像素;其中,不同运动状态对应的目标筛选条件不同;
根据所述噪声干扰像素对所述待校正热图像进行校正。
可选的,所述方法还包括:
确定所述待校正热图像中各像素相对于其邻近像素的邻近差异;
不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同。
可选的,所述运动状态包括如下运动状态的至少两种:高速运动状态、低速运动状态、静止状态;
所述目标筛选条件包括:所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标,且待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值,则将所述待校正热图像中对应位置的像素确定为噪声干扰像素;
所述不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同包括:所述高速运动状态对应的预设差值阈值大于所述低速运动状态对应的预设差值阈值,和/或,所述低速运动状态对应的预设差值阈值大于所述静止状态对应的预设差值阈值。
可选的,所述高速运动状态对应的目标筛选条件还包括:所述待校正热图像中像素灰度与所述参照帧热图像对应位置的像素灰度表示相同目标,且所述待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值,则将所述待校正热图像中对应位置的像素确定为噪声干扰像素;
所述高速运动状态对应目标筛选条件中,所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时对应的预设差值阈值大于表示相同目标时对应的预设差值阈值。
可选的,所述目标筛选条件还包括:所述待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之和小于预设和值阈值;
所述不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同包括:所述高速运动状态对应的预设和值阈值大于所述低速运动状态对应的预设和值阈值,和/或,所述低速运动状态对应的预设和值阈值大于所述静止状态对应的预设和值阈值。
可选的,所述高速运动状态对应的目标筛选条件还包括:
所述高速运动状态对应目标筛选条件中,所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时对应的预设和值阈值大于表示相同目标时对应的预设和值阈值。
可选的,所述根据所述噪声干扰像素对所述待校正热图像进行校正,包括:
针对所述待校正热图像中邻域存在噪声干扰像素的各个像素,确定该像素与其邻域的该噪声干扰像素之间的邻近差异;
如果所述邻近差异满足预设差异条件,则确定该噪声干扰像素为待校正像素;其中,所述预设差异条件表示该像素与其邻域的该噪声干扰像素对应同一目标,不同运动状态对应的预设差异条件不同;
基于所述邻近差异确定所述待校正像素对应的校正参数;
根据所述校正参数对所述待校正像素进行校正,得到校正后的热图像。
可选的,所述预设差异条件包括所述邻近差异不大于预设差异阈值,所述不同运动状态对应的预设差异条件不同包括:所述高速运动状态对应的预设差异阈值大于所述低速运动状态对应的预设差异阈值,和/或,所述低速运动状态对应的预设差异阈值大于所述静止状态对应的预设差异阈值。
可选的,所述基于所述邻近差异确定所述待校正像素对应的校正参数,包括:
根据所述邻近差异和所述运动状态对应的预设校正程度参数,确定所述待校正像素对应的校正参数;其中,不同运动状态对应的预设校正程度参数不同。
可选的,所述不同运动状态对应的预设校正程度参数不同包括:所述高速运动状态对应的预设校正程度参数的值大于所述低速运动状态对应的预设校正程度参数的值,和/或,所述低速运动状态对应的预设校正程度参数的值大于所述静止状态对应的预设校正程度参数的值。
可选的,所述确定待校正热图像所对应热成像设备的运动状态,包括:
获取所述待校正热图像对应的所述热成像设备的多组角速度,其中,每组角速度包括摆动角速度、倾斜角速度和翻转角速度中的至少一种角速度;
计算每种类型的角速度之间的极差以及和值;
基于所述极差和所述和值,确定所述热成像设备的运动状态为高速运动状态、低速运动状态或静止状态。
可选的,所述基于所述极差和所述和值,确定所述热成像设备的运动状态为高速运动状态、低速运动状态或静止状态,包括:
如果所述极差不小于第一预设极差阈值且所述和值不小于第一预设和值阈值,将所述热成像设备的运动状态确定为高速运动状态;
如果所述极差小于第一预设极差阈值且所述和值小于第一预设和值阈值,在所述极差大于第二预设极差阈值以及所述和值大于第二预设和值阈值的情况下,将所述热成像设备的运动状态确定为低速运动状态;其中,所述第一预设极差阈值大于所述第二预设极差阈值,所述第一预设和值阈值大于所述第二预设和值阈值;
如果所述极差不大于第二预设极差阈值且所述和值不大于第二预设和值阈值,将所述热成像设备的运动状态确定为静止状态。
可选的,所述待校正热图像为需要处理的目标热图像,或,所述待校正热图像为对所述目标热图像进行初步校正得到的初步校正热图像。
可选的,所述方法还包括:
获取所述目标热图像之前的各帧热图像对应的校正参数累加所得到的累加校正参数;
基于所述累加校正参数对所述目标热图像进行初步校正,得到所述初步校正热图像。
第二方面,本申请实施例提供了一种热成像图像校正装置,包括:
运动状态确定模块,用于确定待校正热图像所对应热成像设备的运动状态;
干扰像素确定模块,用于利用所述运动状态对应的目标筛选条件从所述待校正热图像中确定噪声干扰像素;其中,不同运动状态对应的目标筛选条件不同;
图像校正模块,用于根据所述噪声干扰像素对所述待校正热图像进行校正。
可选的,所述装置还包括:
邻近差异确定模块,用于确定所述待校正热图像中各像素相对于其邻近像素的邻近差异;不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同;
所述运动状态包括如下运动状态的至少两种:高速运动状态、低速运动状态、静止状态;
所述目标筛选条件包括:所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标,且待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值,则将所述待校正热图像中对应位置的像素确定为噪声干扰像素;
所述不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同包括:所述高速运动状态对应的预设差值阈值大于所述低速运动状态对应的预设差值阈值,和/或,所述低速运动状态对应的预设差值阈值大于所述静止状态对应的预设差值阈值;
所述高速运动状态对应的目标筛选条件还包括:所述待校正热图像中像素灰度与所述参照帧热图像对应位置的像素灰度表示相同目标,且所述待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值,则将所述待校正热图像中对应位置的像素确定为噪声干扰像素;
所述高速运动状态对应目标筛选条件中,所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时对应的预设差值阈值大于表示相同目标时对应的预设差值阈值;
所述目标筛选条件还包括:所述待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之和小于预设和值阈值;
所述不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同包括:所述高速运动状态对应的预设和值阈值大于所述低速运动状态对应的预设和值阈值,和/或,所述低速运动状态对应的预设和值阈值大于所述静止状态对应的预设和值阈值;
所述高速运动状态对应的目标筛选条件还包括:
所述高速运动状态对应目标筛选条件中,所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时对应的预设和值阈值大于表示相同目标时对应的预设和值阈值;
所述图像校正模块,包括:
差异确定子模块,用于针对所述待校正热图像中邻域存在噪声干扰像素的各个像素,确定该像素与其邻域的该噪声干扰像素之间的邻近差异;
像素确定子模块,用于如果所述邻近差异满足预设差异条件,则确定该噪声干扰像素为待校正像素;其中,所述预设差异条件表示该像素与其邻域的该噪声干扰像素对应同一目标,不同运动状态对应的预设差异条件不同;
校正参数确定子模块,用于基于所述邻近差异确定所述待校正像素对应的校正参数;
图像校正子模块,用于根据所述校正参数对所述待校正像素进行校正,得到校正后的热图像;
所述预设差异条件包括所述邻近差异不大于预设差异阈值,所述不同运动状态对应的预设差异条件不同包括:所述高速运动状态对应的预设差异阈值大于所述低速运动状态对应的预设差异阈值,和/或,所述低速运动状态对应的预设差异阈值大于所述静止状态对应的预设差异阈值;
所述校正参数确定子模块,具体用于根据所述邻近差异和所述运动状态对应的预设校正程度参数,确定所述待校正像素对应的校正参数;其中,不同运动状态对应的预设校正程度参数不同;
所述不同运动状态对应的预设校正程度参数不同包括:所述高速运动状态对应的预设校正程度参 数的值大于所述低速运动状态对应的预设校正程度参数的值,和/或,所述低速运动状态对应的预设校正程度参数的值大于所述静止状态对应的预设校正程度参数的值;
所述运动状态确定模块,具体用于获取所述待校正热图像对应的所述热成像设备的多组角速度,其中,每组角速度包括摆动角速度、倾斜角速度和翻转角速度中的至少一种角速度;计算每种类型的角速度之间的极差以及和值;基于所述极差和所述和值,确定所述热成像设备的运动状态为高速运动状态、低速运动状态或静止状态;
所述运动状态确定模块,具体用于如果所述极差不小于第一预设极差阈值且所述和值不小于第一预设和值阈值,将所述热成像设备的运动状态确定为高速运动状态;如果所述极差小于第一预设极差阈值且所述和值小于第一预设和值阈值,在所述极差大于第二预设极差阈值以及所述和值大于第二预设和值阈值的情况下,将所述热成像设备的运动状态确定为低速运动状态;其中,所述第一预设极差阈值大于所述第二预设极差阈值,所述第一预设和值阈值大于所述第二预设和值阈值;如果所述极差不大于第二预设极差阈值且所述和值不大于第二预设和值阈值,将所述热成像设备的运动状态确定为静止状态;
所述待校正热图像为需要处理的目标热图像,或,所述待校正热图像为对所述目标热图像进行初步校正得到的初步校正热图像;
所述装置还包括:
初步校正模块,用于获取所述目标热图像之前的各帧热图像对应的校正参数累加所得到的累加校正参数;基于所述累加校正参数对所述目标热图像进行初步校正,得到所述初步校正热图像。
第三方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的程序时,实现上述第一方面任一所述的方法步骤。
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面任一所述的方法步骤。
第五方面,本申请实施例提供了一种包含指令的计算机程序产品,所述计算机程序产品被计算机执行时实现上述第一方面任一所述的方法步骤。
本申请实施例有益效果:
采用本申请实施例提供的方法,确定待校正热图像所对应热成像设备的运动状态;利用所述运动状态对应的目标筛选条件从所述待校正热图像中确定噪声干扰像素;根据所述噪声干扰像素对所述待校正热图像进行校正。不同运动状态对应的目标筛选条件不同,即可以针对热成像设备的不同运动状态确定出对应的噪声干扰像素,再利用该运动状态对应的噪声干扰像素对待校正热图像进行校正,达到了可以对不同运动状态下的待校正热图像进行准确校正的效果,提高了图像校正的正确率。当然,实施本申请的任一产品或方法并不一定需要同时达到以上所述的所有优点。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。
图1为本申请实施例提供的热成像图像校正方法的一种流程图;
图2为本申请实施例提供的对待校正热图像进行校正的一种流程图;
图3为待校正热图像中各个像素的一种示意图;
图4为热成像图像校正的一种示意图;
图5(a)为一种室外待校正热图像;
图5(b)为应用本申请提供的热成像图像校正方法对图5(a)所示的室外待校正热图像进行校正得到的校正后的热图像;
图6(a)为另一种室外待校正热图像;
图6(b)为应用本申请提供的热成像图像校正方法对图6(a)所示的室外待校正热图像进行校正 得到的校正后的热图像;
图7为本申请实施例提供的热成像图像校正装置的一种结构图;
图8为本申请实施例提供的电子设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
红外热成像机芯、热像仪等热成像设备在进行红外成像时,可能会存在由非均匀响应、镜头透过率不均或机身辐射造成的各像元响应不一致的现象,该现象会导致输出的红外图像存在固定图形噪声。对于无挡片结构的热成像机芯,其输出的红外图像的固定图形噪声也尤为严重。其中,图像的固定图像噪声一般表现为浮在图像表面的麻点或竖线。因此,对图像的固定图形噪声进行校正十分必要。
而为了提高图像校正的准确率,本申请实施例提供了一种热成像图像校正方法、装置、电子设备、计算机可读存储介质以及计算机程序产品。
下面首先对本申请实施例所提供的热成像图像校正方法进行介绍。本申请实施例所提供的热成像图像校正方法可以应用于具有图像处理功能的任何电子设备,在此不做具体限定。
图1为本申请实施例提供的热成像图像校正方法的一种流程图,如图1所示,所述方法包括:
S101,确定待校正热图像所对应热成像设备的运动状态。
S102,利用所述运动状态对应的目标筛选条件从所述待校正热图像中确定噪声干扰像素。
其中,不同运动状态对应的目标筛选条件不同。
S103,根据所述噪声干扰像素对所述待校正热图像进行校正。
可见,采用本申请实施例提供的方法,确定待校正热图像所对应热成像设备的运动状态;利用所述运动状态对应的目标筛选条件从所述待校正热图像中确定噪声干扰像素;根据所述噪声干扰像素对所述待校正热图像进行校正。不同运动状态对应的目标筛选条件不同,即可以针对热成像设备的不同运动状态确定出对应的噪声干扰像素,再利用该运动状态对应的噪声干扰像素对待校正热图像进行校正,达到了可以对不同运动状态下的待校正热图像进行准确校正的效果,提高了图像校正的正确率。
本申请实施例中,待校正热图像可以为需要处理的目标热图像,或,待校正热图像也可以为对目标热图像进行初步校正得到的初步校正热图像。
其中,目标热图像可以为热成像设备采集的未经过处理的原始热图像,或,目标热图像也可以为对热成像设备采集的原始热图像进行初步图像处理后得到的图像。初步图像处理可以包括图像增强处理、图像复原处理和图像分割处理等,在此不做具体限定。
在一种可能的实施方式中,由于热成像设备的角速度变化可以反映热成像设备的运动情况,所以可以获取热成像设备的角速度的变化情况,并利用角速度的变化情况来确定待校正热图像对应的热成像设备的运动状态,所述运动状态一般包括高速运动状态、中速运动状态、低速运动状态和静止状态等。
具体的,上述确定待校正热图像所对应热成像设备的运动状态的步骤,可以包括步骤A1-步骤A3:
步骤A1:获取所述待校正热图像对应的所述热成像设备的多组角速度。其中,待校正热图像对应的热成像设备为采集待校正热图像对应的原始热图像的热成像设备。每组角速度可以包括摆动角速度、倾斜角速度和翻转角速度中的至少一种。
本实施方式中,可以采用角速度检测装置,如陀螺仪,检测热成像设备的多种角速度,如摆动角速度、倾斜角速度和翻转角速度三种类型的角速度。其中,摆动角速度反映了热成像设备“左右摆动”运动方向的角速度,倾斜角速度反映了热成像设备“左右倾斜”运动方向的角速度,翻转角速度反映了热成像设备“前后翻转”运动方向的角速度。
具体的,本实施方式中,可以获取陀螺仪检测到的、热成像设备从采集到待校正热图像对应的原始热图像的前一热图像到采集原始热图像对应的时间段内的多组角速度。举例说明,热成像设备采集 到原始热图像的前一热图像的时刻为t1,热成像设备采集到原始热图像的时刻为t2,时间段[t1,t2]内陀螺仪检测到了热成像设备的3组角速度。则本步骤可以获取时间段[t1,t2]内热成像设备的多组角速度,例如,获取3组角速度分别为:(α1,β1,γ1)、(α2,β2,γ2)和(α3,β3,γ3),其中,α1-α3为摆动角速度,β1-β3为倾斜角速度,γ1-γ3为翻转角速度。
步骤A2:计算每种类型的角速度之间的极差以及和值。
本步骤中,针对每两组角速度,可以计算这两组中相同类型的角速度之间的差值,然后将每种类型的最大的差值确定为该类型的角速度之间的极差。例如,针对摆动角速度可以计算差值:(α1-α2)、(α1-α3)和(α2-α3),并将其中最大的差值确定为摆动角速度对应的极差;针对倾斜角速度可以计算差值:(β1-β2)、(β1-β3)和(β2-β3),并将其中最大的差值确定为倾斜角速度对应的极差;针对翻转角速度可以计算差值:(γ1-γ2)、(γ1-γ3)和(γ2-γ3),并将其中最大的差值确定为翻转角速度对应的极差。
针对每种类型的角速度,可以将该类型的多个角速度相加,得到该类型的多个角速度的和值。例如,可以计算得到摆动角速度的和值为:(α1+α2+α3),可以计算得到倾斜角速度的和值为:(β1+β2+β3),可以计算得到翻转角速度的和值为:(γ1+γ2+γ3)。
步骤A3:基于所述极差和所述和值,确定所述热成像设备的运动状态为高速运动状态、低速运动状态或静止状态。
所述极差可以反映从采集原始热图像的前一热图像到采集原始热图像周期内角速度的最大变化量,所述和值可以反映采集两帧图像周期内热成像设备机芯走过的路程。
具体的,如果所述极差不小于第一预设极差阈值且所述和值不小于第一预设和值阈值,将所述热成像设备的运动状态确定为高速运动状态;
如果所述极差小于第一预设极差阈值且所述和值小于第一预设和值阈值,在所述极差大于第二预设极差阈值以及所述和值大于第二预设和值阈值的情况下,将所述热成像设备的运动状态确定为低速运动状态;
如果所述极差不大于第二预设极差阈值且所述和值不大于第二预设和值阈值,将所述热成像设备的运动状态确定为静止状态。
其中,所述第一预设极差阈值、所述第二预设极差阈值、所述第一预设和值阈值和所述第二预设和值阈值均可以根据实际应用情况进行设定,此处不做具体限定,并且所述第一预设极差阈值大于所述第二预设极差阈值,所述第一预设和值阈值大于所述第二预设和值阈值。
本申请实施例中,可以先根据第一预设极差阈值与第一预设和值阈值,确定出热成像设备的运动状态是否为高速运动状态,如果不是的情况下,再继续根据第二预设极差阈值与第二预设和值阈值,确定出热成像设备的运动状态是否为低速运动状态,以及是否为静止状态。
可见,在本实施方式中,基于陀螺仪输出的多组角速度数据可以将热成像设备的运动状态划分为高速运动状态、低速运动状态和静止状态三种,不仅可以确定出热成像设备处于运动状态或非运动状态,还可以确定热成像设备运动的快慢程度,能够实现高精度判断热成像设备的运动状态。本实施方式中,对于不符合高速运动状态确定条件但实际运动速度已达高速的情况,即高速运动状态漏检数据,其大概率会满足后续的低速运动状态确定条件,对这类情况下的待校正热图像也能够按照低速运动状态进行一定的校正,达到一定的校正效果,同理,对于不满足低速运动状态确定条件但实际为低速的情况,即低速运动状态漏检数据,可以通过静止状态对应的目标筛选条件筛选出的噪声干扰像素对待校正热图像进行校正,达到一定的校正效果,保证了校正的正确率。
确定了热成像设备的运动状态后,在上述步骤S102中,可以利用运动状态对应的目标筛选条件从待校正热图像中确定噪声干扰像素。其中,不同运动状态对应的目标筛选条件不同。由于热成像设备的运动状态不同时对应的待校正热图像中的固定图像噪声干扰像素的筛选困难程度是不同的,因此,针对不同运动状态对应的待校正热图像,需要结合运动状态筛选出待校正热图像中的噪声干扰像素。所以利用运动状态对应的目标筛选条件可以从待校正热图像中确定出准确的噪声干扰像素。进而,可以执行上述步骤S103,即根据噪声干扰像素对待校正热图像进行校正。
在一种可能的实施方式中,由于噪声干扰像素与其邻近像素之间的灰度值的差异具有一定规律,例如,对于固定图形噪声干扰像素来说,无论是由热成像设备的机芯运动引发场景变化,还是机芯静止时场景内目标运动,固定图形噪声干扰像素的位置始终固定,且固定图形噪声干扰像素所在像素与邻近像素之间的灰度值的差异变化较小。所以噪声干扰像素可以通过待校正热图像前后帧各像素的灰度值变化,以及其与邻近像素的邻近差异的变化而选取。所以为了准确筛选出噪声干扰像素,可以确定所述待校正热图像中各像素相对于其邻近像素的邻近差异,利用邻近差异与目标筛选条件从待校正热图像中确定出噪声干扰像素。
并且,热成像设备在高速运动状态时场景变化大,噪声干扰像素选取难度较低且可靠,热成像设备在低速运动状态时场景变化小,噪声干扰像素选取可靠性降低,热成像设备在静止状态时场景变化微弱,噪声干扰像素选取难度大且可靠性低。即不同运动状态下场景变化不同,基于此,不同运动状态下对应的待校正热图像中的噪声干扰像素也是不同的,因此,不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求也不同。
本实施方式中,可以确定待校正热图像中各像素相对于其邻近像素的灰度差异,作为待校正热图像中各像素相对于其邻近像素的邻近差异。或者,本实施方式中,也可以采用如下步骤B1-B2所述的方法,确定所述待校正热图像中各像素相对于其邻近像素的邻近差异:
步骤B1:预先设置全零的邻近差异矩阵;遍历所述待校正热图像的像素,计算当前遍历的像素和其邻域像素之间的像素值的差值,与所述当前遍历的像素在邻近差异矩阵中对应的元素和其邻域元素之间的元素值差值的和值,作为所述当前遍历的像素与其邻域像素的像素差异。
像素的邻近像素可以为该像素的邻域像素,例如,像素的邻近像素可以为其4邻域或8邻域像素等。或者,像素的邻近像素也可以为与该像素距离在预设像素距离范围内的像素,其中,预设像素距离可以设定为相邻两个像素之间的间距或相邻两个像素之间的间距的两倍等,此处不做具体限定。
当前遍历的像素的邻域像素可以为:当前遍历的像素每个四邻域像素,即当前遍历的像素的左、右、上、下最邻近的像素。邻域元素可以为:邻近差异矩阵中与所述当前遍历的像素对应的元素的每个四邻域元素,即邻近差异矩阵中与所述当前遍历的像素对应的元素的左、右、上、下最邻近的元素。
具体的,本实施方式中可以采用如下公式计算计算当前遍历的像素和其邻域像素之间的像素值的差值,与所述当前遍历的像素在邻近差异矩阵中对应的元素和其邻域元素之间的元素值差值的和值,作为所述当前遍历的像素与其邻域像素的像素差异:
dif=Y(i,j)-Yneighbor+Correct_noise(i,j)-Correct_noiseneighbor
其中,dif为所述像素差异,Y(i,j)为待校正热图像中当前遍历的像素(i,j)的像素值,Correct_noise为邻近差异矩阵,Yneighbor为当前遍历的像素(i,j)的邻域像素的像素值,Correct_noise(i,j)为邻近差异矩阵中与当前遍历的像素对应的元素的值,Correct_noiseneighbor为邻近差异矩阵中与当前遍历的像素对应的元素的邻域元素的值。
步骤B2:基于所述像素差异,更新所述邻近差异矩阵中与所述邻域像素对应的元素的值,得到更新后的邻近差异矩阵,直至所述待校正热图像的像素均被遍历,得到目标邻近差异矩阵,则确定待校正热图像中各个像素相对于其邻近像素的邻近差异为所述目标邻近差异矩阵中对应元素的值。
本实施方式中,具体可以采用如下公式基于所述像素差异,更新所述邻近差异矩阵中与所述邻域像素对应的元素的值:
Correct_noiseneighbor=Correct_noiseneighbor+0.5*dif
当待校正热图像的像素均被遍历完后,可以得到更新完成的目标邻近差异矩阵Correct_noise,则可以确定待校正热图像中各个像素相对于其邻近像素的邻近差异为所述目标邻近差异矩阵中对应元素的值。
本申请实施例中,可以利用运动状态对应的目标筛选条件从待校正热图像中筛选噪声干扰像素。
在一种可能的实施方式中,由于无论是由热成像设备的机芯运动引发场景变化还是机芯静止时场景内目标运动,固定图形噪声的位置始终固定,且固定图形噪声所在像素与周边像素的灰度差异变化较小。因此,在待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度发生变化的基础上,待 校正热图像的该像素应从一个目标转移到了另一个目标上,由两个目标温度不同而造成待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度发生变化,则将待校正热图像的该像素确定为噪声干扰像素。因此,目标筛选条件可以包括:所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标,且待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值,则将所述待校正热图像中对应位置的像素确定为噪声干扰像素。其中,参照帧热图像通常可以为待校正热图像的前一帧热图像。
由于待校正热图像中位于同一目标内的两个像素之间的灰度差异始终是在正常的灰度差异范围内的,如果待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度之间的灰度差异大于预设灰度差异阈值,表示待校正热图像中对应位置的像素和参照帧热图像对应位置的像素之间的灰度差异超出了正常的灰度差异范围,即可以确定待校正热图像中对应位置的像素和参照帧热图像对应位置的像素位于不同目标。该灰度差异范围即预设灰度差异阈值,因此,当待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度之间的灰度差异大于运动状态对应的预设灰度差异阈值时,可以确定待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标。
本申请实施例中,由于热成像设备对应的各帧待校正热图像的固定图形噪声干扰像素的位置始终固定,且固定图形噪声干扰像素所在像素与邻近像素之间的灰度值的差异变化较小,即两帧图像之间对应位置的像素之间的邻近差异的差值也是在一定差值范围内的。该差值范围即预设差值阈值,因此,当待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值,且待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时,可以将当待校正热图像中该像素确定为噪声干扰像素。
本申请实施例中,由于热成像设备在高速运动状态时场景变化大,噪声干扰像素选取难度较低且可靠,待校正热图像与参照帧热图像对应位置的像素很容易就可以对应不同目标,因此可以将高速运动状态对应的预设灰度差异阈值设置的较小一些,这样可以确定出更多的噪声干扰像素,提高图像校正的准确率。热成像设备在低速运动状态时场景变化小,噪声干扰像素选取可靠性降低,因此,可以将低速运动状态对应的预设灰度差异阈值设置的较大一些,提高选取噪声干扰像素的门槛,保证噪声干扰像素的门槛的选取准确率,避免误选取噪声干扰像素的问题,进而保证图像校正的准确率。而热成像设备在静止状态时场景变化微弱,噪声干扰像素选取难度大且可靠性低,因此,可以将静止状态对应的预设灰度差异阈值设置的更大一些,进一步提高选取噪声干扰像素的门槛,保证噪声干扰像素的门槛的选取准确率,避免误选取噪声干扰像素的问题,保证图像校正的准确率。
所以不同运动状态对应的预设灰度差异阈值不同。并且,由于热成像设备处于高速运动状态时场景变化大,噪声干扰像素选取难度较低且可靠,热成像设备处于低速运动状态时场景变化小,噪声干扰像素选取可靠性降低,热成像设备处于静止状态时场景变化微弱,噪声干扰像素选取难度大且可靠性低。不同运动状态对应的预设灰度差异阈值不同可以包括:静止状态对应的预设灰度差异阈值大于低速运动状态对应的预设灰度差异阈值,和/或,低速运动状态对应的预设灰度差异阈值大于高速运动状态对应的预设灰度差异阈值。不同运动状态对应的预设灰度差异阈值的具体值可以根据实际应用的经验值进行设定,此处不做具体限定。
本申请实施例中,由于热成像设备在高速运动状态时场景变化大,待校正热图像与参照帧热图像对应位置的像素之间的对应位置的像素的邻近差异之间差值通常也较大,因此,可以将高速运动状态对应的预设差值阈值设置的较大一些,这样可以确定出更多的噪声干扰像素,提高图像校正的准确率。热成像设备在低速运动状态时场景变化小,待校正热图像与参照帧热图像对应位置的像素之间的对应位置的像素的邻近差异之间差值通常也较小,因此,可以将低速运动状态对应的预设差值阈值设置的较小一些,提高选取噪声干扰像素的门槛,避免误选取噪声干扰像素的问题,保证图像校正的准确率。而热成像设备在静止状态时场景变化微弱,待校正热图像与参照帧热图像对应位置的像素之间的对应位置的像素的邻近差异之间差值通常也更小,因此,可以将静止状态对应的预设差值阈值设置的更小一些,进一步提高选取噪声干扰像素的门槛,避免误选取噪声干扰像素的问题,保证图像校正的准确率。
所以不同运动状态对应的预设差值阈值不同,所述不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同可以包括:所述高速运动状态对应的预设差值阈值大于所述低速运动状态对应的预设差值阈值,和/或,所述低速运动状态对应的预设差值阈值大于所述静止状态对应的预设差值阈值。不同运动状态对应的预设差值阈值的具体值可以根据实际应用的经验值进行设定,此处不做具体限定。
在一种可能的实施方式中,由于热成像设备处于高速运动状态时场景变化大,在高速运动状态下当待校正热图像中该像素的像素灰度与参照帧热图像对应位置的像素灰度之间的灰度差异在高速运动状态对应的预设灰度差异阈值范围内时,有可能是该像素仍在一个较大较均匀的目标上运动,或者还可能是待校正热图像和参照帧热图像采集目标的辐射量相似。因此,所述高速运动状态对应的目标筛选条件还可以包括:所述待校正热图像中像素灰度与所述参照帧热图像对应位置的像素灰度表示相同目标,且所述待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值,则将所述待校正热图像中对应位置的像素确定为噪声干扰像素。
例如,待校正热图像中的目标为一块面积较大的灰色背景,当该像素在这块灰色背景上高速运动时,待校正热图像中该像素的像素灰度与参照帧热图像对应位置的像素灰度之间的灰度差异也在高速运动状态对应的预设灰度差异阈值范围内。则当待校正热图像中该像素的邻近差异与参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值时,可以将待校正热图像中对应位置的像素确定为噪声干扰像素。
本申请实施例中,当两个像素对应同一目标时,两个的灰度值是比较接近的,两个像素与自身邻近像素之间的邻近差异也是比较接近的,因此,当待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示相同目标时,待校正热图像中对应位置的邻近差异与参照帧热图像对应位置的像素的邻近差异之间的差值也是比较小的。当两个像素对应不同目标时,两个的灰度值是相差较大,两个像素与自身邻近像素之间的邻近差异也相差较大,因此,当待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时,待校正热图像中对应位置的邻近差异与参照帧热图像对应位置的像素的邻近差异之间的差值是较大的。所以,所述高速运动状态对应目标筛选条件中,所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时对应的预设差值阈值大于表示相同目标时对应的预设差值阈值。
在一种可能的实施方式中,由于热图像中各像素的邻近差异都是在一定范围内的,因此,两帧热图像对应位置的像素的邻近差异之和也是在噪声强度范围内的。该噪声强度范围内即预设和值阈值,所以所述目标筛选条件还可以包括:所述待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之和小于预设和值阈值。
本申请实施例中,由于热成像设备在高速运动状态时场景变化大,待校正热图像与参照帧热图像对应位置的像素之间的对应位置的像素的邻近差异之间通常也较大,因此,待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之和也较大,可以将高速运动状态对应的预设和值阈值设置的较大一些,这样可以确定出更多的噪声干扰像素,提高图像校正的准确率。热成像设备在低速运动状态时场景变化小,待校正热图像与参照帧热图像对应位置的像素之间的对应位置的像素的邻近差异通常较小,因此,待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之和也较小,可以将低速运动状态对应的预设和值阈值设置的较小一些,提高选取噪声干扰像素的门槛,避免误选取噪声干扰像素的问题,保证图像校正的准确率。而热成像设备在静止状态时场景变化微弱,待校正热图像与参照帧热图像对应位置的像素之间的对应位置的像素的邻近差异更小,因此,待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之和也更小,可以将静止状态对应的预设和值阈值设置的更小一些,进一步提高选取噪声干扰像素的门槛,避免误选取噪声干扰像素的问题,保证图像校正的准确率。
所以,不同运动状态对应的预设和值阈值不同,所述不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同包括:所述高速运动状态对应的预设和值阈值大于所述低速运动状态对应的预设和值阈值,和/或,所述低速运动状态对应的预设和值阈值大于所述静止状 态对应的预设和值阈值。不同运动状态对应的预设和值阈值的具体值可以根据实际应用的经验值进行设定,此处不做具体限定。
在一种可能的实施方式中,当两个像素对应同一目标时,两个像素与自身邻近像素之间的邻近差异都比较小,因此,当待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示相同目标时,待校正热图像中对应位置的邻近差异与参照帧热图像对应位置的像素的邻近差异之间的和值也是比较小的。当两个像素对应不同目标时,两个像素与自身邻近像素之间的邻近差异都比较大,因此,当待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时,待校正热图像中对应位置的邻近差异与参照帧热图像对应位置的像素的邻近差异之间的和值是较大的。所以,所述高速运动状态对应的目标筛选条件还可以包括:所述高速运动状态对应目标筛选条件中,所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时对应的预设和值阈值大于表示相同目标时对应的预设和值阈值。
以下结合具体的筛选条件公式对不同运动状态对应目标筛选条件进行举例说明:
当所述运动状态为高速运动状态时,如果待校正热图像中的像素(i,j)满足如下条件(1)或条件(2),确定该像素为噪声干扰像素。
条件(1):
其中,abs()表示取绝对值运算,Y(i,j)为待校正热图像中的该像素(i,j)的像素值(即像素灰度),Y’(i,j)为参照帧热图像中对应位置像素的像素值,Correct_noise(i,j)为该像素的邻近差异,Correct_noise’(i,j)为参照帧热图像对应位置的像素的邻近差异,n11为所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时高速运动状态对应的预设差值阈值,n12为所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时高速运动状态对应的预设和值阈值,n13为高速运动状态对应的预设灰度差异阈值。
当待校正热图像中该像素的像素灰度与参照帧热图像对应位置的像素灰度之间的灰度差异大于高速运动状态对应的预设灰度差异阈值,即abs(Y(i,j)-Y′(i,j))>n13时,可以确定待校正热图像中该像素与参照帧热图像对应位置的像素表示不同目标,与此同时,当待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值的绝对值小于预设差值阈值n11,以及,待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之和的绝对值小于预设和值阈值n12,则可以将待校正热图像中的该像素确定为噪声干扰像素。
条件(2):
其中,n21为所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示相同目标时高速运动状态对应的预设差值阈值,n22为所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示相同目标时高速运动状态对应的预设和值阈值,n23为高速运动状态对应的预设灰度差异阈值,n11>n21
在高速运动状态下当待校正热图像中该像素的像素灰度与参照帧热图像对应位置的像素灰度之间的灰度差异在高速运动状态对应的预设灰度差异阈值范围内,即abs(Y(i,j)-Y′(i,j))≤n23时,可以确定待校正热图像中该像素与参照帧热图像对应位置的像素表示相同目标,与此同时,当待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值的绝对值小于预设差值阈值n21,以及,待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之 和的绝对值小于预设和值阈值n22,则可以将待校正热图像中的该像素确定为噪声干扰像素。
当所述运动状态为低速运动状态时,如果待校正热图像中的像素(i,j)满足如下条件(3),可以确定该像素为噪声干扰像素。
条件(3):
其中,n31为低速运动状态对应的预设差值阈值,n32为低速运动状态对应的预设和值阈值,n33为低速运动状态对应的预设灰度差异阈值,n31<n21,n32<n22,n33>n23,n13=n23
低速运动状态不允许灰度差异变化小的像素为噪声干扰像素,当待校正热图像中该像素的像素灰度与参照帧热图像对应位置的像素灰度之间的灰度差异大于低速运动状态对应的预设灰度差异阈值,即abs(Y(i,j)-Y′(i,j))>n33时,可以确定待校正热图像中该像素与参照帧热图像对应位置的像素表示不同目标,与此同时,当待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值的绝对值小于预设差值阈值n31,以及,待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之和的绝对值小于预设和值阈值n32,则可以将待校正热图像中的该像素确定为噪声干扰像素。
当所述运动状态为静止状态时,如果待校正热图像中的像素(i,j)满足如下条件(4),可以确定该像素为噪声干扰像素。
条件(4):
其中,n41为静止状态对应的预设差值阈值,n42为静止状态对应的预设和值阈值,n43为静止状态对应的预设灰度差异阈值,n41<n31,n42<n32,n43>n33
当所述运动状态为静止状态时,如果该像素满足上述条件(4)表示:静止状态下只能校正弱固定图形噪声,此处灰度差异变化由目标运动造成。当待校正热图像中该像素的像素灰度与参照帧热图像对应位置的像素灰度之间的灰度差异大于静止状态对应的预设灰度差异阈值,即abs(Y(i,j)-Y′(i,j))>n43时,可以确定待校正热图像中该像素与参照帧热图像对应位置的像素表示不同目标,与此同时,当待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值的绝对值小于预设差值阈值n41,以及,待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之和的绝对值小于预设和值阈值n42,则可以将待校正热图像中的该像素确定为噪声干扰像素。
可见,在本实施方式中,热成像设备的三种运动状态分别对应了不同的目标筛选条件。针对不同的运动状态,可以进入对应的噪声干扰像素选取模式,并且三种模式基本相同仅对应的目标筛选条件不同,筛选框架简单易实现,计算量小。将目标筛选条件与热成像设备的运动状态相结合,在筛选噪声干扰像素时利用了固定图形噪声位置固定且为加性噪声的特点,可以实现快速筛选出噪声干扰像素,减小了筛选过程的计算量,降低了筛选错误率。
在确定出待校正热图像中的噪声干扰像素后,在上述步骤S103中,为了排除被误选取的噪声干扰像素,可以利用待校正热图像中邻域存在噪声干扰像素的各个像素与其邻域的该噪声干扰像素之间的邻近差异,从噪声干扰像素进一步筛选出待校正像素,进而,可以针对待校正像素确定对应的校正参数,然后利用校正参数对待校正像素进行校正,校正后的热图像。其中,校正参数为可以对待校正像素的灰度值进行校正的灰度参数。
在一种可能的实施方式中,由于待校正热图像中同一目标内的各个像素之间的邻近差异始终在预 设差异阈值内,当该像素与其邻域的该噪声干扰像素之间的邻近差异大于预设差异阈值,表示该像素与其邻域的该噪声干扰像素并不位于同一目标上。因此,该噪声干扰像素与其邻域的该像素之间的邻近差异的差值过大并不是由于固定图像噪声导致,而是由于该像素与其邻域的该噪声干扰像素位于不同目标,该噪声干扰像素实际上是被误判断为噪声干扰像素,不需要对该噪声干扰像素进行校正。当该像素与其邻域的该噪声干扰像素之间的邻近差异不大于预设差异阈值,表示该像素与其邻域的该噪声干扰像素对应同一目标。因此,该噪声干扰像素与其邻域的该像素之间的邻近差异的差值过大是由于固定图像噪声导致,因此将该噪声干扰像素确定为待校正像素,后续需要对该待校正像素进行校正。所以,可以利用待校正热图像中邻域存在噪声干扰像素的各个像素与其邻域的该噪声干扰像素之间的邻近差异,从噪声干扰像素进一步筛选出待校正像素,进而,可以针对待校正像素确定对应的校正参数,然后利用校正参数对待校正像素进行校正,校正后的热图像。具体的,图2为本申请实施例提供的对待校正热图像进行校正的一种流程图,如图2所示,所述根据所述噪声干扰像素对所述待校正热图像进行校正,可以包括:
S201,针对所述待校正热图像中邻域存在噪声干扰像素的各个像素,确定该像素与其邻域的该噪声干扰像素之间的邻近差异。
具体的,可以预先定义一个全零的校正参数的矩阵。针对所述待校正热图像中邻域存在噪声干扰像素的每个像素,可以计算该像素和其邻域的该噪声干扰像素之间的像素差值,与校正参数的矩阵中对应位置元素和其邻域元素之间的元素差值的和值,将该和值作为该像素与其邻域的该噪声干扰像素之间的邻近差异。
S202,如果所述邻近差异满足预设差异条件,则确定该噪声干扰像素为待校正像素。
其中,所述预设差异条件表示该像素与其邻域的该噪声干扰像素对应同一目标,不同运动状态对应的预设差异条件不同。
本申请实施例中,由于待校正热图像中同一目标内的各个像素之间的邻近差异始终在一定的差异范围内,如果该像素与其邻域的该噪声干扰像素之间的邻近差异不在差异范围内,表示该像素与其邻域的该噪声干扰像素并不位于同一目标上,也就是说,该噪声干扰像素与其邻域的该像素之间的邻近差异的差值过大并不是由于固定图像噪声导致,而是由于该像素与其邻域的该噪声干扰像素位于不同目标,该噪声干扰像素实际上是被误判断为噪声干扰像素。该差异范围即预设差异阈值,所以,所述预设差异条件可以包括所述邻近差异不大于预设差异阈值。
并且,由于热成像设备在高速运动状态时场景变化大,待校正热图像中同一目标内的各个像素的邻近差异也较大,因此,可以将高速运动状态对应的预设差异阈值设置的较大一些,这样可以确定出更多的待校正干扰像素,即可以对更多的待校正像素进行校正,提高图像校正的准确率。热成像设备在低速运动状态时场景变化小,待校正热图像中同一目标内的各个像素的邻近差异通常较小,因此,可以将低速运动状态对应的预设差异阈值设置的较小一些,提高筛选待校正像素的门槛,保证图像校正的准确率。而热成像设备在静止状态时场景变化微弱,待校正热图像中同一目标内的各个像素的邻近差异通常更小,因此,可以将静止状态对应的预设差异阈值设置的更小一些,进一步提高筛选待校正像素的门槛,保证图像校正的准确率。所以,所述预设差异条件可以包括所述邻近差异不大于预设差异阈值,所述不同运动状态对应的预设差异条件不同包括:所述高速运动状态对应的预设差异阈值大于所述低速运动状态对应的预设差异阈值,和/或,所述低速运动状态对应的预设差异阈值大于所述静止状态对应的预设差异阈值。不同运动状态对应的预设差异阈值的具体值可以根据实际应用的经验值进行设定,此处不做具体限定。
由于待校正热图像中同一目标内的各个像素之间的邻近差异始终在预设差异阈值内,当该像素与其邻域的该噪声干扰像素之间的邻近差异大于预设差异阈值,表示该像素与其邻域的该噪声干扰像素并不位于同一目标上。因此,该噪声干扰像素与其邻域的该像素之间的邻近差异的差值过大并不是由于固定图像噪声导致,而是由于该像素与其邻域的该噪声干扰像素位于不同目标,该噪声干扰像素实际上是被误判断为噪声干扰像素,不需要对该噪声干扰像素进行校正。当该像素与其邻域的该噪声干扰像素之间的邻近差异不大于预设差异阈值,表示该像素与其邻域的该噪声干扰像素对应同一目标。 因此,该噪声干扰像素与其邻域的该像素之间的邻近差异的差值过大是由于固定图像噪声导致,因此将该噪声干扰像素确定为待校正像素,后续需要对该待校正像素进行校正。
S203,基于所述邻近差异确定所述待校正像素对应的校正参数。
校正参数为可以对待校正像素的灰度值进行校正的灰度参数。
由于待校正热图像中同一目标内的各个像素与自身邻域之间的邻近差异在一定范围内,其中,正常像素与自身邻域像素之间的邻近差异通常是位于邻近差异范围的,而待校正像素与其邻域像素之间的邻近差异是大于正常像素与自身邻域像素之间的邻近差异的,位于邻近差异范围之外。因此,可以利用待校正像素与其邻域像素的邻近差异,确定出对应的校正参数,用于对待校正像素的灰度值进行校正,使得待校正像素与其邻域像素之间的邻近差异到正常的邻近差异范围内。
而该像素与其邻域的该噪声干扰像素之间的邻近差异就反映了该噪声干扰像素与正常像素之间的灰度差异,所以,可以针对每个待校正像素,可以将所述邻近差异与预设系数的乘积,与校正参数的矩阵中对应位置元素值之和确定为所述待校正像素对应的校正参数。其中,预设系数可以根据实际应用场景进行具体设定,例如可以设定为0.5或0.6等。
如果该待校正像素的各个邻域像素中存在多个邻域像素与该待校正像素之间的邻近差异满足预设差异条件,则可以根据计算像素与其邻域的噪声干扰像素的邻近差异的先后顺序,依次更新该待校正像素对应的校正参数。直至满足预设差异条件的各个邻域像素的与该待校正像素之间的邻近差异均参与该待校正像素对应的校正参数的计算或更新。
举例说明,图3为待校正热图像中各个像素的一种示意图,如图3所示,像素e为噪声干扰像素,像素a、b、c和d为噪声干扰像素e的邻域像素。
当像素a与噪声干扰像素e的邻近差异、像素b与噪声干扰像素e的邻近差异、像素c与噪声干扰像素e的邻近差异或像素d与噪声干扰像素e的邻近差异满足预设差异条件,可以噪声干扰像素e为待校正像素。
如果图3中,像素a与噪声干扰像素e的邻近差异、像素b与噪声干扰像素e的邻近差异、像素c与噪声干扰像素e的邻近差异和像素d与噪声干扰像素e的邻近差异均满足预设差异条件,即噪声干扰像素e为待校正像素,同时,是按照像素a、像素b、像素c和像素d的顺序依次计算各个像素与其邻域的噪声干扰像素e的邻近差异,则可以在计算出像素a与待校正像素e的邻近差异后,基于像素a与待校正像素e的邻近差异确定待校正像素e对应的校正参数,然后在计算出像素b与待校正像素e的邻近差异后,基于像素b与待校正像素e的邻近差异更新待校正像素e对应的校正参数,然后,在计算出像素c与待校正像素e的邻近差异后,基于像素c与待校正像素e的邻近差异更新待校正像素e对应的校正参数,然后,在计算出像素d与待校正像素e的邻近差异后,基于像素d与待校正像素e的邻近差异更新待校正像素e对应的校正参数。
S204,根据所述校正参数对所述待校正像素进行校正,得到校正后的热图像。
具体的,可以将校正参数与所述待校正像素的像素值和值作为待校正热图像中对应像素的校正后的像素值。当待校正热图像中每个待校正像素的像素值都替换为校正后的像素值后,得到校正后的热图像。
在一种可能的实施方式中,所述基于所述邻近差异确定所述待校正像素对应的校正参数,包括:根据所述邻近差异和所述运动状态对应的预设校正程度参数,确定所述待校正像素对应的校正参数。
由于热成像设备在高速运动状态时场景变化大,噪声干扰像素选取难度较低且可靠,因此,可以将预设校正程度参数设置的较大一些,能够在不影响校正准确度的前提下,加快校正速度,提高校正效率。热成像设备在低速运动状态时场景变化小,噪声干扰像素选取可靠性降低,因此,可以将预设校正程度参数设置的较小一些,优先保证校正准确度。热成像设备在静止状态时场景变化微弱,噪声干扰像素选取难度大且可靠性低,可以将预设校正程度参数设置的更小一些,优先保证校正准确度。因此,不同运动状态对应的预设校正程度参数不同,且在热成像设备处于高速运动状态时预设校正程度参数的值较大,在热成像设备处于低速运动状态时预设校正程度参数适中,在热成像设备处于静止状态时预设校正程度参数极小。
具体的,针对每个待校正像素,可以将所述邻近差异、预设系数和预设校正程度参数的乘积确定为所述待校正像素对应的校正参数。
以下步骤C1-C6结合了具体的公式对校正参数计算方法进行说明:
步骤C1,定义全零的校正参数的矩阵。
步骤C2,遍历待校正热图像中邻域存在噪声干扰像素的各个像素,采用如下公式计算当前遍历的像素和其邻域的噪声干扰像素之间的邻近差异:
dif=Y(i,j)-Yneighbor+Correct1(i,j)-Correct1neighbor
其中,dif为当前遍历的像素和其邻域的噪声干扰像素之间的邻近差异,Y(i,j)为待校正热图像当前遍历的像素(i,j)的像素值,Yneighbor为当前遍历的像素(i,j)的邻域的噪声干扰像素的像素值,Correct1为校正参数的矩阵,Correct1(i,j)为校正参数的矩阵中与所述当前遍历的像素对应的元素的值,Correct1neighbor为校正参数的矩阵中与当前遍历的像素(i,j)的邻域的噪声干扰像素对应的元素的值。
步骤C3,确定该邻近差异是否大于所述运动状态对应的预设差异阈值,如果是,执行步骤C4,否则执行步骤C5。
步骤C4,将该预设差异阈值置为0。
步骤C5,采用如下公式,根据该预设差异阈值与所述运动状态对应的预设校正程度参数,更新校正参数的矩阵:
Correct1neighbor=Correct1neighbor+k*dif*lr
其中,dif为当前遍历的像素和其邻域的噪声干扰像素之间的邻近差异,lr为与所述运动状态对应的预设校正程度参数,等式右侧的Correct1neighbor为校正参数的矩阵中与该噪声干扰像素对应位置元素的值,等式右侧的Correct1neighbor为更新后的校正参数的矩阵。根据该公式可知,在当前遍历的像素的邻域像素中存在噪声干扰像素时才可以计算出非零的dif值,更新Correct1矩阵邻域元素的值,否则无法更新Correct1矩阵邻域元素的值。因此,本实施方式中可以根据噪声干扰像素查找出待校正热图像邻域存在噪声干扰像素的像素进行遍历,减少了计算目标校正矩阵的计算量。
步骤C6,当待校正热图像中的邻域存在噪声干扰像素的像素均被遍历,可以得到最终更新后的校正参数的目标矩阵。待校正像素的校正参数即为目标矩阵中对应位置的元素值。
本申请实施例中,不同运动状态对应的预设校正程度参数不同。具体的,所述不同运动状态对应的预设校正程度参数不同可以包括:所述高速运动状态对应的预设校正程度参数的值大于所述低速运动状态对应的预设校正程度参数的值,和/或,所述低速运动状态对应的预设校正程度参数的值大于所述静止状态对应的预设校正程度参数的值。
本申请实施例中,由于各帧待校正热图像对应的校正效果是可以累加的,即当前的待校正热图像的校正效果会影响下一帧待校正热图像的校正,因此,随着校正图像的数量的增加,需要减小预设校正程度参数的值,以降低待校正热图像的校正效果对下一帧待校正热图像的校正影响,避免待校正热图像的校正效果对下一帧待校正热图像的校正影响过大导致下一帧待校正热图像的图像校正准确率受影响。所以,在热成像设备处于高速运动状态时,预设校正程度参数可以随着校正图像的数量增加而衰减,在热成像设备处于低速运动状态时,预设校正程度参数也可以随着校正图像的数量增加而衰减,在热成像设备处于静止状态时,预设校正程度参数通常不衰减。
具体的,在热成像设备处于高速运动状态时,预设校正程度参数可以随着校正图像的数量增加而衰减的衰减规则可以为:在高速运动状态每累计校正128帧图像,对应的预设校正程度参数可以衰减为原来的1/2,通常情况下最多可以衰减3次。
在热成像设备处于低速运动状态时,预设校正程度参数可以随着校正图像的数量增加而衰减的衰减规则可以为:在低速运动状态每累计校正128帧图像,对应的预设校正程度参数可以衰减为原来的1/2,且通常情况下最多可以衰减3次。
可见,在本实施方式中,校正参数的计算利用了热成像设备的运动状态,高速运动状态和高速运动状态下的dif值的上限大,静止状态下的dif的上限小,各dif值超过上限时置0,高速运动状态对 应的预设校正程度参数大于低速运动状态对应的预设校正程度参数,且低速运动状态对应的预设校正程度参数大于静止状态对应的预设校正程度参数,并且高、低速运动状态包含预设校正程度参数衰减机制,校正参数计算也利用了噪声干扰像素,即邻域存在噪声干扰像素的像素才可更新,中心像素不需要是噪声干扰像素,进一步减少了计算校正参数的计算量,提高了图像校正效率。
在一种可能的实施方式中,所述对目标热图像进行初步校正得到的初步校正热图像的步骤可以包括如下步骤D1-D2:
步骤D1:获取所述目标热图像之前的各帧热图像对应的校正参数累加所得到的累加校正参数。
步骤D2:基于所述累加校正参数对所述目标热图像进行初步校正,得到所述初步校正热图像。
具体的,图4为热成像图像校正的一种示意图,参见图4,在读入目标热图像Y后,可以先使用累加校正参数Correct对目标热图像Y进行初步校正,即Y1=Y+Correct,达到抵消目标热图像Y中固定图形噪声的作用,得到初步校正热图像Y1;如果目标热图像Y为首帧图像,则可将累加校正参数的全零矩阵叠加到该目标热图像Y上,得到初步校正热图像Y1。
如果待校正热图像为对目标热图像进行初步校正得到的初步校正热图像,如图4所示,则可以针对初步校正热图像Y1,选取噪声干扰像素,计算校正参数Correct1,然后可以用校正参数Correct1校正初步校正热图像Y1,得到校正后的热图像Y2输出。同时,在得到校正参数Correct1后,还可以将该校正参数Correct1累加到累加校正参数Correct,更新累加校正参数Correct,然后更新后的累加校正参数Correct可以用于对下一帧待校正热图像进行初步校正。
其中,累加校正参数Correct是由目标热图像Y之前的各帧热图像对应的校正参数累加所得到的,例如,目标热图像Y对应的校正参数Correct1可以累加到Correct(Correct=Correct+Correct1)中,用于对下一帧待校正热图像进行初步校正,达到抵消下一帧待校正热图像中固定图形噪声的作用。
并且,随着校正后的热图像的数量的增加,各运动状态以较低的校正程度参数更新累加校正参数Correct,以监控新增固定图形噪声,不断优化图像。此时需保留当前的校正后的热图像Y2与初步校正热图像Y1的各队员像素之间的邻近差异供下一帧待校正热图像确定其噪声干扰像素时使用。
在一种实施方式中,由于在确定待校正热图像的噪声干扰像素时,需要利用待校正热图像和参照帧热图像对应位置的像素的邻近差异,因此,在得到当前的校正后的热图像Y2与初步校正热图像Y1的各队员像素之间的邻近差异之后,还可以将邻近差异与校正参数之间的差值,确定为所述校正后的热图像中对应像素的与其邻域像素的邻近差异,用于确定下一帧待校正热图像中的噪声干扰像素。
可见,上述实施方式中,将各帧待校正热图像计算的校正参数进行累加,用于对下一帧待校正热图像进行初步校正,不仅提高了容错率,还对先前的校正误差进行了纠正,保证了校正大方向的正确性。并且,将运动状态与目标筛选条件相结合,共同确定出初步校正热图像的噪声干扰像素,再利用初步校正热图像的噪声干扰像素对初步校正热图像进行精细校正,很大程度上提高了图像校正的正确率。
图5(a)为一种室外待校正热图像,图5(b)为应用本申请提供的热成像图像校正方法对图5(a)所示的室外待校正热图像进行校正得到的校正后的热图像。对比图5(a)和图5(b)可知,图5(b)所示的校正后的热图像相比图5(a)所示的待校正热图像,麻点、竖线等固定图形噪声被校正去除了。
图6(a)为另一种室外待校正热图像,图6(b)为应用本申请提供的热成像图像校正方法对图6(a)所示的室外待校正热图像进行校正得到的校正后的热图像。对比图6(a)和图6(b)可知,图6(b)所示的校正后的热图像相比图6(a)所示的待校正热图像,麻点、竖线等固定图形噪声被校正去除了。
相应于上述热成像图像校正方法,本申请实施例还提供了一种热成像图像校正装置。下面对本申请实施例所提供的热成像图像校正装置进行介绍。如图7所示,一种热成像图像校正装置,所述装置包括:
运动状态确定模块701,用于确定待校正热图像所对应热成像设备的运动状态;
干扰像素确定模块702,用于利用所述运动状态对应的目标筛选条件从所述待校正热图像中确定 噪声干扰像素;其中,不同运动状态对应的目标筛选条件不同;
图像校正模块703,用于根据所述噪声干扰像素对所述待校正热图像进行校正。
采用本申请实施例提供的装置,确定待校正热图像所对应热成像设备的运动状态;利用所述运动状态对应的目标筛选条件从所述待校正热图像中确定噪声干扰像素;根据所述噪声干扰像素对所述待校正热图像进行校正。不同运动状态对应的目标筛选条件不同,即可以针对热成像设备的不同运动状态确定出对应的噪声干扰像素,再利用该运动状态对应的噪声干扰像素对待校正热图像进行校正,达到了可以对不同运动状态下的待校正热图像进行准确校正的效果,提高了图像校正的正确率。
可选的,所述装置还包括:
邻近差异确定模块(图7中未示出),用于确定所述待校正热图像中各像素相对于其邻近像素的邻近差异;不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同。
可选的,所述运动状态包括如下运动状态的至少两种:高速运动状态、低速运动状态、静止状态;
所述目标筛选条件包括:所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标,且待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值,则将所述待校正热图像中对应位置的像素确定为噪声干扰像素;
所述不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同包括:所述高速运动状态对应的预设差值阈值大于所述低速运动状态对应的预设差值阈值,和/或,所述低速运动状态对应的预设差值阈值大于所述静止状态对应的预设差值阈值。
可选的,所述高速运动状态对应的目标筛选条件还包括:所述待校正热图像中像素灰度与所述参照帧热图像对应位置的像素灰度表示相同目标,且所述待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值,则将所述待校正热图像中对应位置的像素确定为噪声干扰像素;
所述高速运动状态对应目标筛选条件中,所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时对应的预设差值阈值大于表示相同目标时对应的预设差值阈值。
可选的,所述目标筛选条件还包括:所述待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之和小于预设和值阈值;
所述不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同包括:所述高速运动状态对应的预设和值阈值大于所述低速运动状态对应的预设和值阈值,和/或,所述低速运动状态对应的预设和值阈值大于所述静止状态对应的预设和值阈值。
可选的,所述高速运动状态对应的目标筛选条件还包括:
所述高速运动状态对应目标筛选条件中,所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时对应的预设和值阈值大于表示相同目标时对应的预设和值阈值。
可选的,所述图像校正模块703,包括:
差异确定子模块(图7中未示出),用于针对所述待校正热图像中邻域存在噪声干扰像素的各个像素,确定该像素与其邻域的该噪声干扰像素之间的邻近差异;
像素确定子模块(图7中未示出),用于如果所述邻近差异满足预设差异条件,则确定该噪声干扰像素为待校正像素;其中,所述预设差异条件表示该像素与其邻域的该噪声干扰像素对应同一目标,不同运动状态对应的预设差异条件不同;
校正参数确定子模块(图7中未示出),用于基于所述邻近差异确定所述待校正像素对应的校正参数;
图像校正子模块(图7中未示出),用于根据所述校正参数对所述待校正像素进行校正,得到校正后的热图像。
可选的,所述预设差异条件包括所述邻近差异不大于预设差异阈值,所述不同运动状态对应的预设差异条件不同包括:所述高速运动状态对应的预设差异阈值大于所述低速运动状态对应的预设差异阈值,和/或,所述低速运动状态对应的预设差异阈值大于所述静止状态对应的预设差异阈值。
可选的,所述校正参数确定子模块,具体用于根据所述邻近差异和所述运动状态对应的预设校正 程度参数,确定所述待校正像素对应的校正参数;其中,不同运动状态对应的预设校正程度参数不同。
可选的,所述不同运动状态对应的预设校正程度参数不同包括:所述高速运动状态对应的预设校正程度参数的值大于所述低速运动状态对应的预设校正程度参数的值,和/或,所述低速运动状态对应的预设校正程度参数的值大于所述静止状态对应的预设校正程度参数的值。
可选的,所述运动状态确定模块701,具体用于获取所述待校正热图像对应的所述热成像设备的多组角速度,其中,每组角速度包括摆动角速度、倾斜角速度和翻转角速度中的至少一种角速度;计算每种类型的角速度之间的极差以及和值;基于所述极差和所述和值,确定所述热成像设备的运动状态为高速运动状态、低速运动状态或静止状态。
可选的,所述运动状态确定模块701,具体用于如果所述极差不小于第一预设极差阈值且所述和值不小于第一预设和值阈值,将所述热成像设备的运动状态确定为高速运动状态;如果所述极差小于第一预设极差阈值且所述和值小于第一预设和值阈值,在所述极差大于第二预设极差阈值以及所述和值大于第二预设和值阈值的情况下,将所述热成像设备的运动状态确定为低速运动状态;其中,所述第一预设极差阈值大于所述第二预设极差阈值,所述第一预设和值阈值大于所述第二预设和值阈值;如果所述极差不大于第二预设极差阈值且所述和值不大于第二预设和值阈值,将所述热成像设备的运动状态确定为静止状态。
可选的,所述待校正热图像为需要处理的目标热图像,或,所述待校正热图像为对所述目标热图像进行初步校正得到的初步校正热图像。
可选的,所述装置还包括:
初步校正模块(图7中未示出),用于获取所述目标热图像之前的各帧热图像对应的校正参数累加所得到的累加校正参数;基于所述累加校正参数对所述目标热图像进行初步校正,得到所述初步校正热图像。
本申请实施例还提供了一种电子设备,如图8所示,包括处理器801、通信接口802、存储器803和通信总线804,其中,处理器801,通信接口802,存储器803通过通信总线804完成相互间的通信,
存储器803,用于存放计算机程序;
处理器801,用于执行存储器803上所存放的程序时,实现上述任一种实施例所述的热成像图像校正方法步骤。
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述电子设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一热成像图像校正方法的步骤。
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一热成像图像校正方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的 流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、电子设备、计算机可读存储介质以及计算机程序产品实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (19)

  1. 一种热成像图像校正方法,其特征在于,包括:
    确定待校正热图像所对应热成像设备的运动状态;
    利用所述运动状态对应的目标筛选条件从所述待校正热图像中确定噪声干扰像素;其中,不同运动状态对应的目标筛选条件不同;
    根据所述噪声干扰像素对所述待校正热图像进行校正。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    确定所述待校正热图像中各像素相对于其邻近像素的邻近差异;
    不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同。
  3. 根据权利要求2所述的方法,其特征在于,所述运动状态包括如下运动状态的至少两种:高速运动状态、低速运动状态、静止状态;
    所述目标筛选条件包括:所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标,且待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值,则将所述待校正热图像中对应位置的像素确定为噪声干扰像素;
    所述不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同包括:所述高速运动状态对应的预设差值阈值大于所述低速运动状态对应的预设差值阈值,和/或,所述低速运动状态对应的预设差值阈值大于所述静止状态对应的预设差值阈值。
  4. 根据权利要求3所述的方法,其特征在于,所述高速运动状态对应的目标筛选条件还包括:所述待校正热图像中像素灰度与所述参照帧热图像对应位置的像素灰度表示相同目标,且所述待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值,则将所述待校正热图像中对应位置的像素确定为噪声干扰像素;
    所述高速运动状态对应目标筛选条件中,所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时对应的预设差值阈值大于表示相同目标时对应的预设差值阈值。
  5. 根据权利要求2-4任一项所述的方法,其特征在于,所述目标筛选条件还包括:所述待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之和小于预设和值阈值;
    所述不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同包括:所述高速运动状态对应的预设和值阈值大于所述低速运动状态对应的预设和值阈值,和/或,所述低速运动状态对应的预设和值阈值大于所述静止状态对应的预设和值阈值。
  6. 根据权利要求5所述的方法,其特征在于,所述高速运动状态对应的目标筛选条件还包括:
    所述高速运动状态对应目标筛选条件中,所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时对应的预设和值阈值大于表示相同目标时对应的预设和值阈值。
  7. 根据权利要求3所述的方法,其特征在于,所述根据所述噪声干扰像素对所述待校正热图像进行校正,包括:
    针对所述待校正热图像中邻域存在噪声干扰像素的各个像素,确定该像素与其邻域的该噪声干扰像素之间的邻近差异;
    如果所述邻近差异满足预设差异条件,则确定该噪声干扰像素为待校正像素;其中,所述预设差异条件表示该像素与其邻域的该噪声干扰像素对应同一目标,不同运动状态对应的预设差异条件不同;
    基于所述邻近差异确定所述待校正像素对应的校正参数;
    根据所述校正参数对所述待校正像素进行校正,得到校正后的热图像。
  8. 根据权利要求7所述的方法,其特征在于,所述预设差异条件包括所述邻近差异不大于预设差异阈值,所述不同运动状态对应的预设差异条件不同包括:所述高速运动状态对应的预设差异阈值大于所述低速运动状态对应的预设差异阈值,和/或,所述低速运动状态对应的预设差异阈值大于所述静止状态对应的预设差异阈值。
  9. 根据权利要求7所述的方法,其特征在于,所述基于所述邻近差异确定所述待校正像素对应的校正参数,包括:
    根据所述邻近差异和所述运动状态对应的预设校正程度参数,确定所述待校正像素对应的校正参数;其中,不同运动状态对应的预设校正程度参数不同。
  10. 根据权利要求9所述的方法,其特征在于,所述不同运动状态对应的预设校正程度参数不同包括:所述高速运动状态对应的预设校正程度参数的值大于所述低速运动状态对应的预设校正程度参数的值,和/或,所述低速运动状态对应的预设校正程度参数的值大于所述静止状态对应的预设校正程度参数的值。
  11. 根据权利要求1所述的方法,其特征在于,所述确定待校正热图像所对应热成像设备的运动状态,包括:
    获取所述待校正热图像对应的所述热成像设备的多组角速度,其中,每组角速度包括摆动角速度、倾斜角速度和翻转角速度中的至少一种角速度;
    计算每种类型的角速度之间的极差以及和值;
    基于所述极差和所述和值,确定所述热成像设备的运动状态为高速运动状态、低速运动状态或静止状态。
  12. 根据权利要求11所述的方法,其特征在于,所述基于所述极差和所述和值,确定所述热成像设备的运动状态为高速运动状态、低速运动状态或静止状态,包括:
    如果所述极差不小于第一预设极差阈值且所述和值不小于第一预设和值阈值,将所述热成像设备的运动状态确定为高速运动状态;
    如果所述极差小于第一预设极差阈值且所述和值小于第一预设和值阈值,在所述极差大于第二预设极差阈值以及所述和值大于第二预设和值阈值的情况下,将所述热成像设备的运动状态确定为低速运动状态;其中,所述第一预设极差阈值大于所述第二预设极差阈值,所述第一预设和值阈值大于所述第二预设和值阈值;
    如果所述极差不大于第二预设极差阈值且所述和值不大于第二预设和值阈值,将所述热成像设备的运动状态确定为静止状态。
  13. 根据权利要求1-4或6-12任一项所述的方法,其特征在于,所述待校正热图像为需要处理的目标热图像,或,所述待校正热图像为对所述目标热图像进行初步校正得到的初步校正热图像。
  14. 根据权利要求13所述的方法,其特征在于,所述方法还包括:
    获取所述目标热图像之前的各帧热图像对应的校正参数累加所得到的累加校正参数;
    基于所述累加校正参数对所述目标热图像进行初步校正,得到所述初步校正热图像。
  15. 一种热成像图像校正装置,其特征在于,包括:
    运动状态确定模块,用于确定待校正热图像所对应热成像设备的运动状态;
    干扰像素确定模块,用于利用所述运动状态对应的目标筛选条件从所述待校正热图像中确定噪声干扰像素;其中,不同运动状态对应的目标筛选条件不同;
    图像校正模块,用于根据所述噪声干扰像素对所述待校正热图像进行校正。
  16. 根据权利要求15所述的装置,其特征在于,所述装置还包括:
    邻近差异确定模块,用于确定所述待校正热图像中各像素相对于其邻近像素的邻近差异;不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同;
    所述运动状态包括如下运动状态的至少两种:高速运动状态、低速运动状态、静止状态;
    所述目标筛选条件包括:所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标,且待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之间差值小于预设差值阈值,则将所述待校正热图像中对应位置的像素确定为噪声干扰像素;
    所述不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同包括:所述高速运动状态对应的预设差值阈值大于所述低速运动状态对应的预设差值阈值,和/或,所述低速运动状态对应的预设差值阈值大于所述静止状态对应的预设差值阈值;
    所述高速运动状态对应的目标筛选条件还包括:所述待校正热图像中像素灰度与所述参照帧热图像对应位置的像素灰度表示相同目标,且所述待校正热图像中该像素的邻近差异与所述参照帧热图像 对应位置的像素的邻近差异之间差值小于预设差值阈值,则将所述待校正热图像中对应位置的像素确定为噪声干扰像素;
    所述高速运动状态对应目标筛选条件中,所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时对应的预设差值阈值大于表示相同目标时对应的预设差值阈值;
    所述目标筛选条件还包括:所述待校正热图像中该像素的邻近差异与所述参照帧热图像对应位置的像素的邻近差异之和小于预设和值阈值;
    所述不同运动状态对应的目标筛选条件中对噪声干扰像素相对于其邻近像素的邻近差异要求不同包括:所述高速运动状态对应的预设和值阈值大于所述低速运动状态对应的预设和值阈值,和/或,所述低速运动状态对应的预设和值阈值大于所述静止状态对应的预设和值阈值;
    所述高速运动状态对应的目标筛选条件还包括:
    所述高速运动状态对应目标筛选条件中,所述待校正热图像中像素灰度与参照帧热图像对应位置的像素灰度表示不同目标时对应的预设和值阈值大于表示相同目标时对应的预设和值阈值;
    所述图像校正模块,包括:
    差异确定子模块,用于针对所述待校正热图像中邻域存在噪声干扰像素的各个像素,确定该像素与其邻域的该噪声干扰像素之间的邻近差异;
    像素确定子模块,用于如果所述邻近差异满足预设差异条件,则确定该噪声干扰像素为待校正像素;其中,所述预设差异条件表示该像素与其邻域的该噪声干扰像素对应同一目标,不同运动状态对应的预设差异条件不同;
    校正参数确定子模块,用于基于所述邻近差异确定所述待校正像素对应的校正参数;
    图像校正子模块,用于根据所述校正参数对所述待校正像素进行校正,得到校正后的热图像;
    所述预设差异条件包括所述邻近差异不大于预设差异阈值,所述不同运动状态对应的预设差异条件不同包括:所述高速运动状态对应的预设差异阈值大于所述低速运动状态对应的预设差异阈值,和/或,所述低速运动状态对应的预设差异阈值大于所述静止状态对应的预设差异阈值;
    所述校正参数确定子模块,具体用于根据所述邻近差异和所述运动状态对应的预设校正程度参数,确定所述待校正像素对应的校正参数;其中,不同运动状态对应的预设校正程度参数不同;
    所述不同运动状态对应的预设校正程度参数不同包括:所述高速运动状态对应的预设校正程度参数的值大于所述低速运动状态对应的预设校正程度参数的值,和/或,所述低速运动状态对应的预设校正程度参数的值大于所述静止状态对应的预设校正程度参数的值;
    所述运动状态确定模块,具体用于获取所述待校正热图像对应的所述热成像设备的多组角速度,其中,每组角速度包括摆动角速度、倾斜角速度和翻转角速度中的至少一种角速度;计算每种类型的角速度之间的极差以及和值;基于所述极差和所述和值,确定所述热成像设备的运动状态为高速运动状态、低速运动状态或静止状态;
    所述运动状态确定模块,具体用于如果所述极差不小于第一预设极差阈值且所述和值不小于第一预设和值阈值,将所述热成像设备的运动状态确定为高速运动状态;如果所述极差小于第一预设极差阈值且所述和值小于第一预设和值阈值,在所述极差大于第二预设极差阈值以及所述和值大于第二预设和值阈值的情况下,将所述热成像设备的运动状态确定为低速运动状态;其中,所述第一预设极差阈值大于所述第二预设极差阈值,所述第一预设和值阈值大于所述第二预设和值阈值;如果所述极差不大于第二预设极差阈值且所述和值不大于第二预设和值阈值,将所述热成像设备的运动状态确定为静止状态;
    所述待校正热图像为需要处理的目标热图像,或,所述待校正热图像为对所述目标热图像进行初步校正得到的初步校正热图像;
    所述装置还包括:
    初步校正模块,用于获取所述目标热图像之前的各帧热图像对应的校正参数累加所得到的累加校正参数;基于所述累加校正参数对所述目标热图像进行初步校正,得到所述初步校正热图像。
  17. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器, 通信接口,存储器通过通信总线完成相互间的通信;
    存储器,用于存放计算机程序;
    处理器,用于执行存储器上所存放的程序时,实现权利要求1-14任一所述的方法步骤。
  18. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-14任一所述的方法步骤。
  19. 一种包含指令的计算机程序产品,其特征在于,所述计算机程序产品被计算机执行时实现权利要求1-14任一所述的方法步骤。
PCT/CN2023/072402 2022-01-29 2023-01-16 一种热成像图像校正方法和装置 WO2023143193A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210109939.6A CN114140362B (zh) 2022-01-29 2022-01-29 一种热成像图像校正方法和装置
CN202210109939.6 2022-01-29

Publications (1)

Publication Number Publication Date
WO2023143193A1 true WO2023143193A1 (zh) 2023-08-03

Family

ID=80381806

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/072402 WO2023143193A1 (zh) 2022-01-29 2023-01-16 一种热成像图像校正方法和装置

Country Status (2)

Country Link
CN (2) CN114140362B (zh)
WO (1) WO2023143193A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114140362B (zh) * 2022-01-29 2022-07-05 杭州微影软件有限公司 一种热成像图像校正方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101180652A (zh) * 2005-04-11 2008-05-14 爱肯公司 用于捕捉和分析运动物体的热成像图像的方法和装置
JP2012252069A (ja) * 2011-06-01 2012-12-20 Panasonic Corp フレーム画像処理装置およびフレーム画像処理方法
CN103096117A (zh) * 2011-10-28 2013-05-08 浙江大华技术股份有限公司 视频噪声检测方法及装置
CN113177893A (zh) * 2021-05-08 2021-07-27 深圳沐奇科技有限公司 一种图像模糊度处理方法
CN114140362A (zh) * 2022-01-29 2022-03-04 杭州微影软件有限公司 一种热成像图像校正方法和装置

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0981754A (ja) * 1995-09-19 1997-03-28 Matsushita Electric Ind Co Ltd 動き検出回路
JP2007040764A (ja) * 2005-08-01 2007-02-15 Toyota Motor Corp 光ファイバジャイロの異常検出装置
JP5613145B2 (ja) * 2008-05-16 2014-10-22 カシオ計算機株式会社 撮影装置およびプログラム
CN102096912A (zh) * 2009-12-14 2011-06-15 北京中星微电子有限公司 一种图像处理方法及装置
JP2011199716A (ja) * 2010-03-23 2011-10-06 Sony Corp 画像処理装置、および画像処理方法、並びにプログラム
JP6302341B2 (ja) * 2014-04-23 2018-03-28 キヤノン株式会社 撮像装置及びその制御方法、プログラム、記憶媒体
CN105100771A (zh) * 2015-07-14 2015-11-25 山东大学 一种基于场景分类和几何标注的单视点视频深度获取方法
CN107437238B (zh) * 2016-05-25 2020-11-24 上海联影医疗科技股份有限公司 一种图像分块自适应递归降噪方法及装置
TW201742001A (zh) * 2016-05-30 2017-12-01 聯詠科技股份有限公司 影像雜訊估測方法及裝置與影像擷取裝置
CN108335279B (zh) * 2017-01-20 2022-05-17 微软技术许可有限责任公司 图像融合和hdr成像
CN206946930U (zh) * 2017-04-24 2018-01-30 东莞市壹鼎达环保设备有限公司 一种噪声消除装置
CN110631706B (zh) * 2018-06-22 2021-04-27 杭州海康微影传感科技有限公司 红外图像的校正方法、装置及存储介质
CN111968066B (zh) * 2020-08-27 2023-01-10 烟台艾睿光电科技有限公司 红外图像的校正方法、装置、设备及制冷红外成像系统
CN112720408B (zh) * 2020-12-22 2022-07-08 江苏理工学院 一种全地形机器人视觉导航控制方法
CN112686801B (zh) * 2021-01-05 2023-06-20 金陵科技学院 基于航拍图像和串联回声状态网络的水质监测方法
CN113034452B (zh) * 2021-03-15 2022-09-27 南京理工大学 一种焊件轮廓检测方法
CN113674322A (zh) * 2021-08-25 2021-11-19 浙江大华技术股份有限公司 一种运动状态检测方法及相关装置
CN113936044B (zh) * 2021-12-17 2022-03-18 武汉锐科光纤激光技术股份有限公司 激光设备运动状态的检测方法、装置、计算机设备及介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101180652A (zh) * 2005-04-11 2008-05-14 爱肯公司 用于捕捉和分析运动物体的热成像图像的方法和装置
JP2012252069A (ja) * 2011-06-01 2012-12-20 Panasonic Corp フレーム画像処理装置およびフレーム画像処理方法
CN103096117A (zh) * 2011-10-28 2013-05-08 浙江大华技术股份有限公司 视频噪声检测方法及装置
CN113177893A (zh) * 2021-05-08 2021-07-27 深圳沐奇科技有限公司 一种图像模糊度处理方法
CN114140362A (zh) * 2022-01-29 2022-03-04 杭州微影软件有限公司 一种热成像图像校正方法和装置

Also Published As

Publication number Publication date
CN114140362A (zh) 2022-03-04
CN114140362B (zh) 2022-07-05
CN114998136A (zh) 2022-09-02

Similar Documents

Publication Publication Date Title
CN101822039B (zh) 用于针对图像确定照相机瑕疵的系统和方法
WO2023143193A1 (zh) 一种热成像图像校正方法和装置
WO2020010945A1 (zh) 图像处理方法和装置、电子设备、计算机可读存储介质
WO2021179590A1 (zh) 视差图的处理方法、装置、计算机设备和存储介质
KR102038789B1 (ko) 포커스 검출
CN112241976A (zh) 一种训练模型的方法及装置
CN113538286B (zh) 一种图像处理方法、装置、电子设备及存储介质
JP7429363B2 (ja) 画像検出方法、装置、システム、デバイス及び記憶媒体
WO2021102913A1 (zh) 图像处理方法、装置及存储介质
CN107277367A (zh) 拍照处理方法、装置、设备和存储介质
JP2021086616A (ja) ランダムサンプリング一貫性に基づく魚眼画像の有効領域抽出方法
WO2021004260A1 (zh) 深度图处理方法和装置
CN111340735A (zh) 一种led屏体校正方法、装置及终端
CN114913171A (zh) 一种图像失焦检测方法、装置、电子设备及存储介质
CN107085843B (zh) 用于估计光学系统中的调制传递函数的系统和方法
CN112393804B (zh) 一种图像校正的方法及装置
CN110689496A (zh) 降噪模型的确定方法、装置、电子设备和计算机存储介质
WO2022205934A1 (zh) 视差图优化方法、装置、电子设备及计算机可读存储介质
US11910080B2 (en) Image pickup apparatus for inferring noise and learning device
CN115035168A (zh) 基于多约束的光伏面板多源图像配准方法、装置及系统
CN115810051A (zh) 一种内参校准方法、装置、电子设备及存储介质
CN111340714B (zh) 一种摩尔纹处理方法、装置及电子设备
CN109636740B (zh) 一种红外图像多尺度智能化非均匀性校正方法
JP4828728B2 (ja) 解像度測定装置および解像度測定方法
CN111801709B (zh) 一种圆形特征检测方法、处理系统及具有存储功能的装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23746075

Country of ref document: EP

Kind code of ref document: A1