CN117911290A - Infrared image pot cover correction algorithm - Google Patents

Infrared image pot cover correction algorithm Download PDF

Info

Publication number
CN117911290A
CN117911290A CN202311859776.4A CN202311859776A CN117911290A CN 117911290 A CN117911290 A CN 117911290A CN 202311859776 A CN202311859776 A CN 202311859776A CN 117911290 A CN117911290 A CN 117911290A
Authority
CN
China
Prior art keywords
correction
pot cover
grid
infrared image
corrected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311859776.4A
Other languages
Chinese (zh)
Inventor
叶丽婷
梁春春
闫志勇
吴棋龙
黄泽锷
吴涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Guangzhi Technology Co Ltd
Original Assignee
Anhui Guangzhi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Guangzhi Technology Co Ltd filed Critical Anhui Guangzhi Technology Co Ltd
Priority to CN202311859776.4A priority Critical patent/CN117911290A/en
Publication of CN117911290A publication Critical patent/CN117911290A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

The invention belongs to the technical field of infrared image processing, and discloses an infrared image pot cover correction algorithm, which comprises the following steps: s1, acquiring an infrared image containing a pot cover phenomenon, performing gridding treatment, and establishing a grid correction coefficient table corresponding to a grid; s2, carrying out blocking treatment on the infrared image containing the pot cover phenomenon, calculating grids associated with blocks to which pixel points to be corrected belong, and acquiring grid correction coefficients of corresponding grids from a grid correction coefficient table; s3, calculating an actual correction coefficient of the pixel point to be corrected through the grid correction coefficient related to the pixel point to be corrected; s4, multiplying the pixel value of the pixel point to be corrected by the actual correction coefficient to obtain the correction value of the pixel point to be corrected. The method ensures that the infrared image is uniform in output and good in pot cover removing effect on the basis of keeping high real-time performance.

Description

