CN112614195A - Thermal image generation method and device and thermal imaging equipment - Google Patents

Thermal image generation method and device and thermal imaging equipment Download PDF

Info

Publication number
CN112614195A
CN112614195A CN202011473975.8A CN202011473975A CN112614195A CN 112614195 A CN112614195 A CN 112614195A CN 202011473975 A CN202011473975 A CN 202011473975A CN 112614195 A CN112614195 A CN 112614195A
Authority
CN
China
Prior art keywords
information
color
thermal image
temperature information
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011473975.8A
Other languages
Chinese (zh)
Other versions
CN112614195B (en
Inventor
潘永友
周瑞卿
谭招
陈松林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikmicro Sensing Technology Co Ltd
Original Assignee
Hangzhou Hikmicro Sensing 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 Hangzhou Hikmicro Sensing Technology Co Ltd filed Critical Hangzhou Hikmicro Sensing Technology Co Ltd
Priority to CN202011473975.8A priority Critical patent/CN112614195B/en
Priority claimed from CN202011473975.8A external-priority patent/CN112614195B/en
Publication of CN112614195A publication Critical patent/CN112614195A/en
Application granted granted Critical
Publication of CN112614195B publication Critical patent/CN112614195B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour

Abstract

The embodiment of the application provides a thermal image generation method, a thermal image generation device and a thermal imaging device, wherein the method comprises the following steps: acquiring at least one piece of first appointed temperature information set by a user; acquiring first color characteristic information corresponding to the first specified temperature information and second color characteristic information corresponding to the first specified temperature information in the target thermal image; mapping a first color value corresponding to a pixel to a second color value to obtain a target thermal image, wherein the pixel corresponds to first color characteristic information in the thermal image to be processed; the first color value is a color value of the pixel in the thermal image to be processed, and the second color value is a color value included in the second color feature information. According to the method and the device, the personalized thermal image can be generated according to the user requirements, and the user experience is improved.

Description

Thermal image generation method and device and thermal imaging equipment
Technical Field
The present application relates to the field of thermal imaging technologies, and in particular, to a thermal image generation method and apparatus, and a thermal imaging device.
Background
The thermal imaging device is a device that detects infrared energy (heat) of a target object in a non-contact manner and converts the infrared energy into an electric signal to obtain an image picture and temperature information, and an image generated by the thermal imaging device and used for recording the heat or temperature of the object is called a thermal image. The thermal imaging device may include an infrared thermal imaging camera, a thermal imager, or the like.
Thermal images generated by existing thermal imaging devices are typically grayscale images, i.e., each pixel in the thermal image has only grayscale values. The existing thermal imaging equipment cannot generate personalized thermal images according to the requirements of users, and the personalized requirements of the users are met.
Disclosure of Invention
The application provides a thermal image generation method and device, which can generate personalized thermal images according to user requirements and improve user experience.
In a first aspect, an embodiment of the present application provides a method for generating a thermal image, which is applied to a thermal imaging device, and includes:
acquiring at least one piece of first appointed temperature information set by a user;
acquiring first color characteristic information corresponding to the first specified temperature information and second color characteristic information corresponding to the first specified temperature information in a target thermal image;
mapping a first color value corresponding to a pixel to a second color value for the pixel corresponding to the first color feature information in the thermal image to be processed to obtain the target thermal image; the first color value is a color value of the pixel in the thermal image to be processed, and the second color value is a color value included in the second color feature information.
In one possible implementation, the thermal image to be processed is an original thermal image, the first color feature information is original gray-scale value feature information, and the second color feature information is compressed gray-scale value feature information; alternatively, the first and second electrodes may be,
the thermal image to be processed is a compressed thermal image, the first color characteristic information is original gray-scale value characteristic information, and the second color characteristic information is multi-channel color value characteristic information; or
The thermal image to be processed is a compressed thermal image, the first color feature information is compressed gray-scale value feature information, and the second color feature information is multi-channel color value feature information.
In a possible implementation manner, before mapping the first color value corresponding to the pixel to the second color value, the method further includes:
acquiring first non-specified temperature information; the temperatures among the first specified temperature information, the first non-specified temperature information and the first non-specified temperature information are not overlapped;
acquiring first color characteristic information corresponding to the first non-specified temperature information and second color characteristic information corresponding to the first non-specified temperature information in the target thermal image; and the second color characteristic information corresponding to the first non-specified temperature information is different from the second color characteristic information corresponding to the first specified temperature information.
In a possible implementation manner, the obtaining of the target thermal image includes: for a piece of compressed gray-scale value characteristic information, searching pixels of compressed gray-scale values included in the compressed gray-scale value characteristic information from the compressed thermal image to obtain pixels corresponding to the compressed gray-scale value characteristic information; for the obtained pixel, mapping the compressed gray-scale value of the pixel into a multi-channel color value according to the compressed gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel to obtain the target thermal image;
or, the obtaining of the target thermal image by mapping, for a pixel corresponding to the first color feature information in the to-be-processed thermal image, a first color value corresponding to the pixel as a second color value, includes: for original gray-scale value characteristic information, searching pixels of which the original gray-scale values are included in the original gray-scale value characteristic information from an original thermal image of the compressed thermal image, and determining the position information of the searched pixels in the original thermal image; searching the pixel indicated by the position information from the compressed thermal image, and mapping the compressed gray-scale value of the pixel into a multi-channel color value according to the original gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel for the pixel searched from the compressed thermal image to obtain the target thermal image;
or, the obtaining of the target thermal image by mapping, for a pixel corresponding to the first color feature information in the to-be-processed thermal image, a first color value corresponding to the pixel as a second color value, includes: for original gray-scale value characteristic information, searching pixels of original gray-scale values included in the original gray-scale value characteristic information from the original thermal image to obtain pixels corresponding to the original gray-scale value characteristic information; and mapping the original gray-scale value of the pixel into a compressed gray-scale value according to the original gray-scale value characteristic information and the compressed gray-scale value characteristic information corresponding to the pixel to obtain the target thermal image.
In one possible implementation, the second color feature information is a color value; the mapping the first color value corresponding to the pixel to the second color value includes: mapping the first color value of the pixel to a color value included in second color characteristic information corresponding to the pixel;
or, the second color feature information is a color value interval; the mapping the first color value corresponding to the pixel to the second color value includes: and determining a second color value of the pixel according to the mapping relation between the first color characteristic information corresponding to the pixel and the color value interval, and mapping the first color value of the pixel into the determined second color value.
In a possible implementation manner, the acquiring at least one first specified temperature information set by a user includes:
acquiring a numerical value or an upper and lower boundary value of the first specified temperature information input by the user on a temperature information setting interface to obtain the first specified temperature information; alternatively, the first and second electrodes may be,
displaying the thermal image to the user, acquiring at least one area selected by the user on the thermal image, and determining the first specified temperature information according to the gray-scale values of pixels in the area; the thermal image is a raw thermal image or a compressed thermal image; alternatively, the first and second electrodes may be,
acquiring a numerical value or an upper and lower boundary value of first non-specified temperature information input by the user on a temperature information setting interface to obtain the first non-specified temperature information, and determining the first specified temperature information according to the first non-specified temperature information and a detectable temperature range of the thermal imaging equipment; alternatively, the first and second electrodes may be,
presenting the thermal image to the user, acquiring at least one region selected by the user on the thermal image, determining the first non-specified temperature information according to the gray-scale values of pixels in the region, and determining the first specified temperature information according to the first non-specified temperature information and the detectable temperature range of the thermal imaging device; the thermal image is either a raw thermal image or a compressed thermal image.
In one possible implementation manner, the determining the first specified temperature information according to the gray-scale values of the pixels in the area includes:
for one of the regions, determining temperature information of the region according to the maximum gray-scale value and the minimum gray-scale value of the pixels in the region; if the temperature information with overlapped temperatures does not exist, taking each piece of temperature information as first appointed temperature information; if the temperature information with temperature overlapping exists, the temperature information with non-overlapping temperature is respectively used as first appointed temperature information, and the temperature information with temperature overlapping is merged into one piece of temperature information to be used as the first appointed temperature information.
In one possible implementation manner, acquiring second color feature information corresponding to the first specified temperature information in the target thermal image includes:
acquiring second color characteristic information selected by the user for the first specified temperature information on a characteristic setting interface to obtain second color characteristic information corresponding to the first specified temperature information; alternatively, the first and second electrodes may be,
and distributing corresponding second color characteristic information for the first appointed temperature information from preset second color characteristic information.
In one possible implementation manner, acquiring second color feature information corresponding to the first non-specific temperature information in the target thermal image includes:
acquiring second color characteristic information selected by the user for the first non-specified temperature information on a characteristic setting interface to obtain second color characteristic information corresponding to the first specified temperature information; alternatively, the first and second electrodes may be,
distributing corresponding second color characteristic information for the first non-specified temperature information from preset second color characteristic information; alternatively, the first and second electrodes may be,
and determining second color characteristic information corresponding to the first non-specified temperature information according to the second color characteristic information corresponding to the first specified temperature information.
In a second aspect, an embodiment of the present application provides an apparatus for generating a thermal image, including:
the first acquisition module is used for acquiring at least one piece of first specified temperature information set by a user;
a second obtaining module, configured to obtain first color feature information corresponding to the first specified temperature information, and second color feature information corresponding to the first specified temperature information in the target thermal image
The mapping module is used for mapping a first color value corresponding to a pixel to a second color value to obtain a target thermal image, wherein the pixel corresponds to the first color characteristic information in the thermal image to be processed; the first color value is a color value of the pixel in the thermal image to be processed, and the second color value is a color value included in the second color feature information.
In one possible implementation, the thermal image to be processed is an original thermal image, the first color feature information is original gray-scale value feature information, and the second color feature information is compressed gray-scale value feature information; or the thermal image to be processed is a compressed thermal image, the first color characteristic information is original gray-scale value characteristic information, and the second color characteristic information is multi-channel color value characteristic information; or the thermal image to be processed is a compressed thermal image, the first color feature information is compressed gray-scale value feature information, and the second color feature information is multi-channel color value feature information.
In a possible implementation manner, the first obtaining module is further configured to: acquiring first non-specified temperature information; the temperatures among the first specified temperature information, the first non-specified temperature information and the first non-specified temperature information are not overlapped;
the second obtaining module is further configured to: acquiring first color characteristic information corresponding to the first non-specified temperature information and second color characteristic information corresponding to the first non-specified temperature information in the target thermal image; and the second color characteristic information corresponding to the first non-specified temperature information is different from the second color characteristic information corresponding to the first specified temperature information.
In one possible implementation manner, the thermal image to be processed is a compressed thermal image, the first color feature information is compressed grayscale value feature information, the second color feature information is multi-channel color value feature information, and the mapping module is specifically configured to: for a piece of compressed gray-scale value characteristic information, searching pixels of compressed gray-scale values included in the compressed gray-scale value characteristic information from the compressed thermal image to obtain pixels corresponding to the compressed gray-scale value characteristic information; for the obtained pixel, mapping the compressed gray-scale value of the pixel into a multi-channel color value according to the compressed gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel to obtain the target thermal image;
or, the thermal image to be processed is a compressed thermal image, the first color feature information is original gray-scale value feature information, the second color feature information is multi-channel color value feature information, and the mapping module is specifically configured to: for original gray-scale value characteristic information, searching pixels of which the original gray-scale values are included in the original gray-scale value characteristic information from an original thermal image of the compressed thermal image, and determining the position information of the searched pixels in the original thermal image; searching the pixel indicated by the position information from the compressed thermal image, and mapping the compressed gray-scale value of the pixel into a multi-channel color value according to the original gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel for the pixel searched from the compressed thermal image to obtain the target thermal image;
or, the thermal image to be processed is an original thermal image, the first color feature information is original gray-scale value feature information, the second color feature information is compressed gray-scale value feature information, and the mapping module is specifically configured to: for original gray-scale value characteristic information, searching pixels of original gray-scale values included in the original gray-scale value characteristic information from the original thermal image to obtain pixels corresponding to the original gray-scale value characteristic information; and mapping the original gray-scale value of the pixel into a compressed gray-scale value according to the original gray-scale value characteristic information and the compressed gray-scale value characteristic information corresponding to the pixel to obtain the target thermal image.
In one possible implementation, the second color feature information is a color value; the mapping module is specifically configured to: mapping the first color value of the pixel to a color value included in second color characteristic information corresponding to the pixel;
or, the second color feature information is a color value interval; the mapping module is specifically configured to: and determining a second color value of the pixel according to the mapping relation between the first color characteristic information corresponding to the pixel and the color value interval, and mapping the first color value of the pixel into the determined second color value.
In a possible implementation manner, the first obtaining module is specifically configured to:
acquiring a numerical value or an upper and lower boundary value of the first specified temperature information input by the user on a temperature information setting interface to obtain the first specified temperature information; alternatively, the first and second electrodes may be,
displaying the thermal image to the user, acquiring at least one area selected by the user on the thermal image, and determining the first specified temperature information according to the gray-scale values of pixels in the area; the thermal image is a raw thermal image or a compressed thermal image; alternatively, the first and second electrodes may be,
acquiring a numerical value or an upper and lower boundary value of first non-specified temperature information input by the user on a temperature information setting interface to obtain the first non-specified temperature information, and determining the first specified temperature information according to the first non-specified temperature information and a detectable temperature range of the thermal imaging equipment; alternatively, the first and second electrodes may be,
presenting the thermal image to the user, acquiring at least one region selected by the user on the thermal image, determining the first non-specified temperature information according to the gray-scale values of pixels in the region, and determining the first specified temperature information according to the first non-specified temperature information and the detectable temperature range of the thermal imaging device; the thermal image is either a raw thermal image or a compressed thermal image.
In a possible implementation manner, the first obtaining module is specifically configured to: for one of the regions, determining temperature information of the region according to the maximum gray-scale value and the minimum gray-scale value of the pixels in the region; if the temperature information with overlapped temperatures does not exist, taking each piece of temperature information as first appointed temperature information; if the temperature information with temperature overlapping exists, the temperature information with non-overlapping temperature is respectively used as first appointed temperature information, and the temperature information with temperature overlapping is merged into one piece of temperature information to be used as the first appointed temperature information.
In a possible implementation manner, the second obtaining module is specifically configured to: acquiring second color characteristic information selected by the user for the first specified temperature information on a characteristic setting interface to obtain second color characteristic information corresponding to the first specified temperature information; or distributing corresponding second color characteristic information for the first specified temperature information from preset second color characteristic information.
In a possible implementation manner, the second obtaining module is specifically configured to: acquiring second color characteristic information selected by the user for the first non-specified temperature information on a characteristic setting interface to obtain second color characteristic information corresponding to the first specified temperature information; or distributing corresponding second color characteristic information for the first non-specified temperature information from preset second color characteristic information; or determining second color characteristic information corresponding to the first non-specified temperature information according to the second color characteristic information corresponding to the first specified temperature information.
In a third aspect, an embodiment of the present application further provides a thermal imaging apparatus, including: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the apparatus, cause the apparatus to perform the method of any of the first aspects.
In a fourth aspect, the present embodiments also provide a computer-readable storage medium, in which a computer program is stored, which, when run on a computer, causes the computer to perform the method of any one of the first aspect.
In the thermal image generation method according to the embodiment of the application, a thermal imaging device obtains at least one first specified temperature information set by a user, obtains first color feature information corresponding to the first specified temperature information, and second color feature information corresponding to the first specified temperature information in a target thermal image, maps, for a pixel corresponding to the first color feature information in a thermal image to be processed, a first color value corresponding to the pixel into a second color value, so as to obtain the target thermal image, where the first color value is a color value of the pixel in the thermal image to be processed, and the second color value is a color value included in the second color feature information, so that the pixel in the obtained target thermal image whose temperature is included in the first specified temperature information is displayed as a color value included in the second color feature information, thereby highlighting a temperature value or a temperature interval in which the user is interested in the target thermal image, such as a compressed thermal image or a pseudo-color thermal image, and the personalized thermal image is generated according to the user requirements, so that the user experience is improved.
Drawings
FIG. 1 is a block diagram of one embodiment of a thermal imaging apparatus of the present application;
FIG. 2 is a flow chart of one embodiment of a thermal image generation method of the present application;
FIG. 3A is a flow chart of another embodiment of a thermal image generation method of the present application;
FIGS. 3B-3D are diagrams illustrating examples of interfaces provided by a thermal imaging apparatus according to embodiments of the present disclosure;
FIG. 4 is a flow chart of yet another embodiment of a thermal image generation method of the present application;
FIG. 5 is a flow chart of yet another embodiment of a thermal image generation method of the present application;
FIG. 6 is a flow chart of yet another embodiment of a thermal image generation method of the present application;
FIG. 7 is a flow chart of yet another embodiment of a thermal image generation method of the present application;
FIG. 8 is a flow chart of yet another embodiment of a thermal image generation method of the present application;
FIG. 9 is a block diagram of one embodiment of a thermal image generation apparatus of the present application.
Detailed Description
The terminology used in the description of the embodiments section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.
The terms referred to in the embodiments of the present application are first described by way of illustration and not limitation.
Infrared thermal imaging camera: the camera detects infrared energy in a non-contact mode, converts the infrared energy into an electric signal through the sensor, and further obtains image pictures and temperature information.
The gray scale value: the temperature radiation of the object is sensed by a thermal imaging detector in the thermal imaging equipment through electromagnetic wave transmission, the gray-scale value of each pixel in a thermal image generated after digital sampling is carried out, and the larger the gray-scale value is, the higher the temperature is, under the same state.
Steady state: the thermal imaging detector outputs a state in which the corresponding relationship between the gray-scale value and the temperature value is relatively stable, and the state can be reached after equipment is powered on for a period of time. The corresponding relation between the temperature value and the gray-scale value fluctuates obviously under the unstable state.
Temperature drift (called temperature drift for short): and (3) representing the phenomenon that the temperature value and the gray scale value fluctuate along with time under the unsteady state condition, namely the same temperature value corresponds to different gray scale values at different time points.
Pseudo-color: the thermal imaging detector detects electromagnetic waves in a non-visible light wave band, so that a color image cannot be naturally generated, and only a gray image can be generated. And generating a pseudo-color image through the corresponding relation of the gray value and the color value.
In the existing implementation, the original thermal image output by the thermal imaging detector in the thermal imaging device is a gray scale image, and generally, the gray scale value of each pixel is 14bit data; then, the thermal imaging device maps the gray-scale value of each pixel in the original thermal image into 8-bit or 10-bit data, and the mapping process is called gray-scale mapping and is compression of the gray-scale value of the pixel in the original thermal image; and the thermal imaging equipment displays the thermal image obtained after the gray scale mapping to a user, and the user checks the thermal image.
The thermal images before and after the thermal imaging device performs the gray scale mapping are both gray scale images, and each pixel in the thermal image only has a gray scale value. The gray-scale value and the temperature in the thermal image before gray-scale mapping have a positive mapping relation, namely the larger the gray-scale value of the pixel is, the higher the temperature is, the smaller the gray-scale value of the pixel is, and the lower the temperature is; in the thermal image after the gray-scale mapping, the gray-scale value and the temperature do not necessarily have a positive mapping relationship, which depends on the specific mapping rule of the gray-scale mapping.
The thermal imaging device may be an infrared thermal imaging camera, a thermal imager, or the like that outputs a thermal imaging video, and the thermal image may be a frame of video image in a video output by the thermal imaging device. And performing the gray scale mapping processing on each frame of video image to obtain the thermal imaging video displayed to the user.
The mapping rules of the gray scale mapping in the thermal imaging equipment are preset, all the thermal images are subjected to gray scale mapping according to the same mapping rules, and for the same thermal image, the gray scale mapping rules of each pixel are also the same, so that the personalized thermal image cannot be generated according to the requirements of a user.
Therefore, the method and the device for generating the thermal image can enable a user to specify temperature information such as an interested temperature value or a temperature interval, and the thermal imaging device generates the thermal image which highlights an image area corresponding to the temperature information specified by the user based on the temperature information specified by the user, so that the thermal image displayed to the user is closer to the user requirement, and the user experience is improved.
The method and the device for generating the thermal image can be suitable for thermal imaging equipment, such as a thermal infrared imager, a thermal infrared imaging camera and the like.
In the embodiment of the present application, in order to distinguish thermal images before and after grayscale mapping, a thermal image output by a thermal imaging detector before grayscale mapping is referred to as an original thermal image, and a thermal image obtained after grayscale mapping (that is, after compressing a grayscale value of each pixel in the original thermal image) is referred to as a compressed thermal image; to distinguish the gray scale values in the original thermal image from the compressed thermal image, the gray scale values of the pixels in the original thermal image are referred to as original gray scale values and the gray scale values of the pixels in the compressed thermal image are referred to as compressed gray scale values.
In the embodiment of the present application, the thermal image obtained after mapping the compressed thermal image of the pixels in the compressed thermal image into multi-channel color values is referred to as a pseudo-color thermal image. In the thermal imaging device, the multi-channel color value in the embodiment of the present application may be a red, green, and blue (RGB) color value in general. However, the multi-channel color values are not limited to RGB color values, and are related to an abstract color model established for representing colors in the thermal imaging device, which is not described herein.
Hereinafter, the structure of the thermal imaging apparatus is first exemplarily explained. Fig. 1 is a view showing an example of a structure of a thermal image forming apparatus, and as shown in fig. 1, a thermal image forming apparatus 10 may include: a thermal imaging detector 11 and a processor 12; optionally, a memory 13 may also be included. Wherein the thermal imaging detector 11 and the processor 12 and the memory 13 can communicate with each other via internal connection paths to transfer control and/or data signals, the memory 13 is used for storing a computer program, and the processor 11 is used for calling and running the computer program from the memory 13.
The memory 13 may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a Random Access Memory (RAM), or other types of dynamic storage devices that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), a magnetic disc storage medium or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, etc.
The processor 11 may be combined with the memory 13 into a processing device, more generally a separate component, and the processor 11 is configured to execute the program code stored in the memory 13 to implement the above-mentioned functions. In particular, the memory 13 may be integrated in the processor 11, or may be independent of the processor 11.
In addition to this, in order to further improve the functions of the electronic apparatus 10, the electronic apparatus 10 may further include one or more of an input unit 14, a display unit 15, and the like. The display unit 15 may include a display screen, among others.
The thermal imaging detector 11 is used for generating a primary thermal image, and transmitting the primary thermal image to the processor 12;
the processor 12 may process the raw thermal image to obtain a compressed thermal image or a pseudo-color thermal image that satisfies the user's personalized requirements of embodiments of the present application.
The compressed thermal image or pseudo-color thermal image generated by the processor 12 may be presented to the user by the display unit 15.
Optionally, the electronic device 10 may further include a power supply 16 for providing power to various devices or circuits in the thermal imaging device.
It should be understood that the thermal imaging device 10 shown in fig. 1 is capable of implementing the processes of the thermal image generation method provided by the embodiments of the present application. The operations and/or functions of the respective modules in the thermal imaging apparatus 10 are respectively to implement the corresponding flows in the above-described method embodiments. Specifically, reference may be made to the following description in the embodiments of the present application, and a detailed description is appropriately omitted herein to avoid redundancy.
Fig. 2 is a flowchart of an embodiment of a thermal image generation method of the present application, which may include, as shown in fig. 2:
step 201: the thermal imaging apparatus acquires at least one first specified temperature information set by a user.
The first designated temperature information may be a temperature value or a temperature interval, and temperatures of different first designated temperature information do not overlap. If a plurality of pieces of first specified temperature information are acquired, each piece of first specified temperature information may be a temperature value or a temperature interval, for example, 2 pieces of first specified temperature information are acquired, 1 piece of first specified temperature information may be a temperature value or a temperature interval, and the other 1 piece of first specified temperature information may be a temperature value or a temperature interval.
Step 202: the thermal imaging device acquires first color characteristic information corresponding to the first specified temperature information and second color characteristic information corresponding to the first specified temperature information in the target thermal image.
Step 203: for a pixel corresponding to first color characteristic information in the thermal image to be processed, mapping a first color value corresponding to the pixel into a second color value by the thermal imaging equipment to obtain a target thermal image; the first color value is a color value of the pixel in the thermal image to be processed, and the second color value is a color value included in the second color feature information.
For steps 202 to 203, if the thermal image to be processed is an original thermal image, the first color characteristic information may be original gray-scale value characteristic information, and the second color characteristic information may be compressed gray-scale value characteristic information; alternatively, the first and second electrodes may be,
if the thermal image to be processed is a compressed thermal image, the first color characterization information may be original gray-scale value characterization information, and the second color characterization information may be multi-channel color value characterization information; alternatively, the first and second electrodes may be,
if the thermal image to be processed is a compressed thermal image, the first color characterization information may be compressed grayscale value characterization information and the second color characterization information may be multi-channel color value characterization information.
The first color feature information may be a color value or a color value interval; the second color feature information may be a color value or a color value interval. For example, the original grayscale value characteristic information may be an original grayscale value or an original grayscale value interval, the compressed grayscale value characteristic information may be a compressed grayscale value or a compressed grayscale value interval, and the multi-channel color value characteristic information may be a multi-channel color value or a multi-channel color value interval.
In the method shown in fig. 2, a thermal imaging device acquires at least one first specified temperature information set by a user, acquires first color feature information corresponding to the first specified temperature information, and second color feature information corresponding to the first specified temperature information in a target thermal image, and maps, for a pixel corresponding to the first color feature information in a to-be-processed thermal image, a first color value corresponding to the pixel to a second color value, so as to obtain the target thermal image, so that a pixel whose temperature is included in the first specified temperature information in the obtained target thermal image is displayed as a color value included in the second color feature information, thereby highlighting an image area corresponding to temperature information of interest in the target thermal image, such as a compressed thermal image or a pseudo-color thermal image, generating a personalized thermal image according to a user requirement, and improving user experience.
The thermal image generation method according to the embodiment of the present application is described below by way of specific embodiments.
Fig. 3A is a flowchart of an embodiment of a thermal image generation method of the present application, as shown in fig. 3A, the method may include:
step 301: the thermal imaging device obtains at least one piece of first appointed temperature information set by a user, and obtains multi-channel color value characteristic information corresponding to the first appointed temperature information.
Each piece of first appointed temperature information corresponds to one piece of multichannel color value characteristic information, and the multichannel color value characteristic information corresponding to different pieces of first appointed temperature information can be the same or different. Optionally, in order to distinguish different first specified temperature information, the multi-channel color value characteristic information corresponding to different first specified temperature information is different.
Wherein, multichannel colour value characteristic information can be multichannel colour value, perhaps multichannel colour value interval to, what a first appointed temperature information corresponds can be multichannel colour value also can be multichannel colour value interval. When the first designated temperature information is multiple, one first designated temperature information corresponds to the multichannel color value or the multichannel color value interval and the other first designated temperature information corresponds to the multichannel color value or the multichannel color value interval without an incidence relation, that is: a first appointed temperature information corresponds multichannel colour value, and another first appointed temperature information can correspond multichannel colour value also can correspond multichannel colour value interval, and the same reason, a first appointed temperature information corresponds multichannel colour value interval, and another first appointed temperature information can correspond multichannel colour value also can correspond multichannel colour value interval, and this application embodiment does not do the restriction.
Wherein, multichannel colour value can be the RGB colour value, and the RGB colour value includes red (R), green (G), blue (B) three parameter, consequently, every multichannel colour value interval generally comprises the interval of three parameter, also includes in a multichannel colour value interval: the numerical value or data interval of R, the numerical value or numerical interval of G, and the numerical value or numerical interval of B, which are not described in detail in the embodiments of the present application.
The multichannel color value characteristic information corresponding to the first specified temperature information can be set by a user or can be automatically set by the thermal imaging device, and the embodiment of the application is not limited.
If the multi-channel color value feature information corresponding to the first specified temperature information is automatically set by the thermal imaging device, the obtaining of the multi-channel color value feature information corresponding to the first specified temperature information may include:
and distributing corresponding multi-channel color value characteristic information for the first appointed temperature information from preset multi-channel color value characteristic information.
If the multi-channel color value feature information corresponding to the first specified temperature information is set by a user, the obtaining of the multi-channel color value feature information corresponding to the first specified temperature information may include:
acquiring multichannel color value characteristic information selected for first appointed temperature information by a user on a multichannel color value characteristic information setting interface to obtain multichannel color value characteristic information corresponding to the first appointed temperature information;
the thermal imaging device may provide an interface (hereinafter, referred to as a temperature information setting interface) for setting the first specified temperature information for the user, so that the user sets the first specified temperature information, and the thermal imaging device may acquire the first specified temperature information set by the user. Similarly, if the multi-channel color value characteristic information is set by the user, the thermal imaging device can provide an interface for setting the multi-channel color value characteristic information for the user (hereinafter referred to as a multi-channel color value characteristic information setting interface) so that the user sets the multi-channel color value characteristic information corresponding to the first designated temperature information, and then the thermal imaging device can acquire the multi-channel color value characteristic information corresponding to the first designated temperature information set by the user.
The temperature information setting interface and the multichannel color value characteristic information setting interface provided by the thermal imaging device for the user can be the same interface or can be two separate interfaces, and the embodiment of the application is not limited.
In one possible implementation, referring to fig. 3B, an exemplary diagram of a temperature information setting interface provided by a thermal imaging device is shown, and includes an input control for upper and lower boundary values of first specified temperature information (i.e., temperature information of interest to a user), where the user may input one or more upper and lower boundary values of the first specified temperature information in the interface, where it should be noted that if the upper and lower boundary values fill in the same value, the first specified temperature information is a temperature value; the interface also provides a multichannel color value characteristic information setting control of each piece of first appointed temperature information, a user enters a multichannel color value characteristic information setting interface after selecting the multichannel color value characteristic information setting control, the user can set multichannel color value characteristic information of the piece of first appointed temperature information on the multichannel color value characteristic information setting interface, the multichannel color value characteristic information is displayed to the user by replacing corresponding multichannel color values or multichannel color value intervals with red, orange, blue, yellow, green, cyan, purple and other intuitive colors in the graph 3B, and the user returns to the previous interface after selecting the corresponding multichannel color value characteristic information to complete the setting of the multichannel color value characteristic information of the piece of first appointed temperature information; after the user sets up first appointed temperature information and multichannel colour value characteristic information, can select the definite control in the setting interface, it is corresponding, thermal imaging equipment detects the operation of user to the definite control, can acquire the upper and lower boundary value of the first appointed temperature information that the user input on the temperature information setting interface, obtain first appointed temperature information, acquire the multichannel colour value characteristic information that the user selected for first appointed temperature information on multichannel colour value characteristic information setting interface, obtain the multichannel colour value characteristic information that first appointed temperature information corresponds.
In general, the thermal imaging apparatus is limited to the detection performance of the thermal imaging detector in the thermal imaging apparatus, has a detectable temperature range, and the first specified temperature information set by the user should be included in the detectable temperature range of the thermal imaging apparatus. In order to ensure that the first specified temperature information set by the user is within the detectable temperature range of the thermal imaging apparatus, the detectable temperature range of the thermal imaging apparatus may be indicated in a temperature information setting interface provided by the thermal imaging apparatus, for example, the detectable temperature range of the thermal imaging apparatus indicated in fig. 3B is-20 degrees to 150 degrees.
In another possible implementation, referring to fig. 3C, the thermal imaging device may present the thermal image 31 to the user in a temperature information setting interface, where the thermal image presented to the user may be either a raw thermal image or a compressed thermal image. The user can select one or more regions 311 in the compressed thermal image through operation, the user can select a determination control in the setting interface after the selection is completed, correspondingly, the thermal imaging device detects the operation of the user on the determination control, obtains at least one region 311 selected by the user on the displayed thermal image, and determines first specified temperature information according to the gray-scale values (original gray-scale values or compressed gray-scale values) of pixels in the region. Wherein determining the first specified temperature information according to the gray-scale values of the pixels in the region may include: and determining the temperature information of the area according to the maximum gray-scale value and the minimum gray-scale value of the pixels in the area, and determining first specified temperature information according to the temperature information. If there are 2 or more regions and, correspondingly, there are 2 or more obtained temperature information, determining the first specified temperature information according to the temperature information may include: if the temperature information with the temperature overlapping does not exist, each temperature information can be respectively used as a first appointed temperature information; if the temperature information with temperature overlapping exists, the temperature information with non-overlapping temperature is respectively used as first appointed temperature information, and the temperature information with temperature overlapping is merged into one piece of temperature information to be used as the first appointed temperature information. For example, if the thermal imaging device obtains 4 areas selected by the user, namely, areas 1 to 4, and obtains corresponding temperature ranges 1 to 4, temperature overlap exists between the temperature ranges 1 to 3, and there is no temperature overlap between the temperature range 4 and the temperature ranges 1 to 3, the temperature ranges 1 to 3 are merged into one temperature range 5, and the temperature range 4 and the temperature range 5 are respectively used as first specified temperature information, so that 2 pieces of first specified temperature information are obtained.
After the user sets the first specified temperature information, the thermal imaging device may further provide a multi-channel color value feature information setting interface similar to that shown in fig. 3D for the user, and the implementation method is similar to that shown in fig. 3B and is not described here again.
In the above examples shown in fig. 3B to 3D, taking the user setting the first specified temperature information on the setting interface as an example, in other examples, the thermal imaging apparatus may also provide the user with a setting interface of the first non-specified temperature information, and the interface may refer to fig. 3B or 3C, except that the user sets the temperature information that is not interested by the user, that is, the first non-specified temperature information, on the setting interface, and then the thermal imaging apparatus uses the temperature information of the detectable temperature range of the thermal imaging apparatus other than the first non-specified temperature information set by the user as the first specified temperature information set by the user. At this time, the step may include:
acquiring a numerical value or an upper and lower boundary value of first non-specified temperature information input by the user on a temperature information setting interface to obtain first non-specified temperature information, and determining first specified temperature information according to the first non-specified temperature information, wherein the first specified temperature information is temperature information except the first non-specified temperature information in a detectable temperature range of the thermal imaging equipment; alternatively, the first and second electrodes may be,
displaying the thermal image to a user, acquiring at least one area selected by the user on the thermal image, determining first non-specified temperature information according to the gray-scale values of pixels in the area, and determining first specified temperature information according to the first non-specified temperature information; the thermal image is a compressed thermal image obtained by performing gray scale mapping on the original thermal image or the original thermal image.
It should be noted that, for a thermal imaging apparatus, the detectable temperature range is fixed, after the first specified temperature information is set by the user, the first non-specified temperature information is fixed, that is, is also set by the user, and likewise, after the first non-specified temperature information is set by the user, the first specified temperature information is fixed, that is, is set by the user. For example, if it is determined from the first non-specified temperature information set by the user and the detectable temperature range of the thermal imaging apparatus, the numerical value or the upper and lower boundary values of the first specified temperature information may be determined from the upper and lower boundary values of the detectable temperature range and the numerical value or the upper and lower boundary values of the first non-specified temperature information, assuming that the detectable temperature range is (0, 50), the first non-specified temperature information is (10, 20) and (30, 40), the detectable temperature range may be divided into the following 5 temperature subintervals based on the two first non-specified temperature information: (0, 10], (10, 20), [20, 30], (30, 40), [40, 50), wherein the first non-specified temperature information is: (10, 20) (30, 40), the first specified temperature information being: (0, 10],[20, 30],[40, 50). For the method for determining the first non-specific temperature information according to the first specific temperature information in the subsequent steps, reference may be made to the above example, which is not described herein again.
Step 302: the thermal imaging device determines gray-scale value characteristic information corresponding to the first specified temperature information.
The gray-scale value characteristic information may be compressed gray-scale value characteristic information or original gray-scale value characteristic information. The compressed gray-scale value characteristic information can be a compressed gray-scale value or a compressed gray-scale value interval; the original gray-scale value characteristic information may be an original gray-scale value or an original gray-scale value interval.
Wherein, if the gray-scale value characteristic information is the original gray-scale value characteristic information, the implementation of this step may include: and calculating the original gray-scale value characteristic information corresponding to the first designated temperature information based on a preset mapping relation between the temperature and the original gray-scale value. The preset mapping relationship between the temperature and the original gray-scale value is not limited in the embodiments of the present application.
The temperature can be represented by the original gray-scale value, the larger the original gray-scale value of the pixel is, the higher the temperature is, the smaller the original gray-scale value of the pixel is, and the lower the temperature is; however, because different mapping rules may exist in the process from the original thermal image to the compressed thermal image, a forward mapping relationship may not necessarily exist between the temperature range detectable by the thermal imaging apparatus and the value range of the compressed gray-scale values of the pixels in the compressed thermal image, and if the value range does not have the forward mapping relationship, the temperature may not be represented by the compressed gray-scale values, that is, there may be a case that the temperature is higher the larger the compressed gray-scale values of some pixels in the same compressed thermal image are, the temperature is lower the smaller the compressed gray-scale values are, and the temperature is lower the larger the compressed gray-scale values of other pixels are, the temperature is lower the smaller the compressed gray-scale values are, and the temperature is higher the lower the.
At this time, if the gray-scale value feature information is compressed gray-scale value feature information, the implementation of this step may include: calculating original gray scale value characteristic information corresponding to the first designated temperature information based on a preset mapping relation between the temperature and the original gray scale value; and calculating compressed gray scale value characteristic information corresponding to the original gray scale value characteristic information based on a preset mapping relation between the original gray scale value and the compressed gray scale value to obtain the compressed gray scale value characteristic information corresponding to the first specified temperature information. The preset mapping relationship between the original gray-scale value and the compressed gray-scale value is not limited in the embodiments of the present application.
Step 303: the thermal imaging device determines a pixel corresponding to the gray-scale value characteristic information corresponding to the first specified temperature information in the compressed thermal image.
Wherein, if the gray-scale value characteristic information is compressed gray-scale value characteristic information, the step may include: and for the compressed gray-scale value characteristic information, searching pixels of the compressed gray-scale values in the compressed gray-scale value characteristic information from the compressed thermal image to obtain pixels corresponding to the compressed gray-scale value characteristic information.
For example, if the compressed grayscale characteristic information is a compressed grayscale range, e.g., (50,100), the pixels in the compressed thermal image with compressed grayscale values of 51-99 are the pixels corresponding to the compressed grayscale range (i.e., the grayscale characteristic information).
Wherein, if the gray-scale value characteristic information is the original gray-scale value characteristic information, the step may include: for original gray-scale value characteristic information, searching pixels of which the original gray-scale values are included in the original gray-scale value characteristic information from the original thermal image, and determining the position information of the searched pixels in the original thermal image; and finding the pixel indicated by the position information from the compressed thermal image as the pixel corresponding to the original gray-scale value characteristic information.
For example, assuming that the original grayscale characteristic information is an original grayscale range, e.g., (50,100), pixels with original grayscale values of 51-99 are searched from the original thermal image, and the position information of each pixel is determined, where the position information may be a coordinate value in a preset coordinate system; accordingly, corresponding pixels may be located from the compressed thermal image based on the determined location information, the pixels having the same location information as the located pixels in the original thermal image. It should be noted that, if the position information is a coordinate value, the original thermal image and the compressed thermal image should establish a coordinate system based on the same principle to ensure that the pixel indicated by the position information in the compressed thermal image is at the same position as the corresponding pixel in the original thermal image.
Step 304: for each determined pixel, the thermal imaging device maps the compressed gray-scale value of the pixel into a multi-channel color value according to the gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel, and a pseudo-color thermal image is obtained.
After the gray-scale value characteristic information corresponding to the first designated temperature information is obtained through calculation in step 302, the first designated temperature information, the gray-scale value characteristic information, and the multi-channel color value characteristic information have a corresponding relationship, and for the pixel determined in step 303 in the compressed thermal image, the pixel will correspond to the first designated temperature information, the gray-scale value characteristic information, and the multi-channel color value characteristic information based on the gray-scale value characteristic information corresponding to the pixel and the corresponding relationship.
If the multi-channel color value characteristic information corresponding to a pixel is a multi-channel color value, the thermal imaging device can map the compressed gray-scale value of the pixel to be the multi-channel color value included in the multi-channel color value characteristic information corresponding to the pixel; if the multi-channel color value characteristic information corresponding to a pixel is a multi-channel color value interval, the thermal imaging device can determine the multi-channel color value of the pixel according to the mapping relation between the gray-scale value characteristic information corresponding to the pixel and the multi-channel color interval, and map the compressed gray-scale value of the pixel into the determined multi-channel color value.
It should be noted that how the thermal imaging device performs grayscale mapping on the original thermal image to obtain the compressed thermal image in the method shown in fig. 3A is not limited, and for example, the method may be implemented by using a related grayscale mapping technique, such as a mapping algorithm, such as Automatic Gain Control (AGC) and histogram AGC, which is not described in detail in this application,
in the method shown in fig. 3A, a thermal imaging device acquires first specified temperature information set by a user, acquires multichannel color value characteristic information corresponding to the first specified temperature information, and maps a compressed gray scale value of a pixel at the first specified temperature information into multichannel color values according to the multichannel color value characteristic information, so that the pixel at the first specified temperature information in an obtained target thermal image displays a color indicated by the multichannel color value characteristic information set by the user, thereby highlighting temperature information of interest in the compressed thermal image, generating a personalized thermal image according to user requirements, and improving user experience.
Unlike the method shown in fig. 3A, which performs pseudo-color mapping only on the compressed thermal image based on the first specified temperature information, in the thermal image generation method shown in fig. 4, gray-scale mapping is also performed on the original thermal image based on the first specified temperature information. As shown in fig. 4, in the method, on the basis of fig. 3A, steps 301 to 302 are replaced by the following steps 401 to 403, specifically:
step 401: the thermal imaging device obtains at least one piece of first appointed temperature information and at least one piece of first non-appointed temperature information set by a user, and obtains multichannel color value characteristic information corresponding to the first appointed temperature information.
Wherein the temperatures between the first specified temperature information, between the first non-specified temperature information, and between the first specified temperature information and the first non-specified temperature information do not coincide with each other.
Wherein the first specified temperature information and the first non-specified temperature information constitute a detectable temperature range of the thermal imaging apparatus, and the first specified temperature information and the first non-specified temperature information are hereinafter collectively referred to as first temperature information.
The implementation of this step may refer to the corresponding description in step 301, which is not described herein again.
Step 402: the thermal imaging device determines compressed gray-scale value characteristic information corresponding to each piece of first temperature information, and calculates original gray-scale value characteristic information corresponding to each piece of first temperature information.
The thermal imaging device determines an execution sequence of the compressed gray-scale value characteristic information and the original gray-scale value characteristic information, and the embodiment of the application is not limited.
The calculating, by the thermal imaging device, the original gray-scale value characteristic information corresponding to the first specified temperature information may include:
and calculating the original gray-scale value characteristic information corresponding to the first appointed temperature information according to a preset mapping relation between the temperature and the original gray-scale value.
The preset mapping relationship between the temperature and the original gray-scale value is not limited in the embodiments of the present application. For example, assuming that a linear mapping relationship exists between the temperature and the original gray-scale value, the temperature range detectable by the thermal imaging apparatus is 0-80 degrees, the first specified temperature information is (10, 20), and the compressed gray-scale value range of the pixel in the original thermal image is (0, 65535), then the original gray-scale value characteristic information corresponding to the first specified temperature information (10, 20) is (8192, 16383), that is: the position and proportional relation between the first specified temperature information and the detectable temperature range of the thermal imaging device, and the position and proportional relation between the original gray-scale value characteristic information corresponding to the first specified temperature information and the original gray-scale value range can be the same.
The method for calculating the original gray-scale value characteristic information corresponding to the first non-specified temperature information by the thermal imaging device may refer to the above method for calculating the original gray-scale value characteristic information corresponding to the first specified temperature information, which is not described herein again.
In the existing gray scale mapping according to the temperature, temperature information cannot be specified, the mapping relation between the temperature and the original gray scale value and the mapping relation between the original gray scale value and the compressed gray scale value are preset, all pixels are subjected to the mapping according to the same mapping relation according to the temperature of the pixel, and the compressed gray scale value of the pixel is finally obtained, namely once the temperature of one pixel is determined in one thermal imaging device, the compressed gray scale value of the pixel is determined; similarly, the compression gray-scale value characteristic information corresponding to the temperature information cannot be specified.
However, in this step of the embodiment of the present application, the processing that a user cannot set temperature information and perform mapping according to a fixed mapping relationship in the prior art may be broken, and the user may set corresponding compressed grayscale characteristic information for each piece of first temperature information, or the thermal imaging device may set corresponding compressed grayscale characteristic information for each piece of first temperature information according to a certain preset rule. If the user sets the corresponding compression gray scale value characteristic information for each piece of first temperature information, a corresponding compression gray scale value characteristic information setting interface can be provided for the user, and the user sets the compression gray scale value characteristic information corresponding to each piece of first temperature information in the setting interface.
In one possible implementation, the first designated temperature information may be assigned a larger compressed gray scale value interval than in the existing gray scale mapping method, and the first non-designated temperature information may be assigned a smaller compressed gray scale value interval than in the existing gray scale mapping method, or even only one compressed gray scale value. Through the processing, the image area corresponding to the first designated temperature information set by the user in the compressed thermal image can be displayed more clearly.
For example, the first temperature subinterval is: (0, 10], (10, 20), [20, 30], (30, 40), [40, 50), the first specified temperature information is: (10, 20) (30, 40), the range of the compressed gray scale value is [0, 255], assuming that the existing gray scale mapping method performs linear mapping, and obtaining the compressed gray scale value intervals corresponding to each piece of first temperature information are respectively: (0, 51], (51, 102), [102, 153], (153, 204), [204, 255); in the embodiment of the present application, a larger compression gray scale value interval (e.g., (30, 120)) than (51, 102) may be allocated to the first specified temperature information (10, 20), a larger compression gray scale value interval (e.g., (130, 249) than (153, 204) may be allocated to the first specified temperature information (30, 40), accordingly, the compression gray scale value intervals corresponding to the first non-specified temperature information are respectively correspondingly reduced, and finally, the compression gray scale value intervals corresponding to the respective first temperature information are: (0, 30], (30, 120), [120, 130], (130, 249), [249, 255); if the compressed gray-scale value interval allocated to the first specific temperature information is further expanded, the compressed gray-scale value interval allocated to the first non-specific temperature information may be further reduced and may be finally reduced to a compressed gray-scale value, for example, the compressed gray-scale value characteristic information finally allocated to each first temperature information may be: 0,(0, 127),127, (127, 255),255.
Step 403: and mapping the original gray-scale value of the pixel into a compressed gray-scale value according to the original gray-scale value characteristic information and the compressed gray-scale value characteristic information corresponding to the pixel for the pixel in the original thermal image to obtain a compressed thermal image.
If the compressed gray-scale value characteristic information corresponding to the original gray-scale value characteristic information is a compressed gray-scale value, mapping the original gray-scale value of the pixel belonging to the original gray-scale value characteristic information to the compressed gray-scale value;
if the compressed gray-scale value characteristic information corresponding to the original gray-scale value characteristic information is a compressed gray-scale value interval, the original gray-scale value belonging to the original gray-scale value characteristic information can be mapped into the compressed gray-scale value in the compressed gray-scale value interval according to the gray-scale mapping relation between the original gray-scale value characteristic information and the corresponding compressed gray-scale value interval. The specific implementation of the gray scale mapping relationship may refer to a related gray scale mapping method, such as a linear AGC, a histogram AGC, and other mapping algorithms, which are not described herein.
Since the original gray-scale value characteristic information and the compressed gray-scale value characteristic information corresponding to the first specified temperature information and the original gray-scale value characteristic information and the compressed gray-scale value characteristic information corresponding to the first non-specified temperature information are obtained through calculation in step 402 of the embodiment shown in fig. 4, the gray-scale value characteristic information in step 303 of the embodiment may be the compressed gray-scale value characteristic information or the original gray-scale value characteristic information, and may be a pseudo-color thermal image, and is preferably the compressed gray-scale value characteristic information based on an angle that the data processing speed is faster and the data processing amount is relatively smaller.
In the method shown in fig. 4, when the original thermal image is subjected to grayscale mapping based on the first specified temperature information, the first specified temperature information has a larger compressed grayscale value interval than that in the prior art, so that an image area corresponding to the first specified temperature information in the compressed thermal image is clearer than that in the prior art.
Unlike the method shown in fig. 3A, which maps the compressed grayscale values to the multi-channel color values only for the pixels corresponding to the first specified temperature information in the compressed thermal image, the method shown in fig. 5 to 8 also maps the multi-channel color values for the pixels corresponding to the first non-specified temperature information.
In the method shown in fig. 5, a user sets multi-channel color value feature information corresponding to first specified temperature information, and the thermal imaging device sets multi-channel color value feature information corresponding to first non-specified temperature information, where as shown in fig. 5, the method includes:
step 501: the thermal imaging apparatus acquires at least one first specified temperature information and at least one first non-specified temperature information set by a user.
In this step, the obtaining of the at least one first specific temperature information and the at least one first non-specific temperature information set by the user may include:
acquiring a numerical value or an upper and lower boundary value of first specified temperature information input by a user on a temperature interval setting interface to obtain first specified temperature information, and determining first non-specified temperature information according to the first specified temperature information and a detectable temperature range of the thermal imaging device, wherein the first non-specified temperature information is temperature information of the detectable temperature range of the thermal imaging device except the first specified temperature information; alternatively, the first and second electrodes may be,
displaying the thermal image to a user, acquiring at least one area selected by the user on the thermal image, determining first designated temperature information according to the gray-scale value of pixels in the area, determining first non-designated temperature information according to the first designated temperature information and the detectable temperature range of the thermal imaging equipment, wherein the thermal image is an original thermal image or a compressed thermal image obtained by performing gray-scale mapping on the original thermal image; alternatively, the first and second electrodes may be,
acquiring a numerical value or an upper boundary value and a lower boundary value of first non-specified temperature information input by a user on a temperature interval setting interface to obtain the first non-specified temperature information, and determining the first specified temperature information according to the first non-specified temperature information and a detectable temperature range of the thermal imaging equipment; alternatively, the first and second electrodes may be,
displaying the thermal image to a user, acquiring at least one area selected by the user on the thermal image, determining first non-specified temperature information according to the gray-scale values of pixels in the area, and determining first specified temperature information according to the first non-specified temperature information and the detectable temperature range of the thermal imaging device; the thermal image is a raw thermal image or a compressed thermal image obtained by gray-scale mapping the raw thermal image.
The specific implementation of this step may refer to the related description in step 401, and is not described herein again.
Step 502: the thermal imaging device obtains multichannel color value characteristic information corresponding to the first appointed temperature information, and obtains multichannel color value characteristic information corresponding to at least one first non-appointed temperature information.
Optionally, the multi-channel color value characteristic information corresponding to the first designated temperature information is different from the multi-channel color value characteristic information corresponding to the first non-designated temperature information, so as to distinguish the first designated temperature information and the first non-designated temperature information by color in a subsequently generated target thermal image.
The multi-channel color value characteristic information corresponding to different first non-specific temperature information may be the same or different, and the embodiment of the application is not limited.
In a possible implementation manner, both the multichannel color value feature information corresponding to the first specified temperature information and the multichannel color value feature information corresponding to the first non-specified temperature information may be set by a user, at this time, the implementation of obtaining, by the thermal imaging device, the multichannel color value feature information corresponding to at least one piece of first specified temperature information in this step may refer to the corresponding description in step 301, which is not described herein again; in this step, the thermal imaging device obtains the multi-channel color value feature information corresponding to the at least one first non-specific temperature information, or the thermal imaging device obtains the multi-channel color value feature information corresponding to the at least one first specific temperature information in step 301 may be referred to, and the difference is only that the first specific temperature information is replaced with the first non-specific temperature information.
In another possible implementation manner, the multichannel color value characteristic information corresponding to the first specified temperature information may be set by a user, and the multichannel color value characteristic information corresponding to the first non-specified temperature information may be set by the thermal imaging device according to the multichannel color value characteristic information corresponding to the first specified temperature information. How to determine the multichannel color value characteristic information corresponding to the first non-specified temperature information specifically by the thermal imaging device is not limited in the embodiment of the application, as long as the multichannel color value characteristic information corresponding to the first non-specified temperature information is different from the multichannel color value characteristic information corresponding to the first specified temperature information, so that the image of the first non-specified temperature information and the image of the first specified temperature information can be distinguished in the generated pseudo-color thermal image. For example, multichannel color value feature information can be preset in the thermal imaging device, the thermal imaging device searches multichannel color value feature information different from the multichannel color value feature information corresponding to the first specified temperature information from the preset multichannel color value feature information, and the multichannel color value feature information corresponding to the first non-specified temperature information is set.
In another possible implementation manner, the multi-channel color value feature information corresponding to the first specified temperature information and the multi-channel color value feature information corresponding to the first non-specified temperature information may be set by the thermal imaging device, for example, this step may include: the thermal imaging equipment randomly distributes multi-channel color value characteristic information to the first specified temperature information and the first non-specified temperature information; or the thermal imaging device allocates corresponding multi-channel color value characteristic information to the first specified temperature information and the first non-specified temperature information from preset multi-channel color value characteristic information.
The multi-channel color value feature information may be set for one or more pieces of the acquired first non-specific temperature information, and the embodiment of the present application is not limited.
Step 503: the thermal imaging device calculates gray-scale value characteristic information corresponding to the first specified temperature information and gray-scale value characteristic information corresponding to the first non-specified temperature information.
The implementation of this step can refer to the description in step 302, and the difference is only that in step 302, the grayscale characteristic information corresponding to the first specified temperature information is calculated, and in this step, both the grayscale characteristic information corresponding to the first specified temperature information and the grayscale characteristic information corresponding to the first non-specified temperature information are calculated.
Wherein the execution order between step 502 and step 503 is not limited.
Step 504: and the thermal imaging equipment determines the pixel corresponding to the gray-scale value characteristic information in the compressed thermal image.
Step 505: for each determined pixel, the thermal imaging device maps the compressed gray-scale value of the pixel into a multi-channel color value according to the gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel, and a pseudo-color thermal image is obtained.
The implementation of steps 504 to 505 may refer to the description in steps 303 to 304, except that only the compressed gray-scale value of the pixel corresponding to the first specified temperature information is mapped to the multi-channel color value in steps 303 to 304, and in this step, the compressed gray-scale value of the pixel corresponding to the first non-specified temperature information is mapped to the multi-channel color value based on the gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel.
In this embodiment, the compressed grayscale value of the pixel in the compressed thermal image is mapped to the multichannel color value based on the corresponding grayscale value characteristic information and the multichannel color value characteristic information, and because the multichannel color value characteristic information corresponding to the first specified temperature information is different from the multichannel color value characteristic information corresponding to the first non-specified temperature information, the temperature interval in which the user is interested in the compressed thermal image is highlighted through different multichannel color value characteristic information, and the personalized thermal image is generated according to the user requirement, thereby improving the user experience.
Unlike the method shown in fig. 5 in which only the compressed thermal image is subjected to color mapping, in the thermal image generation method shown in fig. 6, the original thermal image is also subjected to grayscale mapping based on the first specified temperature information, thereby improving the flexibility of grayscale mapping according to temperature. As shown in fig. 6, in the method, on the basis of fig. 5, step 503 is replaced by the following steps 601 to 602, specifically:
step 601: the thermal imaging device determines compressed gray-scale value characteristic information corresponding to each piece of first temperature information, and calculates original gray-scale value characteristic information corresponding to each piece of first temperature information.
The implementation of this step may refer to the description in step 402, which is not described herein again.
Step 602: for a pixel in the original thermal image, the thermal imaging device maps the original gray-scale value of the pixel into a compressed gray-scale value according to the original gray-scale value characteristic information and the compressed gray-scale value characteristic information corresponding to the pixel, so as to obtain a compressed thermal image.
The implementation of this step may refer to the description in step 403, which is not described herein again.
In the above fig. 4 and fig. 6, the original thermal image is subjected to gray scale mapping based on the first designated temperature information set by the user to obtain the compressed thermal image, and in another implementation manner, the user may additionally set temperature information for the gray scale mapping.
Referring to fig. 7, unlike the method shown in fig. 3A, before step 303, the following steps 701 to 703 are added, specifically:
step 701: the thermal imaging apparatus acquires at least one second specified temperature information and at least one second non-specified temperature information set by a user.
The temperatures among the second specified temperature information, the second non-specified temperature information and the second specified temperature information are not overlapped; the second specified temperature information and the second non-specified temperature information constitute a detectable temperature range of the thermal imaging apparatus.
Here, this step may be implemented with reference to the corresponding descriptions in step 301 and step 401, except that the first specified temperature information and the first non-specified temperature information are replaced with the second specified temperature information and the second non-specified temperature information, respectively.
The second specified temperature information set by the user may be the same as or different from the first specified temperature information, and the embodiment of the application is not limited.
For convenience of description, the second specified temperature information and the second non-specified temperature information will be collectively referred to as second temperature information hereinafter.
Step 702: and the thermal imaging equipment determines the compressed gray-scale value characteristic information corresponding to each piece of second temperature information and calculates the original gray-scale value characteristic information corresponding to each piece of second temperature information.
Here, the implementation of this step may refer to the related description in step 402, and only differs from the replacement of the first temperature information with the second temperature information.
Step 703: and mapping the original gray-scale value of the pixel into a compressed gray-scale value according to the original gray-scale value characteristic information and the compressed gray-scale value characteristic information corresponding to the pixel by the thermal imaging equipment for the pixel in the original thermal image to obtain a compressed thermal image.
The implementation of this step may refer to the related description in step 403, which is not described herein again.
It should be noted that, referring to fig. 7, the execution sequence between steps 701 to 703 and steps 301 to 202 is not limited in the embodiment of the present application.
For the method shown in fig. 7, the user can set the designated temperature information for the grayscale mapping and the pseudo-color mapping, so that the user can set the thermal image output by the thermal imaging device more flexibly and individually, and the user experience is improved.
Similarly, the steps 701 to 703 may be added to the method shown in fig. 5 before the step 505, which is not described herein again.
In the above embodiment, the thermal imaging device maps the compressed gray-scale values of some or all pixels in the compressed thermal image into multi-channel color values according to the first specified temperature information set by the user, so as to generate a personalized thermal image according to the user requirement. In the following embodiments, the thermal imaging device performs gray scale mapping according to the first specified temperature information set by the user, and also generates a personalized thermal image according to the user requirement.
Fig. 8 is a flowchart of yet another embodiment of a thermal image generation method of the present application, as shown in fig. 8, the method may include:
step 801: the thermal imaging apparatus acquires at least one first specified temperature information and at least one first non-specified temperature information set by a user.
Step 802: the thermal imaging device determines compressed gray-scale value characteristic information corresponding to each piece of first temperature information, and calculates original gray-scale value characteristic information corresponding to each piece of first temperature information.
Step 803: and mapping the original gray-scale value of the pixel into a compressed gray-scale value according to the original gray-scale value characteristic information and the compressed gray-scale value characteristic information corresponding to the pixel by the thermal imaging equipment for the pixel in the original thermal image to obtain a compressed thermal image.
The implementation of steps 801 to 803 may refer to steps 701 to 703, but the difference is that the second is replaced by the first, which is not described herein.
In the method shown in fig. 8, when the original thermal image is mapped to the compressed thermal image based on the first designated temperature information, the compressed gray-scale value characteristic information corresponding to the original gray-scale value characteristic information may be set autonomously, so that the personalized thermal image is generated according to the user requirement, and the user experience is improved.
On the basis of the embodiment shown in fig. 8, the thermal imaging device may further map the compressed gray-scale values of some or all pixels in the compressed thermal image to color values based on the first specified temperature information, so that the user can more flexibly perform personalized setting on the thermal image output by the thermal imaging device, and user experience is improved.
On the basis of the embodiment shown in fig. 8, the user can further set second specified temperature information, and the thermal imaging device maps the compressed gray-scale values of some or all pixels in the compressed thermal image into multi-channel color values based on the second specified temperature information, so that the user can more flexibly perform personalized setting on the thermal image output by the thermal imaging device, and the user experience is improved. The specific implementation can be seen in fig. 7 and 5 with the addition of steps 701-703.
It is to be understood that some or all of the steps or operations in the above-described embodiments are merely examples, and other operations or variations of various operations may be performed by the embodiments of the present application. Further, the various steps may be performed in a different order presented in the above-described embodiments, and it is possible that not all of the operations in the above-described embodiments are performed.
Fig. 9 is a block diagram of an embodiment of the apparatus for generating a thermal image according to the present application, and as shown in fig. 9, the apparatus 90 may include:
a first obtaining module 91, configured to obtain at least one piece of first specified temperature information set by a user;
a second obtaining module 92, configured to obtain first color feature information corresponding to the first specified temperature information, and second color feature information corresponding to the first specified temperature information in the target thermal image;
a mapping module 93, configured to map, for a pixel corresponding to the first color feature information in the thermal image to be processed, a first color value corresponding to the pixel into a second color value, so as to obtain the target thermal image; the first color value is a color value of the pixel in the thermal image to be processed, and the second color value is a color value included in the second color feature information.
In one possible implementation, the thermal image to be processed is an original thermal image, the first color feature information is original gray-scale value feature information, and the second color feature information is compressed gray-scale value feature information; alternatively, the first and second electrodes may be,
the thermal image to be processed is a compressed thermal image, the first color characteristic information is original gray-scale value characteristic information, and the second color characteristic information is multi-channel color value characteristic information; or
The thermal image to be processed is a compressed thermal image, the first color feature information is compressed gray-scale value feature information, and the second color feature information is multi-channel color value feature information.
In a possible implementation manner, the first obtaining module 91 may further be configured to: acquiring first non-specified temperature information; the temperatures among the first specified temperature information, the first non-specified temperature information and the first non-specified temperature information are not overlapped;
the second obtaining module 92 may further be configured to: acquiring first color characteristic information corresponding to the first non-specified temperature information and second color characteristic information corresponding to the first non-specified temperature information in the target thermal image; and the second color characteristic information corresponding to the first non-specified temperature information is different from the second color characteristic information corresponding to the first specified temperature information.
In a possible implementation manner, the thermal image to be processed is a compressed thermal image, the first color feature information is compressed grayscale value feature information, the second color feature information is multi-channel color value feature information, and the mapping module 93 is specifically configured to: for a piece of compressed gray-scale value characteristic information, searching pixels of compressed gray-scale values included in the compressed gray-scale value characteristic information from the compressed thermal image to obtain pixels corresponding to the compressed gray-scale value characteristic information; for the obtained pixel, mapping the compressed gray-scale value of the pixel into a multi-channel color value according to the compressed gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel to obtain the target thermal image;
or, the thermal image to be processed is a compressed thermal image, the first color feature information is original gray-scale value feature information, the second color feature information is multi-channel color value feature information, and the mapping module 93 may specifically be configured to: for original gray-scale value characteristic information, searching pixels of which the original gray-scale values are included in the original gray-scale value characteristic information from an original thermal image of the compressed thermal image, and determining the position information of the searched pixels in the original thermal image; searching the pixel indicated by the position information from the compressed thermal image, and mapping the compressed gray-scale value of the pixel into a multi-channel color value according to the original gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel for the pixel searched from the compressed thermal image to obtain the target thermal image;
or, the thermal image to be processed is an original thermal image, the first color feature information is original gray-scale value feature information, the second color feature information is compressed gray-scale value feature information, and the mapping module 93 may specifically be configured to: for original gray-scale value characteristic information, searching pixels of original gray-scale values included in the original gray-scale value characteristic information from the original thermal image to obtain pixels corresponding to the original gray-scale value characteristic information; mapping the original gray-scale value of the pixel into a compressed gray-scale value according to the original gray-scale value characteristic information and the compressed gray-scale value characteristic information corresponding to the pixel to obtain the target thermal image;
in one possible implementation, the second color feature information is a color value; the mapping module 93 may specifically be configured to: mapping the first color value of the pixel to a color value included in second color characteristic information corresponding to the pixel;
or, the second color feature information is a color value interval; the mapping module 93 may specifically be configured to: and determining a second color value of the pixel according to the mapping relation between the first color characteristic information corresponding to the pixel and the color value interval, and mapping the first color value of the pixel into the determined second color value.
In a possible implementation manner, the first obtaining module 91 may specifically be configured to:
acquiring a numerical value or an upper and lower boundary value of the first specified temperature information input by the user on a temperature information setting interface to obtain the first specified temperature information; alternatively, the first and second electrodes may be,
displaying the thermal image to the user, acquiring at least one area selected by the user on the thermal image, and determining the first specified temperature information according to the gray-scale values of pixels in the area; the thermal image is a raw thermal image or a compressed thermal image; alternatively, the first and second electrodes may be,
acquiring a numerical value or an upper and lower boundary value of first non-specified temperature information input by the user on a temperature information setting interface to obtain the first non-specified temperature information, and determining the first specified temperature information according to the first non-specified temperature information and a detectable temperature range of the thermal imaging equipment; alternatively, the first and second electrodes may be,
presenting the thermal image to the user, acquiring at least one region selected by the user on the thermal image, determining the first non-specified temperature information according to the gray-scale values of pixels in the region, and determining the first specified temperature information according to the first non-specified temperature information and the detectable temperature range of the thermal imaging device; the thermal image is either a raw thermal image or a compressed thermal image.
In a possible implementation manner, the first obtaining module 91 may specifically be configured to:
for one of the regions, determining temperature information of the region according to the maximum gray-scale value and the minimum gray-scale value of the pixels in the region; if the temperature information with overlapped temperatures does not exist, taking each piece of temperature information as first appointed temperature information; if the temperature information with temperature overlapping exists, the temperature information with non-overlapping temperature is respectively used as first appointed temperature information, and the temperature information with temperature overlapping is merged into one piece of temperature information to be used as the first appointed temperature information.
In a possible implementation manner, the second obtaining module 92 may specifically be configured to:
acquiring second color characteristic information selected by the user for the first specified temperature information on a characteristic setting interface to obtain second color characteristic information corresponding to the first specified temperature information; alternatively, the first and second electrodes may be,
and distributing corresponding second color characteristic information for the first appointed temperature information from preset second color characteristic information.
In a possible implementation manner, the second obtaining module 92 may specifically be configured to:
acquiring second color characteristic information selected by the user for the first non-specified temperature information on a characteristic setting interface to obtain second color characteristic information corresponding to the first specified temperature information; alternatively, the first and second electrodes may be,
distributing corresponding second color characteristic information for the first non-specified temperature information from preset second color characteristic information; alternatively, the first and second electrodes may be,
and determining second color characteristic information corresponding to the first non-specified temperature information according to the second color characteristic information corresponding to the first specified temperature information.
The apparatus provided in the embodiment shown in fig. 9 may be used to implement the technical solutions of the method embodiments shown in fig. 2 to fig. 8 of the present application, and the implementation principles and technical effects thereof may be further referred to in the related description of the method embodiments.
It should be understood that the division of the modules of the apparatus shown in fig. 9 is merely a logical division, and the actual implementation may be wholly or partially integrated into one physical entity or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling by the processing element in software, and part of the modules can be realized in the form of hardware. For example, the obtaining module may be a separate processing element, or may be implemented by being integrated in a chip of the electronic device. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors (DSPs), one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, these modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is enabled to execute the method provided by the embodiment shown in fig. 2 to 8 of the present application.
Embodiments of the present application further provide a computer program product, which includes a computer program, and when the computer program runs on a computer, the computer executes the method provided in the embodiments shown in fig. 2 to 8 of the present application.
In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, and means that there may be three relationships, for example, a and/or B, and may mean that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be single or multiple.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, any function, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. A method for generating a thermal image, applied to a thermal imaging device, comprising:
acquiring at least one piece of first appointed temperature information set by a user;
acquiring first color characteristic information corresponding to the first specified temperature information and second color characteristic information corresponding to the first specified temperature information in a target thermal image;
mapping a first color value of a pixel corresponding to the first color characteristic information in the thermal image to be processed into a second color value to obtain the target thermal image; the first color value is a color value of the pixel in the thermal image to be processed, and the second color value is a color value included in the second color feature information.
2. The method of claim 1, wherein the thermal image to be processed is a raw thermal image, the first color characterization information is raw grayscale value characterization information, and the second color characterization information is compressed grayscale value characterization information; alternatively, the first and second electrodes may be,
the thermal image to be processed is a compressed thermal image, the first color characteristic information is original gray-scale value characteristic information, and the second color characteristic information is multi-channel color value characteristic information; or
The thermal image to be processed is a compressed thermal image, the first color feature information is compressed gray-scale value feature information, and the second color feature information is multi-channel color value feature information.
3. The method of claim 1 or 2, wherein before mapping the first color value corresponding to the pixel to the second color value, further comprising:
acquiring first non-specified temperature information; the temperatures among the first specified temperature information, the first non-specified temperature information and the first non-specified temperature information are not overlapped;
acquiring first color characteristic information corresponding to the first non-specified temperature information and second color characteristic information corresponding to the first non-specified temperature information in the target thermal image; and the second color characteristic information corresponding to the first non-specified temperature information is different from the second color characteristic information corresponding to the first specified temperature information.
4. The method of claim 1 or 2, wherein the thermal image to be processed is a compressed thermal image, the first color characterization information is compressed grayscale value characterization information, the second color characterization information is multi-channel color value characterization information, and mapping, for a pixel corresponding to the first color characterization information in the thermal image to be processed, a first color value corresponding to the pixel to a second color value to obtain the target thermal image, comprises: for a piece of compressed gray-scale value characteristic information, searching pixels of compressed gray-scale values included in the compressed gray-scale value characteristic information from the compressed thermal image to obtain pixels corresponding to the compressed gray-scale value characteristic information; for the obtained pixel, mapping the compressed gray-scale value of the pixel into a multi-channel color value according to the compressed gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel to obtain the target thermal image;
or, the obtaining of the target thermal image by mapping, for a pixel corresponding to the first color feature information in the to-be-processed thermal image, a first color value corresponding to the pixel as a second color value, includes: for original gray-scale value characteristic information, searching pixels of which the original gray-scale values are included in the original gray-scale value characteristic information from an original thermal image of the compressed thermal image, and determining the position information of the searched pixels in the original thermal image; searching the pixel indicated by the position information from the compressed thermal image, and mapping the compressed gray-scale value of the pixel into a multi-channel color value according to the original gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel for the pixel searched from the compressed thermal image to obtain the target thermal image;
or, the obtaining of the target thermal image by mapping, for a pixel corresponding to the first color feature information in the to-be-processed thermal image, a first color value corresponding to the pixel as a second color value, includes: for original gray-scale value characteristic information, searching pixels of original gray-scale values included in the original gray-scale value characteristic information from the original thermal image to obtain pixels corresponding to the original gray-scale value characteristic information; and mapping the original gray-scale value of the pixel into a compressed gray-scale value according to the original gray-scale value characteristic information and the compressed gray-scale value characteristic information corresponding to the pixel to obtain the target thermal image.
5. The method according to claim 1 or 2, wherein the second color characteristic information is a color value; the mapping the first color value corresponding to the pixel to the second color value includes: mapping the first color value of the pixel to a color value included in second color characteristic information corresponding to the pixel;
or, the second color feature information is a color value interval; the mapping the first color value corresponding to the pixel to the second color value includes: and determining a second color value of the pixel according to the mapping relation between the first color characteristic information corresponding to the pixel and the color value interval, and mapping the first color value of the pixel into the determined second color value.
6. The method according to claim 1 or 2, wherein the acquiring at least one first specified temperature information set by a user comprises:
acquiring a numerical value or an upper and lower boundary value of the first specified temperature information input by the user on a temperature information setting interface to obtain the first specified temperature information; alternatively, the first and second electrodes may be,
displaying the thermal image to the user, acquiring at least one area selected by the user on the thermal image, and determining the first specified temperature information according to the gray-scale values of pixels in the area; the thermal image is a raw thermal image or a compressed thermal image; alternatively, the first and second electrodes may be,
acquiring a numerical value or an upper and lower boundary value of first non-specified temperature information input by the user on a temperature information setting interface to obtain the first non-specified temperature information, and determining the first specified temperature information according to the first non-specified temperature information and a detectable temperature range of the thermal imaging equipment; alternatively, the first and second electrodes may be,
presenting the thermal image to the user, acquiring at least one region selected by the user on the thermal image, determining the first non-specified temperature information according to the gray-scale values of pixels in the region, and determining the first specified temperature information according to the first non-specified temperature information and the detectable temperature range of the thermal imaging device; the thermal image is either a raw thermal image or a compressed thermal image.
7. The method of claim 6, wherein determining the first specified temperature information from gray-scale values of pixels in the region comprises:
for one of the regions, determining temperature information of the region according to the maximum gray-scale value and the minimum gray-scale value of the pixels in the region; if the temperature information with overlapped temperatures does not exist, taking each piece of temperature information as first appointed temperature information; if the temperature information with temperature overlapping exists, the temperature information with non-overlapping temperature is respectively used as first appointed temperature information, and the temperature information with temperature overlapping is merged into one piece of temperature information to be used as the first appointed temperature information.
8. The method of claim 1 or 2, wherein obtaining second color characterization information corresponding to the first specified temperature information in the target thermal image comprises:
acquiring second color characteristic information selected by the user for the first specified temperature information on a characteristic setting interface to obtain second color characteristic information corresponding to the first specified temperature information; alternatively, the first and second electrodes may be,
and distributing corresponding second color characteristic information for the first appointed temperature information from preset second color characteristic information.
9. The method of claim 3, wherein obtaining corresponding second color characterization information of the first non-specified temperature information in the target thermal image comprises:
acquiring second color characteristic information selected by the user for the first non-specified temperature information on a characteristic setting interface to obtain second color characteristic information corresponding to the first specified temperature information; alternatively, the first and second electrodes may be,
distributing corresponding second color characteristic information for the first non-specified temperature information from preset second color characteristic information; alternatively, the first and second electrodes may be,
and determining second color characteristic information corresponding to the first non-specified temperature information according to the second color characteristic information corresponding to the first specified temperature information.
10. An apparatus for generating a thermal image, comprising:
the first acquisition module is used for acquiring at least one piece of first specified temperature information set by a user;
a second obtaining module, configured to obtain first color feature information corresponding to the first specified temperature information, and second color feature information corresponding to the first specified temperature information in the target thermal image
The mapping module is used for mapping a first color value corresponding to a pixel to a second color value to obtain a target thermal image, wherein the pixel corresponds to the first color characteristic information in the thermal image to be processed; the first color value is a color value of the pixel in the thermal image to be processed, and the second color value is a color value included in the second color feature information.
11. The apparatus of claim 10, wherein the thermal image to be processed is a raw thermal image, the first color characterization information is raw grayscale value characterization information, and the second color characterization information is compressed grayscale value characterization information; or the thermal image to be processed is a compressed thermal image, the first color characteristic information is original gray-scale value characteristic information, and the second color characteristic information is multi-channel color value characteristic information; or the thermal image to be processed is a compressed thermal image, the first color feature information is compressed gray-scale value feature information, and the second color feature information is multi-channel color value feature information;
and/or the presence of a gas in the gas,
the first obtaining module is further configured to: acquiring first non-specified temperature information; the temperatures among the first specified temperature information, the first non-specified temperature information and the first non-specified temperature information are not overlapped;
the second obtaining module is further configured to: acquiring first color characteristic information corresponding to the first non-specified temperature information and second color characteristic information corresponding to the first non-specified temperature information in the target thermal image; second color characteristic information corresponding to the first non-specified temperature information is different from second color characteristic information corresponding to the first specified temperature information;
and/or the presence of a gas in the gas,
the thermal image to be processed is a compressed thermal image, the first color feature information is compressed grayscale value feature information, the second color feature information is multi-channel color value feature information, and the mapping module is specifically configured to: for a piece of compressed gray-scale value characteristic information, searching pixels of compressed gray-scale values included in the compressed gray-scale value characteristic information from the compressed thermal image to obtain pixels corresponding to the compressed gray-scale value characteristic information; for the obtained pixel, mapping the compressed gray-scale value of the pixel into a multi-channel color value according to the compressed gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel to obtain the target thermal image;
or, the thermal image to be processed is a compressed thermal image, the first color feature information is original gray-scale value feature information, the second color feature information is multi-channel color value feature information, and the mapping module is specifically configured to: for original gray-scale value characteristic information, searching pixels of which the original gray-scale values are included in the original gray-scale value characteristic information from an original thermal image of the compressed thermal image, and determining the position information of the searched pixels in the original thermal image; searching the pixel indicated by the position information from the compressed thermal image, and mapping the compressed gray-scale value of the pixel into a multi-channel color value according to the original gray-scale value characteristic information and the multi-channel color value characteristic information corresponding to the pixel for the pixel searched from the compressed thermal image to obtain the target thermal image;
or, the thermal image to be processed is an original thermal image, the first color feature information is original gray-scale value feature information, the second color feature information is compressed gray-scale value feature information, and the mapping module is specifically configured to: for original gray-scale value characteristic information, searching pixels of original gray-scale values included in the original gray-scale value characteristic information from the original thermal image to obtain pixels corresponding to the original gray-scale value characteristic information; mapping the original gray-scale value of the pixel into a compressed gray-scale value according to the original gray-scale value characteristic information and the compressed gray-scale value characteristic information corresponding to the pixel to obtain the target thermal image;
and/or the presence of a gas in the gas,
the second color characteristic information is a color value; the mapping module is specifically configured to: mapping the first color value of the pixel to a color value included in second color characteristic information corresponding to the pixel;
or, the second color feature information is a color value interval; the mapping module is specifically configured to: determining a second color value of the pixel according to a mapping relation between first color characteristic information corresponding to the pixel and the color value interval, and mapping the first color value of the pixel into the determined second color value;
and/or the presence of a gas in the gas,
the first obtaining module is specifically configured to:
acquiring a numerical value or an upper and lower boundary value of the first specified temperature information input by the user on a temperature information setting interface to obtain the first specified temperature information; alternatively, the first and second electrodes may be,
displaying the thermal image to the user, acquiring at least one area selected by the user on the thermal image, and determining the first specified temperature information according to the gray-scale values of pixels in the area; the thermal image is a raw thermal image or a compressed thermal image; alternatively, the first and second electrodes may be,
acquiring a numerical value or an upper and lower boundary value of first non-specified temperature information input by the user on a temperature information setting interface to obtain the first non-specified temperature information, and determining the first specified temperature information according to the first non-specified temperature information and a detectable temperature range of the thermal imaging equipment; alternatively, the first and second electrodes may be,
presenting the thermal image to the user, acquiring at least one region selected by the user on the thermal image, determining the first non-specified temperature information according to the gray-scale values of pixels in the region, and determining the first specified temperature information according to the first non-specified temperature information and the detectable temperature range of the thermal imaging device; the thermal image is a raw thermal image or a compressed thermal image;
and/or the presence of a gas in the gas,
the first obtaining module is specifically configured to: for one of the regions, determining temperature information of the region according to the maximum gray-scale value and the minimum gray-scale value of the pixels in the region; if the temperature information with overlapped temperatures does not exist, taking each piece of temperature information as first appointed temperature information; if the temperature information with temperature overlapping exists, the temperature information with non-overlapping temperature is respectively used as first appointed temperature information, and the temperature information with temperature overlapping is merged into one temperature information to be used as the first appointed temperature information;
and/or the presence of a gas in the gas,
the second obtaining module is specifically configured to: acquiring second color characteristic information selected by the user for the first specified temperature information on a characteristic setting interface to obtain second color characteristic information corresponding to the first specified temperature information; or distributing corresponding second color characteristic information for the first specified temperature information from preset second color characteristic information;
and/or the presence of a gas in the gas,
the second obtaining module is specifically configured to: acquiring second color characteristic information selected by the user for the first non-specified temperature information on a characteristic setting interface to obtain second color characteristic information corresponding to the first specified temperature information; or distributing corresponding second color characteristic information for the first non-specified temperature information from preset second color characteristic information; or determining second color characteristic information corresponding to the first non-specified temperature information according to the second color characteristic information corresponding to the first specified temperature information.
12. A thermal imaging apparatus, comprising:
one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the apparatus, cause the apparatus to perform the method of any of claims 1 to 9.
CN202011473975.8A 2020-12-14 Thermal image generation method and device and thermal imaging equipment Active CN112614195B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011473975.8A CN112614195B (en) 2020-12-14 Thermal image generation method and device and thermal imaging equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011473975.8A CN112614195B (en) 2020-12-14 Thermal image generation method and device and thermal imaging equipment

Publications (2)

Publication Number Publication Date
CN112614195A true CN112614195A (en) 2021-04-06
CN112614195B CN112614195B (en) 2024-04-12

Family

ID=

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116128770A (en) * 2023-04-13 2023-05-16 杭州微影软件有限公司 Image generation method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110299826A1 (en) * 2010-06-07 2011-12-08 Esw Gmbh Thermographic Camera and Method for the Recording and/or Modification and Reproduction of Thermal Images of a Scene and/or of an Object
CN104052937A (en) * 2013-03-15 2014-09-17 弗兰克公司 Thermal image animation
CN104157003A (en) * 2014-07-18 2014-11-19 北京理工大学 Heat image detail enhancement method based on normal distribution adjustment
US20160373662A1 (en) * 2013-10-21 2016-12-22 Eric Olsen Systems and methods for producing temperature accurate thermal images
WO2019203351A1 (en) * 2018-04-20 2019-10-24 パナソニックIpマネジメント株式会社 Image display device and image display method
CN110930963A (en) * 2019-11-14 2020-03-27 Tcl华星光电技术有限公司 Gamut mapping method and gamut processing system
CN111095906A (en) * 2017-08-04 2020-05-01 塞克热量股份有限公司 Color display mode for thermal imaging system
CN111968068A (en) * 2020-08-18 2020-11-20 杭州海康微影传感科技有限公司 Thermal imaging image processing method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110299826A1 (en) * 2010-06-07 2011-12-08 Esw Gmbh Thermographic Camera and Method for the Recording and/or Modification and Reproduction of Thermal Images of a Scene and/or of an Object
CN104052937A (en) * 2013-03-15 2014-09-17 弗兰克公司 Thermal image animation
US20160373662A1 (en) * 2013-10-21 2016-12-22 Eric Olsen Systems and methods for producing temperature accurate thermal images
CN104157003A (en) * 2014-07-18 2014-11-19 北京理工大学 Heat image detail enhancement method based on normal distribution adjustment
CN111095906A (en) * 2017-08-04 2020-05-01 塞克热量股份有限公司 Color display mode for thermal imaging system
WO2019203351A1 (en) * 2018-04-20 2019-10-24 パナソニックIpマネジメント株式会社 Image display device and image display method
CN110930963A (en) * 2019-11-14 2020-03-27 Tcl华星光电技术有限公司 Gamut mapping method and gamut processing system
CN111968068A (en) * 2020-08-18 2020-11-20 杭州海康微影传感科技有限公司 Thermal imaging image processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
葛曼玲;魏孟佳;杨皓宇;师鹏飞;陈营;付晓璇;张吉昌;陈玉民;: "红外热像校正技术的仿真研究及其实时应用――双阈值分割算法结合伪彩色变换", 《红外技术》, no. 04 *
赵红怡,王景中,曾凡锋: "小波变换在热图像压缩中的应用", 《中国图象图形学报》, no. 1 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116128770A (en) * 2023-04-13 2023-05-16 杭州微影软件有限公司 Image generation method and device, electronic equipment and storage medium
CN116128770B (en) * 2023-04-13 2023-08-04 杭州微影软件有限公司 Image generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11070749B2 (en) Image processing method and apparatus
US9554109B2 (en) Identifying gray regions for auto white balancing
US9491366B2 (en) Electronic device and image composition method thereof
US10560686B2 (en) Photographing device and method for obtaining depth information
EP3637763A1 (en) Colour detection method and terminal
CN102685511B (en) Image processing apparatus and image processing method
US9064178B2 (en) Edge detection apparatus, program and method for edge detection
KR102397396B1 (en) Image processing method and device for auto white balance
US8463026B2 (en) Automated identification of image outliers
US20210312647A1 (en) Detecting device, information processing device, detecting method, and information processing program
CN108335454A (en) A kind of fire behavior detection method and device
US8019153B2 (en) Wide luminance range colorimetrically accurate profile generation method
CN112614195B (en) Thermal image generation method and device and thermal imaging equipment
CN112614195A (en) Thermal image generation method and device and thermal imaging equipment
JP2000306191A (en) Area division and device for extracting object
JPWO2017169782A1 (en) Distance image processing device, distance image acquisition device, and distance image processing method
US20140333659A1 (en) Image processing apparatus and control method thereof
US11682134B2 (en) Object detection device, method, information processing device, and storage medium calculating reliability information of detected image data for object shape determination
US10083516B2 (en) Method for segmenting a color image and digital microscope
US20150334314A1 (en) Device and method for detecting thermal images
KR101662738B1 (en) Method and apparatus of processing image
CN103458163A (en) Device, system and method for image processing
KR100999887B1 (en) Method of setup Color Zone, Method of Color Temperature Detection using Color Zone, Recording Media of the same and Image Apparatus of performing the same
JP2018063588A (en) Color determination device, control method, and program
JP2024024863A (en) An image analysis device, a control method for the image analysis device, a program, and an image analysis system.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant