Coordinate transformation method of bi-optical image
By obtaining the coordinates of the calibration object feature points in the infrared and visible light images and performing linear fitting, the problem of long time-consuming coordinate conversion of infrared and visible light images in the existing technology is solved, and fast and simple coordinate conversion in a short range is achieved, which is suitable for Used for dual-light pedestrian detection and human body temperature measurement.
Patent Information
- Application Number
- CN202010847049.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-21
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-08-21
AI Technical Summary
The existing coordinate conversion methods for infrared and visible light images are computationally intensive, slow in continuity, and time-consuming, making it difficult to quickly obtain the coordinate conversion parameters of visible light images and infrared images at close range.
By fixing the infrared thermal imaging camera and the visible light camera, the coordinates of the calibration object feature points of the infrared and visible light images are obtained, linear fitting is performed to obtain the coordinate conversion parameters, and these parameters are used to convert any point in the image, simplifying the size of the image. Unification and feature point correspondence process.
In the short-range dual-light pedestrian detection and body temperature measurement scenarios, the coordinate conversion parameters of visible light images and infrared images can be obtained simply and quickly, significantly improving the coordinate conversion speed.
Abstract
Description
Technical Field
[0001] The invention relates to a coordinate conversion method of a dual light image, in particular to a coordinate conversion method of an infrared light image and a visible light image. Background Art
[0002] In the registration of infrared and visible light, due to the large grayscale difference between visible light images and infrared images, the registration is mainly carried out by combining normalized mutual information and edge features, and finally the coordinate transformation relationship between visible light images and infrared images is obtained. This method has large computational complexity, slow continuity, and long time consumption. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a coordinate conversion method for a dual-light image, which can obtain the coordinate conversion parameters of a visible light image and an infrared image in a simple and fast way for close-range dual-light pedestrian detection and temperature measurement scenarios.
[0004] The technical solution provided by the present invention is: a coordinate conversion method of a bi-optical image, comprising the following steps:
[0005] S1: Fix the infrared thermal imager and visible light camera, and make the infrared dual-light fixed object within the field of view of both;
[0006] S2: using the infrared thermal imager and the visible light camera to respectively obtain an infrared image T and a visible light image V of the field of view;
[0007] S3: adjusting the visible light image V to obtain an adjusted visible light image VI, and recording a scaling ratio of the visible light image V to the adjusted visible light image VI, wherein the height and width of the adjusted image VI are the same as those of the infrared image T;
[0008] S4: Obtain the feature point coordinate matrix (T X ,T Y ) and the feature point coordinate matrix of the calibration object in the adjusted visible light image VI (VI X ,VI Y ), where the feature point coordinate matrix (T X ,T Y ) and (VI X ,VI Y ) corresponds to each other, T X and VI X They represent the horizontal coordinate vectors of the feature points in the infrared image T and the adjusted visible light image VI, respectively. Y and VI Y Respectively represent the ordinate vectors of the feature points in the infrared image T and the adjusted visible light image VI;
[0009] S5: Use formula (1) and formula (2) to calculate VI X , T X and VI Y , T Y Perform linear fitting and obtain the parameters (k x , b x ) and (k y , b y ) value;
[0010] VI X =k x *T X +b x (1)
[0011] VI Y =k y *T Y +b y (2)
[0012] S6: transform any coordinates in the bi-optical image;
[0013] Among them, the coordinates (Vx i ,Vy i ) is converted to the corresponding coordinates (Tx i ,Ty i ) is as follows:
[0014] 1) Adjust the visible light image coordinates (Vx) according to the scaling factor in S3 i ,Vy i ), and obtain the corresponding adjusted visible light image coordinates (VI Xi ,VI Yi );
[0015] 2) Using formula (3) and (4) to obtain the coordinate (VI Xi ,VI Yi ) corresponding to the corresponding coordinates in the infrared image T (Tx i ,Ty i )
[0016] T Xi =(VI Xi -b x ) / k x (3)
[0017] T Yi =(VI Yi -b y ) / k y (4)
[0018] Among them, the coordinates (Tx i,Ty i ) is converted into the corresponding coordinates (Vx i ,Vy i ) is as follows:
[0019] 1) Using formulas (5) and (6) we can get the coordinate (Tx i ,Ty i ) corresponding to the adjusted visible light image coordinates (VI Xi ,VI Yi );
[0020] VI Xi =k x *T Xi +b x (5)
[0021] VI Yi =k y *T Yi +b y (6)
[0022] 2) According to the scaling ratio in S3, the coordinates of the adjusted visible light image (VI Xi ,VI Yi ) to obtain the corresponding coordinates (Vx i ,Vy i ).
[0023] Preferably, in S3, the visible light image V is adjusted to an adjusted visible light image VI by bilinear interpolation.
[0024] Further preferably, in S4, a feature point coordinate matrix (T X ,T Y ) and the feature point coordinate matrix of the calibration object in the adjusted visible light image VI (VI X ,VI Y ) are as follows:
[0025] S41: Manually obtain the feature point coordinate matrix (T X ,T Y ) or the coordinate matrix of the feature points of the calibration object in the adjusted visible light image VI (VI X ,VI Y );
[0026] S42: Obtain a feature point coordinate matrix of the calibration object in another image according to the order in which the feature points in the calibration object are obtained in S41.
[0027] Further preferably, the infrared dual-light positioning object is an infrared dual-light positioning plate.
[0028] The coordinate conversion method of a dual-light image provided by the present invention can obtain the coordinate conversion parameters of the two images by using the coordinates of the feature points in the calibration object obtained by a fixed infrared thermal imager and a visible light camera. Afterwards, the coordinates of any point in the image can be converted using the parameters. In the process of obtaining the coordinate conversion parameters, the present invention first unifies the size of the infrared image and the visible light image, then selects the corresponding feature points on the image of the same size, and performs linear fitting using the coordinates of the feature points to obtain the coordinate conversion parameters. The method is simple and fast for close-range dual-light pedestrian detection and human body temperature measurement, and can effectively improve the coordinate conversion speed. DETAILED DESCRIPTION
[0029] The present invention will be further explained below in conjunction with specific implementation schemes, but the present invention is not limited thereto.
[0030] The present invention provides a coordinate conversion method of a bi-optical image, comprising the following steps:
[0031] S1: Fix the infrared thermal imager and the visible light camera, and place the infrared dual-light stator in the fields of view of both cameras, wherein the infrared dual-light stator is preferably an infrared dual-light stator plate;
[0032] S2: using the infrared thermal imager and the visible light camera to respectively obtain an infrared image T and a visible light image V of the field of view;
[0033] S3: adjusting the visible light image V to obtain an adjusted visible light image VI, and recording a scaling ratio of the visible light image V to the adjusted visible light image VI, wherein the height and width of the adjusted image VI are the same as those of the infrared image T;
[0034] S4: Obtain the feature point coordinate matrix (T X ,T Y ) and the feature point coordinate matrix of the calibration object in the adjusted visible light image VI (VI X ,VI Y ), where the feature point coordinate matrix (T X ,T Y ) and (VI X ,VI Y ) corresponds to each other, T X and VI X They represent the horizontal coordinate vectors of the feature points in the infrared image T and the adjusted visible light image VI, respectively. Y and VI Y Respectively represent the ordinate vectors of the feature points in the infrared image T and the adjusted visible light image VI;
[0035] S5: Use formula (1) and formula (2) to calculate VI X , T X and VI Y , T Y Perform linear fitting and obtain the parameters (k x , b x ) and (k y , b y ) value;
[0036] VI X =k x *T X +b x (1)
[0037] VI Y =k y *T Y +b y (2)
[0038] S6: transform any coordinates in the bi-optical image;
[0039] Among them, the coordinates (Vx i ,Vy i ) is converted to the corresponding coordinates (Tx i ,Ty i ) is as follows:
[0040] 1) Adjust the visible light image coordinates (Vx) according to the scaling factor in S3 i ,Vy i ), and obtain the corresponding adjusted visible light image coordinates (VI Xi ,VI Yi );
[0041] 2) Using formula (3) and (4) to obtain the coordinate (VI Xi ,VI Yi ) corresponding to the corresponding coordinates in the infrared image T (Tx i ,Ty i )
[0042] T Xi =(VI Xi -b x ) / k x (3)
[0043] T Yi =(VI Yi -b y ) / k y (4)
[0044] Among them, the coordinates (Tx i,Ty i ) is converted into the corresponding coordinates (Vx i ,Vy i ) is as follows:
[0045] 1) Using formulas (5) and (6) we can get the coordinate (Tx i ,Ty i ) corresponding to the adjusted visible light image coordinates (VI Xi ,VI Yi );
[0046] VI Xi =k x *T Xi +b x (5)
[0047] VI Yi =k y *T Yi +b y (6)
[0048] 2) According to the scaling ratio in S3, the coordinates of the adjusted visible light image (VI Xi ,VI Yi ) to obtain the corresponding coordinates (Vx i ,Vy i ).
[0049] The coordinate conversion method of the dual-light image can obtain the coordinate conversion parameters of the two images by using the coordinates of the feature points in the calibration object obtained by a fixed infrared thermal imager and a visible light camera. Then, the coordinates of any point in the image can be converted using the parameters. In the process of obtaining the coordinate conversion parameters, the present invention first unifies the size of the infrared image and the visible light image, then selects the corresponding feature points on the image of the same size, and uses the coordinates of the feature points for linear fitting to obtain the coordinate conversion parameters. The method is simple and fast for close-range dual-light pedestrian detection and human body temperature measurement, and can effectively improve the coordinate conversion speed.
[0050] As an improvement of the technical solution, in S3, the visible light image V is adjusted to the adjusted visible light image VI by bilinear interpolation.
[0051] As an improvement of the technical solution, in S4, the feature point coordinate matrix (T X ,T Y ) and the feature point coordinate matrix of the calibration object in the adjusted visible light image VI (VI X ,VI Y ) are as follows:
[0052] S41: Manually obtain the feature point coordinate matrix (T X ,T Y ) or the coordinate matrix of the feature points of the calibration object in the adjusted visible light image VI (VI X ,VI Y );
[0053] S42: Obtain a feature point coordinate matrix of the calibration object in another image according to the order in which the feature points in the calibration object are obtained in S41.
[0054] By manually obtaining the coordinates of the feature points of the calibration object and then obtaining the feature point coordinate matrix, the accuracy of the obtained coordinates can be guaranteed. Obtaining them in sequence can ensure the correspondence of the coordinate points and reduce the error rate.
[0055] The detailed description of the present invention is written in a progressive manner, emphasizing the differences between the various implementations, and similar parts thereof can be referred to each other.
[0056] The embodiments of the present invention are described in detail above, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A coordinate transformation method for a bi-optical image, characterized in that: The steps include: S1: Fix the infrared thermal imager and visible light camera, and make the infrared dual-light fixed object within the field of view of both; S2: using the infrared thermal imager and the visible light camera to respectively obtain an infrared image T and a visible light image V of the field of view; S3: Adjust the visible light image V to obtain an adjusted visible light image VI, and record a scaling ratio of the visible light image V to the adjusted visible light image VI, wherein the height and width of the adjusted image VI are the same as those of the infrared image T; S4: Obtain the feature point coordinate matrix (T X ,T Y ) and the coordinate matrix of the feature points of the calibration object in the adjusted visible light image VI (VI X ,VI Y ), where the feature point coordinate matrix (T X ,T Y ) and (VI X ,VI Y ) corresponds to each other, T X and VI X They represent the horizontal coordinate vectors of the feature points in the infrared image T and the adjusted visible light image VI, respectively. Y and VI Y Respectively represent the ordinate vectors of the feature points in the infrared image T and the adjusted visible light image VI; Among them, the feature point coordinate matrix (T X ,T Y ) and the coordinate matrix of the feature points of the calibration object in the adjusted visible light image VI (VI X ,VI Y ) are as follows: S41: Manually obtain the feature point coordinate matrix (T X ,T Y ) or the coordinate matrix of the feature points of the calibration object in the adjusted visible light image VI (VI X ,VI Y ); S42: Obtaining a feature point coordinate matrix of the calibration object in the adjusted visible light image VI according to the order of obtaining the feature points in the calibration object in S41; S5: Use formula (1) and formula (2) to calculate VI X , T X and VI Y , T Y Perform linear fitting and obtain the parameters (k x , b x ) and (k y , b y ) value; YOU X = k x* T X + b x (1) YOU Y = k y* T Y + b y (2) S6: transform any coordinates in the bi-optical image; Among them, the coordinates (Vx i ,Vy i ) is converted to the corresponding coordinates (Tx i ,Ty i ) is as follows: 1) Adjust the visible light image coordinates (Vx i ,Vy i ), and obtain the corresponding adjusted visible light image coordinates (VI Xi ,VI Yi ); 2) Using formulas (3) and (4), we can get the coordinates (VI Xi ,VI Yi ) corresponding to the corresponding coordinates in the infrared image T (Tx i ,Ty i ) T Xi = (VI Xi -b x ) / k x (3) T Yi = (VI Yi - b y ) / k y (4) Among them, the coordinates in the infrared image T (Tx i ,Ty i ) is converted into the corresponding coordinates (Vx i ,Vy i ) is as follows: 1) Using formulas (5) and (6) we can get the coordinates (Tx i ,Ty i ) corresponding to the adjusted visible light image coordinates (VI Xi ,VI Yi ); YOU Xi = k x *T Xi + b x (5) YOU Yi = k y *T Yi + b y (6) 2) Adjust the visible light image coordinates according to the scaling ratio in S3 (VI Xi ,VI Yi ) to obtain the corresponding coordinates (Vx i ,Vy i ).
2. The coordinate conversion method of bi-optical images according to claim 1, characterized in that: In S3, the visible light image V is adjusted to an adjusted visible light image VI through bilinear interpolation.
3. The coordinate conversion method of bi-optical images according to claim 1, characterized in that: The infrared dual-light positioning object is an infrared dual-light positioning plate.
