Novel target and background contrast ratio measuring method and device and storage medium

By calibrating the exposure gain parameter, correcting the human eye's visual function, and calibrating the deviation, the problem of large errors in traditional contrast testing methods under low illumination conditions has been solved, enabling accurate detection of photoelectric imaging systems in complex environments.

CN121954431APending Publication Date: 2026-05-01JIANGSU NORTH LAKE OPTOELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU NORTH LAKE OPTOELECTRONICS CO LTD
Filing Date
2026-01-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional contrast testing methods fail to accurately reflect the actual observation effect of photoelectric imaging systems in complex environments, resulting in a large difference between indoor testing and field observation effects. Furthermore, measurement errors are large in low-light environments, which cannot meet the accurate testing requirements of field distance tests for photoelectric imaging systems.

Method used

By calibrating exposure gain parameters, correcting human visual function, hyperbola fitting, and converting grayscale value to actual brightness, a mapping function between the target and the background is established. The measurement results are then calibrated using a deviation function to eliminate the difference between the detector's spectral response and human vision, thereby improving measurement accuracy.

Benefits of technology

It achieves accurate matching of the actual observation effect of the human eye in low-light environment, eliminates the difference between the detector spectral response and human vision, improves measurement accuracy, and meets the accurate detection requirements of field line-of-sight tests of visible light photoelectric imaging system and micro-light observation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121954431A_ABST
    Figure CN121954431A_ABST
Patent Text Reader

Abstract

The invention provides a novel target and background contrast ratio measuring method, and belongs to the field of precise instrument manufacturing. When an image gray value is used for measuring the contrast ratio of a target and a background, imaging parameters of a detector and parameters of an optical system need to be calibrated, so that brightness information of the target and the background is truly reflected. The method comprises the following steps: respectively carrying out contrast measurement calibration on standard target plates with different contrast values under different illuminations by using a brightness meter, measuring the contrast values of the standard target plates by using an image gray value, fitting the contrast measured by the image gray value with the contrast measured by the brightness value in software by using a mathematical fitting algorithm, and calculating the contrast value of the standard target plates. The purpose of measuring the target background contrast value by using the image gray value is achieved. And establishing relational mapping between brightness and a gray value, defining a rule of a sampling sample, selecting a target and a background, and finally calculating a contrast ratio between the target and the background.
Need to check novelty before this filing date? Find Prior Art

Description

A novel method, apparatus, and storage medium for measuring the contrast between a target and its background. Technical Field

[0001] This invention belongs to the field of precision instrument manufacturing, and specifically relates to a novel method, device, and storage medium for measuring the contrast between a target and a background. Background Technology

[0002] With the deepening of the new military revolution and the acceleration of the PLA's informatization construction, military optoelectronic weapon systems are increasingly important in weaponry due to their crucial applications in reconnaissance, precision strikes, and optoelectronic countermeasures. The military has increasingly higher requirements for the tactical and technical specifications and usage of optoelectronic equipment, including miniaturization, lightweight design, longer operating range, and higher resolution. As a test instrument capable of quantitatively testing target-background contrast under actual environmental conditions, it provides testing support for test scenario selection, test condition control, and test result evaluation. It can more comprehensively reflect the actual observation capabilities of optoelectronic imaging systems in different environments and has received increasing attention from equipment users, developers, and test bases. Various optoelectronic and low-light observation and aiming systems require this test instrument for field line-of-sight testing.

[0003] Furthermore, in the current evaluation of visible light optoelectronic imaging systems and low-light observation systems, to avoid interference from complex environments on line-of-sight detection data, traditional testing methods are all conducted under indoor conditions. These methods include resolution and modulation transfer function. The limiting resolution angle of visible light television systems is generally expressed using the spatial angle of discrete detector units—the instantaneous field of view (IFOV). Low-light systems primarily test the resolution under different illumination levels in a darkroom environment, and then analyze the system's effective range based on the Johnson criterion. These evaluation results only represent the imaging quality under single-state target and background conditions in the laboratory, without considering the influence of target-background contrast, atmospheric transmission attenuation, and other factors. Therefore, they cannot accurately reflect the detection capabilities of visible light imaging systems and low-light imaging systems in complex external scenes, leading to discrepancies between indoor system testing and actual observation results. Consequently, for field line-of-sight observation experiments, especially those requiring standard conditions, it is difficult to meet in practice. For example, there is no specific method to detect a moderate contrast between the target and background. Traditional contrast testing methods often result in unstable line-of-sight test data and do not correspond to the resolution measured in the laboratory.

