Infrared image scene distinguishing method, electronic equipment and medium

By calculating the histogram and grayscale difference of infrared images and distinguishing image scenes in combination with the definition conditions, the problem of poor discrimination effect of infrared image scenes is solved, and better high dynamic range compression and visual quality are achieved.

CN120495855APending Publication Date: 2025-08-15UNI TREND TECH (CHINA) CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510616862.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the prior art, the scene distinction method of infrared images fails to classify the entire image in scene, resulting in poor effects in different scenarios and affecting the visual perception.

Method used

By obtaining the histogram of the infrared image, the first and second grayscale differences and maximum pixel values ​​are calculated, and the image scenes are distinguished using the definition conditions, including calculating the average values ​​of the first 10% and the last 10% pixels and the average values ​​of the first 1% and the last 1% pixels, generating the grayscale differences, and combining the empirical values ​​a, b, c, and d for scene classification.

Benefits of technology

The scene classification of the entire infrared image is realized, the image compression effect in different scenarios is improved, and the visual quality is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495855A_ABST
    Figure CN120495855A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and particularly relates to an infrared image scene distinguishing method, electronic equipment and a medium, and the method comprises the steps: obtaining a to-be-processed infrared image, and carrying out the histogram statistics of the infrared image, and obtaining a histogram; obtaining the maximum pixel value of the histogram; calculating a first gray difference and a second gray difference according to the histogram; distinguishing the image scene according to the first gray difference, the second gray difference and the maximum pixel value; according to the infrared image scene distinguishing method, scene classification can be carried out on the whole infrared image, the to-be-processed infrared image is acquired, histogram statistics is carried out, the first gray difference, the second gray difference and the maximum pixel value are calculated, and then image scenes are distinguished according to definition conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an infrared image scene distinction method, electronic equipment, and medium. Background Art

[0002] In related technologies, scene segmentation for infrared images typically uses segmentation to distinguish objects within the image, such as humans and plants. However, this approach does not classify the entire infrared image, making it impossible to perform different high dynamic range compression for different scenes. This results in poor infrared image quality in some scenes, affecting the viewing experience.

[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in this field.

[0004] Application Contents

[0005] In view of at least one of the above technical problems, the present application provides an infrared image scene distinction method, electronic device and medium, which solves the problem of using a separation method to distinguish objects in the image in the related art. However, this method does not classify the scene of the entire infrared image, and thus cannot perform different high dynamic range compression for different scenes, resulting in poor effect of infrared images in some scenes, affecting the viewing experience.

[0006] In a first aspect, a method for distinguishing scenes in infrared images is provided, comprising:

[0007] Acquire an infrared image to be processed, perform histogram statistics on the infrared image, and obtain a histogram;

[0008] Get the maximum pixel value of the histogram;

[0009] Calculating a first grayscale difference and a second grayscale difference according to the histogram;

[0010] Distinguishing image scenes according to the first grayscale difference, the second grayscale difference, and the maximum pixel value, and based on the following defined conditions;

[0011] The definition conditions are:

[0012]

[0013] Where a, b, c, and d are all empirical values, range1 is the first grayscale difference, range2 is the second grayscale difference, and maxV is the maximum pixel value.

[0014] The infrared image scene distinction method of the present application can classify the scene of the entire infrared image by obtaining the infrared image to be processed, performing histogram statistics, calculating the first grayscale difference, the second grayscale difference and the maximum pixel value, and then distinguishing the image scene according to the defined conditions.

[0015] In some possible implementations, the range of the histogram is: 0≤pixel value≤16383.

[0016] In some possible implementations, calculating the first grayscale difference includes:

[0017] According to the histogram, calculate the average value of the first 10% pixels and the average value of the last 10% pixels;

[0018] According to the average value of the first 10% pixels and the average value of the last 10% pixels, the difference between the average value of the last 10% pixels and the average value of the first 10% pixels is calculated to generate a first grayscale difference.

[0019] In some possible implementations, the average of the top 10% pixels is calculated, including:

[0020] Determine the number of 10% pixels based on the total number of pixels in the infrared image;

[0021] Using the histogram, starting from the lowest grayscale value of the histogram, accumulate the number of pixels and grayscale values in ascending order of grayscale value until the cumulative number of pixels reaches 10% of the pixels, and calculate the quotient of the accumulated grayscale value and the accumulated number of pixels as the average value of the first 10% of pixels.

[0022] In some possible implementations, calculating the average of the last 10% of pixels includes:

[0023] Determine the number of 10% pixels based on the total number of pixels in the infrared image;

[0024] Using the histogram, starting from the highest grayscale value of the histogram, accumulate the number of pixels and grayscale values in descending order of grayscale value until the cumulative number of pixels reaches 10% of the pixels, and calculate the quotient of the accumulated grayscale value and the accumulated number of pixels as the average value of the last 10% of the pixels.

[0025] In some possible implementations, calculating the second grayscale difference includes:

[0026] According to the histogram, calculate the average value of the first 1% pixels and the average value of the last 1% pixels;

[0027] According to the average value of the first 1% of pixels and the average value of the last 1% of pixels, the difference between the average value of the last 1% of pixels and the average value of the first 1% of pixels is calculated to generate a second grayscale difference.

[0028] In some possible implementations, calculating the average of the top 1% pixels includes:

[0029] According to the total number of pixels in the infrared image, the number of pixels of 1% is determined;

[0030] Using the histogram, starting from the lowest grayscale value of the histogram, accumulate the number of pixels and grayscale values in ascending order of grayscale value until the cumulative number of pixels reaches 1% of the pixels. Calculate the quotient of the accumulated grayscale value and the accumulated number of pixels as the average value of the first 1% of pixels.

[0031] In some possible implementations, calculating the average of the last 1% of pixels includes:

[0032] According to the total number of pixels in the infrared image, the number of pixels of 1% is determined;

[0033] Using the histogram, starting from the highest grayscale value of the histogram, accumulate the number of pixels and grayscale values in descending order of grayscale value until the cumulative number of pixels reaches 1% of the pixels. Calculate the quotient of the accumulated grayscale value and the accumulated number of pixels as the average value of the last 1% of pixels.

[0034] In a second aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for distinguishing infrared image scenes is implemented.

[0035] According to a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, a method for distinguishing infrared image scenes is implemented.

[0036] The present application is further described below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0038] Figure 1 Schematic diagram of the flow of the infrared image scene distinction method according to an embodiment of the present application;