Infrared image pot cover correction algorithm
Technical Field
The invention belongs to the technical field of infrared image processing, and particularly relates to an infrared image pot cover correction algorithm.
Background
Uncooled infrared detectors are increasingly being used in the military and civil fields with the advantages of low cost and easy miniaturization. However, the direct output image has the problems of low spatial resolution, low contrast, large noise, blurred edge details, large dynamic range, small information amount and the like due to the influence of factors such as self manufacturing process, hardware circuits, external working environment and the like. Because of the optical characteristics of the lens, the light intensity received by the edge area of the image area of the detector is smaller than that received by the center, and the phenomenon that the brightness of the imaging center and the brightness of four corners are inconsistent is caused. The lens itself is a convex lens, and the center is necessarily more sensitive than the periphery due to the convex lens principle. In the structure of the infrared module, the baffle is arranged behind the lens, and the uneven energy distribution caused by the part of the lens is not corrected when the baffle is hit, so that the pot cover effect shown in fig. 1 appears, and the quality of image display is affected.
Therefore, it is necessary to design an infrared image pot cover correction algorithm, which can effectively inhibit pot cover effect.
Disclosure of Invention
In order to solve the problems, the invention provides an infrared image pot cover correction algorithm, which enables an infrared image to output a uniform image on the basis of keeping high real-time performance.
The specific technical scheme is as follows:
an infrared image pot cover correction algorithm, the algorithm comprising the steps of:
s1, acquiring an infrared image containing a pot cover phenomenon, performing gridding treatment, and establishing a grid correction coefficient table corresponding to a grid;
s2, carrying out blocking treatment on the infrared image containing the pot cover phenomenon, calculating grids associated with blocks to which pixel points to be corrected belong, and acquiring grid correction coefficients of corresponding grids from a grid correction coefficient table;
S3, calculating an actual correction coefficient of the pixel point to be corrected through the grid correction coefficient related to the pixel point to be corrected;
S4, multiplying the pixel value of the pixel point to be corrected by the actual correction coefficient to obtain the correction value of the pixel point to be corrected.
Further, the step S1 specifically includes: acquiring an infrared image containing a pot cover phenomenon, dividing the acquired infrared image into (n+1) x (m+1) grids, calculating (n+1) x (m+1) grid correction coefficients, and establishing a grid correction coefficient table corresponding to the grids; where m is the number of correction grids in the column direction and n is the number of correction grids in the row direction.
Further, the grid division method of (n+1) × (m+1) is as follows: the other grids except the first row, the last row, the first column and the last column are the same in size; the first and last rows are each 1/2 of the middle row height, and the first and last columns are 1/2 of the middle column width.
Further, the grid correction coefficientThe calculation method comprises the following steps:
For the average value of all pixels contained in the grid of the ith row and the jth column, the calculation method is as follows:
wherein,
Wherein Height is the total number of pixels in the infrared image column direction containing the pot cover phenomenon, width is the total number of pixels in the infrared image row direction containing the pot cover phenomenon,For each pixel number included in the grid column direction,/>The number of pixels included for each grid row direction; src (h, w) is the data of the h row and the w column in the infrared image containing the pot cover phenomenon; max () means taking as output the larger one of the two data contained in brackets; min () denotes taking as output the smaller one of the two data contained in brackets; /(I)For the row start coordinates,/>, of the pixels contained in the ith row and jth column grid in the infrared image actually containing the pot cover phenomenonFor line termination coordinates,/>Column start coordinates,/>For column termination coordinates, num is the total number of pixels contained in each grid.
Further, the step S2 specifically includes:
s21, calculating grid coordinates to which coordinates (h, w) belong according to coordinates (h, w) of pixel points to be corrected in an image src containing a pot cover phenomenon in the whole frame:
wherein, 、/>Respectively representing row coordinate values and column coordinate values of the current pixel point in the whole frame image src containing the pot cover phenomenon, wherein floor () represents data integer;
s22, acquiring coordinates of grids related to pixel points to be corrected; wherein each block of the infrared image partition is associated with four grids, and the coordinates of the four grids are respectively as follows 、/>、/>
S23, obtaining grid correction coefficients of four grids related to the pixel point to be corrected by inquiring a grid correction coefficient table, wherein the grid correction coefficients are respectively、/>、/>、/>
Further, the step S3 specifically includes: calculating the actual correction coefficient of each pixel point to be corrected by using a bilinear interpolation method through grid correction coefficients of four grids related to the pixel
Wherein x and y are intermediate parameters.
Further, steps S2 to S4 are performed for each pixel to be corrected until correction of all the pixels to be corrected is completed.
Further, the algorithm further comprises: s5, acquiring current image data and current detector working temperature, and calculating a correction adjustment coefficient R of the current image according to the detector working temperature and the image data information; the final correction result is obtained by multiplying the correction adjustment coefficient R by the correction value obtained in step S4.
Further, the algorithm is based on an FPGA platform, real-time infrared data are corrected at two non-uniform points and then written into the DDR, and the DDR is used as a data source to calculate an actual correction coefficient for a CPU; the data source is subtracted 24576 and then added 24576 after multiply-divide calculation; reading actual correction coefficients of the pot cover from the DDR in real time according to the time sequence of the image data, correcting, and performing the following processing on decimal multiplication in calculation: amplifying the decimal to the integer power of 2; the amplified data is rounded for calculation and the result is divided by the magnification.
Further, the data operation function in correction is realized in the DDR memory; by replacing the image data DDR address involved in the calculation, the operation before the calculation of the pot cover correction algorithm is set as: freezing the image before calculation; the Fabric does not use DDR in the calculation process; after the calculation is completed, the image thawing operation is executed, and the DDR is released.
Compared with the prior art, one or more of the technical schemes can achieve at least one of the following beneficial effects:
The infrared module pot cover correction algorithm can ensure that the output image is uniform and the pot cover removal effect is good on the basis of keeping high real-time performance of the infrared image. The invention provides an engineering method of an infrared module pot cover correction algorithm, which is easy for engineering realization.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an image of the presence of a pot cover effect.
FIG. 2 is a flowchart of the infrared module pot cover correction algorithm of example 1.
Fig. 3 is a grid distribution diagram of image correction in example 1.
Fig. 4 is a diagram showing the grid distribution of the calculation grid correction coefficients of embodiment 1.
Fig. 5 is a schematic diagram of infrared image blocking in example 1.
Fig. 6 shows four grid correction coefficients for the pixel of example 1.
FIG. 7 is a flow chart of the infrared module pot cover correction algorithm engineering of example 1.
Fig. 8 is a comparison graph of the effect of example 1 before and after the pot cover is removed in scene 1, wherein fig. 8a is a graph of the effect of example 1 before the pot cover is removed in scene 1, and fig. 8b is a graph of the effect of example 1 after the pot cover is removed in scene 1.
Fig. 9 is a comparison graph of the effect of embodiment 1 before and after the pot cover is removed in the scene 2, wherein fig. 9a is a graph of the effect of embodiment 2 before the pot cover is removed, and fig. 9b is a graph of the effect of embodiment 2 after the pot cover is removed.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 2, the embodiment provides an infrared module pot cover correction algorithm based on an FPGA, and adopts a grid correction method.
S1, performing gridding processing on the acquired infrared image, and establishing a grid correction coefficient table corresponding to the grid.
Acquiring an infrared image containing a pot cover phenomenonDividing the image into (n+1) x (m+1) grids, calculating (n+1) x (m+1) grid correction coefficients, and storing the grid correction coefficients into a grid correction coefficient table; where m is the number of correction grids in the column direction and n is the number of correction grids in the row direction.
As shown in fig. 3 and 4, (n+1) × (m+1) mesh division methods are as follows: the other grids except the first row, the last row, the first column and the last column are the same in size; the height of the first row and the last row is 1/2 of the height of the middle rowThe height of the remaining rows is/>The width of the first and last columns is 1/2 of the width of the middle column, i.e./>The width of the remaining columns is/>
Wherein Height is the total number of pixels in the column direction of the infrared image containing the phenomenon of the pot cover, and m is the correction grid number in the column direction; width is the total number of pixels in the infrared image row direction including the pot cover phenomenon; n is the correction grid number in the row direction; For each correction grid column direction contains the number of pixels,/> The number of pixels contained in the row direction of each correction grid.
Grid correction coefficientThe calculation method comprises the following steps:
for the average value of all pixels contained in the jth grid of the ith row, the method of calculation is as follows:
wherein,
Wherein Height is the total number of pixels in the infrared image column direction containing the pot cover phenomenon, width is the total number of pixels in the infrared image row direction containing the pot cover phenomenon,For each correction grid column direction contains the number of pixels,/>The number of pixels included for each correction grid row direction; src (h, w) is the data of the h row and the w column in the infrared image containing the pot cover phenomenon; max () means taking as output the larger one of the two data contained in brackets; min () denotes taking as output the smaller one of the two data contained in brackets; /(I)For the row start coordinates,/>, of the pixels contained in the ith row and jth column grid in the infrared image actually containing the pot cover phenomenonFor line termination coordinates,/>Column start coordinates,/>For the column termination coordinates, the total number of pixels contained in the Num grid.
S2, as shown in FIG. 5, performing matrix blocking treatment on the infrared image containing the pot cover phenomenon; each block overlaps the grid. This embodiment takes as an example that each block has an overlapping portion with four grids. As shown in fig. 6, the solid line portion is a grid, and the broken line portion is a block.
Grid coordinates related to pixels contained in each block are calculated, and grid correction coefficients corresponding to each grid are obtained from a grid correction coefficient table.
S21, calculating grid coordinates to which coordinates (h, w) belong according to the coordinates (h, w) of the pixel points to be corrected in the whole frame of image src containing the pot cover phenomenon;
wherein, 、/>Respectively representing row coordinate values and column coordinate values of the current pixel point in the whole frame image src, and representing data by floor ();
s22, obtaining coordinates of four grids related to the current pixel point to be corrected 、/>、/>
S23, obtaining grid correction coefficients corresponding to four grids related to the current pixel by querying a grid correction coefficient table, wherein the block to which the pixel point (h, w) to be corrected belongs is a dotted rectangle at the upper left corner, the dotted rectangle is associated with four solid rectangles (namely four related grids), and the grid correction coefficients of the four grids are respectively、/>、/>
S3, calculating an actual correction coefficient of the pixel point to be corrected.
Calculating the actual correction coefficient of the pixel point to be corrected by using bilinear interpolation and using the grid correction coefficients of four grids related to the pixel point to be corrected. Wherein x and y are intermediate parameters.
S4, correcting pixels: multiplying the pixel value of the current pixel to be corrected by the actual correction coefficient to obtain a correction value of the pixel to be corrected:
and executing steps S2 to S4 on each pixel point to be corrected until the correction of all the pixel points to be corrected is completed.
As an alternative embodiment, the algorithm further comprises: s5, acquiring current image data and current detector working temperature, and calculating a correction adjustment coefficient R of the current image according to the detector working temperature and the image data information; the final correction result is obtained by multiplying the correction adjustment coefficient R by the correction value obtained in step S4.
As a specific implementation mode, the embodiment implements the infrared module pot cover correction algorithm based on the FPGA platform. The infrared complete machine system comprises an infrared detector, an infrared detector driving circuit, an FPGA processing circuit and an interface driving circuit. The infrared detector is used for converting infrared signals into electric signals; the infrared detector driving circuit converts the electric signal output by the infrared detector into an original 14-bit parallel digital signal; the FPGA processing circuit processes the input 14-bit parallel digital signals in real time, and outputs an interface digital video stream input by the interface chip through algorithm processing; interface drive circuit: and converting the FPGA output digital video stream into a CVBS signal. The infrared detector adopts a detector with 640x512 pixels and 12 mu m pixel spacing, and the FPGA adopts SmartFusion series of microsemi company.
As shown in fig. 7, the infrared image pot cover correction algorithm performs the following processing in the engineering implementation process:
1) And after the real-time infrared data are subjected to non-uniform two-point correction, writing the real-time infrared data into the DDR, and taking the DDR as a data source to calculate an actual correction coefficient for the CPU. The data source is subtracted 24576 from the precision problem and then performed.
2) According to the image data time sequence, the actual correction coefficient of the pot cover is read from the DDR in real time and corrected, and the decimal multiplication cannot be directly realized by Verilog.
A. The decimal is first amplified by an integer power of 2, in this case 14 times 2. The result of this amplified fraction is then divided by the amplification factor, which division can be achieved by a right shift method. The current pixel value is multiplied by the actual correction coefficient.
B. in consideration of precision, the data source is subtracted 24576, and then added 24576 after the multiply-divide operation, and the CPU correction coefficients also need to be synchronized.
The processing method improves the operation accuracy and solves the resource problem.
In CPU soft cores
1) The data operation function is moved to the DDR memory for calculation, so that the problem that floating point type data size is huge and the movement operation is likely to be blocked is solved.
2) The operation before the calculation of the pot cover correction algorithm is modified by replacing the DDR address of the image data participating in the calculation, and the original external reference operation is modified as follows: freezing the image before calculation; and adding DDR not used by Fabric in the calculation process; after the calculation is completed, the image thawing operation is executed, and the DDR is released. The corrected image is normal, and the phenomenon of uneven blocking is avoided.
As shown in fig. 8 and 9, according to the comparison images before and after the pot cover algorithm processing is implemented according to different scenes, the details of the corrected images are more obvious, and the pot cover removing effect is good.
It is apparent that the above examples are only examples for clearly illustrating the technical solution of the present invention, and are not limiting of the embodiments of the present invention. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the invention are to be included in the protection of the present claims.