[0004] Traditional contrast testing methods define target-background brightness contrast in two ways: the first is contrast contrast or contrast ratio, and the second is modulation contrast. Modulation contrast is often used when testing cameras against a black-and-white grid. Traditional calculation methods for measuring target contrast against complex outdoor backgrounds are significantly inaccurate and unstable. Furthermore, contrast decreases noticeably with decreasing illumination; most night vision products typically operate at illumination levels below a certain threshold. However, within this range, most luminance meters cannot function and have large measurement errors.

[0005] It should be noted that the above content is only used to help understand the technical solution of the present invention, and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] The main objective of this invention is to provide a novel method, apparatus, and storage medium for measuring the contrast between a target and a background. This invention aims to solve the technical problems in the prior art, such as the fact that traditional contrast testing methods do not consider the contrast between the target and the background, there is a significant difference between the indoor test results and the actual observation results, the contrast decreases significantly with the decrease of illuminance, the inability to correspond to the resolution of laboratory tests, and the inability of the luminance meter to work and the large measurement error.

[0007] To achieve the above objectives, this invention provides a novel method for measuring the contrast between a target and a background. The method includes the following steps: imaging a test scene using a detector, and setting the exposure time and gain parameters for the detector to achieve the clearest image of the test scene; establishing a mapping function between the actual brightness of the target and background and the image grayscale value, and obtaining the inverse function of the mapping function; fitting the spectral response curve of the detector to the human visual function curve using a human visual function filter, thereby correcting the detector's visual function; measuring the contrast of a standard target under different illuminance conditions using a luminance meter, and fitting the luminance meter's measurements of the standard target under different illuminance conditions using a first polynomial to obtain the contrast curve function of the luminance meter on the standard target under different illuminance conditions. The contrast of the detector relative to the standard target plate was measured by a detector with calibrated exposure time, gain parameters, and visibility function. This calibrated detector was then fitted with a second polynomial to obtain the contrast curves of the detector relative to the standard target plate under different illumination levels. Contrast curve function of luminance meter on standard target plate under different illuminance conditions Contrast curves of the detector against the standard target plate under different illumination conditions deviation function The bias function is stored in the detector software to obtain the corrected detector. The corrected detector is placed in the scene to be tested to acquire the scene image. The gray values ​​of the target and the background in the scene image are extracted respectively. The gray values ​​of the target and the background are converted into the actual brightness of the target and the actual brightness of the background respectively by the inverse function of the mapping relationship function. The actual brightness of the target and the actual brightness of the background are substituted into the contrast formula to calculate the contrast of the original image. The contrast of the original image is calibrated by the bias function stored in the detector software to obtain the contrast value of the target and the background in the real scene.

[0008] By designing a complete workflow including exposure gain parameter calibration, human visual function correction, hyperbola fitting deviation calibration, and grayscale value-actual brightness conversion, this method solves the technical problems of large errors in low-light environments and unstable data in complex field scenes encountered by traditional contrast measurement methods. This method enables measurement results to accurately match the actual observation effect of the human eye, effectively eliminating the influence of differences between the detector's spectral response and human vision. Furthermore, deviation function calibration further improves measurement accuracy, meeting the precise testing requirements of field distance tests for visible light photoelectric imaging systems and low-light observation systems.

[0009] In a specific feasible implementation, setting the exposure time and gain parameters for the detector to image the test scene most clearly includes the following steps: turning off the detector's automatic exposure and automatic gain functions; presetting multiple sets of exposure times and multiple sets of gain parameters to image the test scene with the detector, obtaining multiple sets of test scene images under different exposure times and gain parameters; and selecting the exposure gain parameter that images the clearest by comparing multiple sets of test scene images under different exposure and gain parameters.

[0010] By disabling the detector's automatic exposure and automatic gain functions, interference from automatic adjustment functions on image grayscale values ​​is eliminated. Through multi-set parameter imaging comparison and optimization, it is ensured that the selected exposure and gain parameters accurately correspond to the actual brightness of the acquired image grayscale values ​​and the target and background, providing an image data foundation for subsequently establishing a mapping relationship between brightness and grayscale values. In a specific feasible implementation, establishing the mapping relationship between the actual brightness of the target and background and image grayscale values ​​involves: adjusting the detector's exposure time and gain parameters to ensure that the visual effect of the image captured by the detector matches the actual scene display effect; capturing at least 50 sets of exposure time and gain parameter data under different light intensities; substituting the exposure time and gain parameter data into the optical system transfer function; and calculating the mapping relationship using software. .