[0039] Figure 2 A block diagram of an electronic device for implementing the infrared image scene differentiation method according to an embodiment of the present application; DETAILED DESCRIPTION

[0040] To make the above-mentioned objects, features, and advantages of the present application more clearly understood, the specific embodiments of the present application are described in detail below with reference to the accompanying drawings. The following description sets forth many specific details to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar improvements without violating the scope of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.

[0041] like Figure 1 As shown, this embodiment provides a method for distinguishing scenes in infrared images, including steps S100 to S400.

[0042] Step S100: acquiring an infrared image to be processed, performing histogram statistics on the infrared image, and obtaining a histogram.

[0043] In step S100, the range of the histogram is: 0 ≤ pixel value ≤ 16383. The histogram can intuitively display the distribution of the number of pixels at each grayscale level in the infrared image. By analyzing the histogram, the overall brightness distribution of the image can be clearly understood.

[0044] Step S200: Obtain the maximum pixel value of the histogram.

[0045] In step S200, the maximum pixel value represents the brightness of the brightest part of the image, which helps to clarify the brightness range of the image. When performing high dynamic range compression, the maximum pixel value can serve as an important reference parameter to ensure that the compressed image is not overexposed. In addition, the maximum pixel values of infrared images of different scenes often vary. For example, in scenes with strong light reflections, the maximum pixel value is usually higher; while in more uniform indoor scenes, the maximum pixel value may be relatively low. Therefore, the maximum pixel value can help determine the scene type to which the image belongs.

[0046] Step S300 , calculating a first grayscale difference and a second grayscale difference according to the histogram.

[0047] In step S300, by calculating the first grayscale difference and the second grayscale difference, local features of the image, such as edges, textures, etc., can be highlighted. Infrared images of different scenes have different grayscale difference distributions, and these differences can serve as an important basis for scene differentiation.

[0048] Step S400, distinguishing image scenes according to the first grayscale difference, the second grayscale difference, and the maximum pixel value, and based on the following defined conditions;

[0049] The definition conditions are:

[0050]

[0051] Where a, b, c, and d are all empirical values, range1 is the first grayscale difference, range2 is the second grayscale difference, and maxV is the maximum pixel value.

