[go: up one dir, main page]

CN114339209B - Method for measuring and calculating image inclination value, image acquisition system, device and medium - Google Patents

Method for measuring and calculating image inclination value, image acquisition system, device and medium Download PDF

Info

Publication number
CN114339209B
CN114339209B CN202111646007.7A CN202111646007A CN114339209B CN 114339209 B CN114339209 B CN 114339209B CN 202111646007 A CN202111646007 A CN 202111646007A CN 114339209 B CN114339209 B CN 114339209B
Authority
CN
China
Prior art keywords
image
reference line
value
corrected
pixel value
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.)
Active
Application number
CN202111646007.7A
Other languages
Chinese (zh)
Other versions
CN114339209A (en
Inventor
郑旭阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111646007.7A priority Critical patent/CN114339209B/en
Publication of CN114339209A publication Critical patent/CN114339209A/en
Application granted granted Critical
Publication of CN114339209B publication Critical patent/CN114339209B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Abstract

本申请公开了一种测算像倾值的方法、图像采集系统、装置及介质,涉及成像系统调试与测量领域。该方法首先获取由红外成像观调装置采集的第一图像以及第二图像;其中,第一图像根据白光成像得到,第二图像根据夜视成像得到,第一图像、第二图像的中心重合;然后根据预先设定的参考线确定第一图像、第二图像中较正的一个图像;最后以第一图像、第二图像中较正的一个图像为基准,根据另一个图像上点的像素值获取双模图像像倾值。由此可见,该方法实现了对双模成像系统像倾斜的测算。

This application discloses a method for measuring image tilt value, an image acquisition system, a device and a medium, and relates to the field of imaging system debugging and measurement. The method first obtains a first image and a second image collected by an infrared imaging observation device; wherein, the first image is obtained based on white light imaging, the second image is obtained based on night vision imaging, and the centers of the first image and the second image coincide; Then determine the corrected image of the first image and the second image based on the preset reference line; finally, use the corrected image of the first image and the second image as the benchmark, based on the pixel value of the point on the other image Obtain the image tilt value of the dual-mode image. It can be seen that this method realizes the measurement of the image tilt of the dual-mode imaging system.

Description

Method for measuring and calculating image inclination value, image acquisition system, device and medium
Technical Field
The present application relates to the field of debugging and measurement of imaging systems, and in particular, to a method for measuring and calculating an image tilt value, an image acquisition system, an image acquisition device, and a medium.
Background
With the rapid development of imaging systems, technologies such as white light imaging, low-light night vision and infrared imaging are mature, and progress towards all-weather imaging observation is gradually carried out, so that in order to adapt to all-weather imaging, white light imaging and night vision imaging are often required to form a set of dual-mode imaging system, and all-weather images are output by utilizing an image fusion technology.
In the process of image fusion, parameters such as field of view, image tilt, coaxiality and the like of dual-mode imaging are required to be kept in a certain range, and typically, the relative image tilt of dual modes needs to be kept in 1: within a slope value of 100. The infrared imaging observation and adjustment device in the existing dual-mode imaging system is connected with a display, and dual-mode image inclination values cannot be measured.
It can be seen that how to measure and calculate the image tilt of the dual-mode imaging system is a problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a method for measuring and calculating an image inclination value, an image acquisition system, an image acquisition device and a medium, which are used for measuring and calculating the image inclination of a dual-mode imaging system.
In order to solve the above technical problems, the present application provides a method for measuring and calculating an image tilt value, comprising:
acquiring a first image and a second image acquired by an infrared imaging viewing device; the first image is obtained according to white light imaging, the second image is obtained according to night vision imaging, and the centers of the first image and the second image are coincident;
determining a corrected image in the first image and the second image according to a preset reference line;
taking the corrected one of the first image and the second image as a reference, and acquiring a dual-mode image inclination value according to the pixel value of a point on the other image;
The determining the corrected one of the first image and the second image according to the preset reference line comprises the following steps:
setting a first reference line on the first image, setting a second reference line on the second image, and setting a standard reference line on an upper computer, wherein each reference line is a cross dividing line;
determining a corrected one of the first image and the second image according to the relation among the first reference line, the second reference line and the standard reference line;
the obtaining the dual-mode image inclination value according to the pixel value of the point on the other image by taking the corrected image of the first image and the second image as a reference comprises the following steps:
judging whether a reference line on the other image coincides with the standard reference line or not by taking the corrected one of the first image and the second image as a reference;
if not, collecting the pixel value of any point on the reference line and the pixel value of the center point of the standard reference line;
and acquiring a tangent value between the pixel value on the reference line and the pixel value of the center point of the standard reference line, wherein the tangent value is the dual-mode image inclination value.
Preferably, the infrared imaging viewing device comprises:
a blackbody, a cross target plate, an infrared collimator, a CCD and an IR detector;
the black body is positioned in a first preset distance outside the cross target plate;
the cross target plate is positioned outside the infrared collimator tube within a second preset distance;
the lens of the IR detector, the lens of the CCD and the center of the lens of the infrared collimator are positioned on the same plane, and the lens of the IR detector and the lens of the CCD are respectively positioned in front of the lens of the infrared collimator within a third preset distance.
Preferably, the determining the corrected one of the first image and the second image according to the preset reference line includes:
setting a first reference line on the first image, and setting a second reference line on the second image, wherein the reference line is a cross dividing line;
and determining a corrected one of the first image and the second image according to the relation between the first reference line and the second reference line.
Preferably, any point on the reference line is an upper end point of the reference line in the first quadrant.
In order to solve the above technical problems, the present application further provides an image acquisition system, including: the infrared imaging observation and adjustment device and the upper computer;
The infrared imaging observation and adjustment device is connected with the upper computer;
the infrared imaging observation device is used for obtaining a first image according to white light imaging and obtaining a second image according to night vision imaging, wherein the centers of the first image and the second image are coincident;
the upper computer is used for acquiring the first image and the second image, and determining a corrected image in the first image and the second image according to a preset reference line; acquiring a dual-mode image inclination value according to the pixel value of a point on the other image by taking the corrected image in the first image and the second image as a reference;
the determining the corrected one of the first image and the second image according to the preset reference line comprises the following steps:
setting a first reference line on the first image, setting a second reference line on the second image, and setting a standard reference line on an upper computer, wherein each reference line is a cross dividing line;
determining a corrected one of the first image and the second image according to the relation among the first reference line, the second reference line and the standard reference line;
The obtaining the dual-mode image inclination value according to the pixel value of the point on the other image by taking the corrected image of the first image and the second image as a reference comprises the following steps:
judging whether a reference line on the other image coincides with the standard reference line or not by taking the corrected one of the first image and the second image as a reference;
if not, collecting the pixel value of any point on the reference line and the pixel value of the center point of the standard reference line;
and acquiring a tangent value between the pixel value on the reference line and the pixel value of the center point of the standard reference line, wherein the tangent value is the dual-mode image inclination value.
In order to solve the technical problem, the present application further provides a device for measuring and calculating an image tilt value, including:
the first acquisition module is used for acquiring a first image and a second image acquired by the infrared imaging viewing and adjusting device; the first image is obtained according to white light imaging, the second image is obtained according to night vision imaging, and the centers of the first image and the second image are coincident;
the determining module is used for determining a corrected image in the first image and the second image according to a preset reference line;
The second acquisition module is used for acquiring a dual-mode image inclination value according to the pixel value of a point on the other image by taking the corrected one of the first image and the second image as a reference;
the determining module is specifically configured to set a first reference line on the first image, set a second reference line on the second image, and set a standard reference line on the upper computer, where each reference line is a cross dividing line; determining a corrected one of the first image and the second image according to the relation among the first reference line, the second reference line and the standard reference line;
the second acquisition module is specifically configured to determine whether a reference line on the other image coincides with the standard reference line based on the corrected one of the first image and the second image; if not, collecting the pixel value of any point on the reference line and the pixel value of the center point of the standard reference line; and acquiring a tangent value between the pixel value on the reference line and the pixel value of the center point of the standard reference line, wherein the tangent value is the dual-mode image inclination value.
In order to solve the technical problem, the present application further provides a device for measuring and calculating an image tilt value, including:
A memory for storing a computer program;
and the processor is used for realizing the steps of the method for measuring and calculating the image tilt value when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for measuring and calculating an image tilt value described above.
The application provides a method for measuring and calculating an image inclination value, which comprises the steps of firstly, acquiring a first image and a second image which are acquired by an infrared imaging viewing and adjusting device; the first image is obtained according to white light imaging, the second image is obtained according to night vision imaging, and the centers of the first image and the second image are coincident; then determining a corrected image in the first image and the second image according to a preset reference line; and finally, taking the corrected one of the first image and the second image as a reference, and acquiring the image inclination value of the dual-mode image according to the pixel value of the point on the other image. It can be seen that the method realizes the measurement and calculation of the image tilt of the dual-mode imaging system.
In addition, the application also provides an image acquisition system, a device for measuring and calculating the image inclination value and a computer readable storage medium, which have the same beneficial effects as the method for measuring and calculating the image inclination value.
Drawings
For a clearer description of embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flow chart of a method for measuring and calculating an image tilt value according to the present application;
FIG. 2 is a block diagram of an infrared imaging viewing device;
FIG. 3 is a cross division line on an upper computer;
FIG. 4 is a schematic diagram of a dual mode imaging system image tilt;
FIG. 5 is a block diagram of an apparatus for measuring and calculating an image tilt value according to an embodiment of the present application;
FIG. 6 is a block diagram of an apparatus for measuring and calculating an image tilt value according to another embodiment of the present application;
fig. 7 is a flowchart of a method for measuring and calculating an image tilt value in an application scenario according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application 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 application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present application.
The application provides a method for measuring and calculating an image tilt value, an image acquisition system, an image acquisition device and a medium, which are used for measuring and calculating the image tilt of a dual-mode imaging system.
In order to adapt to all-weather imaging, white light imaging and night vision imaging are required to form a set of imaging dual-mode imaging system, and all-weather images are output by utilizing an image fusion technology. In the image fusion process, the need to keep the dual mode relative image tilt needs to be kept at 1: within a slope value of 100. According to the application, the measurement and calculation of the image tilt value of the dual-mode system are realized on an upper computer platform through a laboratory virtual instrument engineering platform (Laboratory Virtual Instrument Engineering Workbench, labVIEW). LabVIEW is a graphical programming language that uses icons instead of text lines to create an application. LabVIEW adopts a data flow programming mode, and the data flow between nodes in the flow chart determines the execution sequence of virtual instruments (Virtual instrument, VI) and functions. It is also a general purpose programming system with a huge library of functions that accomplish any programming task. The function library of LabVIEW comprises data acquisition, GPIB, serial port control, data analysis, data display, data storage and the like. The IMAQdx Open Camera.vi, IMAQdx configuration Grab.vi, IMAQ Overlay Line, IMAQ colorBCGLookup and the like mentioned in the present application are all tool functions in their function libraries.
In order to better understand the aspects of the present application, the present application will be described in further detail with reference to the accompanying drawings and detailed description. Fig. 1 is a flowchart of a method for measuring and calculating an image tilt value according to the present application. As shown in fig. 1, the method includes:
s10: acquiring a first image and a second image acquired by an infrared imaging viewing device; the first image is obtained according to white light imaging, the second image is obtained according to night vision imaging, and centers of the first image and the second image are coincident.
In order to realize measurement and calculation of the image tilt value of the dual-mode imaging system, firstly, the infrared imaging device performs white light imaging and generates a corresponding white light image, and performs night vision imaging and generates a corresponding night vision image, then the upper computer acquires the white light image and the night vision image which are acquired by the image acquisition device, and the image tilt value of the dual-mode imaging is measured and calculated.
Commonly used image acquisition devices are typically Charge-coupled devices (CCDs) or infrared (Infrared Radiation, IR) detectors. The CCD is a detecting element for representing the signal size by charge quantity and transmitting signals by coupling mode, and has the advantages of self-scanning, wide sensing spectrum range, small distortion, small volume, light weight, low system noise, low power consumption, long service life, high reliability and the like, and can be made into an assembly with very high integration level. The IR detector is a wireless communication mode, and can transmit wireless data. Typically, a CCD is used for white light image acquisition, and an IR detector is used for night vision image acquisition. The infrared appearance adjusting device can adjust white light images and night vision images, and therefore measurement of dual-mode imaging image inclination values is facilitated. In this embodiment, the first image collected by the infrared tone device is obtained by white light imaging, and the second image is obtained by night vision imaging. In practice, the first image acquired may also be obtained by night vision imaging, and the second image acquired may also be obtained by white light imaging, where the first and second images are merely to distinguish between the generated images in the two imaging modes. In addition, in order to facilitate measurement and calculation of the image inclination value, the infrared image adjusting device can adjust images generated in two imaging modes, and the centers of the two images are guaranteed to coincide.
The upper computer acquires a first image and a second image acquired by the infrared imaging observation device, and image information acquisition is carried out through IMAQdx Open camera.vi, IMAQdx configuration Grab.vi and other module functions in the Lab VIEW.
S11: and determining a corrected image in the first image and the second image according to a preset reference line.
The preset reference line may be a reference line set in the first image and the second image, or may be selected in addition to the reference line set in the first image and the second image, and in general, the reference line is set in the upper computer. The form of the reference line is not limited as long as the degree of inclination of the image can be determined from the reference line. To facilitate the observation of the image tilt, the reference line is typically selected to be a cross-split line. The first image and the second image are provided with cross dividing lines or the first image, the second image and the upper computer are provided with cross dividing lines. The upper computer adds a cross division line in the acquired image through a IMAQ Overlay Line function in the LabVIEW, and the cross division line is used as a reference and comparison standard of the acquired image cross division line. The center of the cross division line can be at the center of the first image, the center of the second image and the center of the upper computer. In order to judge the image inclination through the cross dividing line, the cross dividing line can be as clear as possible and occupy larger positions on the first image, the second image and the upper computer. And determining the corrected one of the first image and the second image according to the inclination degree of the cross dividing line.
S12: and taking the corrected one of the first image and the second image as a reference, and acquiring the image inclination value of the dual-mode image according to the pixel value of the point on the other image.
In the step S11, the corrected one of the first image and the second image is determined, the upper computer collects image information by using the image attribute node, captures the pixel value of the collected image by the cursor, and estimates the image tilt value based on the pixel value. When image information is acquired, the situation that the image is excessive or excessively dark can possibly occur, so that in order to meet the requirement of on-site debugging, an upper computer can adjust gray scale, contrast and GAMMA through a IMAQ colorBCGLookup function in LabVIEW, and the pixel value corresponding to a pixel point can be accurately acquired, and then the dual-mode image inclination value can be acquired according to the pixel value.
The method for measuring and calculating the image inclination value provided by the embodiment comprises the steps of firstly, acquiring a first image and a second image acquired by an infrared imaging observation device; the first image is obtained according to white light imaging, the second image is obtained according to night vision imaging, and the centers of the first image and the second image are coincident; then determining a corrected image in the first image and the second image according to a preset reference line; and finally, taking the corrected one of the first image and the second image as a reference, and acquiring the image inclination value of the dual-mode image according to the pixel value of the point on the other image. It can be seen that the method realizes the measurement and calculation of the image tilt of the dual-mode imaging system.
In the above embodiments, the white light imaging and night vision imaging are achieved by an infrared imaging viewing device, which in practice preferably comprises:
a blackbody, a cross target plate, an infrared collimator, a CCD and an IR detector;
the black body is positioned outside the cross target plate within a first preset distance;
the cross target plate is positioned outside the infrared collimator tube within a second preset distance;
the centers of the lens of the IR detector, the lens of the CCD and the lens of the infrared collimator are positioned on the same plane, and the lens of the IR detector and the lens of the CCD are respectively positioned in front of the lens of the infrared collimator within a third preset distance.
Fig. 2 is a block diagram of an infrared imaging viewing device. As shown in fig. 2, the infrared imaging viewing and adjusting device comprises a black body 1, a cross target plate 2, an infrared collimator 3, a CCD 4 and an IR detector 5. The black body 1 is positioned outside the cross target plate 2 within a first preset distance; the cross target plate 2 is positioned outside the infrared collimator 3 within a second preset distance; the centers of the lens of the IR detector 5, the lens of the CCD 4 and the lens of the infrared collimator 3 are positioned on the same plane, and the lens of the IR detector 5 and the lens of the CCD 4 are respectively positioned in front of the lens of the infrared collimator 3 by a third preset distance.
In the infrared imaging observation device, the blackbody 1 can emit radiation values outwards, and the higher the temperature is, the larger the radiation value is, so that the observed image is clearer; the cross target plate 2 is used for creating a cross dividing line, so that the cross dividing line is conveniently arranged in the first image and the second image; the infrared collimator 3 has a corresponding light path design, and the infrared collimator 3 can ensure that the IR detector 5 can observe images; when the light intensity is strong in daytime, the CCD 4 can be used for collecting images, and when the light is dark, the CCD 4 can be used for collecting images by switching the image collection into the IR detector 5. The transmission path of the light rays in the infrared imaging observation and adjustment device is a blackbody 1-cross target plate 2-infrared collimator 3-CCD 4 or an IR detector 5. In addition, the infrared appearance adjusting device is further provided with a measuring workbench 6, and can be adjusted up and down or 360 degrees, so that the center of the CCD 4 lens, the center of the IR detector 5 and the center of the infrared collimator 3 are kept on the same straight line as much as possible, and a relatively complete and correct image can be captured conveniently. The setting of the preset distance is not limited, and each component is placed at a proper position according to the actual situation. The upper computer is respectively connected with the CCD 4 and the IR detector 5, and can switch the equipment for collecting the images according to actual conditions.
The infrared imaging observation and adjustment device provided by the embodiment can enable a clearer image to be observed through the change of the temperature of the black body; all-weather images can be acquired through CCD and IR; the cross dividing line is created through the cross target plate, so that the inclination of the image can be primarily judged.
In the above embodiment, the corrected one of the first image and the second image is determined based on the reference line set in advance. In an implementation, the reference line may be provided in the first image and the second image, respectively, the two images being mutually referenced. Therefore, determining the corrected one of the first image and the second image according to the preset reference line comprises:
setting a first reference line on the first image, and setting a second reference line on the second image, wherein the reference line is a cross dividing line;
and determining a corrected one of the first image and the second image according to the relation between the first reference line and the second reference line.
A first reference line is set on the first image and a second reference line is set on the second image by the IMAQ Overlay Line function in LabVIEW, respectively. The first reference line and the second reference line are not limited, and preferably, the reference lines are selected to be cross-shaped dividing lines, and two straight lines in the cross-shaped dividing lines vertically intersect. And setting cross dividing lines on the first image and the second image respectively, and judging one image which is positive in comparison in the two images by taking the two images as a reference. When calculating the image inclination value, the image inclination value of the dual-mode image is obtained according to the pixel value of a point on the other image by taking one corrected image as a reference. When calculating the tilt value by only relying on the reference lines on two images, it is necessary to select the pixel values of two points on the other image to calculate the tilt value.
According to the embodiment, the first reference line is arranged on the first image, the second reference line is arranged on the second image, and one image which is corrected in the two images can be judged according to the reference line, so that the reference line is arranged on the first image and the second image to provide a reference basis for determining the one image which is corrected in the two images.
In the above embodiment, the reference line is only set on the first image and the second image, the two images are mutually used as the reference, and the corrected one of the two images is judged according to the reference line. In order to more accurately judge one image which is corrected in the two images, besides setting reference lines on the first image and the second image respectively, the reference lines can also be set on the upper computer, and the reference lines on the upper computer are used as a reference to determine the one image which is corrected in the two images. Therefore, as a preferred embodiment, determining the corrected one of the first image and the second image according to the preset reference line includes:
setting a first reference line on a first image, setting a second reference line on a second image, and setting a standard reference line on an upper computer, wherein each reference line is a cross dividing line;
And determining a corrected one of the first image and the second image according to the relation among the first reference line, the second reference line and the standard reference line.
And setting reference lines on the first image, the second image and the upper computer respectively. The reference line on the upper computer is a standard reference line. The form of the reference line is not limited, and preferably, the reference line is selected to be a cross dividing line, and two straight lines of the cross dividing line are perpendicular to each other. FIG. 3 is a cross-sectional line on an upper computer. And judging the corrected one of the two images by taking the cross dividing line on the upper computer as a reference. And determining a corrected image in the first image and the second image according to the degree that the first reference line in the first image and the second reference line in the second image deviate from the standard reference line by taking the standard reference line on the upper computer as a standard. Since the standard reference line is a cross dividing line and is two straight lines perpendicular to each other, the standard reference line can be regarded as a rectangular coordinate system. When determining the corrected image in the two images, the determination can be performed according to the degree that the first reference line and the second reference line in any quadrant in the rectangular coordinate system deviate from the standard reference line. If the angle between the first reference line and the positive half axis of the standard reference line in the first quadrant is smaller than the angle between the second reference line and the positive half axis of the standard reference line in the first quadrant, it is determined that the first image is the corrected one of the two images, as in determining the corrected one of the two images based on the degree to which the first reference line and the second reference line are offset from the standard reference line in the rectangular coordinate system. Likewise, the corrected one of the two images may also be determined based on the extent to which the first reference line and the second reference line on the remaining quadrants are offset from the standard reference line.
According to the embodiment, the reference lines are arranged on the first image, the second image and the upper computer, and the reference line on the upper computer is used as a reference, so that one image which is corrected on the two images can be accurately judged.
In the above embodiment, the standard reference line on the upper computer is used as a reference, and the corrected one of the two images is accurately determined, so that the image inclination value can be accurately calculated. For the preferred implementation manner of measuring the image inclination value, taking the corrected one of the first image and the second image as a reference, acquiring the image inclination value of the dual-mode image according to the pixel value of the point on the other image comprises the following steps:
judging whether a reference line on the other image coincides with a standard reference line or not by taking the corrected one of the first image and the second image as a reference;
if not, collecting the pixel value of any point on the reference line and the pixel value of the center point of the standard reference line;
and acquiring a tangent value between the pixel value on the reference line and the pixel value of the center point of the standard reference line, wherein the tangent value is the dual-mode image inclination value.
And determining one image which is corrected in the two images according to a standard reference line on the upper computer, and taking the one image which is corrected in the two images as a reference. It should be noted that, when a positive image is determined, if the reference line on the image deviates from the standard reference line by a certain angle, that is, does not completely coincide with the standard reference line, the infrared imaging viewing device may be debugged to make the reference line on the image completely coincide with the standard reference line.
After the adjustment is finished, judging whether the reference line on the other image is overlapped with the standard reference line, if so, indicating that the two images are not inclined, and directly realizing the fusion of the images. If the pixel values are not overlapped, the pixel value of any point on the reference line and the pixel value of the center point of the standard reference line can be acquired, and the upper computer automatically calculates the tangent value between the pixel value on the reference line and the pixel value of the center point of the standard reference line, wherein the tangent value is the dual-mode image inclination value. Fig. 4 is a schematic diagram of a dual mode imaging system image tilt. Two cross dividing lines in the figure represent a first reference line and a second reference line respectively, and whether each cross dividing line represents the first reference line or the second reference line is determined according to actual conditions. The standard reference line is regarded as a rectangular coordinate system, and after determining the right one of the two images, any point selected on the reference line for the other image may be a point located on any quadrant, which is not limited herein. The pixel value of any point on the acquisition reference line and the pixel value on the standard reference line are obtained by image information acquisition through module functions such as IMAQdx Open camera.vi, IMAQdx configuration Grab.vi and the like in LabVIEW, and the pixel value of the acquired image is captured through a cursor. Assuming that any point on the acquired reference line is the point A in FIG. 4, the pixel value of the point A, that is, the coordinate value is (x 1 ,y 1 ) The center point of the collected standard reference line is the point O in FIG. 4, and the pixel value of the point O, that is, the coordinate value is (x 0 ,y 0 ) Then the tangent value between the two is (y 1 ,y 0 )/(x 1 ,x 0 )。
When a reference line on the other image is not coincident with a standard reference line, collecting pixel values of any point on the reference line and pixel values of a center point of the standard reference line; the tangent value between the pixel value on the measuring reference line and the pixel value of the center point of the standard reference line realizes the measurement of the image tilt value of the dual-mode image.
In the above embodiment, after determining the righted one of the two images, any point on the reference line for the other image may be a point located on any quadrant. In practice, as a preferred embodiment, any point on the acquired reference line is the upper end point of the reference line in the first quadrant.
When any point on the collected reference line is a point on the first quadrant, the image inclination value can be calculated by coordinate conversion, and when any point on the collected reference line is a point on the first quadrant, the image inclination value can be obtained by directly carrying out tangent calculation through the collected pixel value, so that any point on the collected reference line is a point on the first quadrant. When a point on the first quadrant is selected, the further from the center point of the standard reference line, the more accurate the pixel value on the acquired reference line is, and thus the upper end point of the reference line on the first quadrant is selected to be acquired, such as point a in fig. 4.
Any point on the acquired reference line provided by the embodiment is an upper end point of the reference line in the first quadrant, on one hand, the tangent value calculated according to the pixel value of the point on the first quadrant is the image tilt value, so that the calculation is simple, on the other hand, the selected point is the upper end point of the first quadrant, the obtained pixel value is accurate, and the image tilt value can be calculated more accurately.
On the basis of the above embodiment, this embodiment also provides an image acquisition system, including: the infrared imaging observation and adjustment device and the upper computer;
the infrared imaging observation and adjustment device is connected with the upper computer;
the infrared imaging observation device is used for obtaining a first image according to white light imaging and obtaining a second image according to night vision imaging, wherein the centers of the first image and the second image are coincident;
the upper computer is used for acquiring a first image and a second image, and determining a corrected image in the first image and the second image according to a preset reference line; acquiring a dual-mode image inclination value according to the pixel value of a point on the other image by taking the corrected image in the first image and the second image as a reference; specifically, determining a corrected one of the first image and the second image according to a preset reference line includes:
Setting a first reference line on a first image, setting a second reference line on a second image, and setting a standard reference line on an upper computer, wherein each reference line is a cross dividing line;
determining a corrected one of the first image and the second image according to the relation among the first reference line, the second reference line and the standard reference line;
taking one corrected image in the first image and the second image as a reference, acquiring the image inclination value of the dual-mode image according to the pixel value of the point on the other image comprises the following steps:
judging whether a reference line on the other image coincides with a standard reference line or not by taking the corrected one of the first image and the second image as a reference;
if not, collecting the pixel value of the center point of the pixel value standard reference line of any point on the reference line;
and acquiring a tangent value between the pixel value on the reference line and the pixel value of the center point of the standard reference line, wherein the tangent value is the dual-mode image inclination value.
The image acquisition system provided in this embodiment corresponds to the above method for measuring and calculating the image tilt value, and the method for measuring and calculating the image tilt value is described in detail above, which is not described here again.
In the above embodiments, the method for measuring and calculating the image tilt value is described in detail, and the application also provides a corresponding embodiment of the device for measuring and calculating the image tilt value. It should be noted that the present application describes an embodiment of the device portion from two angles, one based on the angle of the functional module and the other based on the angle of the hardware.
Fig. 5 is a block diagram of an apparatus for measuring and calculating an image tilt value according to an embodiment of the present application. The embodiment is based on the angle of the functional module, and comprises:
a first acquisition module 10 for acquiring a first image and a second image acquired by the infrared imaging viewing device; the first image is obtained according to white light imaging, the second image is obtained according to night vision imaging, and the centers of the first image and the second image are coincident;
a determining module 11, configured to determine a corrected one of the first image and the second image according to a preset reference line;
a second obtaining module 12, configured to obtain a dual-mode image inclination value according to a pixel value of a point on the other image with reference to the corrected one of the first image and the second image; the determining module 11 is specifically configured to set a first reference line on the first image, set a second reference line on the second image, and set a standard reference line on the upper computer, where each reference line is a cross dividing line; determining a corrected one of the first image and the second image according to the relation among the first reference line, the second reference line and the standard reference line;
the second obtaining module 12 is specifically configured to determine whether a reference line on one of the first image and the second image is coincident with a standard reference line based on the corrected image; if not, collecting the pixel value of any point on the reference line and the pixel value of the center point of the standard reference line; and acquiring a tangent value between the pixel value on the reference line and the pixel value of the center point of the standard reference line, wherein the tangent value is the dual-mode image inclination value.
Since the embodiments of the apparatus portion and the embodiments of the method portion correspond to each other, the embodiments of the apparatus portion are referred to the description of the embodiments of the method portion, and are not repeated herein.
The device for measuring and calculating the image inclination value provided by the embodiment firstly acquires a first image and a second image acquired by an infrared imaging observation device through a first acquisition module; then determining a corrected image in the first image and the second image according to a preset reference line through a determining module; and finally, acquiring a dual-mode image inclination value according to the pixel value of the point on the other image by using the corrected image in the first image and the second image as a reference through a second acquisition module. It can be seen that the device realizes the measurement and calculation of the image tilt of the dual-mode imaging system.
Fig. 6 is a block diagram of an apparatus for measuring and calculating an image tilt value according to another embodiment of the present application. The device for measuring and calculating the image tilt value according to the embodiment based on the hardware angle as shown in fig. 6 includes:
a memory 20 for storing a computer program;
a processor 21 for carrying out the steps of the method of measuring an image tilt value as mentioned in the above embodiments when executing a computer program.
The device for measuring and calculating the image tilt value provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in hardware in at least one of a digital signal processor (Digital Signal Processor, DSP), a Field programmable gate array (Field-Programmable Gate Array, FPGA), a programmable logic array (Programmable Logic Array, PLA). The processor 21 may also comprise a main processor, which is a processor for processing data in an awake state, also called central processor (Central Processing Unit, CPU), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with an image processor (Graphics Processing Unit, GPU) for rendering and rendering of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (Artificial Intelligence, AI) processor for processing computing operations related to machine learning.
Memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing a computer program 201, where the computer program, when loaded and executed by the processor 21, is capable of implementing the relevant steps of the method for measuring and calculating an image tilt value disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may further include an operating system 202, data 203, and the like, where the storage manner may be transient storage or permanent storage. The operating system 202 may include Windows, unix, linux, among others. The data 203 may include, but is not limited to, the data related to the above-mentioned method for measuring an image tilt value, and the like.
In some embodiments, the device for measuring and calculating the image tilt value may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
It will be appreciated by those skilled in the art that the configuration shown in fig. 6 is not limiting of the apparatus for measuring and calculating the image tilt value and may include more or less components than those shown.
The device for measuring and calculating the image tilt value provided by the embodiment of the application comprises a memory and a processor, wherein the processor can realize the following method when executing a program stored in the memory: the method for measuring and calculating the image inclination value has the same effect.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps as described in the method embodiments above.
It will be appreciated that the methods of the above embodiments, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored on a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium for performing all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The computer readable storage medium provided by the application comprises the method for measuring and calculating the image inclination value, and the effects are the same as the above.
The present application will be further described in detail below with reference to fig. 7, in order to enable those skilled in the art to better understand the technical solutions of the present application. Fig. 7 is a flowchart of a method for measuring and calculating an image tilt value in an application scenario according to an embodiment of the present application. As shown in fig. 7, the method includes:
s13: selecting an image device;
s14: initializing equipment and collecting images;
s15: overlapping the cross dividing line with the image;
s16: gray scale, contrast, GAMMA adjustment;
s17: outputting an image;
s18: acquiring image information and acquiring pixel values in an image through a cursor;
s19: and measuring and calculating an image inclination value.
The application scene specifically comprises the following steps: selecting the image device may select a CCD or an IR detector; initializing a CCD or IR detector; respectively adding overlapped cross dividing lines to images acquired on the CCD and the IR detector; in order to meet the field debugging requirement, gray scale, contrast and GAMMA adjustment can be performed; outputting images acquired by the CCD and the IR detector; the upper computer collects image information through IMAQdx Open camera.vi, IMAQdx configuration Grab.vi and other module functions in the LabVIEW, acquires pixel values in an image through a cursor, and finally calculates an image inclination value according to the pixel values.
If the IR detector image is output to the upper computer platform, the debugging structure enables the cross division line image observed by the IR detector to coincide with the cross division line overlapped by the upper computer, and the product is fixed; then switching CCD image acquisition, at the moment, observing whether the cross dividing line acquired by the CCD coincides with the cross dividing line overlapped by the upper computer, and acquiring a corresponding pixel value through a cursor by acquiring the upper end point of the cross dividing line acquired by the CCD if the cross dividing line does not coincide with the cross dividing line; and finally, the upper computer automatically calculates the tangent value between the center coordinate of the cross division line and the endpoint coordinate on the cross division line acquired by the CCD, and the tangent value is the image tilt value of the dual-mode image.
The method, the image acquisition system, the device and the medium for measuring and calculating the image inclination value provided by the application are described in detail. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the application can be made without departing from the principles of the application and these modifications and adaptations are intended to be within the scope of the application as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (8)

1. A method for measuring and calculating an image tilt value, comprising:
acquiring a first image and a second image acquired by an infrared imaging viewing device; the first image is obtained according to white light imaging, the second image is obtained according to night vision imaging, and the centers of the first image and the second image are coincident;
Determining a corrected image in the first image and the second image according to a preset reference line;
taking the corrected one of the first image and the second image as a reference, and acquiring a dual-mode image inclination value according to the pixel value of a point on the other image;
the determining the corrected one of the first image and the second image according to the preset reference line comprises the following steps:
setting a first reference line on the first image, setting a second reference line on the second image, and setting a standard reference line on an upper computer, wherein each reference line is a cross dividing line;
determining a corrected one of the first image and the second image according to the relation among the first reference line, the second reference line and the standard reference line;
the obtaining the dual-mode image inclination value according to the pixel value of the point on the other image by taking the corrected image of the first image and the second image as a reference comprises the following steps:
judging whether a reference line on the other image coincides with the standard reference line or not by taking the corrected one of the first image and the second image as a reference;
If not, collecting the pixel value of any point on the reference line and the pixel value of the center point of the standard reference line;
and acquiring a tangent value between the pixel value on the reference line and the pixel value of the center point of the standard reference line, wherein the tangent value is the dual-mode image inclination value.
2. The method for measuring and calculating an image tilt value according to claim 1, wherein the infrared imaging viewing device comprises:
a blackbody, a cross target plate, an infrared collimator, a CCD and an IR detector;
the black body is positioned in a first preset distance outside the cross target plate;
the cross target plate is positioned outside the infrared collimator tube within a second preset distance;
the lens of the IR detector, the lens of the CCD and the center of the lens of the infrared collimator are positioned on the same plane, and the lens of the IR detector and the lens of the CCD are respectively positioned in front of the lens of the infrared collimator within a third preset distance.
3. The method for measuring and calculating an image tilt value according to claim 1 or 2, wherein determining a corrected one of the first image and the second image according to a predetermined reference line comprises:
setting a first reference line on the first image, and setting a second reference line on the second image, wherein the reference line is a cross dividing line;
And determining a corrected one of the first image and the second image according to the relation between the first reference line and the second reference line.
4. The method of measuring an image tilt according to claim 1, wherein the arbitrary point on the reference line is an upper end point of the reference line in the first quadrant.
5. An image acquisition system, comprising: an infrared imaging observation and adjustment device and an upper computer, which is characterized in that,
the infrared imaging observation and adjustment device is connected with the upper computer;
the infrared imaging observation device is used for obtaining a first image according to white light imaging and obtaining a second image according to night vision imaging, wherein the centers of the first image and the second image are coincident;
the upper computer is used for acquiring the first image and the second image, and determining a corrected image in the first image and the second image according to a preset reference line; acquiring a dual-mode image inclination value according to the pixel value of a point on the other image by taking the corrected image in the first image and the second image as a reference;
the determining the corrected one of the first image and the second image according to the preset reference line comprises the following steps:
Setting a first reference line on the first image, setting a second reference line on the second image, and setting a standard reference line on an upper computer, wherein each reference line is a cross dividing line;
determining a corrected one of the first image and the second image according to the relation among the first reference line, the second reference line and the standard reference line;
the obtaining the dual-mode image inclination value according to the pixel value of the point on the other image by taking the corrected image of the first image and the second image as a reference comprises the following steps:
judging whether a reference line on the other image coincides with the standard reference line or not by taking the corrected one of the first image and the second image as a reference;
if not, collecting the pixel value of any point on the reference line and the pixel value of the center point of the standard reference line;
and acquiring a tangent value between the pixel value on the reference line and the pixel value of the center point of the standard reference line, wherein the tangent value is the dual-mode image inclination value.
6. An apparatus for measuring and calculating an image tilt value, comprising:
the first acquisition module is used for acquiring a first image and a second image acquired by the infrared imaging viewing and adjusting device; the first image is obtained according to white light imaging, the second image is obtained according to night vision imaging, and the centers of the first image and the second image are coincident;
The determining module is used for determining a corrected image in the first image and the second image according to a preset reference line;
the second acquisition module is used for acquiring a dual-mode image inclination value according to the pixel value of a point on the other image by taking the corrected one of the first image and the second image as a reference;
the determining module is specifically configured to set a first reference line on the first image, set a second reference line on the second image, and set a standard reference line on the upper computer, where each reference line is a cross dividing line; determining a corrected one of the first image and the second image according to the relation among the first reference line, the second reference line and the standard reference line;
the second acquisition module is specifically configured to determine whether a reference line on the other image coincides with the standard reference line based on the corrected one of the first image and the second image; if not, collecting the pixel value of any point on the reference line and the pixel value of the center point of the standard reference line; and acquiring a tangent value between the pixel value on the reference line and the pixel value of the center point of the standard reference line, wherein the tangent value is the dual-mode image inclination value.
7. An apparatus for measuring and calculating an image tilt value, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for measuring an image tilt value according to any one of claims 1 to 4 when executing the computer program.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of measuring an image tilt value according to any one of claims 1 to 4.
CN202111646007.7A 2021-12-29 2021-12-29 Method for measuring and calculating image inclination value, image acquisition system, device and medium Active CN114339209B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111646007.7A CN114339209B (en) 2021-12-29 2021-12-29 Method for measuring and calculating image inclination value, image acquisition system, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111646007.7A CN114339209B (en) 2021-12-29 2021-12-29 Method for measuring and calculating image inclination value, image acquisition system, device and medium

Publications (2)

Publication Number Publication Date
CN114339209A CN114339209A (en) 2022-04-12
CN114339209B true CN114339209B (en) 2023-11-14

Family

ID=81016048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111646007.7A Active CN114339209B (en) 2021-12-29 2021-12-29 Method for measuring and calculating image inclination value, image acquisition system, device and medium

Country Status (1)

Country Link
CN (1) CN114339209B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202631858U (en) * 2012-05-24 2012-12-26 深圳市掌网立体时代视讯技术有限公司 Dual-lens module three-dimensional imaging debugging device
CN104272717A (en) * 2012-02-29 2015-01-07 前视红外系统股份公司 Method and system for performing alignment of projected images to detected infrared (IR) radiation information
CN107635135A (en) * 2017-09-20 2018-01-26 歌尔股份有限公司 Method and system for testing relative tilt angle before assembly of dual-camera module
KR20180010590A (en) * 2016-07-21 2018-01-31 한화테크윈 주식회사 Method for image processing
CN108234897A (en) * 2018-02-01 2018-06-29 北京集光通达科技股份有限公司 The method and device of control night vision system, storage medium, processor
CN113064248A (en) * 2021-03-29 2021-07-02 南昌欧菲光电技术有限公司 Optical alignment method of camera, camera and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104272717A (en) * 2012-02-29 2015-01-07 前视红外系统股份公司 Method and system for performing alignment of projected images to detected infrared (IR) radiation information
CN202631858U (en) * 2012-05-24 2012-12-26 深圳市掌网立体时代视讯技术有限公司 Dual-lens module three-dimensional imaging debugging device
KR20180010590A (en) * 2016-07-21 2018-01-31 한화테크윈 주식회사 Method for image processing
CN107635135A (en) * 2017-09-20 2018-01-26 歌尔股份有限公司 Method and system for testing relative tilt angle before assembly of dual-camera module
CN108234897A (en) * 2018-02-01 2018-06-29 北京集光通达科技股份有限公司 The method and device of control night vision system, storage medium, processor
CN113064248A (en) * 2021-03-29 2021-07-02 南昌欧菲光电技术有限公司 Optical alignment method of camera, camera and electronic equipment

Also Published As

Publication number Publication date
CN114339209A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CA2969482C (en) Method and apparatus for multiple technology depth map acquisition and fusion
CN104853109B (en) A kind of method and camera terminal for automatically adjusting flash of light
CN104613930B (en) Method and device for measuring distance as well as mobile terminal
CN108322670A (en) A kind of control method of multi-camera system, mobile terminal and storage medium
JP6234044B2 (en) Exterior material deterioration judging method and judging device
CN105554489A (en) White balance adjusting method and shooting terminal
CN113358231A (en) Infrared temperature measurement method, device and equipment
CN103148786B (en) Device and method for height measurement of object
CN110196422B (en) Laser ranging test method, test device and mobile terminal
WO2022061899A1 (en) Infrared image processing method and device, and infrared camera
KR20180023835A (en) Method and apparatus for generating data representative of a bokeh associated to light-filed data
CN106341593B (en) Camera control method and terminal
CN114638880A (en) Planar ranging method, monocular camera and computer readable storage medium
CN113077518A (en) Camera parameter calibration method, device and storage medium
CN104333709B (en) Method, device and the electronic equipment being controlled to flash lamp
CN109931906A (en) Video camera distance measuring method, device and electronic equipment
WO2020211576A1 (en) Method and device for dual light fusion
JP2019082451A (en) Reflection characteristic measuring apparatus, processing system, reflection characteristic measuring method and object processing method
CN116990830B (en) Distance positioning method and device based on binocular and TOF, electronic equipment and medium
WO2016197494A1 (en) Method and device for adjusting focusing area
CN114339209B (en) Method for measuring and calculating image inclination value, image acquisition system, device and medium
CN106303277A (en) The parameter control method of light compensating lamp, terminal and self-shooting bar
CN116055607B (en) Zoom smoothness evaluation method and device and electronic equipment
CN103969029A (en) Digital-camera-based simple glaring testing method
RU2729698C2 (en) Apparatus and method for encoding an image captured by an optical system for acquiring data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address