[0011] By collecting at least 50 sets of measured data under different illuminance levels, the richness and representativeness of the data samples were ensured. By substituting the optical system transfer function and fitting it with software, the mapping relationship function can accurately characterize the correspondence between actual brightness and image grayscale values, providing a mathematical basis for subsequently deducing actual brightness from grayscale values ​​and effectively improving the accuracy of brightness conversion.

[0012] In one specific feasible implementation, the contrast curve function of the luminance meter on the standard target plate under different illuminance conditions is... It is a polynomial function, and its calculation formula is: ,in, For ambient illuminance, The coefficients are the fitting coefficients of the first polynomial.

[0013] By using polynomial fitting, the true contrast of the standard target plate under different illumination levels can be accurately quantified, forming a unified and standardized reference curve. This provides a clear and calculable standard mathematical model for the subsequent comparison and calibration of instrument measurement curves, improving the standardization and accuracy of the entire calibration process.

[0014] In a specific feasible implementation, the contrast curve function of the detector to the standard target plate under different illuminations. To compare the contrast curves of a standard target plate with those of a luminance meter under different illuminance conditions. Polynomial functions of the same order, contrast curves of the detector against the standard target under different illumination levels. The calculation formula is:

[0015] in, The coefficients are the fitting coefficients of the second polynomial.

[0016] The two curves have the same function dimension, avoiding errors in deviation calculation caused by different function orders. This makes the comparison between instrument measurements and standard values ​​more targeted and lays the foundation for the accurate derivation of the deviation function in the future.

[0017] In a specific feasible implementation, the deviation function The calculation formula is: .

[0018] By constructing a deviation function using the difference in polynomial coefficients between the contrast curve function of the luminance meter on the standard target under different illumination conditions and the contrast curve function of the detector on the standard target under different illumination conditions, the calculation of the deviation value is quantified, accurate and traceable, providing a clear mathematical basis for contrast calibration during actual measurement and achieving efficient and accurate correction of the detector's original measurement value.

[0019] In a specific feasible implementation, the gray values ​​of the target and the background in the scene image to be tested are extracted respectively. The target area and the background area in the scene image to be tested are selected by the detector operation interface, and the average gray value of the pixels in the target area and the background area are calculated respectively.

[0020] By selecting the target area and the background area and calculating the average gray value, the interference of noise from individual pixels on the gray value is avoided, making the extracted gray value more representative and able to truly reflect the overall brightness characteristics of the target area and the background area, further improving the reliability of subsequent brightness conversion and contrast calculation.

[0021] In a specific feasible implementation, both the actual brightness of the target and the actual brightness of the background are substituted into the step of calculating the contrast of the original image using the contrast formula, which is as follows:

[0022] in, This represents the target background contrast in a real-world scene. For the target actual brightness, The actual brightness of the background. The average grayscale value of the pixels within the target area. The average grayscale value of the pixels in the background area. It is the inverse function of the mapping relation function.

[0023] The contrast formula is adapted to the testing scenarios of photoelectric imaging systems, combined with the inverse function. The contrast of a real scene can be directly derived from the grayscale value of an image without the need for additional complex conversions, ensuring the practicality of the measurement results, improving the accuracy of contrast calculation, and enabling the final result to accurately reflect the contrast between the target and the background as actually observed by the human eye.

[0024] Furthermore, to achieve the above objectives, the present invention also provides a novel target-background contrast measurement device, comprising: an optical imaging module, a parameter calibration module, a data processing module, and a human-computer interaction module; the optical imaging module includes a detector, a lens, and a human-eye visual function filter, the human-eye visual function filter being disposed in the optical path of the lens to adjust the spectral response range of the lens from 380nm~1000nm to 380nm~780nm, so that the spectral response curve of the detector fits the human-eye visual function curve; the parameter calibration module is used to disable the automatic exposure and automatic gain functions of the detector, retrieve multiple preset exposure gain parameters, and establish the mapping relationship and inverse function between the actual brightness of the target and background and the image grayscale value; the data processing module is used to store the contrast curve function of the luminance meter on a standard target under different illumination conditions. Contrast curves of the detector against the standard target plate under different illumination levels. and the deviation function between the two The contrast value between the target and the background in a real scene is calculated based on the inverse function and the deviation function; the human-computer interaction module is used for operators to select exposure gain parameters, select target and background areas, and display the final contrast measurement results.

[0025] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement a novel method for measuring the contrast between a target and a background.