[0052] In step S400, a, b, c, and d are all empirical values, derived from summarizing multiple infrared images. When the second grayscale difference is less than the empirical value a and the first grayscale difference is less than the empirical value b, the scene is defined as a weak scene. When the second grayscale difference is less than the empirical value a, the first grayscale difference is less than the empirical value c, and the maximum pixel value is less than the empirical value d, the scene is defined as a normal scene. When the second grayscale difference is greater than the empirical value a and the maximum pixel value is greater than the empirical value d, the scene is located as a high temperature scene.

[0053] In some embodiments, calculating the first grayscale difference includes:

[0054] According to the histogram, calculate the average value of the first 10% pixels and the average value of the last 10% pixels;

[0055] In this step, the top 10% of pixels represent the portion of the image with lower grayscale values, and their average value reflects the overall brightness of the darker areas in the image. In infrared imaging scenarios, dark areas may correspond to cold objects or shadowed areas. This average value helps determine the brightness state of the dark areas in the image, thereby fully understanding the grayscale distribution range of the image. The bottom 10% of pixels typically correspond to the portion of the image with higher grayscale values, and the average value of these pixels can reflect the overall brightness level of the brighter areas in the image. For example, in an infrared image, if there are hot objects or areas with strong light reflections, the average value of the bottom 10% of pixels will be relatively high. By calculating this average value, you can quickly understand the general situation of the bright areas in the image, providing important information for subsequent analysis of the image's brightness distribution.

[0056] In this step, only the first 10% and last 10% of pixels are selected for averaging, which effectively reduces the amount of data and the impact of noise on the results. At the same time, focusing on the extreme grayscale parts of the image highlights the characteristics of the brightest and darkest areas in the image.

[0057] According to the average value of the first 10% pixels and the average value of the last 10% pixels, the difference between the average value of the last 10% pixels and the average value of the first 10% pixels is calculated to generate a first grayscale difference.

[0058] In some embodiments, calculating the average of the top 10% pixels includes:

[0059] Determine the number of 10% pixels based on the total number of pixels in the infrared image;

[0060] In this step, the specific number of the top 10% pixels is determined, which provides a clear target for subsequent pixel screening from the histogram.

[0061] Using the histogram, starting from the lowest grayscale value of the histogram, accumulate the number of pixels and grayscale values in ascending order of grayscale value until the cumulative number of pixels reaches 10% of the pixels, and calculate the quotient of the accumulated grayscale value and the accumulated number of pixels as the average value of the first 10% of pixels.

[0062] In this step, the average value of the first 10% of pixels with the lowest grayscale values in the image is accumulated, starting from the lowest grayscale value in the histogram. In infrared images, low grayscale areas often correspond to cooler objects or shadows, and the grayscale characteristics of these areas are important for distinguishing different scenes. For example, in a scene with a cold background and a hot target, the average value of the first 10% of pixels can reflect the overall brightness of the cold background and help determine whether there are large areas of cold temperatures in the scene.

[0063] In some embodiments, calculating the average of the bottom 10% of pixels includes:

[0064] Determine the number of 10% pixels based on the total number of pixels in the infrared image;

[0065] In this step, the specific number of the last 10% of pixels is determined, which provides a clear target for subsequent pixel screening from the histogram.

[0066] Using the histogram, starting from the highest grayscale value of the histogram, accumulate the number of pixels and grayscale values in descending order of grayscale value until the cumulative number of pixels reaches 10% of the pixels, and calculate the quotient of the accumulated grayscale value and the accumulated number of pixels as the average value of the last 10% of the pixels.

[0067] In this step, the histogram's grayscale values are accumulated in descending order, focusing on the areas with higher grayscale values in the image. In infrared images, high grayscale areas often correspond to important information such as high-temperature objects and strong reflective sources. Calculating the average of the bottom 10% of pixels accurately reflects the overall brightness level of these high-temperature areas, helping to identify key targets in the image. For example, in industrial inspections, high-temperature equipment failure points may appear as high grayscale areas in the infrared image. The average of the bottom 10% of pixels can quickly determine whether the equipment is abnormally hot.

[0068] In some embodiments, calculating the second grayscale difference includes:

[0069] According to the histogram, calculate the average value of the first 1% pixels and the average value of the last 1% pixels;

[0070] In this step, the top 1% of pixels are in the range of extremely low image grayscale values, and their average value can accurately reflect the overall brightness of the darkest area in the image. In infrared images, these darkest areas may represent extremely cold objects or deep shadows. By calculating the average value of the top 1% of pixels, the characteristics of the extremely dark areas in the image can be captured, which is very helpful for identifying targets with special low-temperature characteristics or determining whether there is a large area of low-brightness background in the image. The bottom 1% of pixels belong to the part of the image with extremely high grayscale values, and their average value reflects the overall brightness level of the brightest area in the image. In infrared imaging, the brightest areas often correspond to high-temperature objects or strong reflective sources. Calculating the average value of the bottom 1% of pixels helps to detect high-temperature targets in the image, such as heating equipment in industrial scenes and fire sources in security scenes, and can capture this key information more keenly.