Claims (10)

1. An infrared image pot cover correction algorithm, which is characterized by comprising the following steps:
s1, acquiring an infrared image containing a pot cover phenomenon, performing gridding treatment, and establishing a grid correction coefficient table corresponding to a grid;
S2, carrying out blocking treatment on the infrared image containing the pot cover phenomenon, calculating grids associated with blocks to which pixel points to be corrected belong, and acquiring grid correction coefficients of corresponding grids from a grid correction coefficient table;
S3, calculating an actual correction coefficient of the pixel point to be corrected through the grid correction coefficient related to the pixel point to be corrected;
S4, multiplying the pixel value of the pixel point to be corrected by the actual correction coefficient to obtain the correction value of the pixel point to be corrected.
2. The infrared image pot cover correction algorithm according to claim 1, wherein the step S1 specifically includes: acquiring an infrared image containing a pot cover phenomenon, dividing the acquired infrared image into (n+1) x (m+1) grids, calculating (n+1) x (m+1) grid correction coefficients, and establishing a grid correction coefficient table corresponding to the grids; where m is the number of correction grids in the column direction and n is the number of correction grids in the row direction.
3. The infrared image pot cover correction algorithm according to claim 2, wherein the grid division method of (n+1) × (m+1) is as follows: the other grids except the first row, the last row, the first column and the last column are the same in size; the first and last rows are each 1/2 of the middle row height, and the first and last columns are 1/2 of the middle column width.
4. The infrared image pot cover correction algorithm of claim 3, wherein the grid correction coefficientsThe calculation method comprises the following steps:
For the average value of all pixels contained in the grid of the ith row and the jth column, the calculation method is as follows:
wherein,
Wherein Height is the total number of pixels in the infrared image column direction containing the pot cover phenomenon, width is the total number of pixels in the infrared image row direction containing the pot cover phenomenon,For each pixel number included in the grid column direction,/>The number of pixels included for each grid row direction; src (h, w) is the data of the h row and the w column in the infrared image containing the pot cover phenomenon; max () means taking as output the larger one of the two data contained in brackets; min () denotes taking as output the smaller one of the two data contained in brackets; /(I)For the row start coordinates,/>, of the pixels contained in the ith row and jth column grid in the infrared image actually containing the pot cover phenomenonFor line termination coordinates,/>For column start coordinates,/>For column termination coordinates, num is the total number of pixels contained in each grid.
5. The infrared image pot cover correction algorithm according to claim 4, wherein the step S2 is specifically:
s21, calculating grid coordinates to which coordinates (h, w) belong according to the coordinates (h, w) of pixels to be corrected in an infrared image src of which the whole frame contains a pot cover phenomenon:
wherein, 、/>Respectively the row coordinate value and the column coordinate value of the current pixel point in the infrared image src containing the pot cover phenomenon in the whole frame; floor () represents the integer of data;
s22, acquiring coordinates of grids related to pixel points to be corrected; wherein each block of the infrared image partition is associated with four grids, and the coordinates of the four grids are respectively as follows 、/>、/>
S23, obtaining grid correction coefficients of four grids related to the pixel point to be corrected by inquiring a grid correction coefficient table, wherein the grid correction coefficients are respectively、/>、/>、/>
6. The infrared image pot cover correction algorithm according to claim 5, wherein the step S3 is specifically: calculating the actual correction coefficient of the current pixel point to be corrected by adopting a bilinear interpolation method through grid correction coefficients of four grids related to the pixel
Wherein x and y are intermediate parameters.
7. The infrared image pot cover correction algorithm according to claim 1, wherein steps S2 to S4 are performed for each pixel to be corrected until correction of all the pixels to be corrected is completed.
8. The infrared image pot cover correction algorithm of claim 1, wherein the algorithm further comprises: s5, acquiring current image data and current detector working temperature, and calculating a correction adjustment coefficient R of the current image according to the detector working temperature and the image data information; the final correction result is obtained by multiplying the correction adjustment coefficient R by the correction value obtained in step S4.
9. The infrared image pot cover correction algorithm according to any one of claims 1 to 8, wherein the algorithm is based on an FPGA platform, performs non-uniform two-point correction on real-time infrared data, writes the corrected data into DDR, and calculates an actual correction coefficient for a CPU as a data source; the data source is subtracted 24576 and then added 24576 after multiply-divide calculation; reading actual correction coefficients of the pot cover from the DDR in real time according to the time sequence of the image data, correcting, and performing the following processing on decimal multiplication in calculation: amplifying the decimal to the integer power of 2; the amplified data is used for calculation and the result is divided by the magnification.
10. The infrared image pot cover correction algorithm according to claim 9, wherein the data operation function in correction is realized in a DDR memory; by replacing the image data DDR address involved in the calculation, the operation before the calculation of the pot cover correction algorithm is set as: freezing the image before calculation; the Fabric does not use DDR in the calculation process; after the calculation is completed, the image thawing operation is executed, and the DDR is released.
CN202311859776.4A 2023-12-30 2023-12-30 Infrared image pot cover correction algorithm Pending CN117911290A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311859776.4A CN117911290A (en) 2023-12-30 2023-12-30 Infrared image pot cover correction algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311859776.4A CN117911290A (en) 2023-12-30 2023-12-30 Infrared image pot cover correction algorithm