[0026] By using image analysis to measure the average contrast of the target background under different illumination levels in actual environments, contrast can be further subdivided for various field working environments. This is of great significance for the subdivision and establishment of the correspondence between indoor discrimination rate and field observation distance. It is urgently needed in the testing of the line-of-sight indicators of various types of optoelectronic observation and aiming products, providing testing assurance for various products and also providing a testing tool for product effective distance evaluation models under different contrast levels.

[0027] This invention provides a novel method, apparatus, and storage medium for measuring target-background contrast. By calibrating exposure gain parameters, correcting for human visual function, calibrating hyperbolic fitting deviation, and converting grayscale values ​​to actual brightness, this invention solves the technical problems of traditional contrast testing methods: neglecting target-background contrast, significant differences between indoor system testing and actual observation, a noticeable decrease in contrast with decreasing illuminance, inability to correspond to laboratory resolution, and luminance meter malfunction with large measurement errors. It also addresses the issues of large errors in low-illuminance environments and unstable data in complex field scenarios. This method enables measurement results to accurately match actual human visual observation, effectively eliminating the influence of differences between detector spectral response and human vision. Furthermore, deviation function calibration further improves measurement accuracy, meeting the precise testing requirements of visible light photoelectric imaging systems and low-light observation systems for field distance testing. Attached Figure Description

[0028] Figure 1 shows a flowchart illustrating a full-field-of-view image distortion measurement method for an infrared continuous zoom imaging system provided in an exemplary embodiment of this application; Figure 2 shows a flowchart illustrating a method for setting the exposure time and gain parameters of the detector to achieve the clearest image of the test scene provided in an exemplary embodiment of this application; Figure 3 shows a flowchart illustrating a method for establishing the mapping relationship function between the actual brightness of the target and background and the image grayscale value provided in an exemplary embodiment of this application; Figure 4 shows a flowchart illustrating a pre-shipment calibration curve fitting process provided in an exemplary embodiment of this application; Figure 5 shows a pre-shipment calibration curve fitting process provided in an exemplary embodiment of this application; Figure 6 shows a structural schematic diagram of a full-field-of-view image distortion measurement device for an infrared continuous zoom imaging system provided in an exemplary embodiment of this application; Figure 7 shows a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation

[0029] To make the objectives, technical solutions and advantages of the present invention clearer, the embodiments of the present application will be described in further detail below with reference to Figures 1 to 7.

[0030] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0031] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0032] As shown in Figure 1, Figure 1 is a schematic flowchart of an infrared continuous zoom imaging system full field-of-view image distortion measurement method provided by an exemplary embodiment of this application. The method includes the following steps: S100, imaging the test scene through a detector, and setting the exposure time and gain parameters for the detector to image the test scene most clearly; establishing a mapping relationship function between the actual brightness of the target and the background and the image grayscale value, and obtaining the inverse function of the mapping relationship function.

[0033] As shown in Figure 2, Figure 2 is a schematic flowchart of a method for setting the exposure time and gain parameters of the detector to achieve the clearest image of the test scene provided by an exemplary embodiment of this application. Setting the exposure time and gain parameters of the detector to achieve the clearest image of the test scene includes the following steps: S110, turning off the automatic exposure and automatic gain functions of the detector; turning off the automatic exposure and automatic gain functions of the EMCCD (electron multiplier CCD) detector through the parameter calibration module.

[0034] S120: Multiple sets of exposure times and multiple sets of gain parameters are preset to image the test scene through the detector, resulting in multiple sets of test scene images under different exposure times and gain parameters. Ten preset sets of exposure times and ten sets of gain parameters are retrieved to image a standard target plate under five gradient illuminations: 50 lux, 10 lux, 1 lux, 0.1 lux, and 0.01 lux.

[0035] S130. By comparing multiple sets of test scene images under different exposure gain parameters, select the exposure gain parameters that produce the clearest image. Image a standard target using each set of parameters, and display all imaging results through the human-computer interaction module. The operator compares the clarity of the test scene images and selects the set of exposure time and gain parameters that produce the clearest image for each illumination gradient.

[0036] By disabling the detector's automatic exposure and automatic gain functions, the interference of the automatic adjustment function on the image grayscale value is eliminated. By comparing and selecting multiple sets of parameters, it is ensured that the selected exposure gain parameter can accurately correspond the acquired image grayscale value with the actual brightness of the target and background, providing an image data basis for subsequently establishing the mapping relationship between brightness and grayscale value.