[0071] According to the average value of the first 1% of pixels and the average value of the last 1% of pixels, the difference between the average value of the last 1% of pixels and the average value of the first 1% of pixels is calculated to generate a second grayscale difference.

[0072] In this step, the second grayscale difference measures the contrast between the brightest and darkest areas in the image. A larger difference indicates a higher extreme contrast in the image—that is, a more pronounced difference in brightness between the brightest and darkest areas. A smaller difference indicates a lower extreme contrast. Different scenes result in different extreme contrasts in infrared images.

[0073] In some embodiments, calculating the top 1% pixel average includes:

[0074] According to the total number of pixels in the infrared image, the number of pixels of 1% is determined;

[0075] Using the histogram, starting from the lowest grayscale value of the histogram, accumulate the number of pixels and grayscale values in ascending order of grayscale value until the cumulative number of pixels reaches 1% of the pixels. Calculate the quotient of the accumulated grayscale value and the accumulated number of pixels as the average value of the first 1% of pixels.

[0076] In this step, we accumulate the grayscale values starting from the lowest, ensuring that we calculate the average of the 1% of pixels with the lowest grayscale values in the image. In infrared images, these low-grayscale pixels may correspond to cold objects or shadows. This average value effectively reflects the overall brightness characteristics of dark areas in the image, allowing us to identify cold targets in the image.

[0077] In some embodiments, calculating the average of the bottom 1% of pixels includes:

[0078] According to the total number of pixels in the infrared image, the number of pixels of 1% is determined;

[0079] Using the histogram, starting from the highest grayscale value of the histogram, accumulate the number of pixels and grayscale values in descending order of grayscale value until the cumulative number of pixels reaches 1% of the pixels. Calculate the quotient of the accumulated grayscale value and the accumulated number of pixels as the average value of the last 1% of pixels.

[0080] In this step, the average value is accumulated in descending order, starting with the highest grayscale value. This ensures that the average value is calculated for the top 1% of pixels in the image. In infrared imaging, these high-grayscale pixels often correspond to high-temperature targets in the scene. The average value of the bottom 1% of pixels effectively reflects the overall brightness characteristics of these high-temperature areas, helping to quickly identify and locate high-temperature targets in the image.

[0081] In order to implement the above embodiments, the present application provides an electronic device and a computer-readable storage medium.

[0082] For example, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for distinguishing infrared image scenes is implemented.

[0083] For example, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the infrared image scene distinction method is implemented.

[0084] Figure 2 This is a block diagram of an electronic device that implements the infrared image scene differentiation method according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided for example only and are not intended to limit the implementation of the present application as described and / or claimed herein.

[0085] like Figure 2As shown, the electronic device includes: a memory 610, a processor 620 and a computer program 630 stored in the memory and operable on the processor. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to an interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).

[0086] Memory 610 is a non-transitory computer-readable storage medium provided in this application. The memory stores instructions executable by at least one processor to cause the at least one processor to perform the method of the above embodiment. The non-transitory computer-readable storage medium of this application stores computer instructions for causing a computer to perform the method of the above embodiment.

[0087] Memory 610, 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-described embodiments. Processor 620 executes the non-transitory software programs, instructions, and modules stored in memory 610 to execute various server functional applications and data processing, thereby implementing the methods in the above-described embodiments.

[0088] The memory 610 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the electronic device used to implement the method in the above embodiment, etc. In addition, the memory 610 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 610 may optionally include a memory remotely located relative to the processor 620, and these remote memories may be connected to the electronic device used to implement the method in the above embodiment via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0089] The electronic device used in the method of the above embodiment may further include: an input device 640 and an output device 650. The processor 620, the memory 610, the input device 640 and the output device 650 may be connected via a bus or other means. Figure 2The bus connection is taken as an example.

[0090] The input device 640 can receive input digital or character information and generate key signal input related to user settings and function control of the electronic device, such as input devices such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, a pointer, one or more mouse buttons, a trackball, and a joystick. The output device 650 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.

[0091] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0092] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0093] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application belong.

