CN114765666A - Infrared image brightness evaluation and exposure control method, equipment and medium - Google Patents

Infrared image brightness evaluation and exposure control method, equipment and medium Download PDF

Info

Publication number
CN114765666A
CN114765666A CN202110038492.3A CN202110038492A CN114765666A CN 114765666 A CN114765666 A CN 114765666A CN 202110038492 A CN202110038492 A CN 202110038492A CN 114765666 A CN114765666 A CN 114765666A
Authority
CN
China
Prior art keywords
pixel
value
image
threshold
rectangular area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110038492.3A
Other languages
Chinese (zh)
Inventor
刘勇
张涛
陈美文
何科君
武金龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Pudu Technology Co Ltd
Original Assignee
Shenzhen Pudu 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 Shenzhen Pudu Technology Co Ltd filed Critical Shenzhen Pudu Technology Co Ltd
Priority to CN202110038492.3A priority Critical patent/CN114765666A/en
Publication of CN114765666A publication Critical patent/CN114765666A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/30Transforming light or analogous information into electric information
    • H04N5/33Transforming infrared radiation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a method, a device and a medium for evaluating the brightness and controlling the exposure of an infrared image, wherein the method comprises the following steps: acquiring an infrared image as an image to be evaluated; counting the number of pixel points with pixel values smaller than or equal to a first pixel threshold value and larger than or equal to a second pixel threshold value in a rectangular region of a central one N x M pixel point of the image to be evaluated; comparing the ratio of the number of the pixel points in the threshold value to the total number of the pixel points in the rectangular area with a preset proportional threshold value, and judging whether the rectangular area is high light or low light; calculating the average brightness value of each pixel point in the rectangular region when the light is high or low, and taking the average brightness value as a photometric value; and determining an exposure adjusting step length based on the difference between the photometric value and the target photometric value, setting an exposure parameter, and realizing exposure control. The method is used for carrying out brightness evaluation or exposure control on the infrared image with local high contrast in the actual application scene, and facilitates subsequent image algorithm processing.

Description