[0037] Figure 3 shows a flowchart illustrating a method for establishing a mapping relationship between the actual brightness of the target and background and the image grayscale value, provided in an exemplary embodiment of this application. Specifically, establishing the mapping relationship between the actual brightness of the target and background and the image grayscale value involves: S140, adjusting the exposure time and gain parameters of the detector to ensure that the visual effect of the image captured by the detector matches the display effect of the real scene. For each illuminance gradient, the selected exposure time and gain parameters are adjusted to ensure that the visual effect of the target image captured by the detector matches the display effect of the target in the real scene. S150, capturing at least 50 sets of exposure time data and gain parameter data under different light intensities, and substituting the exposure time data and gain parameter data into the optical system transfer function. At least 50 sets of exposure time data and gain parameter data under different light intensities are cumulatively recorded, while simultaneously measuring the actual brightness of the standard target under the corresponding illuminance using a luminance meter. The detector acquires images of the target plate and extracts grayscale values. The above 50 sets of actual brightness Grayscale value The corresponding exposure time and gain parameter data are substituted into the optical system transfer function, and the mapping relationship function is obtained through software calculation. .

[0038] S160. The mapping relationship is obtained through software calculation. And derive its inverse function f. 1. By storing the two functions in the data processing module and collecting at least 50 sets of measured data under different illumination levels, the richness and representativeness of the data samples are ensured. By substituting the optical system transfer function and software fitting, the mapping relationship function can accurately characterize the correspondence between the actual brightness and the image gray value, providing a mathematical basis for the subsequent deduction of the actual brightness from the gray value, and effectively improving the accuracy of brightness conversion.

[0039] S200: A human visual function (HDF) filter is used to fit the detector's spectral response curve to the HDF curve, enabling the detector to complete visual function correction. An HDF filter is installed in the lens optical path of the optical imaging module, and a coating technique is used to fit the EMCCD detector's spectral response curve to the standard HDF curve. The initial spectral response range of the detector lens is 380nm–1000nm. After coating, the HDF filter is placed in the lens optical path, narrowing the lens's spectral range to 380nm–780nm, thus fitting the EMCCD detector's spectral response curve to the HDF curve. A large relative aperture lens is used to compensate for the near-infrared spectral energy loss caused by the filter, while a frame stacking algorithm is used to reduce noise interference in low-light environments.

[0040] S300. Measure the contrast of the standard target plate under different illuminance conditions using a luminance meter. Fit the luminance meter's measurements of the standard target plate under different illuminance conditions using a first polynomial to obtain the contrast curve function of the luminance meter on the standard target plate under different illuminance conditions. The contrast of the detector relative to the standard target plate was measured by a detector with calibrated exposure time, gain parameters, and visibility function. This calibrated detector was then fitted with a second polynomial to obtain the contrast curves of the detector relative to the standard target plate under different illumination levels. .

[0041] Contrast curve function of luminance meter against standard target plate under different illuminance conditions It is a polynomial function, and its calculation formula is: ,in, For ambient illuminance, The coefficients are those of the first polynomial fitting. By using polynomial fitting, the true contrast of the standard target plate under different illuminance can be accurately quantified, forming a unified and standardized reference curve. This provides a clear and calculable standard mathematical model for the subsequent comparison and calibration of instrument measurement curves, improving the standardization and accuracy of the entire calibration process.

[0042] Contrast curves of the detector against the standard target under different illumination levels To compare the contrast curves of a standard target plate with those of a luminance meter under different illuminance conditions. Polynomial functions of the same order, contrast curves of the detector against the standard target under different illumination levels. The calculation formula is:

[0043] in, These are the fitting coefficients for the second polynomial. The two curves have the same function dimension, avoiding calculation errors caused by different function orders. This makes the comparison between instrument measurements and standard values ​​more targeted, laying the foundation for the accurate derivation of the subsequent deviation function.

[0044] S400, contrast curve function of luminance meter on standard target plate under different illuminance conditions. Contrast curves of the detector against the standard target plate under different illumination conditions deviation function The bias function is then stored in the detector software to obtain the corrected detector. Bias Function The calculation formula is: As shown in Figures 4 and 5, a deviation function is constructed by comparing the polynomial coefficients of the contrast curves of the luminance meter and the detector with the standard target under different illuminance conditions. This allows for the quantification, precision, and traceability of deviation calculations, providing a clear mathematical basis for contrast calibration during actual measurements and enabling efficient and accurate correction of the detector's original measurement values.

