Coding parameter determination method, device, electronic device and medium
By acquiring the image and thermal imaging maps, and determining the encoding parameters based on temperature and brightness information, the problem of unreasonable code rate allocation in image encoding is solved, and the effect of saving code rate is achieved.
Patent Information
- Application Number
- CN202011626163.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2040-12-31
AI Technical Summary
The prior art fails to achieve reasonable allocation of fine code rate in image encoding, resulting in the inability to save code rate while protecting image details.
The target image and thermal imaging image are obtained through the image collector, and the encoding parameters of each sub-region are determined according to the temperature information of the moving region and the brightness information of the non-moving region, and the importance of distinguishing different regions is refined, and the code rate is allocated reasonably.
This achieves saving bit rate while protecting key details and reducing coding pressure.
Smart Images

Figure CN114697665B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of image frame coding, and in particular to a method, device, electronic device, and medium for determining coding parameters. Background Art
[0002] With the rapid development of various technologies in the field of surveillance, people's pursuit of high-quality visual experience has led to an overall improvement in image clarity. The effects have been greatly improved both during the day and at night, and the protection of people's safety has become more and more comprehensive.
[0003] However, as image quality improves, the pressure on image encoding increases. The higher the image resolution, the more obvious the image encoding problems become. Moreover, for the encoding of the entire image, the bitrate is not properly allocated, making it impossible to save bitrate while preserving image details. Summary of the Invention
[0004] Embodiments of the present invention provide a method, device, electronic device, and medium for determining coding parameters, so as to protect key details of an image while reasonably allocating a bit rate.
[0005] In one embodiment, the present application provides a method for determining encoding parameters, the method comprising:
[0006] Acquire a target image and a thermal image of the target image respectively through an image collector;
[0007] determining temperature information of each sub-region in the motion region detected from the target image based on the thermal image, and determining encoding parameters of each sub-region based on the temperature information of each sub-region;
[0008] The coding parameters of the non-motion area are determined according to the brightness information of the non-motion area detected from the target image.
[0009] In another embodiment, the present application further provides a device for determining a coding parameter, the device comprising:
[0010] An image acquisition module, configured to acquire a target image and a thermal image of the target image through an image collector;
[0011] a motion region parameter determination module, configured to determine temperature information of each subregion in the motion region detected from the target image based on the thermal image, and determine encoding parameters of each subregion based on the temperature information of each subregion;
[0012] The non-motion area parameter determination module is used to determine the encoding parameters of the non-motion area according to the brightness information of the non-motion area detected by the target image.
[0013] In yet another embodiment, an embodiment of the present application further provides an electronic device, including: one or more processors;
[0014] a memory for storing one or more programs;
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the coding parameter determination method described in any one of the embodiments of the present application.
[0016] In yet another embodiment, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the coding parameter determination method as described in any one of the embodiments of the present application.
[0017] In an embodiment of the present application, a target image and a thermal imaging image of the target image are respectively obtained by an image collector; based on the thermal imaging image, the temperature information of each sub-area in the motion area detected by the target image is determined, and based on the temperature information of each sub-area, the encoding parameters of each sub-area are determined, so as to finely distinguish the importance of different sub-areas in the motion area of the target image, and specifically determine whether the sub-area is a detail that needs to be protected according to the importance of different sub-areas, and adaptively determine the encoding parameters of the sub-area, and based on the brightness information of the non-motion area detected by the target image, determine the encoding parameters of the non-motion area, so as to achieve a reasonable distribution of bit rate, save bit rate while protecting key details, and reduce encoding pressure. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of a method for determining coding parameters provided by an embodiment of the present invention;
[0019] Figure 2 A flowchart of a method for determining coding parameters provided by another embodiment of the present invention;
[0020] Figure 3 A schematic diagram of the structure of a coding parameter determination device provided by an embodiment of the present invention;
[0021] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0023] Figure 1 This is a flowchart of a method for determining coding parameters provided by an embodiment of the present invention. The method for determining coding parameters provided by the embodiment of the present application can be applied to the case of encoding images or videos acquired by an image collector. Typically, the embodiment of the present application is applicable to the case of encoding images or videos by finely determining coding parameters. The method can be specifically executed by a coding parameter determination device, which can be implemented by software and / or hardware, and the device can be integrated into an electronic device capable of implementing the coding parameter determination method. See Figure 1 , the method of the embodiment of the present application specifically includes:
[0024] S110 , acquiring a target image and a thermal image of the target image through an image collector.
[0025] The system requires at least two image collectors, including a lens for capturing images or videos and an infrared lens. If the image collector captures video, the target image is the video frame. The target image is acquired by a sensor, while the thermal image is obtained by imaging the object using a thermal infrared-sensitive CCD.
[0026] S120 , determining temperature information of each sub-region in the motion region detected from the target image according to the thermal image, and determining encoding parameters of each sub-region according to the temperature information of each sub-region.
[0027] Among them, the motion area in the target image can be obtained through intelligent algorithm analysis, such as a motion detection algorithm. The intelligent algorithm can specifically determine the target area, motion target area and motion area in the target image. The motion target can be a target with autonomously controlled movement, such as a person. The motion area includes a motion target area, which includes not only motion targets but also other moving objects, such as plants moving with the wind. Through intelligent analysis, the motion on the target image can be identified and analyzed in a targeted manner to facilitate the subsequent fine-grained determination of the encoding parameters. In an embodiment of the present application, the motion area is the motion area obtained by detecting the target image, rather than the one obtained by detecting the thermal imaging image. Since the target image is the most direct image obtained by the sensor and is a motion area visible to the human eye, the encoding parameters can be directly determined based on the temperature information, and fine-tuned settings and protection can be performed without considering other influencing factors.
[0028] For example, since the importance of different parts in the motion area may be different, for example, for a person's image, the person's facial image is a more important sub-area, while parts of the image such as clothes and shoes are less important sub-areas, different encoding parameters can be set for different parts in the motion area.
[0029] In the embodiment of the present application, the importance of different parts of the moving area is determined by the temperature information of the sub-areas corresponding to each part. Thermal images can reflect the temperature information of various parts of the moving target. Therefore, the temperature information of each sub-area in the moving area of the target image can be determined based on the thermal image. Alternatively, the moving target can be divided into sub-areas based on the temperature information, for example, into high temperature, medium temperature, and low temperature areas.
[0030] For example, the temperature of a human face reflected in a thermal image is often higher, and the face is a key detail that needs to be protected. The temperature of the feet reflected in a thermal image is lower, and the feet are a less important detail. Therefore, the encoding parameters of each sub-area can be determined based on the temperature information of each sub-area, and different encoding parameters can be set for sub-areas with different temperatures, so as to protect the key details in the target image, secondarily protect less critical areas, save bit rate, and achieve reasonable distribution of bit rate.
[0031] S130 : Determine encoding parameters of the non-motion area according to brightness information of the non-motion area detected from the target image.
[0032] For example, the non-motion area detected in the target image is equivalent to the background area. Generally, the grayscale value in this area does not change much, so it is not necessary to fine-tune the coding parameters for each sub-area. In order to avoid the situation where the coding parameters for the non-motion area are adjusted but the actual scene in the target image is not adaptively adjusted, the details that do not need to be protected are protected, while the details that need to be protected are ignored, thereby wasting bit rate. Therefore, in an embodiment of the present application, the brightness value and brightness change can be adaptively analyzed based on the brightness information of the non-motion area, so as to determine the coding parameters in combination with the specific scene reflected by the brightness.
[0033] In the embodiments of the present application, a target image and a thermal image of the target image are respectively acquired by an image collector; according to the thermal image, the temperature information of each sub-region in the motion region detected from the target image is determined, and according to the temperature information of each sub-region, the coding parameters of each sub-region are determined, so as to finely distinguish the importance degrees of different sub-regions in the motion region of the target image, and specifically determine whether the sub-region is a detail that needs to be protected with emphasis according to the importance degrees of different sub-regions, adaptively determine the coding parameters of the sub-region, and determine the coding parameters of the non-motion region according to the brightness information of the non-motion region detected from the target image, so as to adaptively determine the coding parameters of the non-motion region, achieve reasonable allocation of the bitrate, save the bitrate while protecting key details, and reduce the coding pressure.
[0034] In the embodiments of the present application, determining the coding parameters of each sub-region according to the temperature information of each sub-region includes: setting the coding quantization parameter QP in the coding parameters of each sub-region to be negatively correlated with the temperature value of the sub-region. Setting the coding quantization parameter QP in the coding parameters of each sub-region to be negatively correlated with the temperature value of the sub-region includes: if the temperature value of the first sub-region is greater than the temperature value of the second sub-region, and the temperature value of the second sub-region is greater than the temperature value of the third sub-region, it is determined that the coding quantization parameter QP of the first sub-region is less than the coding quantization parameter QP of the second sub-region, and the coding quantization parameter QP of the second sub-region is less than the coding quantization parameter QP of the third sub-region.
[0035] Among them, the coding quantization parameter QP refers to the quantization parameter of the discrete cosine transform in the bitrate control algorithm. The coding quantization parameter QP reflects the spatial detail compression situation. If the coding quantization parameter QP is small, most details will be retained. If the coding quantization parameter QP is large, some details will be lost and the bitrate will decrease. In the embodiments of the present application, the larger the temperature value of the sub-region, the more important the region is determined to be and needs to be protected with emphasis. Therefore, the value of the coding quantization parameter QP of the sub-region is reduced to retain more details. The smaller the temperature value of the sub-region, the lower the importance degree of the region is determined to be, and the protection degree can be reduced. Therefore, the value of the coding quantization parameter QP of the sub-region is increased to save the bitrate and reduce the coding pressure. For example, for the high-temperature region, the coding quantization parameter QP is set to Q1, for the medium-temperature region, the coding quantization parameter QP is set to Q2, and for the low-temperature region, the coding quantization parameter QP is set to Q3, where Q1 < Q2 < Q3. In the embodiments of the present application, regions with different temperatures can be determined according to the relative magnitudes of the temperature information corresponding to the motion region in the thermal image, or the thermal images of the standard human body temperatures at different distances can be pre-tested to determine the temperature information of different parts of the human body. Thus, in practical applications, the temperature information of each sub-region in the motion region is compared with the temperature information of the standard temperature to determine different temperature regions.
[0036] It should be noted that the above embodiment involves three sub-regions, which is just an example of how to determine the coding parameters for the three sub-regions, and does not limit the number of sub-regions. In fact, it can be divided into any number of sub-regions, as long as the coding quantization parameter QP in the coding parameters of each sub-region is negatively correlated with the temperature value of the sub-region, it is within the protection scope of this application.
[0037] In an embodiment of the present application, the method further includes: if the brightness value of the target image is greater than or equal to a preset visible brightness value, and the real-time gain value of the image collector is less than or equal to a preset standard gain value associated with the brightness value, then executing the step of determining the temperature information of each sub-area in the motion area of the target image according to the thermal imaging image; wherein the real-time gain value is the gain value when the image collector acquires the target image; if the brightness value of the target image is less than the preset visible brightness value, and the real-time gain value of the image collector is greater than the preset standard gain value associated with the brightness value, then setting the encoding quantization parameter QP of the moving target in the target image to be greater than a preset quantization parameter threshold; wherein the moving target is a human target determined based on the thermal imaging image.
[0038] The real-time gain value is the gain value of the image collector used to capture the target image during image acquisition. For example, if the brightness of the target image is greater than or equal to a preset visible brightness value, the target image is visible to the human eye and the content of the target image can be observed by the human eye. If the real-time gain of the image collector is less than or equal to a preset standard gain value associated with the brightness value, the real-time gain of the image collector is adjusted normally. If the brightness of the target image is greater than or equal to the preset visible brightness value, and the real-time gain of the image collector is less than or equal to a preset standard gain value associated with the brightness value, the target image is visible to the human eye and the brightness level of the target image acquisition environment is normal. In this case, the encoding parameters of the target image can be determined according to the encoding parameter determination method described in the above embodiment. If the brightness of the target image is less than the preset visible brightness value, the target image is invisible to the human eye and the content of the target image cannot be observed by the human eye. If the real-time gain of the image collector is greater than the preset standard gain value associated with the brightness value, the target image acquisition environment is relatively dark. If the brightness value of the target image is greater than or equal to the preset visible brightness value, and the real-time gain value of the image collector is less than or equal to the preset standard gain value associated with the brightness value, it means that the acquisition environment of the target image is dark, resulting in the target image being invisible to the human eye. When the target image is invisible to the human eye, there is no need to protect the target image and the moving target determined according to the thermal imaging image. Therefore, the encoding quantization parameter QP of the moving target is increased, thereby saving the bit rate.
[0039] In an embodiment of the present application, before determining whether the real-time gain value of the image collector is greater than the preset standard gain value, the method also includes: in the current environment, controlling the light-emitting device to emit light to set different ambient brightnesses; obtaining the gain value of the image collector when performing image acquisition under different ambient brightnesses as the preset standard gain value associated with the ambient brightness.
[0040] For example, in the current environment, the light-emitting device is controlled to emit light, thereby producing different ambient brightness levels. The image collector captures images under different ambient brightness conditions, and the gain value of the image collector at the time of image capture is used as a preset standard gain value associated with the ambient brightness, thereby serving as a comparison standard for real-time gain values. Similarly, the preset visible brightness value can be pre-determined by identifying images captured by the image collector.
[0041] Figure 2 This is a flowchart of a method for determining coding parameters provided by another embodiment of the present invention. This embodiment of the present application is a further optimization of the above embodiment. For details not described in detail in this embodiment of the present application, please refer to the above embodiment. Figure 2 The coding parameter determination method provided in the embodiment of the present application may include:
[0042] S210 , acquiring a target image and a thermal image of the target image through an image collector.
[0043] S220 , determining temperature information of each sub-region in the motion region detected from the target image according to the thermal image, and determining encoding parameters of each sub-region according to the temperature information of each sub-region.
[0044] S230: If there is a non-moving area whose brightness change between the current frame target image and the historical frame target image is greater than a preset change threshold, determine that the non-moving area is a brightness mutation area.
[0045] The historical frame target image is the target image captured by the image collector before the current moment. If the brightness change in the non-moving area between the current frame target image and the historical frame target image exceeds a preset change threshold, such as when a sudden fill light is applied, the area with a brightness change greater than the preset change threshold is determined as a sudden brightness change area.
[0046] S240 : Determine encoding parameters of the brightness mutation area and the moving target according to a detection result of the moving target determined from the thermal image.
[0047] For example, under normal circumstances, if the brightness change in the non-motion area is greater than the preset change, the value of the encoding quantization parameter QP is reduced to protect the brightness change characteristics. However, in fact, for the case where the light is turned on and off without a moving target, there is no need to focus on protection. In an embodiment of the present application, the encoding parameters of the brightness mutation area and the moving target are determined based on the detection result of the moving target determined by the thermal imaging image, so as to specifically determine whether it is necessary to protect the details in the brightness mutation area. Among them, the moving target is the moving target obtained by detection based on the thermal imaging image, rather than the moving target obtained by detection of the target image. Since the brightness mutation area is determined by detection of the non-motion area, there may be two situations for the non-motion area determined by analysis of the target image. One is that it does not include a moving target, and the second is that it includes a moving target, but because the brightness of the target image is dark, it is difficult to identify it by detection of the target image, so it is necessary to detect the moving target through the thermal imaging image.
[0048] Specifically, based on the detection result of the moving target determined from the thermal image, the coding parameters of the brightness mutation region are determined, including: if the moving target exists in the brightness mutation region, determining that the coding quantization parameter QP of the brightness mutation region is less than or equal to the maximum value of the coding quantization parameter QP of the moving region; if the feature target does not exist in the brightness mutation region, determining that the coding quantization parameter QP of the brightness mutation region is greater than the maximum value of the coding quantization parameter QP of the moving region. Based on the detection result of the moving target determined from the thermal image, the coding parameters of the moving target are determined, including: if the moving target exists in the target image and the moving target is located outside the brightness mutation region, determining the coding parameters of the moving target based on the temperature information of each subregion of the moving target.
[0049] For example, the presence of a moving target in the target image is determined based on the thermal image. If so, the position of the moving target is further detected to determine whether it is within or outside the brightness mutation region, thereby determining the encoding parameters accordingly. For the brightness mutation region, if a moving target is present, it is necessary to prioritize its protection. Therefore, the encoding quantization parameter (QP) for the brightness mutation region is set to be less than or equal to the maximum value of the encoding quantization parameter (QP) for the motion region, thereby preserving the details of the moving target. If no moving target is present, it is not necessary to prioritize its protection. Therefore, to further save bitrate, the encoding quantization parameter (QP) for the brightness mutation region is set to be greater than the maximum value of the encoding quantization parameter (QP) for the motion region, thereby saving bitrate and reducing encoding pressure. If the moving target is outside the brightness mutation region, the encoding parameters for the moving target are determined based on the temperature information of each subregion of the image region corresponding to the moving target. The specific scheme is the same as the method for determining the encoding parameters in the motion region, as described in the above embodiment.
[0050] The solution in this embodiment specifically determines encoding parameters for areas with sudden brightness changes based on whether they contain moving targets. This allows the details of moving targets to be preserved when they are present, while saving bitrate when they are absent, avoiding wasted bitrate on unnecessary features and reducing encoding pressure. For moving targets outside of these areas, encoding parameters are refined based on temperature information, thus preserving their details.
[0051] In an embodiment of the present application, the method also includes: if an operation event of manually modifying the encoding parameters is detected, executing the steps of determining the temperature information of each sub-area in the motion area in the target image based on the thermal imaging image; and determining the encoding parameters of each sub-area based on the temperature information of each sub-area.
[0052] For example, there may be a situation where the encoding parameters are manually modified. When it is detected that the encoding parameters are manually modified, the encoding parameters are further corrected according to the method in the above embodiment to avoid the problem of unreasonable bit rate distribution after manual adjustment, thereby reasonably allocating the bit rate, ensuring the target image details, saving bit rate, and reducing encoding pressure.
[0053] Figure 3 This is a schematic diagram of the structure of a coding parameter determination device provided by an embodiment of the present invention. The device can be applied to the case of encoding images or videos captured by an image collector. Typically, the embodiment of the present application is applicable to the case of encoding images or videos by finely determining coding parameters. The device can be implemented by software and / or hardware, and the device can be integrated into an electronic device. Figure 3 , the device specifically includes:
[0054] An image acquisition module 310 is configured to acquire a target image and a thermal image of the target image through an image collector;
[0055] a motion region parameter determination module 320 for determining temperature information of each subregion in the motion region detected from the target image based on the thermal image, and determining encoding parameters of each subregion based on the temperature information of each subregion;
[0056] The non-motion area parameter determination module 330 is configured to determine encoding parameters of the non-motion area according to brightness information of the non-motion area detected from the target image.
[0057] In the embodiment of the present application, the non-motion area parameter determination module 330 is specifically configured to:
[0058] The encoding quantization parameter QP in the encoding parameters of each sub-region is set to be negatively correlated with the temperature value of the sub-region.
[0059] The non-motion area parameter determination module 330 is further specifically configured to:
[0060] If the temperature value of the first sub-region is greater than the temperature value of the second sub-region, and the temperature value of the second sub-region is greater than the temperature value of the third sub-region, it is determined that the encoding quantization parameter QP of the first sub-region is less than the encoding quantization parameter QP of the second sub-region, and the encoding quantization parameter QP of the second sub-region is less than the encoding quantization parameter QP of the third sub-region.
[0061] In an embodiment of the present application, the device further includes:
[0062] a first comparison module, configured to, if the brightness value of the target image is greater than or equal to a preset visible brightness value and the real-time gain value of the image collector is less than or equal to a preset standard gain value associated with the brightness value, determine the temperature information of each sub-region in the motion region of the target image based on the thermal image; wherein the real-time gain value is the gain value of the image collector when acquiring the target image;
[0063] The second comparison module is used to set the encoding quantization parameter QP of the moving target in the target image to be greater than the preset quantization parameter threshold if the brightness value of the target image is less than the preset visible brightness value and the real-time gain value of the image collector is greater than the preset standard gain value associated with the brightness value; wherein the moving target is a human target determined based on the thermal imaging image.
[0064] In an embodiment of the present application, the device further includes:
[0065] An ambient brightness setting module is used to control the light-emitting device to emit light in the current environment to set different ambient brightness;
[0066] The gain value acquisition module is used to acquire the gain value of the image collector when performing image acquisition under different ambient brightness levels as a preset standard gain value associated with the ambient brightness.
[0067] In the embodiment of the present application, the non-motion area parameter determination module 330 includes:
[0068] a brightness mutation region determining unit, configured to determine that a non-moving region is a brightness mutation region if a brightness variation between a current frame target image and a historical frame target image is greater than a preset variation threshold;
[0069] The parameter determination unit is used to determine the encoding parameters of the brightness mutation area and the moving target according to the detection result of the moving target determined by the thermal imaging image.
[0070] In the embodiment of the present application, the parameter determination unit includes:
[0071] A first determining subunit is configured to determine, if there is a moving object in the brightness mutation region, that the encoding quantization parameter QP of the brightness mutation region is less than or equal to the maximum value of the encoding quantization parameter QP of the motion region;
[0072] The second determining subunit is configured to determine that the encoding quantization parameter QP of the brightness mutation region is greater than the maximum value of the encoding quantization parameter QP of the motion region if there is no moving target in the brightness mutation region.
[0073] In the embodiment of the present application, the parameter determination unit includes:
[0074] The third determining subunit is configured to determine the encoding parameters of the moving target based on the temperature information of each sub-region on the moving target if there is a moving target in the target image and the moving target is outside the brightness mutation region.
[0075] In an embodiment of the present application, the device further includes:
[0076] The coding parameter correction module is used to determine the temperature information of each sub-region in the motion area in the target image based on the thermal imaging image; and determine the coding parameters of each sub-region based on the temperature information of each sub-region if an operation event of manually modifying the coding parameters is detected.
[0077] The coding parameter determination device provided in the embodiment of the present application can execute the coding parameter determination method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
[0078] Figure 4A schematic structural diagram of an electronic device provided by an embodiment of the present invention. Figure 4 A block diagram of an exemplary electronic device 412 suitable for implementing embodiments of the present application is shown. Figure 4 The electronic device 412 shown is merely an example and should not limit the functionality and scope of use of the embodiments of the present application.
[0079] like Figure 4 As shown, the electronic device 412 may include: one or more processors 416; a memory 428 for storing one or more programs. When the one or more programs are executed by the one or more processors 416, the one or more processors 416 implement the coding parameter determination method provided in the embodiment of the present application, including:
[0080] Acquire a target image and a thermal image of the target image respectively through an image collector;
[0081] determining temperature information of each sub-region in the motion region detected from the target image based on the thermal image, and determining encoding parameters of each sub-region based on the temperature information of each sub-region;
[0082] The coding parameters of the non-motion area are determined according to the brightness information of the non-motion area detected from the target image.
[0083] Components of the electronic device 412 may include, but are not limited to, one or more processors or processor 416 , memory 428 , and a bus 418 that connects the various device components, including the memory 428 and the processor 416 .
[0084] Bus 418 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, a processed ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0085] The electronic device 412 typically includes a variety of computer-readable storage media, which can be any available storage media that can be accessed by the electronic device 412, including volatile and non-volatile storage media, removable and non-removable storage media.
[0086] The memory 428 may include computer-readable storage media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. The electronic device 412 may further include other removable / non-removable, volatile / non-volatile computer storage media. By way of example only, the storage system 434 may be configured to read and write non-removable, non-volatile magnetic storage media ( Figure 4 Not shown, often called a "hard drive"). Although Figure 4 Not shown, a magnetic disk drive for reading and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical storage medium) may be provided. In these cases, each drive may be connected to bus 418 via one or more data storage medium interfaces. Memory 428 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.
[0087] A program / utility 440 having a set (at least one) of program modules 442 may be stored, for example, in memory 428. Such program modules 442 include, but are not limited to, operating devices, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 442 generally implement the functions and / or methods of the embodiments described herein.
[0088] The electronic device 412 may also communicate with one or more external devices 414 (e.g., a keyboard, a pointing device, a display 424, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 412, and / or any device that enables the electronic device 412 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 422. Furthermore, the electronic device 412 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 420. Figure 4 As shown, the network adapter 420 communicates with other modules of the electronic device 412 via the bus 418. Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 412, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID devices, tape drives, and data backup storage devices.
[0089] The processor 416 executes various functional applications and data processing by running at least one of the other programs among the multiple programs stored in the memory 428, such as implementing a coding parameter determination method provided in an embodiment of the present application.
[0090] An embodiment of the present invention provides a storage medium containing computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are used to perform a method for determining encoding parameters, including:
[0091] Acquire a target image and a thermal image of the target image respectively through an image collector;
[0092] determining temperature information of each sub-region in the motion region detected from the target image based on the thermal image, and determining encoding parameters of each sub-region based on the temperature information of each sub-region;
[0093] The coding parameters of the non-motion area are determined according to the brightness information of the non-motion area detected from the target image.
[0094] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable storage media. The computer-readable storage medium can be a computer-readable signal storage medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus or device, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In an embodiment of the present application, a computer-readable storage medium can be any tangible storage medium containing or storing a program, which can be used by an instruction execution device, device or device or used in combination with it.
[0095] A computer-readable signal storage medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal storage medium may also be any computer-readable storage medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution device, apparatus, or component.
[0096] The program code embodied on the computer-readable storage medium may be transmitted using any appropriate storage medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0097] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or device. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0098] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for determining coding parameters, characterized in that: The method comprises: Acquire a target image and a thermal image of the target image respectively through an image collector; determining temperature information of each sub-region in the motion region detected from the target image based on the thermal image, and determining encoding parameters of each sub-region based on the temperature information of each sub-region; determining encoding parameters of the non-motion area according to brightness information of the non-motion area detected from the target image; Based on the temperature information of each sub-region, the encoding parameters of each sub-region are determined, including: Setting the encoding quantization parameter QP in the encoding parameters of each sub-region to be negatively correlated with the temperature value of the sub-region; Determining encoding parameters of the non-motion area according to brightness information of the non-motion area detected from the target image includes: If the brightness change of a non-moving area between the current frame target image and the historical frame target image is greater than a preset change threshold, the non-moving area is determined to be a brightness mutation area; According to the detection result of the moving target, the encoding parameters of the brightness mutation area and the moving target are determined; wherein the moving target is a moving target detected according to the thermal imaging image.
2. The method according to claim 1, characterized in that The encoding quantization parameter QP in the encoding parameters of each sub-region is set to be negatively correlated with the temperature value of the sub-region, including: If the temperature value of the first sub-region is greater than the temperature value of the second sub-region, and the temperature value of the second sub-region is greater than the temperature value of the third sub-region, it is determined that the encoding quantization parameter QP of the first sub-region is less than the encoding quantization parameter QP of the second sub-region, and the encoding quantization parameter QP of the second sub-region is less than the encoding quantization parameter QP of the third sub-region.
3. The method according to claim 1, characterized in that Determining encoding parameters of the brightness mutation area according to a detection result of a moving target determined from the thermal image includes: If there is a moving target in the brightness mutation area, determining that the encoding quantization parameter QP of the brightness mutation area is less than or equal to the maximum value of the encoding quantization parameter QP of the motion area; If there is no characteristic target in the brightness mutation region, it is determined that the encoding quantization parameter QP of the brightness mutation region is greater than the maximum value of the encoding quantization parameter QP of the motion region.
4. The method according to claim 1, wherein Determining encoding parameters of the moving target based on a detection result of the moving target determined from the thermal image includes: If there is a moving target in the target image and the moving target is located outside the brightness mutation area, the encoding parameters of the moving target are determined according to the temperature information of each sub-area on the moving target.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: If an operation event of manually modifying the encoding parameters is detected, the steps of determining the temperature information of each sub-region in the motion area of the target image according to the thermal imaging image; and determining the encoding parameters of each sub-region according to the temperature information of each sub-region are executed.
6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: If the brightness value of the target image is greater than or equal to a preset visible brightness value, and the real-time gain value of the image collector is less than or equal to a preset standard gain value associated with the brightness value, then performing a step of determining temperature information of each sub-region in the motion region of the target image based on the thermal imaging image; wherein the real-time gain value is a gain value when the image collector acquires the target image; If the brightness value of the target image is less than a preset visible brightness value, and the real-time gain value of the image collector is greater than a preset standard gain value associated with the brightness value, the encoding quantization parameter QP of the moving target in the target image is set to be greater than a preset quantization parameter threshold; wherein the moving target is a human target determined based on the thermal imaging image.
7. A coding parameter determination device, characterized in that: The device comprises: An image acquisition module, configured to acquire a target image and a thermal image of the target image through an image collector; a motion region parameter determination module, configured to determine temperature information of each subregion in the motion region detected from the target image based on the thermal image, and determine encoding parameters of each subregion based on the temperature information of each subregion; a non-motion area parameter determination module, configured to determine encoding parameters of the non-motion area based on brightness information of the non-motion area detected from the target image; The motion region parameter determination module determines the encoding parameters of each sub-region based on the temperature information of each sub-region, including: Setting the encoding quantization parameter QP in the encoding parameters of each sub-region to be negatively correlated with the temperature value of the sub-region; The non-motion area parameter determination module includes: a brightness mutation region determining unit, configured to determine that a non-moving region is a brightness mutation region if a brightness variation between a current frame target image and a historical frame target image is greater than a preset variation threshold; The parameter determination unit is used to determine the encoding parameters of the brightness mutation area and the moving target according to the detection result of the moving target; wherein the moving target is a moving target detected according to the thermal imaging image.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the coding parameter determination method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the coding parameter determination method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Video frame processing method and device
CN106791910A
Video coding method capable of retaining features
CN107454413A
Surveillance system and method by thermal camera
EP2264643A1