Infrared image brightness evaluation and exposure control method, device and medium
Technical Field
The invention relates to the technical field of infrared image processing and exposure control, in particular to a method, equipment and medium for evaluating and controlling infrared image brightness and exposure.
Background
The conventional method for evaluating the brightness of the infrared image and controlling the exposure is based on the brightness evaluation and feedback control of the whole image, and for the infrared image with local high contrast, because the local contrast is strong and the highlight area is small, if the conventional method for evaluating the brightness and controlling the exposure is adopted, local overexposure is easily caused, so that the image quality is poor and the subsequent image algorithm processing is not facilitated.
Disclosure of Invention
The invention provides a method, equipment and medium for evaluating the brightness and controlling the exposure of an infrared image, and provides a technical scheme for evaluating the brightness and controlling the exposure of a local high-contrast infrared image.
An infrared image brightness evaluation method comprises the following steps:
acquiring an infrared image as an image to be evaluated;
counting the number of pixel points with pixel values smaller than or equal to a first pixel threshold value and larger than or equal to a second pixel threshold value in a rectangular region of a central one N x M pixel point of the image to be evaluated;
comparing the ratio of the number of the pixel points in the threshold value to the total number of the pixel points in the rectangular area with a preset proportional threshold value, and judging whether the rectangular area is high light or low light;
and calculating the average brightness value of each pixel point in the rectangular region in the high light or low light as a photometric value.
An exposure control method comprises the above infrared image brightness evaluation method, and also comprises the following exposure control steps:
acquiring a photometric deviation value according to the photometric value and a preset target photometric value;
determining an exposure adjustment step length according to the photometric deviation value;
dividing the high light and the low light into two modes of the exposure control step according to the high light or the low light in the rectangular area;
dividing the photometric deviation value of each mode into a plurality of gears according to the numerical value, and enabling each gear to correspond to a group of exposure parameters according to the exposure adjustment step length;
and setting exposure parameters according to the gears, and outputting an exposure control instruction to realize exposure control.
An infrared image brightness evaluation device includes:
and the image to be evaluated acquiring module is used for acquiring an infrared image as the image to be evaluated.
And the rectangular region brightness interval counting module is used for counting the number of pixel points with pixel values smaller than or equal to the first pixel threshold value and larger than or equal to the second pixel threshold value in a rectangular region of a central N x M pixel point of the image to be evaluated.
And the rectangular region high-low light judging module is used for comparing the ratio of the number of the pixel points in the threshold value to the total number of the pixel points in the rectangular region with a preset proportional threshold value, and judging whether the rectangular region is high light or low light.
And the photometric value evaluation module is used for calculating the average brightness value of each pixel point in the rectangular region in high light or low light, and the average brightness value is used as the photometric value.
A computer device comprising a memory, a processor and computer readable instructions stored in said memory and executable on said processor, said processor implementing the steps of the above-mentioned infrared image brightness evaluation or exposure control method when executing said computer readable instructions.
A computer readable storage medium, which stores computer readable instructions, and when the computer readable instructions are executed by a processor, the computer readable instructions implement the steps of the above-mentioned infrared image brightness evaluation and exposure control method.
One or more readable storage media storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to implement the steps of the above-described infrared image brightness evaluation, exposure control method.
According to the method, the device and the medium for evaluating the brightness and controlling the exposure of the infrared image, the local highlight area of the infrared image, namely the rectangular area in the embodiment, is obtained, and the brightness evaluation and the exposure control are carried out on the infrared image based on the rectangular area. A solution of brightness evaluation and exposure control is provided for an infrared image scene with local high contrast, and subsequent image algorithm processing is facilitated.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a diagram illustrating an image to be evaluated according to an infrared image brightness evaluation method in an embodiment of the present invention;
FIG. 2 is a region division image of an image to be evaluated according to an infrared image brightness evaluation method in an embodiment of the present invention;
FIG. 3 is a binary image of a portion corresponding to an image to be evaluated according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for evaluating brightness of an infrared image according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for evaluating brightness of an infrared image according to an embodiment of the present invention;
FIG. 6 is another flowchart of a method for evaluating infrared image brightness according to an embodiment of the present invention;
FIG. 7 is another flowchart of a method for evaluating infrared image brightness according to an embodiment of the present disclosure;
FIG. 8 is a flowchart illustrating an IR image exposure control method according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of an infrared image brightness evaluating apparatus according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a computer apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In an embodiment of the present invention, as shown in fig. 4, a method for evaluating infrared image brightness is provided, which is described by taking the infrared image shown in fig. 1 as an example, and includes the following steps:
image to be evaluated acquisition step S1: and acquiring an infrared image as an image to be evaluated.
Specifically, in order to obtain the brightness evaluation of the infrared image, the image may be obtained by an infrared camera and used as an image to be evaluated, so as to provide a basis for performing the subsequent operation related to the brightness evaluation of the infrared image.
Rectangular region luminance section statistics step S2: and counting the number of pixel points with pixel values smaller than or equal to a first pixel threshold value and larger than or equal to a second pixel threshold value in a rectangular region of a central N x M pixel point of the image to be evaluated.
Specifically, a rectangular region of N × M pixel points is obtained from the center of the image to be evaluated, where for convenience of calculation, the rectangular region of N × M pixel points is generally taken as a square, and the rectangular region may be a square region of 200 × 200 pixel points, and in other embodiments, the rectangular region may also be a region of other numbers of pixel points, which is not limited herein. Performing threshold segmentation on the rectangular area by using a first pixel threshold to obtain a first binary image, wherein the gray value of each pixel point of which the brightness value is less than or equal to the first pixel threshold in the rectangular area is 0; and obtaining pixel points of which the brightness values are greater than the second pixel threshold value in the rectangular area of the pixel points with the gray values of 0 in the first binary image, and counting the number of the pixel points.
Or, a rectangular region of N × M pixel points is obtained from the center of the image to be evaluated; performing threshold segmentation on the rectangular area by using a second pixel threshold value to obtain a second binary image; the gray value of each pixel point with the brightness value larger than or equal to the second pixel threshold value in the rectangular area is 255; and acquiring pixel points of pixel points with the gray value of 255 in the second binary image in the rectangular region, wherein the pixel values are less than or equal to the first pixel threshold, and counting the number of the pixel points.
For convenience of calculation, a rectangular region of the N × M pixel points is generally taken as a square, and the rectangular region may be a square region of 200 × 200 pixel points, and in other embodiments, the rectangular region may also be a region of other numbers of pixel points, which is not limited herein.
Rectangular area high/low light determination step S3: and comparing the ratio of the number of the pixel points in the threshold value to the total number of the pixel points in the rectangular area with a certain preset proportion threshold value, and judging whether the rectangular area is high light or low light.
Specifically, calculating the ratio of the number of pixels in the threshold interval to the total number of pixels in the rectangular area; comparing the ratio of the number of the pixel points in the threshold value to the total number of the pixel points in the rectangular area with a preset proportional threshold value; when the ratio is larger than a preset ratio threshold, judging that the rectangular area is high-light; and when the ratio is less than or equal to a preset ratio threshold value, judging that the light in the rectangular area is low.
Photometric value evaluation step S4: and calculating the average brightness value of each pixel point in the rectangular region in the high light or low light as a photometric value.
Specifically, when the rectangular area is highlight, an annular area with a certain set pixel size is expanded inwards from the periphery of the image to be evaluated; calculating the average brightness value of each pixel point in the annular area, and taking the average brightness value as a photometric value; and when the light intensity in the rectangular area is low, calculating the average brightness value of each pixel point with the brightness value larger than the first pixel threshold value in the rectangular area, and taking the average brightness value as a photometric value.
The annular region is a region in which X pixel points are extended inward from the periphery of the image to be evaluated, wherein for convenience of calculation, the annular region in which 100 pixel points are extended inward from the periphery in the image to be evaluated is generally taken, and in other embodiments, pixel point regions in which other numbers of pixel points are extended inward from the periphery in the image to be evaluated may also be taken, which is not limited herein.
In the embodiment of the present invention, as shown in fig. 5, the rectangular area luminance interval statistics step S2 is to count the number of pixels with pixel values less than or equal to the first pixel threshold and greater than or equal to the second pixel threshold in a rectangular area with N × M pixels in the center of the image to be evaluated, and specifically includes the following steps:
s21: and taking a rectangular area of N x M pixel points from the center of the image to be evaluated.
Specifically, a rectangular region of N × M pixels is taken from the center of the image to be evaluated, as shown in fig. 2, a region 201 is the rectangular region. Where a pixel refers to a smallest unit in an image represented by a sequence of numbers, called a pixel, which exists as a cell of a single color. In the embodiment of the invention, the rectangular area is a square, and the square area is an area with 200 × 200 pixels.
S22: and carrying out threshold segmentation on the rectangular area by using a first pixel threshold value to obtain a binary image.
Specifically, the first pixel threshold is a preset pixel value for threshold segmentation, and the value range of the first pixel threshold is 0-255; the pixel value is a value given by a computer when an image of an original is digitized, and represents average luminance information of a certain small block of the original, or average reflection (transmission) density information of the small block. Image segmentation is to divide different regions with special meanings in an image, the regions are mutually disjoint, and each region satisfies the consistency of a specific region. The threshold (threshold) is a set pixel value and takes a value of 0 to 255. Threshold segmentation refers to a region-based image segmentation technology, and the principle is to divide image pixels into a plurality of classes. The method utilizes the difference of brightness between an object to be extracted in an image and a background to classify pixel levels into a plurality of classes by setting a threshold value, thereby realizing the separation of the object and the background. The binary image is that the brightness value of a pixel point on an image is set to be 0 or 255, that is, the whole image has an obvious visual effect of only black and white, and the binary image occupies a small space and is often applied to an image processing technology.
Or, performing threshold segmentation on the rectangular area by using a second pixel threshold value to obtain a second binary image; the gray value of each pixel point with the brightness value larger than or equal to the second pixel threshold value in the rectangular area is 255;
s23: and counting the number of pixel points of which the brightness value in the rectangular region corresponding to the binary image is less than or equal to a first pixel threshold value and greater than or equal to a second pixel threshold value.
Specifically, the second pixel threshold and the first pixel threshold are also a set pixel value for obtaining a pixel point in an interval. And counting the number of the pixel points of which the brightness value is less than or equal to a first pixel threshold value and is greater than or equal to a second pixel threshold value in the corresponding rectangular region of the binary image, namely counting the number of the corresponding pixel points in the acquired interval. Fig. 3 is a binary image corresponding to a part of the image to be evaluated, where the pixel value is greater than the first threshold and less than the second threshold.
Or, performing threshold segmentation on the rectangular area by using a second pixel threshold value to obtain a second binary image; and counting the number of pixel points of which the brightness values are less than or equal to the first pixel threshold in the rectangular region of the pixel points with the gray value of 255 in the second binary image.
In the embodiment of the present invention, as shown in fig. 6, in the step S3 of determining the high/low light in the rectangular area: comparing the ratio of the number of the pixels in the threshold value to the total number of the pixels in the rectangular area with a preset proportional threshold value, and judging whether the rectangular area is high light or low light, specifically comprising the following steps:
s31: and calculating the ratio of the number of pixels with pixel values less than or equal to the first pixel threshold value and greater than or equal to the second pixel threshold value to the total number of pixels in the rectangular area.
Specifically, the ratio of the number of pixels of which the pixel values are smaller than or equal to a first pixel threshold and larger than or equal to a second pixel threshold to the total number of pixels in the rectangular region is obtained.
Or carrying out threshold segmentation on the rectangular area by using a second pixel threshold value to obtain a second binary image; the gray value of each pixel point with the brightness value larger than or equal to the second pixel threshold value in the rectangular area is 255; counting the number of pixel points of which the brightness values in the rectangular region are less than or equal to the first pixel threshold value of the pixel points of which the gray values are 255 in the second binary image; and obtaining the ratio of the number of the pixels of which the pixel values are less than or equal to a first pixel threshold value and greater than or equal to a second pixel threshold value to the total number of the pixels in the rectangular area.
S32: and comparing the ratio of the number of the pixel points in the threshold interval to the total number of the pixel points in the rectangular area with a certain preset proportional threshold, and judging whether the rectangular area is high light or low light.
Specifically, the preset proportion threshold is a preset proportion threshold, and is used as a judgment standard for comparing the ratio of the number of pixels in the threshold interval to the total number of pixels in the rectangular region, and dividing high light and low light based on a comparison result, wherein the value range of the preset proportion threshold is 0-1, and is not a fixed value.
S33: and when the ratio is larger than a preset ratio threshold value, judging that the rectangular area is high-light.
Specifically, the ratio of the number of pixels with the pixel values smaller than or equal to a first pixel threshold and larger than or equal to a second pixel threshold to the total number of pixels in the rectangular area is compared with a certain preset proportion threshold, and when the ratio is larger than the preset proportion threshold, highlight is judged in the rectangular area.
S34: when the ratio is less than or equal to a preset ratio threshold value, judging that the light in the rectangular area is low light
Specifically, the ratio of the pixel value less than or equal to a first pixel threshold, the number of pixels greater than or equal to a second pixel threshold, and the total number of pixels in the rectangular area is compared with a preset ratio threshold, and when the ratio is less than or equal to the preset ratio threshold, it is determined that the rectangular area is low-light.
Alternatively, there are different exposure modes for high light and low light.
In the embodiment of the present invention, as shown in fig. 7, based on the step S32 in fig. 6, the photometric value evaluation step S4 is: calculating the average brightness value of the pixel points in the rectangular region when the light is high or low, and taking the average brightness value as a photometric value, specifically comprising the following steps:
s41: and respectively calculating the photometric value of the image to be evaluated according to the judged high light or low light.
Specifically, as shown in fig. 6, in step S32, the ratio of the number of pixels in the threshold interval to the total number of pixels in the rectangular area is compared with a preset ratio threshold, and it is determined whether the rectangular area is high light or low light. The rectangular area is judged to be high light or low light, different processing is respectively carried out based on the result, and the corresponding photometric value is calculated.
S42: when the rectangular area is high-light, an annular area with a certain set pixel size is expanded inwards from the periphery of the image to be evaluated, and the average brightness value of each pixel point in the annular area is calculated and used as a photometric value.
Specifically, when the rectangular area is highlight, an annular area with a certain set pixel size is expanded inward from the periphery of the image to be evaluated, such as 202 shown in fig. 2, and then the average brightness value of each pixel point in the annular area is calculated and used as the photometric value. The average brightness value comprises weighted average brightness values with different weights. And the annular region is a region which extends X pixel points inwards from the periphery of the image to be evaluated.
S43: and when the light intensity in the rectangular area is low, calculating the average brightness value of each pixel point of which the pixel value is greater than the first pixel threshold value in the rectangular area, and taking the average brightness value as a photometric value.
Specifically, when the light intensity in the rectangular region is low, the average brightness value of each pixel point in the rectangular region whose pixel value is greater than the first pixel threshold is calculated, and the average brightness value is used as the photometric value. The average brightness value comprises weighted average brightness values with different weights.
In an embodiment of the present invention, as shown in fig. 8, an exposure control method is provided, where the exposure control method is based on the infrared image brightness evaluation method, and further includes the following exposure control steps:
s81: and calculating to obtain a photometric deviation value according to the photometric value and a preset target photometric value.
Specifically, the preset target photometric value refers to a target photometric value for automatic exposure, where automatic exposure adjustment is performed on the brightness of a local highlight area, that is, an area with strong light supplement is not overexposed, and an area with weak light supplement is not underexposed. The photometric deviation value is a difference value between a photometric value obtained when the infrared image brightness evaluation method is used for obtaining high light or low light and a target photometric value.
S82: and determining an exposure adjustment step length according to the photometric deviation value.
Specifically, a photometric deviation value, that is, a difference between the photometric value obtained at the high light or low light obtained in the infrared image brightness evaluation method and the target photometric value, is calculated and obtained according to the photometric value and a preset target photometric value; determining an exposure adjustment step length according to the photometric deviation value; and adjusting the exposure time or the digital gain according to the exposure adjusting step length.
S83: and dividing the high light and the low light into two modes of the exposure control step according to the high light or the low light in the rectangular area.
Specifically, according to the infrared image brightness evaluation method, it is determined that the rectangular region is high light or low light, and in the exposure control step, the high light and the low light in the rectangular region are divided into two modes.
S84: dividing the photometric deviation value into a plurality of gears according to the numerical value, and according to the exposure adjustment step length, each gear corresponds to a group of exposure parameters.
Specifically, a photometric deviation value, that is, a difference between the photometric value obtained at the high light or low light obtained in the infrared image brightness evaluation method and the target photometric value, is calculated and obtained according to the photometric value and a preset target photometric value; determining an exposure adjustment step length according to the photometric deviation value; dividing the high light and the low light into two modes of the exposure control step according to the high light or the low light in the rectangular area; and dividing each mode into a plurality of gears according to the difference value between the photometric value and the target photometric value, and corresponding to each gear in the exposure adjusting step according to the exposure adjusting step to form a group of exposure parameters. The exposure parameters refer to exposure time and digital gain, and the corresponding exposure time and digital gain are set according to the photometric difference value.
S85: and setting exposure parameters according to the gears, and outputting an exposure control instruction to realize exposure control.
Specifically, the exposure parameters refer to exposure time and digital gain, and the corresponding exposure time and digital gain are set according to the photometric difference value. For example, in the image to be evaluated, the ratio of the number of pixels in the rectangular region whose pixel values are less than or equal to the first pixel threshold and greater than or equal to the second pixel threshold to the total number of pixels in the rectangular region is greater than the preset proportion threshold, that is, highlight exists in the rectangular region, that is, the highlight mode exists in the exposure control step. And expanding an annular area with a certain set pixel size from the periphery to the inside of the image to be evaluated, and calculating the average brightness value of each pixel point in the annular area to serve as a photometric value. Dividing the difference value between the target photometric value and the highlight mode in the exposure control step into a plurality of gears according to the size, adjusting different exposure parameters corresponding to the exposure gears by adjusting the gears, and adjusting the local over-explosion area to ensure that the highlight area is not over-exploded, thereby realizing exposure control.
An infrared image brightness evaluation device, as shown in fig. 9, specifically includes the following modules:
The image to be evaluated acquiring module 91 is used for acquiring an infrared image as an image to be evaluated;
a rectangular region brightness interval counting module 92, configured to count, in a rectangular region of a center N × M pixel of the image to be evaluated, the number of pixels whose pixel values are less than or equal to a first pixel threshold and greater than or equal to a second pixel threshold;
a rectangular region high-low light determination module 93, configured to compare a ratio of the number of pixels in the threshold to the total number of pixels in the rectangular region with a preset ratio threshold, and determine whether the rectangular region is high-light or low-light;
the photometric value evaluation module 94 is configured to calculate an average brightness value of each pixel in the rectangular region when the light is high or low, and use the average brightness value as the photometric value.
Preferably, the module 92 for counting the rectangular region brightness intervals, that is, the module counts the number of pixels with pixel values less than or equal to the first pixel threshold and greater than or equal to the second pixel threshold in the rectangular region of the central N × M pixels of the image to be evaluated, and includes: the system comprises an area dividing unit, an area preprocessing unit and a data statistical unit.
And the region dividing unit is used for taking a rectangular region of N × M pixel points from the center of the image to be evaluated.
A region preprocessing unit: the method is used for carrying out threshold segmentation on the rectangular area by a first pixel threshold value to obtain a binary image.
And the data counting unit is used for counting the number of pixel points of which the brightness value in the rectangular region corresponding to the binary image is less than or equal to a first pixel threshold value and greater than or equal to a second pixel threshold value.
Preferably, the module 93 for judging high/low light in the rectangular region compares the ratio of the number of pixels in the threshold to the total number of pixels in the rectangular region with a predetermined ratio threshold, and judges whether the rectangular region is high light or low light, including: the device comprises a data acquisition unit, a first judgment unit and a second judgment unit.
And the data acquisition unit is used for acquiring the ratio of the number of pixels with the pixel values smaller than or equal to a first pixel threshold and larger than or equal to a second pixel threshold to the total number of pixels in the rectangular area, and judging the size of the ratio and a certain preset proportion threshold based on the ratio.
And the first judgment unit judges that the rectangular area is high-light when the ratio is greater than the preset ratio threshold.
And the second judging unit is used for comparing the ratio with a certain preset ratio threshold value, and judging that the rectangular area is low light when the ratio is smaller than the preset ratio threshold value.
Preferably, the photometric value evaluation module 94, namely, calculates an average brightness value of each pixel point in the rectangular region when the light is high or low, and uses the average brightness value as the photometric value, including: a first judging unit and a second judging unit.
And the first judgment unit is used for expanding an annular area with a certain set pixel size from the periphery to the inside of the image to be evaluated when the rectangular area is high-light, and calculating the average brightness value of each pixel point in the annular area to be used as a photometric value.
And the second judging unit is used for calculating the average brightness value of each pixel point with the brightness value larger than the first pixel threshold value in the rectangular area as the photometric value when the light in the rectangular area is low.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a readable storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer readable instructions. The internal memory provides an environment for the operating system and execution of computer-readable instructions in the readable storage medium. The network interface of the computer device is used for communicating with an external server through a network connection. The computer readable instructions are executed by a processor to realize the steps of the infrared image brightness evaluation and exposure control method in the above embodiment. The readable storage media provided by the present embodiment include nonvolatile readable storage media and volatile readable storage media.
In one embodiment, a computer device is provided, which includes a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, and when the processor executes the computer readable instructions, the steps of the method for evaluating brightness and controlling exposure of an infrared image in the foregoing embodiments are implemented, for example, steps S1-S4 shown in fig. 4 and steps shown in fig. 8, or steps shown in fig. 5 to 8, and are not repeated here to avoid repetition. Alternatively, the processor implements the functions of each module/unit in the embodiment of the user interface automatic testing apparatus when executing the computer program, for example, the to-be-evaluated image obtaining module 91, the rectangular region brightness interval counting module 92, the rectangular region high-low light judging module 93, and the photometric value evaluating module 94 shown in fig. 9, which are not described herein again to avoid repetition.
In one embodiment, one or more computer-readable storage media having computer-readable instructions stored thereon are provided, the readable storage media provided by the present embodiments including non-volatile readable storage media and volatile readable storage media. The readable storage medium stores computer readable instructions, and the computer readable instructions, when executed by one or more processors, implement the steps of the infrared image brightness evaluation and exposure control method in the above embodiments, such as steps S1-S4 shown in fig. 4 and steps shown in fig. 8, or steps shown in fig. 5 to 8, which are not repeated herein to avoid repetition. Alternatively, the processor implements the functions of each module/unit in the embodiment of the user interface automatic testing apparatus when executing the computer program, for example, the to-be-evaluated image obtaining module 91, the rectangular region brightness interval counting module 92, the rectangular region high-low light judging module 93, and the photometric value evaluating module 94 shown in fig. 9, which are not described herein again to avoid repetition.
It will be understood by those of ordinary skill in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware related to computer readable instructions, which may be stored in a non-volatile readable storage medium or a volatile readable storage medium, and when executed, the computer readable instructions may include processes of the above embodiments of the methods. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