[0045] S500: Place the corrected detector in the scene to be tested and acquire an image of the scene. Extract the grayscale values ​​of the target and the background from the image. Convert the grayscale values ​​of the target and the background to the actual brightness of the target and the actual brightness of the background using the inverse function of the mapping relationship function. Select the target area and the background area in the scene image through the detector operation interface, and calculate the average grayscale value of the pixels in the target area and the background area respectively. By selecting the target area and the background area and calculating the average grayscale value, the interference of noise from individual pixels on the grayscale value is avoided, making the extracted grayscale value more representative and able to truly reflect the overall brightness characteristics of the target area and the background area, further improving the reliability of subsequent brightness conversion and contrast calculation.

[0046] S600: Substitute both the actual brightness of the target and the actual brightness of the background into the contrast formula to calculate the contrast of the original image. The contrast formula is as follows:

[0047] in, This represents the target background contrast in a real-world scene. For the target actual brightness, The actual brightness of the background. The average grayscale value of the pixels within the target area. The average grayscale value of the pixels in the background area. This is the inverse function of the mapping relationship function. The contrast formula is adapted to the testing scenarios of photoelectric imaging systems, combined with the inverse function. The contrast of a real scene can be directly derived from the grayscale value of an image without the need for additional complex conversions, ensuring the practicality of the measurement results, improving the accuracy of contrast calculation, and enabling the final result to accurately reflect the contrast between the target and the background as actually observed by the human eye.

[0048] S700 calibrates the contrast of the original image using a deviation function stored in the detector software to obtain the contrast value between the target and the background in the real scene.

[0049] By designing a complete workflow including exposure gain parameter calibration, human visual function correction, hyperbola fitting deviation calibration, and grayscale value-actual brightness conversion, this method solves the technical problems of large errors in low-light environments and unstable data in complex field scenes encountered by traditional contrast measurement methods. This method enables measurement results to accurately match the actual observation effect of the human eye, effectively eliminating the influence of differences between the detector's spectral response and human vision. Furthermore, deviation function calibration further improves measurement accuracy, meeting the precise testing requirements of field distance tests for visible light photoelectric imaging systems and low-light observation systems.

[0050] Furthermore, to achieve the above objectives, the present invention also provides a novel target-background contrast measurement device, as shown in FIG6. FIG6 shows a schematic diagram of the structure of an infrared continuous zoom imaging system full-field image distortion measurement device provided in an exemplary embodiment of the present application. The device includes: an optical imaging module 810, a parameter calibration module 820, a data processing module 830, and a human-computer interaction module 840. The optical imaging module 810 includes a detector, a lens, and a human eye visual function filter. The human eye visual function filter is disposed in the optical path of the lens and is used to adjust the spectral response range of the lens from 380nm to 1000nm to 380nm to 780nm, so that the spectral response curve of the detector fits the human eye visual function curve. The parameter calibration module 820 is used to turn off the automatic exposure and automatic gain functions of the detector, retrieve multiple preset exposure gain parameters, and establish the mapping relationship between the actual brightness of the target and background and the image gray value and its inverse function. The data processing module 830 is used to store the contrast curve function of the luminance meter on the standard target plate under different illumination conditions. Contrast curves of the detector against the standard target plate under different illumination levels. and the deviation function between the two The contrast value between the target and the background in a real scene is calculated based on the inverse function and the deviation function; the human-computer interaction module 840 is used for operators to select exposure gain parameters, select target and background areas, and display the final contrast measurement results.

[0051] Place the detector in the test scene. Using the human-machine interface module 840, select the optimal exposure time and gain parameters corresponding to the ambient illuminance (e.g., 0.05 lux) from the factory calibration stage. Start the detector and acquire images of the target and background in the test scene. The images are transmitted to the human-machine interface module for display in real time. Using the selection function of the human-machine interface module 840, select the target area and background area in the image respectively. The data processing module 830 automatically calculates the average grayscale value of all pixels in both areas, which is recorded as the grayscale value of the target area. Gray values ​​of the background area The inverse function of the mapping relationship stored in data processing module 830 is called. Convert the average grayscale value to the actual brightness, and the actual brightness of the target area. actual brightness of the background area ; The actual brightness of the target area and the actual brightness of the background area Substitute the modulation contrast formula; call the deviation function stored in the detector software. Substitute the ambient light level at the scene The deviation value was calculated. Use the original contrast ratio The calibration is completed by combining the deviation value, and the contrast value between the target and the background in the real scene is obtained. The data processing module 830 will output the final true contrast value. The data is transmitted to the human-computer interaction module 840, where the numerical results are displayed directly on the screen.

[0052] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement a novel method for measuring the contrast between a target and a background.