Publications (1)

Publication Number Publication Date
CN117911290A true CN117911290A (en) 2024-04-19

Family

ID=90687233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311859776.4A Pending CN117911290A (en) 2023-12-30 2023-12-30 Infrared image pot cover correction algorithm

Country Status (1)

Country Link
CN (1) CN117911290A (en)

Similar Documents

Publication Publication Date Title
US8089533B2 (en) Fixed pattern noise removal circuit, fixed pattern noise removal method, program, and image pickup apparatus
CN102265600B (en) Image processing apparatus and on-vehicle camera apparatus
US7432966B2 (en) Image data correcting method and imaging device
US20100014770A1 (en) Method and apparatus providing perspective correction and/or image dewarping
EP2819092B1 (en) Image correction apparatus and imaging apparatus
JP2009303139A (en) Solid-state imaging apparatus
JP5524133B2 (en) Image processing device
US8369613B2 (en) Image processing circuit, image processing method, and camera
CN113808046B (en) Flat field correction parameter acquisition method and device
CN117911290A (en) Infrared image pot cover correction algorithm
JP2010273282A (en) Image processing apparatus, imaging apparatus, and image processing program
CN105100587B (en) Photographic device and its control method
US9013626B2 (en) Signal processing circuit of solid-state imaging element, signal processing method of solid-state imaging element, and electronic apparatus
JP2012198945A (en) Image processing device, image processing method, and imaging device
CN113473028A (en) Image processing method, image processing device, camera assembly, electronic equipment and medium
JP6115410B2 (en) Image processing apparatus and image processing method
JPH0737079A (en) Method and device for correcting picture distortion
JP6381219B2 (en) Image processing apparatus, image processing method, and program
JP2005020087A (en) Image processing apparatus
WO2016051911A1 (en) Image processing device, imaging device, image processing method, and program
US7990437B2 (en) Color correction in CMOS image sensor
JP2009017583A (en) Image processing device
JP3667234B2 (en) Image processing apparatus, image processing system, image processing method, and storage medium
CN115546055A (en) Low-illumination video image enhancement method based on self-adaptive clipping coefficient
CN117745578A (en) Method for removing pot cover based on FPGA transverse-longitudinal gradient processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Wu Tao

Inventor after: Ye Liting

Inventor after: Liang Chunchun

Inventor after: Yan Zhiyong

Inventor after: Wu Qilong

Inventor after: Huang Zee

Inventor before: Ye Liting

Inventor before: Liang Chunchun

Inventor before: Yan Zhiyong

Inventor before: Wu Qilong

Inventor before: Huang Zee

Inventor before: Wu Tao