Claims (11)

1. An infrared image brightness evaluation method is characterized by comprising the following steps:
acquiring an infrared image as an image to be evaluated;
counting the number of pixel points with pixel values smaller than or equal to a first pixel threshold value and larger than or equal to a second pixel threshold value in a rectangular region of a central one N x M pixel point of the image to be evaluated;
comparing the ratio of the number of the pixel points in the threshold value to the total number of the pixel points in the rectangular area with a preset proportional threshold value, and judging whether the rectangular area is high light or low light;
And calculating the average brightness value of each pixel point in the rectangular region in the high light or low light as a photometric value.
2. The method according to claim 1, wherein counting the number of pixels having pixel values less than or equal to a first pixel threshold and greater than or equal to a second pixel threshold in a rectangular region having N × M pixels in the center of the image to be evaluated comprises:
acquiring a rectangular region of N x M pixel points from the center of the image to be evaluated;
performing threshold segmentation on the rectangular area by using a first pixel threshold to obtain a first binary image, wherein the gray value of each pixel point of which the brightness value is less than or equal to the first pixel threshold in the rectangular area is 0;
and obtaining pixel points of which the brightness values are greater than the second pixel threshold value in the rectangular area of the pixel points with the gray values of 0 in the first binary image, and counting the number of the pixel points.
3. The method according to claim 1, wherein counting the number of pixels having pixel values less than or equal to a first pixel threshold and greater than or equal to a second pixel threshold in a rectangular region having N × M pixels in the center of the image to be evaluated comprises:
Acquiring a rectangular region of N x M pixel points from the center of the image to be evaluated;
carrying out threshold segmentation on the rectangular area by using a second pixel threshold value to obtain a second binary image; the gray value of each pixel point with the brightness value larger than or equal to the second pixel threshold value in the rectangular area is 255;
and acquiring pixel points of pixel points with the gray value of 255 in the second binary image in the rectangular region, wherein the pixel values are less than or equal to the first pixel threshold, and counting the number of the pixel points.
4. The method according to claim 1, wherein the rectangular area is a N x N square area.
5. The method for evaluating the brightness of an infrared image according to claim 1, wherein the step of comparing the ratio of the number of pixels in the threshold to the total number of pixels in the rectangular region with a predetermined ratio threshold to determine whether the rectangular region is high light or low light comprises:
calculating the ratio of the number of the pixel points in the threshold interval to the total number of the pixel points in the rectangular area;
comparing the ratio of the number of the pixel points in the threshold value to the total number of the pixel points in the rectangular area with a preset proportional threshold value;
When the ratio is larger than a preset ratio threshold, judging that the rectangular area is high-light;
and when the ratio is less than or equal to a preset ratio threshold value, judging that the light in the rectangular area is low.
6. The method according to claim 1, wherein the calculating an average luminance value of each pixel in the rectangular region at high or low luminance as the photometric value comprises:
when the rectangular area is highlight, an annular area with a certain set pixel size is expanded inwards from the periphery in the image to be evaluated;
calculating the average brightness value of each pixel point in the annular area, and taking the average brightness value as a photometric value;
and when the light intensity in the rectangular area is low, calculating the average brightness value of each pixel point with the brightness value larger than the first pixel threshold value in the rectangular area, and taking the average brightness value as a photometric value.
7. The method according to claim 6, wherein the annular region is a region extending X pixels inward from the periphery in the image to be evaluated.
8. An exposure control method comprising the infrared image brightness evaluation method according to any one of claims 1 to 5, further comprising the exposure control step of:
Acquiring a photometric deviation value according to the photometric value and a preset target photometric value;
determining an exposure adjustment step length according to the photometric deviation value;
dividing the high light and the low light into two modes of the exposure control step according to the high light or the low light in the rectangular area;
dividing the photometric deviation value of each mode into a plurality of gears according to the numerical value, and enabling each gear to correspond to a group of exposure parameters according to the exposure adjustment step length;
and setting exposure parameters according to the gears, and outputting an exposure control instruction to realize exposure control.
9. An infrared image brightness evaluation device, characterized by comprising:
and the image to be evaluated acquiring module is used for acquiring an infrared image as the image to be evaluated.
And the rectangular region brightness interval counting module is used for counting the number of pixel points with pixel values smaller than or equal to the first pixel threshold value and larger than or equal to the second pixel threshold value in a rectangular region of a central N x M pixel point of the image to be evaluated.
And the rectangular region high-low light judging module is used for comparing the ratio of the number of the pixel points in the threshold value to the total number of the pixel points in the rectangular region with a preset proportional threshold value, and judging whether the rectangular region is high light or low light.
And the photometric value evaluation module is used for calculating the average brightness value of each pixel point in the rectangular region in high light or low light, and the average brightness value is used as the photometric value.
10. A computer device comprising a memory, a processor and computer readable instructions stored in the memory and executable on the processor, wherein the processor implements the infrared image brightness evaluation method according to any one of claims 1 to 7 or the steps of executing the exposure control method according to claim 8 when executing the computer readable instructions.
11. One or more readable storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to implement the infrared image brightness evaluation method of any one of claims 1 to 7 or the steps of performing the exposure control method of claim 8.
CN202110038492.3A 2021-01-12 2021-01-12 Infrared image brightness evaluation and exposure control method, equipment and medium Pending CN114765666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110038492.3A CN114765666A (en) 2021-01-12 2021-01-12 Infrared image brightness evaluation and exposure control method, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110038492.3A CN114765666A (en) 2021-01-12 2021-01-12 Infrared image brightness evaluation and exposure control method, equipment and medium