[0053] This invention provides a novel method, apparatus, and storage medium for measuring target-background contrast. By calibrating exposure gain parameters, correcting for human visual function, calibrating hyperbolic fitting deviation, and converting grayscale values ​​to actual brightness, this invention solves the technical problems of traditional contrast testing methods: neglecting target-background contrast, significant differences between indoor system testing and actual observation, a noticeable decrease in contrast with decreasing illuminance, inability to correspond to laboratory resolution, and luminance meter malfunction with large measurement errors. It also addresses the issues of large errors in low-illuminance environments and unstable data in complex field scenarios. This method enables measurement results to accurately match actual human visual observation, effectively eliminating the influence of differences between detector spectral response and human vision. Furthermore, deviation function calibration further improves measurement accuracy, meeting the precise testing requirements of visible light photoelectric imaging systems and low-light observation systems for field distance testing.

[0054] It should be noted that the novel target-background contrast measuring device provided in this application embodiment is only illustrated by the above-described division of functional modules / functional units. In practical applications, the above functions can be assigned to different functional modules / functional units as needed, that is, the internal structure of the novel target-background contrast measuring device can be divided into different functional modules / functional units to complete all or part of the functions described above.

[0055] Figure 7 shows a structural block diagram of a computer device provided in an exemplary embodiment of this application. The computer device can be a desktop computer, a laptop computer, a handheld computer, or a cloud server, etc. The computer device may include, but is not limited to, a processor and memory. The processor and memory can be connected via a bus or other means. The processor can be a Central Processing Unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, graphics processing units (GPUs), embedded neural network processing units (NPUs) or other dedicated deep learning coprocessors, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.

[0056] The processor may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor may also include a main processor and coprocessors. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0057] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the above embodiments of this application. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory, thereby implementing the methods in the above embodiments. The memory may include a program storage area and a data storage area, wherein the program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0058] In some embodiments, the computer device may also optionally include: a peripheral device interface and at least one peripheral device. The processor, memory, and peripheral device interface can be connected via a bus or signal lines. Each peripheral device can be connected to the peripheral device interface via a bus, signal lines, or a circuit board. Specifically, the peripheral device includes at least one of: a radio frequency circuit, a display screen, and a keyboard.

[0059] Peripheral device interfaces can be used to connect at least one I / O (Input / Output) related peripheral device to the processor and memory. In some embodiments, the processor, memory, and peripheral device interface are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor, memory, and peripheral device interface can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0060] The display screen is used to display the UI (User Interface). This UI can include graphics, text, icons, videos, and any combination thereof. When the display screen is a touch screen, it also has the ability to collect touch signals on or above the surface of the display. These touch signals can be input as control signals to a processor for processing. In this case, the display screen can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen, located on the front panel of the computer device; in other embodiments, there may be at least two display screens, respectively located on different surfaces of the computer device or in a folded design; in still other embodiments, the display screen may be a flexible display screen, located on a curved or folded surface of the computer device. Furthermore, the display screen can be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0061] A power supply is used to power the various components in a computer device. The power supply can be alternating current (AC), direct current (DC), a disposable battery, or a rechargeable battery. When the power supply includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is charged via a wired connection, while a wireless rechargeable battery is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0062] Those skilled in the art will understand that the structure shown in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0063] This application also discloses a computer-readable storage medium. Specifically, the computer-readable storage medium is used to store a computer program, which, when executed by a processor, implements the methods described in the above-described method embodiments. Those skilled in the art will understand that implementing all or part of the processes in the methods described above can be accomplished by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.

[0064] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A novel method for measuring the contrast between a target and its background, characterized in that, The method includes the following steps: imaging a test scene using a detector, and setting the exposure time and gain parameters for the detector to achieve the clearest image of the test scene; establishing a mapping function between the actual brightness of the target and background and the image grayscale value, and obtaining the inverse function of the mapping function; fitting the spectral response curve of the detector to the human visual function curve using a human visual function filter, thereby enabling the detector to complete visual function correction; measuring the contrast of a standard target under different illuminance conditions using a luminance meter, and fitting the contrast of the standard target under different illuminance conditions measured by the luminance meter to a first polynomial to obtain the contrast curve function of the luminance meter for the standard target under different illuminance conditions. The detector, after completing the exposure time calibration, gain parameter calibration, and visibility function correction, measures the contrast of the standard target plate. The contrast of the detector to the standard target plate measured by the detector after completing the exposure time calibration, gain parameter calibration, and visibility function correction is then fitted using a second polynomial to obtain the contrast curve function of the detector to the standard target plate under different illuminance levels. The contrast curve function of the luminance meter on the standard target plate under different illuminance conditions. Contrast curves of the detector against a standard target under different illumination levels deviation function The deviation function is stored in the detector software to obtain a corrected detector. The corrected detector is placed in the scene to be tested and an image of the scene is acquired. The gray values ​​of the target and the background in the image of the scene to be tested are extracted respectively. The gray values ​​of the target and the background are converted into the actual brightness of the target and the actual brightness of the background respectively through the inverse function of the mapping relationship function. The actual brightness of the target and the actual brightness of the background are substituted into the contrast formula to calculate the contrast of the original image. The contrast of the original image is calibrated by the deviation function stored in the detector software to obtain the contrast value of the target and the background in the real scene.