[0094] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0095] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be performed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps in the method embodiments. The aforementioned storage medium can be a read-only memory, a magnetic disk, or an optical disk.

[0096] In addition, the functional units in the various embodiments of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into a module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0097] The above are merely preferred embodiments of the present application and do not constitute any form of limitation to the present application. Any person skilled in the art can, without departing from the scope of the technical solution of the present application, use the methods and technical contents disclosed above to make many possible changes and modifications to the technical solution of the present application, or modify it into an equivalent embodiment with equivalent changes. Therefore, all equivalent changes made based on the shape, structure and principle of the present application without departing from the content of the technical solution of the present application should be included in the scope of protection of the present application.

Claims

1. A method for distinguishing scenes in infrared images, characterized in that: include: Acquiring an infrared image to be processed, performing histogram statistics on the infrared image to obtain a histogram; Obtaining the maximum pixel value of the histogram; Calculating a first grayscale difference and a second grayscale difference according to the histogram; Distinguishing image scenes according to the first grayscale difference, the second grayscale difference, and the maximum pixel value, and based on the following defined conditions; The definition conditions are: Where a, b, c, and d are all empirical values, range1 is the first grayscale difference, range2 is the second grayscale difference, and maxV is the maximum pixel value.

2. The infrared image scene distinction method according to claim 1, characterized in that: The range of the histogram is: 0≤pixel value≤16383.

3. The infrared image scene distinction method according to claim 1, characterized in that: The calculating the first grayscale difference includes: Calculating the average value of the first 10% pixels and the average value of the last 10% pixels according to the histogram; According to the average value of the first 10% pixels and the average value of the last 10% pixels, the difference between the average value of the last 10% pixels and the average value of the first 10% pixels is calculated to generate a first grayscale difference.

4. The infrared image scene distinction method according to claim 3, characterized in that: The calculation of the average value of the first 10% pixels includes: Determining 10% of the number of pixels based on the total number of pixels in the infrared image; Using the histogram, starting from the lowest grayscale value of the histogram, the number of pixels and grayscale values are accumulated in ascending order of grayscale value until the cumulative number of pixels reaches 10% of the number of pixels, and the quotient of the accumulated grayscale value and the accumulated number of pixels is calculated as the average value of the first 10% of pixels.

5. The infrared image scene distinction method according to claim 3, characterized in that: The calculation of the average value of the last 10% pixels includes: Determining 10% of the number of pixels based on the total number of pixels in the infrared image; Using the histogram, starting from the highest grayscale value of the histogram, accumulate the number of pixels and grayscale values in descending order of grayscale value until the cumulative number of pixels reaches 10% of the number of pixels, and calculate the quotient of the accumulated grayscale value and the accumulated number of pixels as the average value of the last 10% of the pixels.

6. The infrared image scene distinction method according to claim 1, characterized in that: The calculating the second grayscale difference includes: Calculate the average value of the first 1% pixels and the average value of the last 1% pixels according to the histogram; According to the first 1% pixel average value and the last 1% pixel average value, a difference between the last 1% pixel average value and the first 1% pixel average value is calculated to generate a second grayscale difference.

7. The infrared image scene distinction method according to claim 6, characterized in that: The calculation of the average value of the first 1% pixels includes: Determining the number of pixels of 1% according to the total number of pixels of the infrared image; Using the histogram, starting from the lowest grayscale value of the histogram, the number of pixels and grayscale values are accumulated in ascending order of grayscale value until the cumulative number of pixels reaches 1% of the number of pixels, and the quotient of the accumulated grayscale value and the accumulated number of pixels is calculated as the average value of the first 1% of pixels.

8. The infrared image scene distinction method according to claim 6, characterized in that: The calculation of the average value of the last 1% pixels includes: Determining the number of pixels of 1% according to the total number of pixels of the infrared image; Using the histogram, starting from the highest grayscale value of the histogram, accumulate the number of pixels and grayscale values in descending order of grayscale value until the cumulative number of pixels reaches 1% of the number of pixels, and calculate the quotient of the accumulated grayscale value and the accumulated number of pixels as the average value of the last 1% of pixels.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Method for adaptive dynamic range transformation of infrared image

    CN109523477A

  • Infrared image detail enhanced dynamic range compression method

    CN110223248A

  • Infrared target detection method and device and computer storage medium

    CN110490848A

  • Method and device for processing infrared image

    CN114359067A

  • Scene-adaptive infrared image wide dynamic range compression method and device and storage medium

    CN116228556A