Publications (1)

Publication Number Publication Date
CN114765666A true CN114765666A (en) 2022-07-19

Family

ID=82363159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110038492.3A Pending CN114765666A (en) 2021-01-12 2021-01-12 Infrared image brightness evaluation and exposure control method, equipment and medium

Country Status (1)

Country Link
CN (1) CN114765666A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116503369A (en) * 2023-05-06 2023-07-28 北京思莫特科技有限公司 Deformation monitoring method of structure and image exposure parameter adjusting method
CN117011189A (en) * 2023-09-01 2023-11-07 中认尚动(上海)检测技术有限公司 Space brightness evaluation method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116503369A (en) * 2023-05-06 2023-07-28 北京思莫特科技有限公司 Deformation monitoring method of structure and image exposure parameter adjusting method
CN116503369B (en) * 2023-05-06 2024-01-26 北京思莫特科技有限公司 Deformation monitoring method of structure and image exposure parameter adjusting method
CN117011189A (en) * 2023-09-01 2023-11-07 中认尚动(上海)检测技术有限公司 Space brightness evaluation method
CN117011189B (en) * 2023-09-01 2024-03-19 中认尚动(上海)检测技术有限公司 Space brightness evaluation method

Similar Documents

Publication Publication Date Title
US11968459B2 (en) Systems and methods for automatic exposure control
US9330446B2 (en) Method and apparatus for processing image
CN109936698B (en) Automatic exposure control method and device, electronic equipment and storage medium
CN111770285B (en) Exposure brightness control method and device, electronic equipment and storage medium
US8471934B2 (en) Computer readable storage medium, image correction apparatus, and image correction method
CN114765666A (en) Infrared image brightness evaluation and exposure control method, equipment and medium
CN112738411B (en) Exposure adjusting method, exposure adjusting device, electronic equipment and storage medium
CN110223244B (en) Image processing method and device, electronic equipment and storage medium
CN111369471B (en) Image processing method, device, equipment and storage medium
CN108961209B (en) Pedestrian image quality evaluation method, electronic device and computer readable medium
CN112541868A (en) Image processing method, image processing device, computer equipment and storage medium
CN111882578A (en) Foreground image acquisition method, foreground image acquisition device and electronic equipment
CN112653845B (en) Exposure control method, exposure control device, electronic equipment and readable storage medium
CN112419270A (en) No-reference image quality evaluation method and device under meta learning and computer equipment
CN110175967B (en) Image defogging processing method, system, computer device and storage medium
CN111445487A (en) Image segmentation method and device, computer equipment and storage medium
CN114429476A (en) Image processing method, image processing apparatus, computer device, and storage medium
JP4841582B2 (en) Image correction program and image correction apparatus
CN111539975B (en) Method, device, equipment and storage medium for detecting moving object
CN109040579A (en) A kind of filming control method, terminal and computer-readable medium
CN116645527A (en) Image recognition method, system, electronic device and storage medium
CN114390266B (en) Image white balance processing method, device and computer readable storage medium
CN114445447A (en) Image segmentation method, device, equipment and medium
CN111064897B (en) Exposure evaluation value statistical method and imaging equipment
CN113747062B (en) HDR scene detection method and device, terminal and readable storage medium

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