Histogram learning-based training method of high-dynamic image enhancement model and image enhancement method
Through a highly dynamic image enhancement model based on histogram learning, using histogram equalization and color scale expansion processing, combined with a one-dimensional convolution architecture model, the problems of high computational complexity and poor adaptability in infrared image enhancement are solved and achieved. Low-complexity, high-efficiency image enhancement that improves contrast and detail retention.
Patent Information
- Application Number
- CN202410747638.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-03
Smart Images

Figure CN118587102A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital image processing, and in particular to a training method of a high-dynamic image enhancement model based on histogram learning and an image enhancement method. Background Art
[0002] Infrared imaging systems are widely used in various fields, and most infrared sensors sample data with a high dynamic range of 14 or 16 bits. However, images obtained from infrared sensors usually have low contrast, so it is necessary to enhance the high dynamic range infrared images.
[0003] Histogram equalization (HE) is a simple and efficient image enhancement algorithm. It adjusts the grayscale distribution of the image to make the number of pixels at each grayscale level in the image more uniform, thereby achieving overall contrast enhancement. However, this method uniformly adjusts the grayscale levels of the original histogram, which may lead to over-enhancement of the image and loss of image details. Plateau histogram equalization (PHE) sets a platform threshold to limit the amplitude of contrast enhancement, thereby making the subject more prominent, improving the problem of image over-enhancement, and better retaining details. However, in this method, the platform threshold cannot be adaptively adjusted according to the image. Contrast limited adaptive histogram equalization (CLAHE), as a local histogram equalization method, divides the image into multiple small units, and each small unit performs contrast-limited histogram equalization separately. This method can avoid the problem of over-enhancement while enhancing details, but its computational complexity is high and the threshold used to limit the contrast cannot be adaptively adjusted. At the same time, deep learning methods are also the mainstream method for infrared image enhancement. However, these methods are based on two-dimensional image enhancement, with complex model structures and large amounts of calculation.
[0004] In summary, it is particularly important in the field of image enhancement to seek a histogram learning method with low computational complexity and capable of adaptively enhancing images. Summary of the invention
[0005] In order to solve the above problems existing in the prior art, the present invention provides a training method of a high dynamic image enhancement model and an image enhancement method based on histogram learning. Specifically, the method includes:
[0006] In a first aspect, the present invention provides a training method for a high dynamic image enhancement model based on histogram learning, comprising:
[0007] Determine a target histogram threshold corresponding to any first high dynamic range original image in the data set according to a preset platform histogram equalization threshold cropping ratio;
[0008] According to the target histogram threshold corresponding to the first high dynamic range original image, the platform histogram equalization processing is performed on each first high dynamic range original image to obtain an enhanced first high dynamic range image;
[0009] According to a preset color scale expansion function, the first high dynamic range original image and the enhanced first high dynamic range image are respectively subjected to color scale expansion processing to obtain a corresponding first infinite color scale high dynamic range original image and a first infinite color scale enhanced high dynamic range image;
[0010] Extracting one-dimensional histogram data of the first infinite-level high dynamic range original image and the first infinite-level enhanced high dynamic range image respectively, and constructing a training sample based on the one-dimensional histogram data according to the extracted one-dimensional histogram data;
[0011] The initial network model of the N-layer one-dimensional convolutional architecture is trained using multiple training samples based on one-dimensional histogram data corresponding to the data set to obtain a trained high dynamic image enhancement model based on histogram learning.
[0012] In a second aspect, the present invention further provides a high dynamic image enhancement method based on histogram learning, comprising:
[0013] Obtaining one-dimensional histogram data corresponding to the target high dynamic image to be enhanced;
[0014] Inputting the one-dimensional histogram data into a high dynamic image enhancement model based on histogram learning obtained by training according to any training method for a high dynamic image enhancement model based on histogram learning provided in the first aspect for processing, so as to obtain enhanced one-dimensional histogram data corresponding to the target high dynamic image;
[0015] A histogram matching process is performed on the target high dynamic image and the enhanced one-dimensional histogram data corresponding to the target high dynamic image to obtain an enhanced target high dynamic image.
[0016] In a third aspect, the present invention provides a training device for a high dynamic image enhancement model based on histogram learning, comprising:
[0017] A determination module, configured to determine a target histogram threshold corresponding to any first high dynamic range original image in the data set according to a preset platform histogram equalization threshold cropping ratio;
[0018] A processing module, configured to perform platform histogram equalization processing on each first high dynamic range original image according to a target histogram threshold corresponding to the first high dynamic range original image, so as to obtain an enhanced first high dynamic range image;
[0019] The processing module is further used to perform color scale expansion processing on the first high dynamic range original image and the enhanced first high dynamic range image according to a preset color scale expansion function, so as to obtain a corresponding first infinite color scale original image and a first infinite color scale enhanced high dynamic range image;
[0020] The processing module is further used to extract the one-dimensional histogram data of the first infinite color scale high dynamic range original image and the first infinite color scale enhanced high dynamic range image respectively, and construct a training sample based on the one-dimensional histogram data according to the extracted one-dimensional histogram data;
[0021] The training module is used to train the initial network model of the N-layer one-dimensional convolutional architecture using multiple training samples based on one-dimensional histogram data corresponding to the data set to obtain a trained high-dynamic image enhancement model based on histogram learning.
[0022] In a fourth aspect, the present invention further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0023] Memory, used to store computer programs;
[0024] The processor is used to implement any one of the methods provided in the first aspect and the second aspect when executing the program stored in the memory.
[0025] In a fifth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any one of the methods provided in the first aspect and the second aspect is implemented.
[0026] In a sixth aspect, the present invention provides a program product, which includes computer program instructions, and when the computer program instructions are executed, they can implement any one of the methods provided in the first and second aspects.
[0027] Beneficial effects of the present invention:
[0028] The training method of the high dynamic image enhancement model based on histogram learning and the image enhancement method provided by the present invention determine the target histogram threshold corresponding to any first high dynamic range original image in the data set by cropping the ratio according to a preset platform histogram equalization threshold; perform platform histogram equalization processing on each first high dynamic range original image according to the target histogram threshold corresponding to the first high dynamic range original image to obtain an enhanced first high dynamic range image; perform color scale expansion processing on the first high dynamic range original image and the enhanced first high dynamic range image according to a preset color scale expansion function to obtain a corresponding first infinite color scale high dynamic range original image and a first infinite color scale enhanced high dynamic range image; extract the first infinite color scale respectively. The one-dimensional histogram data of the original high dynamic range image with infinite color levels and the enhanced high dynamic range image with the first infinite color levels are obtained, and training samples based on the one-dimensional histogram data are constructed according to the extracted one-dimensional histogram data; the initial network model of the N-layer one-dimensional convolutional architecture is trained using multiple training samples based on the one-dimensional histogram data corresponding to the data set to obtain a trained high dynamic image enhancement model based on histogram learning, which is obtained through sample training based on the one-dimensional histogram data. The image can be adaptively enhanced according to the one-dimensional histogram data corresponding to the image, and the details of the image are retained to the greatest extent, and the image distinction and contrast are improved. The computational complexity is low, the amount of calculation is small, and the computational efficiency is high. In addition, the model has a simple structure and is easy to implement and apply.
[0029] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic flow chart of a training method for a high dynamic image enhancement model based on histogram learning provided by the present invention;
[0031] Figure 2 A schematic diagram of a histogram provided by the present invention;
[0032] Figure 3 A schematic diagram of a process flow of a high dynamic image enhancement method based on histogram learning provided by the present invention;
[0033] Figure 4 A high dynamic infrared image provided by the present invention;
[0034] Figure 5 An enhanced high dynamic infrared image provided by the present invention;
[0035] Figure 6 Another enhanced high dynamic infrared image provided by the present invention;
[0036] Figure 7A schematic structural diagram of a training device for a high dynamic image enhancement model based on histogram learning provided by the present invention. DETAILED DESCRIPTION
[0037] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0038] Figure 1 A flowchart of a training method for a high dynamic image enhancement model based on histogram learning provided by the present invention is shown in FIG. Figure 1 As shown, the method includes:
[0039] S101 . Determine a target histogram threshold corresponding to any first high dynamic range original image in a data set according to a preset platform histogram equalization threshold cropping ratio.
[0040] In a possible implementation, determining a target histogram threshold corresponding to any first high dynamic range original image in a data set according to a preset platform histogram equalization threshold cropping ratio includes the following steps A1 and A2:
[0041] A1, for a histogram corresponding to a first high dynamic range original image, obtain the number of pixels in the histogram that exceed a first histogram threshold, and determine the ratio between the number of pixels in the histogram that exceed the first histogram threshold and the total number of pixels in the first high dynamic range original image.
[0042] The initial value of the first histogram threshold is 0.
[0043] A2, determine whether the ratio is less than or equal to the preset platform histogram equalization threshold clipping ratio, if so, determine the first histogram threshold as the target histogram threshold, if not, update the first histogram threshold according to the preset increment, and re-execute A1.
[0044] Optionally, before A1, the step further includes: determining a histogram corresponding to the first high dynamic range original image according to a distribution of grayscale in the first high dynamic range original image.
[0045] For example, see Figure 2 The histogram shown in FIG. 1 is used to obtain the number of pixels P2+P1 in the histogram that exceeds the first histogram threshold t, and determine the ratio r between the number P2+P1 and the total number of pixels P3+P2+P1 of the first high dynamic range original image; then, r is compared with the preset platform histogram equalization threshold cropping ratio R. If r is less than or equal to R, t is determined as the target histogram threshold T corresponding to the histogram; if r is greater than R, t+b is determined as the new first histogram threshold, and the above steps are re-executed until the corresponding ratio r is less than or equal to R. Figure 2 As shown in FIG. 1 , R is the ratio of the total number of pixels P1 in the histogram whose number exceeds the target histogram threshold T to the total number of pixels P3+P2+P1. Where P1 represents the number of pixels exceeding the threshold T, P2 represents the number of pixels between T and t, and P3 represents the number of pixels below the threshold t. The initial value of t is 0.
[0046] The threshold determined by this method can limit the enhancement of the image background, thereby retaining image details and making the subject more prominent.
[0047] S102 . Performing platform histogram equalization processing on each first high dynamic range original image according to a target histogram threshold corresponding to the first high dynamic range original image to obtain an enhanced first high dynamic range image.
[0048] S103, performing color scale expansion processing on the first high dynamic range original image and the enhanced first high dynamic range image according to a preset color scale expansion function, to obtain a corresponding first infinite color scale original high dynamic range image and a first infinite color scale enhanced high dynamic range image.
[0049] In a possible implementation, according to a preset color scale extension function, color scale extension processing is performed on the first high dynamic range original image and the enhanced first high dynamic range image respectively to obtain a corresponding first infinite color scale high dynamic range original image and a first infinite color scale enhanced high dynamic range image, including the following steps B1-B3:
[0050] B1. For any first pixel point in the first high dynamic range original image or the enhanced first high dynamic range image, with the first pixel point as the center, obtain the coordinates and color levels of each pixel point in the surrounding M×M range, and bring each coordinate and each color level into a preset color level expansion function to obtain the color level expansion result of the first pixel point.
[0051] The expression of the color scale expansion function is:
[0052]
[0053] Among them, (x o ,y o ) represents the coordinates of the pixel points to be expanded in the corresponding image. Represents a pixel (x o ,y o )'s color scale expansion result; (x i ,y i ) represents the pixel (x o ,y o )The coordinates of the i-th pixel point in the M×M range around it, f(xi ,y i ) represents the pixel (x o ,y o ) is the color level of the i-th pixel in the M×M range around it, g(x i ,y i ) is the weight of the i-th pixel, g(x i ,y i )=α(x i -x o )+β(y i -y o ), α represents the pixel (x i ,y i ) in the x direction, β represents the weight of the pixel point (x i ,y i ) in the y direction. (x i -x o ) and (y i -y o ) represent the pixel points (x i ,y i ) and the pixel to be expanded (x o ,y o ) in the x and y directions. i ,y i )’s weight g(x) i ,y i ) is related to the distance between this point and the point to be expanded in the x and y directions.
[0054] Optional, M is 3.
[0055] B2. Obtain a first infinite-level high dynamic range original image according to the color scale expansion result corresponding to each pixel point in the first high dynamic range original image.
[0056] B3. Obtain a first infinite-scale enhanced high dynamic range image according to the color scale expansion result corresponding to each pixel point in the enhanced first high dynamic range image.
[0057] The histogram information of the image processed by the color scale expansion function remains basically unchanged, but the color scale has been expanded from a finite domain to an infinite domain, thereby ensuring that the histogram enhancement network can learn from an infinite domain to an infinite domain.
[0058] S104, extracting one-dimensional histogram data of the first infinite-level high dynamic range original image and the first infinite-level enhanced high dynamic range image respectively, and constructing training samples according to the extracted one-dimensional histogram data.
[0059] In a possible implementation, one-dimensional histogram data of the first infinite-level high dynamic range original image and the first infinite-level enhanced high dynamic range image are respectively extracted, and training samples are constructed according to the extracted one-dimensional histogram data, including the following steps C1-C3:
[0060] C1. Obtain the number of pixels of each gray level in the first infinite color scale high dynamic range original image and the first infinite color scale enhanced high dynamic range image respectively.
[0061] Specifically, it can be expressed as:
[0062] P(t)=Num(t)t=0,1,2,...2 n -1,
[0063] Among them, P(t) represents the number of pixels of the tth gray level in the image, and n represents the dynamic range of the image.
[0064] C2. Determine one-dimensional histogram data of the first infinite-level high dynamic range original image and one-dimensional histogram data of the first infinite-level high dynamic range enhanced image according to the number of pixels of each gray level in the first infinite-level high dynamic range original image and the number of pixels of each gray level in the first infinite-level high dynamic range enhanced image.
[0065] The histogram data is represented as:
[0066] H=[P(0),P(1),P(2),...P(2 n -1)],
[0067] Where H represents the histogram data.
[0068] C3. Using the one-dimensional histogram data of the first infinite-level high dynamic range original image as the original data, and using the one-dimensional histogram data of the first infinite-level enhanced high dynamic range image as the label of the original data, constructing a training sample based on the one-dimensional histogram data.
[0069] This method is used to obtain corresponding training samples based on one-dimensional histogram data based on high dynamic images, with low computational complexity and high sample generation efficiency.
[0070] S105. Using a plurality of training samples based on one-dimensional histogram data corresponding to the data set, the initial network model of the N-layer one-dimensional convolutional architecture is trained to obtain a trained high dynamic image enhancement model based on histogram learning.
[0071] The training method of the high dynamic image enhancement model based on histogram learning provided by the present invention determines the target histogram threshold corresponding to any first high dynamic range original image in the data set by cropping the ratio according to a preset platform histogram equalization threshold; performs platform histogram equalization processing on each first high dynamic range original image according to the target histogram threshold corresponding to the first high dynamic range original image to obtain an enhanced first high dynamic range image; performs color scale expansion processing on the first high dynamic range original image and the enhanced first high dynamic range image according to a preset color scale expansion function to obtain a corresponding first infinite color scale high dynamic range original image and a first infinite color scale enhanced high dynamic range image; The one-dimensional histogram data of the first infinite color scale high dynamic range original image and the first infinite color scale enhanced high dynamic range image are extracted respectively, and training samples based on the one-dimensional histogram data are constructed according to the extracted one-dimensional histogram data; the initial network model of the N-layer one-dimensional convolutional architecture is trained using multiple training samples based on the one-dimensional histogram data corresponding to the data set to obtain a trained high dynamic image enhancement model based on histogram learning. This method combines platform histogram equalization with deep learning. The trained model can adaptively enhance the image, retain the details of the image to the greatest extent and improve the image distinction and contrast. In addition, the model has a simple structure, low computational complexity, small amount of calculation and high computational efficiency.
[0072] Figure 3 A flowchart of a high dynamic image enhancement method based on histogram learning provided by the present invention is shown in FIG. Figure 3 As shown, the method includes:
[0073] S301: Obtain one-dimensional histogram data corresponding to a target high dynamic image to be enhanced.
[0074] Specifically, the number of pixels of each gray level in the target high dynamic image is counted, and one-dimensional histogram data corresponding to the target high dynamic image is determined according to the statistical result.
[0075] S302. Input the one-dimensional histogram data into a high dynamic image enhancement model based on histogram learning obtained by training according to any of the training methods for high dynamic image enhancement models based on histogram learning provided by the present invention for processing to obtain enhanced one-dimensional histogram data corresponding to the target high dynamic image.
[0076] S303 , performing histogram matching processing on the target high dynamic image and the enhanced one-dimensional histogram data corresponding to the target high dynamic image to obtain an enhanced target high dynamic image.
[0077] Optionally, the method further includes: normalizing the enhanced target high dynamic image to within a preset dynamic range and outputting the image.
[0078] Exemplarily, the enhanced target high dynamic image is normalized to an 8-bit dynamic range and output.
[0079] The high dynamic image enhancement method based on histogram learning provided by the present invention has low computational complexity, and can retain image details to a greater extent and improve image distinction and contrast while adaptively performing image enhancement. The enhancement result has more detail information, can well distinguish the subject and the background, and has a good image enhancement effect.
[0080] In order to further prove the beneficial effects of the present invention, the present invention also provides a set of experimental data.
[0081] The histogram equalization and the high dynamic image enhancement method based on histogram learning proposed in this invention are respectively used to Figure 4 The high dynamic infrared image shown is enhanced, and the enhanced image is shown in Figure 5 and Figure 6 .
[0082] Figure 5 and Figure 6 By comparison, it can be seen that the histogram equalization results in excessive enhancement on the ground, and the grayscale distinction between the main vehicle and the ground is not obvious; while the method of the present invention limits the enhancement of the ground while distinguishing the grayscale of the main vehicle from the ground, which can better highlight the main body.
[0083] Next, the global contrast (RMSC) and local contrast (Local Contrast) are used to quantitatively compare and evaluate the performance of the high dynamic range image enhancement method based on histogram learning proposed in the present invention.
[0084] The greater the global contrast, the higher the image differentiation.
[0085] The greater the local contrast, the more obvious the main body of the image is and the easier it is to distinguish the details.
[0086] The image enhanced by histogram equalization was compared with the image enhanced by the method of the present invention, and the experimental results are shown in Table 1.
[0087] Table 1 Comparison of quantization parameters of test results
[0088]
[0089]
[0090] It can be seen from Table 1 that:
[0091] (1) The global contrast index of the image enhanced by the method provided by the present invention is substantially higher than that of the image enhanced by the histogram equalization, indicating that the image enhanced by the method provided by the present invention has higher contrast and discrimination.
[0092] (2) The local contrast index of the image enhanced by the method provided by the present invention is significantly higher than that of the histogram equalization, indicating that the image detail information enhanced by the method provided by the present invention is more obvious, and the distinction between the image subject and the background is high.
[0093] (3) The method provided by the present invention has significantly improved the indicators of different images, indicating that the method provided by the present invention can adaptively enhance images.
[0094] Figure 7 A structural schematic diagram of a training device for a high dynamic image enhancement model based on histogram learning provided by the present invention, such as Figure 7 As shown, the device comprises:
[0095] The determination module 71 is used to determine a target histogram threshold corresponding to any first high dynamic range original image in the data set according to a preset platform histogram equalization threshold cropping ratio.
[0096] The processing module 72 is used to perform a platform histogram equalization process on each first high dynamic range original image according to a target histogram threshold corresponding to the first high dynamic range original image to obtain an enhanced first high dynamic range image.
[0097] The processing module 72 is also used to perform color scale expansion processing on the first high dynamic range original image and the enhanced first high dynamic range image according to a preset color scale expansion function, so as to obtain the corresponding first infinite color scale original image and the first infinite color scale enhanced high dynamic range image.
[0098] The processing module 72 is further used to extract the one-dimensional histogram data of the first infinite-level high dynamic range original image and the first infinite-level enhanced high dynamic range image, and construct a training sample based on the one-dimensional histogram data according to the extracted one-dimensional histogram data.
[0099] The training module 73 is used to train the initial network model of the N-layer one-dimensional convolutional architecture using multiple training samples based on one-dimensional histogram data corresponding to the data set to obtain a trained high dynamic image enhancement model based on histogram learning.
[0100] The present invention also provides a structural schematic diagram of an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus.
[0101] Memory, used to store computer programs;
[0102] The processor is used to implement the steps provided in the above method embodiment when executing the program stored in the memory.
[0103] The communication interface is used for communication between the above electronic device and other devices.
[0104] The method provided in the embodiment of the present invention can be applied to electronic devices. Specifically, the electronic device can be: a desktop computer, a portable computer, an intelligent mobile terminal, a server, etc. This is not limited here, and any electronic device that can implement the present invention belongs to the protection scope of the present invention.
[0105] The present invention also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps provided in the above method embodiment are implemented.
[0106] As for the device / electronic device / storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the specific content and beneficial effects and other related matters can be referred to the partial description of the method embodiment.
[0107] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0108] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A training method for a high dynamic image enhancement model based on histogram learning, characterized in that: include: Determine a target histogram threshold corresponding to any first high dynamic range original image in the data set according to a preset platform histogram equalization threshold cropping ratio; performing platform histogram equalization processing on each of the first high dynamic range original images according to a target histogram threshold corresponding to the first high dynamic range original images to obtain an enhanced first high dynamic range image; According to a preset color scale expansion function, the first high dynamic range original image and the enhanced first high dynamic range image are respectively subjected to color scale expansion processing to obtain a corresponding first infinite color scale high dynamic range original image and a first infinite color scale enhanced high dynamic range image; Extracting one-dimensional histogram data of the first infinite-level high dynamic range original image and the first infinite-level enhanced high dynamic range image respectively, and constructing training samples based on the one-dimensional histogram data according to the extracted one-dimensional histogram data; The initial network model of the N-layer one-dimensional convolutional architecture is trained using a plurality of training samples based on one-dimensional histogram data corresponding to the data set to obtain a trained high dynamic image enhancement model based on histogram learning.
2. The method according to claim 1, characterized in that: The method of performing color scale expansion processing on the first high dynamic range original image and the enhanced first high dynamic range image according to a preset color scale expansion function to obtain a corresponding first infinite color scale high dynamic range original image and a first infinite color scale enhanced high dynamic range image includes: For any first pixel in the first high dynamic range original image or the enhanced first high dynamic range image, taking the first pixel as the center, obtain the coordinates and color levels of each pixel in the surrounding M×M range, and bring each of the coordinates and each of the color levels into a preset color level extension function to obtain the color level extension result of the first pixel. The expression of the color level extension function is: Among them, (x o ,y o ) represents the coordinates of the pixel points to be expanded in the corresponding image. Represents a pixel (x o ,y o )'s color scale expansion result; (x i ,y i ) represents the pixel (x o ,y o )The coordinates of the i-th pixel point in the M×M range around it, f(x i ,y i ) represents the pixel (x o ,y o ) is the color level of the i-th pixel in the M×M range around it, g(x i ,y i ) is the weight of the i-th pixel, g(x i ,y i )=α(x i -x o )+β(y i -y o ), α represents the pixel (x i ,y i ) in the x direction, β represents the weight of the pixel point (x i ,y i ) weight in the y direction; Obtaining the first infinite-scale high dynamic range original image according to the color scale expansion result corresponding to each pixel point in the first high dynamic range original image; According to the color scale expansion results corresponding to each pixel point in the enhanced first high dynamic range image, a first infinite color scale enhanced high dynamic range image is obtained.
3. The method according to claim 1, characterized in that The step of determining a target histogram threshold corresponding to any first high dynamic range original image in the data set according to a preset platform histogram equalization threshold cropping ratio includes: S31, for a histogram corresponding to the first high dynamic range original image, obtaining the number of pixels in the histogram that exceed a first histogram threshold, and determining a ratio between the number of pixels in the histogram that exceed the first histogram threshold and the total number of pixels in the first high dynamic range original image, wherein an initial value of the first histogram threshold is 0; S32, determining whether the ratio is less than or equal to the preset platform histogram equalization threshold clipping ratio, if so, determining the first histogram threshold as the target histogram threshold, if not, updating the first histogram threshold according to a preset increment, and re-executing S31.
4. The method according to claim 1, characterized in that: The step of respectively extracting one-dimensional histogram data of the first infinite-level high dynamic range original image and the first infinite-level enhanced high dynamic range image, and constructing a training sample based on the one-dimensional histogram data according to the extracted one-dimensional histogram data, comprises: The number of pixels of each gray level in the first infinite-level high dynamic range original image and the first infinite-level enhanced high dynamic range image is obtained respectively, and is expressed as: P(t)=Num(t)t=0,1,2,...2 n -1, Where P(t) represents the number of pixels of the tth gray level in the image, and n represents the dynamic range of the image; According to the number of pixels of each gray level in the first infinite-level high dynamic range original image and the number of pixels of each gray level in the first infinite-level enhanced high dynamic range image, one-dimensional histogram data of the first infinite-level high dynamic range original image and one-dimensional histogram data of the first infinite-level enhanced high dynamic range image are determined, respectively, and the histogram data are expressed as: H=[P(0),P(1),P(2),...P(2 n -1)], Where H represents histogram data; The one-dimensional histogram data of the first infinite-level high dynamic range original image is used as the original data, and the one-dimensional histogram data of the first infinite-level enhanced high dynamic range image is used as the label of the original data to construct a training sample based on the one-dimensional histogram data.
5. A high dynamic image enhancement method based on histogram learning, characterized in that: include: Obtaining one-dimensional histogram data corresponding to the target high dynamic image to be enhanced; Inputting the one-dimensional histogram data into a high dynamic image enhancement model based on histogram learning obtained by training the high dynamic image enhancement model based on histogram learning according to any one of claims 1 to 4 for processing, so as to obtain enhanced one-dimensional histogram data corresponding to the target high dynamic image; A histogram matching process is performed on the target high dynamic image and the enhanced one-dimensional histogram data corresponding to the target high dynamic image to obtain an enhanced target high dynamic image.
6. The method according to claim 5, characterized in that The method further comprises: The enhanced target high dynamic image is normalized to a preset dynamic range and output.
7. A training device for a high dynamic image enhancement model based on histogram learning, characterized in that: include: A determination module, configured to determine a target histogram threshold corresponding to any first high dynamic range original image in the data set according to a preset platform histogram equalization threshold cropping ratio; a processing module, configured to perform platform histogram equalization processing on each of the first high dynamic range original images according to a target histogram threshold corresponding to the first high dynamic range original images, so as to obtain an enhanced first high dynamic range image; The processing module is further used to perform color scale expansion processing on the first high dynamic range original image and the enhanced first high dynamic range image according to a preset color scale expansion function, so as to obtain a corresponding first infinite color scale high dynamic range original image and a first infinite color scale enhanced high dynamic range image; The processing module is further used to extract one-dimensional histogram data of the first infinite-level high dynamic range original image and the first infinite-level enhanced high dynamic range image, respectively, and construct a training sample based on the one-dimensional histogram data according to the extracted one-dimensional histogram data; The training module is used to train the initial network model of the N-layer one-dimensional convolutional architecture using multiple training samples based on one-dimensional histogram data corresponding to the data set to obtain a trained high-dynamic image enhancement model based on histogram learning.
8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-6 when executing a program stored in a memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A program product, characterized in that The program product comprises computer program instructions, and when the computer program instructions are executed, the method according to any one of claims 1 to 6 can be implemented.