2. The novel target-background contrast measurement method according to claim 1, characterized in that, Setting the exposure time and gain parameter that enables the detector to image the test scene most clearly includes the following steps: turning off the automatic exposure and automatic gain functions of the detector; pre-setting multiple sets of exposure times and multiple sets of gain parameters to image the test scene through the detector, obtaining multiple sets of test scene images under different exposure times and gain parameters; and selecting the exposure gain parameter that produces the clearest image by comparing the test scene images under multiple sets of different exposure and gain parameters.

3. The novel target-background contrast measurement method according to claim 1, characterized in that, The specific steps for establishing the mapping relationship between the actual brightness of the target and background and the image grayscale value are as follows: Adjust the exposure time and gain parameters of the detector to ensure that the visual effect of the image captured by the detector matches the actual scene display effect; capture at least 50 sets of exposure time data and gain parameter data under different light intensities; substitute the exposure time data and gain parameter data into the optical system transfer function; and calculate the mapping relationship using software. 。 4. The novel method for measuring the contrast between a target and the background according to claim 1, characterized in that: The contrast curve function of the luminance meter for the standard target plate under different illuminance conditions. It is a polynomial function, and its calculation formula is: ,in, For ambient illuminance, The fitting coefficients of the first polynomial are denoted as .

5. The novel method for measuring the contrast between a target and the background according to claim 4, characterized in that: The contrast curve function of the detector against the standard target plate under different illumination conditions. To compare the contrast curves of the luminance meter against the standard target plate under different illuminance conditions. A polynomial function of the same order, representing the contrast curve function of the detector against the standard target plate under different illumination levels. The calculation formula is: in, are the fitting coefficients of the second polynomial.

6. The novel target-background contrast measurement method according to claim 5, characterized in that, The deviation function The calculation formula is: 。 7. The novel target-background contrast measurement method according to claim 1, characterized in that, The grayscale values ​​of the target and the background in the scene image to be tested are extracted respectively. The target area and the background area in the scene image to be tested are selected by the detector operation interface, and the average grayscale value of the pixels in the target area and the background area are calculated respectively.

8. The novel method for measuring the contrast between a target and the background according to claim 1, characterized in that, In the step of substituting both the actual brightness of the target and the actual brightness of the background into the contrast formula to calculate the contrast of the original image, the contrast formula is specifically as follows: in, This represents the target background contrast in a real-world scene. For the target actual brightness, The actual brightness of the background. The average grayscale value of the pixels within the target area. The average grayscale value of the pixels within the background region. It is the inverse function of the mapping relationship function.

9. A novel device for measuring the contrast between a target and a background, characterized in that, The device includes an optical imaging module, a parameter calibration module, a data processing module, and a human-computer interaction module. The optical imaging module includes a detector, a lens, and a human visual function filter. The human visual function filter is disposed in the optical path of the lens to adjust the spectral response range of the lens from 380nm–1000nm to 380nm–780nm, thereby fitting the spectral response curve of the detector to the human visual function curve. The parameter calibration module is used to disable the automatic exposure and automatic gain functions of the detector, retrieve multiple preset exposure gain parameters, and establish the mapping relationship and inverse function between the actual brightness of the target and background and the image grayscale value. The data processing module is used to store the contrast curve function of the luminance meter on a standard target plate under different illumination conditions. The contrast curve function of the detector to the standard target plate under different illumination conditions. and the deviation function between the two The contrast value between the target and the background in a real scene is calculated based on the inverse function and the deviation function; the human-computer interaction module is used for operators to select exposure gain parameters, select target and background areas, and display the final contrast measurement results.

10. A computer-readable storage medium, characterized in that, The readable storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or instruction set is loaded and executed by a processor to implement a novel target-background contrast measurement method as described in any one of claims 1 to 8.