Image processing method and apparatus

By adjusting the image bit depth, gain processing, and mapping processing, the pixel value overflow problem caused by image shadows was solved, thus achieving the integrity of image information and the preservation of imaging effects.

CN115760596BActive Publication Date: 2026-04-07VIVO MOBILE COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies, when eliminating image shadows, cause some pixels with high pixel values ​​to overflow, resulting in the loss of image information and compromising the integrity of the image information.

Method used

By adjusting the bit depth of the image, performing gain processing, and mapping each pixel based on the information from the original image and the image after gain processing, the bit depth of the image is restored.

Benefits of technology

While eliminating image shadows, pixel value overflow was avoided, ensuring the integrity of image information and imaging effect, without increasing storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115760596B_ABST
    Figure CN115760596B_ABST
Patent Text Reader

Abstract

The application discloses an image processing method and device, and belongs to the technical field of image processing. The image processing method comprises the following steps: adjusting the bit depth of a first image to obtain a second image, wherein the bit depth of the second image is greater than that of the first image; performing gain processing on the second image to obtain a third image; and performing mapping processing on each pixel point in the third image according to the image information of the first image and the third image to obtain a target image, wherein the bit depth of the target image is the same as that of the first image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of image processing technology, specifically relating to an image processing method and apparatus. Background Technology

[0002] When taking pictures, due to the optical characteristics of the lens, the camera lens may not refract the incident light evenly, resulting in shadows appearing around the edges of the captured image.

[0003] Currently, those skilled in the art often eliminate shadows in images by multiplying the pixel value of each pixel by a different gain value. However, when eliminating image shadows using this method, the pixel values ​​of some pixels with higher values ​​overflow after gaining, resulting in the loss of that portion of image information, damaging the integrity of the image information, and reducing the imaging effect. Summary of the Invention

[0004] The purpose of this application is to provide an image processing method and apparatus that can eliminate shadows in an image while ensuring the integrity of the image information.

[0005] In a first aspect, embodiments of this application provide an image processing method, the method comprising: adjusting the bit depth of a first image to obtain a second image, wherein the bit depth of the second image is greater than the bit depth of the first image; performing gain processing on the second image to obtain a third image; and performing mapping processing on each pixel in the third image based on image information of the first image and the third image to obtain a target image, wherein the bit depth of the target image is the same as the bit depth of the first image.

[0006] Secondly, embodiments of this application provide an image processing apparatus, the apparatus comprising: a processing unit configured to adjust the bit depth of a first image to obtain a second image, wherein the bit depth of the second image is greater than the bit depth of the first image; the processing unit further configured to perform gain processing on the second image to obtain a third image; and the processing unit further configured to perform mapping processing on each pixel in the third image based on image information of the first image and the third image to obtain a target image, wherein the bit depth of the target image is the same as the bit depth of the first image.

[0007] Thirdly, embodiments of this application provide an electronic device including a processor and a memory. The memory stores a program or instructions that can run on the processor, and when the program or instructions are executed by the processor, they implement the steps of the image processing method as described in the first aspect.

[0008] Fourthly, embodiments of this application provide a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the image processing method as described in the first aspect.

[0009] Fifthly, embodiments of this application provide a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the steps of the image processing method as described in the first aspect.

[0010] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the steps of the image processing method as described in the first aspect.

[0011] In the image processing method provided in this application embodiment, the bit depth of the first image is adjusted to obtain the second image, and then the second image is subjected to gain processing to obtain the third image. Based on this, each pixel in the third image is mapped according to the image information of the first and third images to obtain the target image. The bit depth of the second image is greater than that of the first image, and the bit depth of the target image is the same as that of the first image.

[0012] The image processing method described above, in the process of processing the first image to obtain the target image, firstly, performs bit-increment processing on the first image to obtain a second image with a larger bit depth. Then, it performs gain processing on the bit-incremented image to obtain a third image. Based on this, according to the image information of the first and third images, each pixel in the third image is mapped to compress the third image, thus obtaining the target image with the same bit depth as the first image. In other words, this image processing method performs bit-increment processing on the image to be processed, followed by gain processing, and then restores the image's bit depth through special mapping processing. This eliminates image shadows through gain processing, avoids pixel value overflow during gain processing, and ensures that the final bit depth of the image remains unchanged. This avoids image information loss, thus ensuring imaging quality without increasing the storage space occupied by the image. Attached Figure Description

[0013] Figure 1 A schematic flowchart of the image processing method provided in the embodiments of this application;

[0014] Figure 2 One of the schematic diagrams of the image processing method provided in the embodiments of this application;

[0015] Figure 3 A second schematic diagram of the image processing method provided in the embodiments of this application;

[0016] Figure 4 The third schematic diagram of the image processing method provided in the embodiments of this application;

[0017] Figure 5 The fourth schematic diagram of the image processing method provided in the embodiments of this application;

[0018] Figure 6 This is a structural block diagram of the image processing apparatus provided in the embodiments of this application;

[0019] Figure 7 A structural block diagram of the electronic device provided in the embodiments of this application;

[0020] Figure 8 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0022] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0023] The first aspect of this application provides an image processing method. The executing entity of the image processing method provided in this application can be an image processing device, which can be determined according to actual usage requirements. This application does not limit this. To more clearly describe the image processing method provided in this application, the following method embodiments executor is an image processing device.

[0024] The image processing method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0025] like Figure 1 As shown, this application provides an image processing method, which may include the following steps S102 to S106:

[0026] S102: Adjust the bit depth of the first image to obtain the second image.

[0027] The bit depth of the second image is greater than that of the first image.

[0028] Specifically, in the process of processing an image using the image processing method provided in this application embodiment, a first image to be processed is obtained, and then bit-increment processing is performed on the first image, that is, the bit depth of the first image is expanded, thereby obtaining a second image with a bit depth greater than that of the first image. That is, the pixel value that each pixel in the first image can carry is expanded from a first range to a second range, thereby enabling each pixel to represent more colors.

[0029] For example, an 8-bit first image is adjusted to a 10-bit second image, where each pixel in the 8-bit first image can carry a pixel value range of 0 to 255, and each pixel in the 10-bit second image can carry a pixel value range of 0 to 1023.

[0030] It should be noted that the aforementioned first image can be a real-time captured image, an image stored in the photo album of an electronic device, or a picture downloaded by the user from an external storage device such as a USB flash drive or hard disk. In other words, the image processing method provided in this application embodiment can process the captured image in real time during the shooting process to obtain a better image quality, and can also perform post-processing on the existing image after obtaining the image to be processed, thereby improving the image quality.

[0031] S104: Perform gain processing on the second image to obtain the third image.

[0032] The gain processing described above is used to adjust the actual pixel value of each pixel in the second image, thereby adjusting the brightness of each pixel in the second image to eliminate shadows. During the gain processing of the second image, the bit depth of the image is not changed; that is, the bit depth of the third image is equal to the bit depth of the second image.

[0033] Specifically, in the process of processing an image using the image processing method provided in the embodiments of this application, after obtaining the second image, the second image is further subjected to gain processing, that is, the actual pixel value of each pixel in the second image is multiplied by a corresponding gain value, thereby adjusting the actual pixel value of each pixel in the second image from the original first pixel value to the corresponding second pixel value, that is, adjusting the image pixel range of the second image from the first pixel range to the second pixel range.

[0034] It should be noted that the second image is obtained by bit-increasing the first image. That is, compared to the first image, each pixel in the second image can carry a wider range of pixel values. Therefore, during the gain processing of the second image, even if the actual pixel value of some pixels in the second image exceeds the maximum pixel value that each pixel in the first image can carry after gain processing, the actual pixel value of these pixels after gain processing will still be within the range that each pixel in the second image can carry. In other words, after gain processing of the second image, the pixel values ​​of each pixel in the processed second image will not overflow, and image information will not be lost, thus obtaining a third image with no shadows and complete image information.

[0035] S106: Based on the image information of the first image and the third image, perform mapping processing on each pixel in the third image to obtain the target image.

[0036] The target image has the same bit depth as the first image.

[0037] Furthermore, the aforementioned image information may specifically include the image's pixel information, bit depth information, and size information. The pixel information may specifically include the pixel value information and pixel coordinates of each pixel in the image.

[0038] Furthermore, the above mapping process is used to adjust the actual pixel value of each pixel in the third image through a target mapping curve, which is related to the image information of the first and third images.

[0039] Specifically, in the image processing process provided by the embodiment of this application, after obtaining the third image, a target mapping curve corresponding to each pixel in the third image is determined based on the image information of the first image and the third image. Based on this, the actual pixel value of each pixel in the third image is adjusted accordingly using the target mapping curve corresponding to each pixel, so that the actual pixel value of each pixel in the third image is adjusted from the second pixel value after gain processing to the corresponding third pixel value. That is, the image pixel range of the third image is adjusted from the second pixel range to the third pixel range, so that the actual pixel value of each pixel in the obtained target image does not exceed the maximum pixel value that each pixel in the first image can bear.

[0040] In other words, by performing the above mapping process on the third image, the bit depth of the third image is restored to the bit depth before the bit increment processing, that is, restored to the bit depth of the first image. In this way, after bit increment processing, gain processing, and mapping processing, the first image yields a target image with unchanged bit depth, complete image information, no shadow phenomenon, and good image effect.

[0041] For example, the first image has an actual pixel range of 78 to 240 and a bit depth of 8 bits, meaning each pixel in the first image can carry a pixel value range of 0 to 255. Based on this, the first image undergoes bit increment processing, adjusting its bit depth from 8 bits to 10 bits to obtain the second image. The second image also has an actual pixel range of 78 to 240 and a bit depth of 10 bits, meaning each pixel in the second image can carry a pixel value range of 0 to 1023. Furthermore, the second image undergoes gain processing, adjusting its actual pixel range from 78 to 240 to 200 to 300, resulting in a third image without shadows. The third image also has an actual pixel range of 200 to 300 and a bit depth of 10 bits, meaning each pixel in the third image can carry a pixel value range of 0 to 1023. At this point, although some pixels in the third image have pixel values ​​exceeding 255, they do not exceed 1023. Therefore, pixel value overflow does not occur in the third image, and the image information from the first image is retained in the third image. Further, the third image undergoes mapping processing, adjusting its actual pixel range from 200 to 300 to 170 to 255, resulting in the target image. The actual pixel range of the third image is 170 to 255, and its bit depth is 8 bits.

[0042] The image processing method provided in this application, in the process of processing the first image to obtain the target image, firstly, bit-increment processing is performed on the first image to obtain a second image with a larger bit depth. Then, gain processing is performed on the bit-incremented image to obtain a third image. Based on this, each pixel in the third image is mapped according to the image information of the first and third images to compress the third image, thereby obtaining a target image with the same bit depth as the first image. In other words, the above image processing method performs bit-increment processing on the image to be processed, then performs gain processing, and then restores the bit depth of the image through special mapping processing. In this way, the image shadow phenomenon is eliminated through gain processing, pixel value overflow is avoided during image gain processing, and the final bit depth of the image is not changed. This avoids the loss of image information, thus ensuring the imaging effect without increasing the storage space occupied by the image.

[0043] In this embodiment of the application, S104 may specifically include the following S104a:

[0044] S104a: Multiply the pixel value of each pixel in the second image by its corresponding target magnification to obtain the third image.

[0045] The target magnification corresponding to each pixel is negatively correlated with the pixel value of the pixel.

[0046] Specifically, in the process of processing an image using the image processing method provided in the embodiments of this application, after obtaining the second image, for each pixel in the second image, the pixel value of the pixel is multiplied by its corresponding target magnification, thereby adjusting the actual pixel value of each pixel in the second image from the original first pixel value to the corresponding second pixel value, that is, adjusting the image pixel range of the second image from the first pixel range to the second pixel range.

[0047] In this method, the target magnification for each pixel is negatively correlated with its pixel value. That is, the pixel value of a brighter pixel in the second image is multiplied by a smaller target magnification, while the pixel value of a darker pixel is multiplied by a larger target magnification. By multiplying the pixel values ​​of each pixel in the second image by different target magnifications, the brightness of each pixel in the second image is balanced, thereby eliminating shadows and obtaining a third image with better image quality.

[0048] Additionally, it should be noted that the second image is obtained by bit-incrementing the first image. This means that each pixel in the second image can carry a wider range of pixel values ​​compared to the first image. Therefore, after multiplying the pixel value of each pixel in the second image by the corresponding target multiplier, there will be no overflow of pixel values, and no image information will be lost. This ensures both the image quality of the resulting third image and the integrity of the image information within the third image.

[0049] The embodiments provided in this application perform gain processing on the second image by multiplying the pixel value of each pixel in the second image by its corresponding target magnification, thereby obtaining the third image. The target magnification corresponding to each pixel is negatively correlated with the pixel value. This eliminates shadows in the second image while avoiding pixel value overflow, thus preventing image information loss and ensuring the image quality and integrity of the obtained third image.

[0050] In this embodiment of the application, S106 may specifically include the following S106a to S106d:

[0051] S106a: Divide the third image into N image blocks, and determine Q target blocks based on the N image blocks.

[0052] A target block consists of M adjacent image blocks, and each target block is square.

[0053] Furthermore, N, M, and Q are all positive integers, M is less than N, and Q is less than N.

[0054] Optionally, in practical applications, the third image can be divided into N image blocks, and each image block is square.

[0055] Specifically, in the process of processing an image using the image processing method provided in the embodiments of this application, after obtaining the third image, the third image is divided into N image blocks, and then Q target blocks are determined based on the N image blocks, so that the mapping processing of each pixel in the third image can be realized by processing the pixels in each target block.

[0056] A target block consists of M adjacent image blocks. In practical applications, a square patch composed of every M adjacent image blocks can be considered as a target block. This allows adjacent target blocks to overlap, ensuring comprehensiveness and smoothness in the mapping of each pixel in the third image during subsequent mapping processing of pixels within each target block. This results in a better image quality for the final target image.

[0057] In addition, in practical applications, the value of M can be 4, 9, etc. Those skilled in the art can set it according to the actual situation, and no specific restrictions are made here.

[0058] For example, such as Figure 2 As shown, after obtaining the third image 202, the third image 202 is divided into 36 image blocks 204. Then, every 4 adjacent image blocks 204 are divided into a target block 206 so that the mapping processing of each pixel in the third image 202 can be realized by processing the pixels in each target block 206.

[0059] S106b: Based on the image information of the third image, determine the highlight ratio of each target block and the distance coefficient of each target block relative to the center point of the third image.

[0060] The highlight ratio is used to indicate the proportion of pixels in the target block whose pixel value is greater than the target pixel value to the total number of pixels in the target block.

[0061] In practical applications, the target pixel value can be 220, 225, 230, 235, etc. Those skilled in the art can also set the specific value of the target pixel value according to the actual situation, without making specific restrictions here.

[0062] Furthermore, the distance coefficient of each target block relative to the center point of the third image is used to indicate the degree of dispersion of the target block relative to the center point of the third image. The larger the distance coefficient, the greater the distance between the corresponding target block and the center point of the third image; the smaller the distance coefficient, the smaller the distance between the corresponding target block and the center point of the third image.

[0063] Specifically, in the image processing process provided by the embodiment of this application, after determining multiple target blocks in the third image, the highlight ratio of each target block and the distance coefficient of each target block relative to the center point of the third image are determined according to the image information of the third image. Specifically, the highlight ratio and distance coefficient of each target block are determined according to the pixel information, bit depth information, and size information of the third image, so that the pixels in the corresponding target block can be mapped according to the determined highlight ratio and distance coefficient.

[0064] S106c: Based on the image information of the first and third images, the highlight ratio and distance coefficient of each target block, determine the target mapping curve corresponding to each pixel in the third image.

[0065] The target mapping curve corresponding to each pixel is used to perform mapping processing on that pixel, so as to limit the actual pixel value of that pixel to the maximum pixel value that each pixel in the first image can carry, thereby restoring the bit depth of the third image to the bit depth before bit increment processing, that is, restoring it to the bit depth of the first image.

[0066] Specifically, after determining the highlight ratio and distance coefficient of each target block, the target mapping curve used for mapping each pixel in the third image is determined by combining the image information of the first and third images, the highlight ratio and distance coefficient of each target block, so that the corresponding pixels in the third image can be mapped subsequently using the determined target mapping curve.

[0067] S106d: Map each pixel in the third image according to the target mapping curve to obtain the target image.

[0068] Specifically, after determining the target mapping curve corresponding to each pixel in the third image, the correspondence between each pixel and its corresponding target mapping curve can be stored in the image processing device. Based on this, when mapping each pixel in the third image, the target mapping curve corresponding to each pixel is looked up in a table, and then the corresponding pixel is mapped using the found target mapping curve until all pixels in the third image have been processed, resulting in the target image.

[0069] In this diagram, the horizontal axis of the target mapping curve represents the input value, i.e., the original actual pixel value of each pixel; the vertical axis represents the output value, i.e., the pixel value to which each pixel will be adjusted. When mapping corresponding pixels using the target mapping curve, the actual pixel value of each pixel is obtained, and the coordinate point with the horizontal axis of that actual pixel value is found in the corresponding target mapping curve. The vertical axis of this coordinate point is then used as the mapped pixel value of the corresponding pixel.

[0070] In the embodiments provided in this application, after obtaining the third image, the third image is divided into N image blocks, and Q target blocks are determined based on the N image blocks, wherein each target block includes M adjacent image blocks. Based on this, the highlight ratio of each target block and the distance coefficient of each target block relative to the center point of the third image are determined according to the image information of the third image. Further, based on the image information of the first and third images, the highlight ratio and distance coefficient of each target block, a target mapping curve corresponding to each pixel in the third image is determined, and each pixel in the third image is mapped according to the target mapping curve to obtain the target image. In this way, on the one hand, the comprehensiveness and smoothness of the mapping processing of each pixel in the third image are ensured, thereby ensuring that the obtained target image has better image quality; on the other hand, the bit depth of the third image is restored to the bit depth of the first image through mapping processing, without increasing the storage space occupied by the target image.

[0071] In this embodiment of the application, S106b may specifically include the following S106b1 and S106b2:

[0072] S106b1: Determine the highlight ratio of each target block based on the pixel information of each target block in the third image and the bit depth information of the third image.

[0073] The highlight ratio is used to indicate the proportion of pixels in the target block whose pixel value is greater than the target pixel value to the total number of pixels in the target block.

[0074] Furthermore, the pixel information of each target block includes the pixel value of each pixel in each target block and the total number of pixels in each target block.

[0075] Furthermore, the bit depth information of the aforementioned third image may specifically include the bit width of the third image, which is related to the bit depth of the third image. For example, when the bit depth of the third image is 8 bits, the bit width of the third image is 256, and when the bit depth of the third image is 10 bits, the bit width of the third image is 1024.

[0076] In practical applications, the target pixel value can be determined using the following formula (1):

[0077] HighlightPer=MaxValue×HighlightP, (1)

[0078] Wherein, HighlightPer represents the target pixel value, MaxValue represents the bit width of the third image, and HighlightP is a scaling factor, which can be a value such as 0.7, 0.8, or 0.85. Those skilled in the art can set it according to the actual situation, and no specific restrictions are imposed here.

[0079] Based on this, the specific highlight ratio of each target block can be calculated using the following formula:

[0080]

[0081] Where β represents the highlight ratio of each target block, m represents the total number of pixels in each target block, and n represents the number of pixels in each target block whose pixel value is greater than the target pixel value mentioned above.

[0082] S106b2: Determine the distance coefficient of each target block relative to the center point of the third image based on the pixel coordinates of the center point of each target block and the pixel size of the third image.

[0083] The distance coefficient of each target block relative to the center point of the third image is used to indicate the degree of dispersion of the target block relative to the center point of the third image.

[0084] Furthermore, the pixel coordinates of the center point of each target block are used to indicate the pixel position of the center point of each target block in the third image.

[0085] Furthermore, the pixel dimensions of the third image may specifically include the pixel height and the pixel width of the third image.

[0086] In practical applications, the distance coefficient for each target block can be determined using the following formula (2):

[0087]

[0088] Where α represents the distance coefficient of each target block, x represents the x-coordinate of the pixel coordinate of the center point of each target block, y represents the y-coordinate of the pixel coordinate of the center point of each target block, h represents the pixel height of the third image, and w represents the pixel width of the third image.

[0089] The embodiments provided in this application determine the highlight ratio of each target block based on the pixel information of each target block in the third image and the bit depth information of the third image, and determine the distance coefficient of each target block relative to the center point of the third image based on the pixel coordinates of the center point of each target block and the pixel size of the third image. In this way, when subsequent mapping processing is performed on the pixels in the corresponding target blocks based on the determined highlight ratio and distance coefficient, the mapping processing result of the third image is ensured to be related to the image information of the third image, thereby ensuring the accuracy of the mapping processing of the third image and guaranteeing the image quality of the target image.

[0090] In this embodiment of the application, S106c may specifically include the following S106c1 to S106c3:

[0091] S106c1: Determine the first mapping curve for each target block based on the pixel information of the first and third images, the bit depth information of the first image, the specular ratio and distance coefficient of each target block.

[0092] The pixel information of the first image and the third image includes the actual pixel value of each pixel in the first image and the third image. Based on the actual pixel value of each pixel in the first image and the third image, the ratio of the actual pixel value of the pixel at the same pixel position in the first image and the third image can be determined.

[0093] Furthermore, the bit depth information of the first image includes the maximum pixel value indicated by the bit depth of the first image. For example, if the bit depth of the first image is 8 bits, the maximum pixel value it indicates is 255.

[0094] Furthermore, the aforementioned first mapping curve is the basic mapping rule for mapping each pixel in the third image. The first mapping curve influences the curve direction of the subsequently determined target mapping curve to a certain extent. Subsequent mapping processing of the third image based on this basic mapping rule can ensure the accuracy and smoothness of the mapping processing of the third image.

[0095] Furthermore, some output values ​​of the first mapping curve are greater than the maximum pixel value indicated by the bit depth of the first image. Therefore, each pixel in the third image cannot be directly mapped using the first mapping curve. Instead, the third image should be mapped based on the target mapping curve after processing the first mapping curve to obtain the target mapping curve.

[0096] S106c2: Determine the second mapping curve for each target block based on the pixel information of the first and third images and the first mapping curve for each target block.

[0097] The pixel information of the first image and the third image includes the actual pixel value of each pixel in the first image and the third image. Based on the actual pixel value of each pixel in the first image and the third image, the ratio of the actual pixel value of the pixel at the same pixel position in the first image and the third image can be determined.

[0098] Specifically, after determining the first mapping curve for each target block, the horizontal coordinate value of the first mapping curve is kept unchanged. Based on the pixel information of the first and third images, the vertical coordinate value of the first mapping curve is proportionally compressed to obtain the second mapping curve for each target block. In this way, the curve path of the second mapping curve is similar to that of the corresponding first mapping curve, meaning the mapping rule indicated by the second mapping curve is similar to the basic mapping rule described above. This ensures the accuracy and smoothness of the processing of the third image when subsequently processed based on the second mapping curve of each target block.

[0099] Furthermore, by proportionally compressing the ordinate value of the first mapping curve, the output value of the obtained second mapping curve is limited to the maximum pixel value indicated by the bit depth of the first image, so that after processing the third image based on the second mapping curve, the bit depth of the third image can be restored to the bit depth of the first image.

[0100] S106c3: Based on the pixel information of the third image and the second mapping curve, determine the target mapping curve corresponding to each pixel in the third image.

[0101] Specifically, the pixel information of the third image may include the pixel position of each pixel in the third image, and may also include the pixel position range of the boundary of each target block in the third image.

[0102] Specifically, after obtaining the second mapping curve for each target block, the target mapping curve used for mapping each pixel in the third image is determined by combining the pixel information of the third image with the second mapping curve of each target block.

[0103] Specifically, when the distance between a pixel and the boundary of its target block is large, the second mapping curve of the target block containing that pixel is directly used as the target mapping curve corresponding to that pixel. Conversely, when the distance between a pixel and the boundary of its target block is small, a bilinear interpolation algorithm is used to fuse the second target curves of the four target blocks adjacent to that pixel to obtain the target mapping curve corresponding to that pixel. The four target blocks adjacent to the pixel include the target block containing that pixel, and there is no overlap between the four target blocks.

[0104] The embodiments provided in this application, when determining the target mapping curve corresponding to each pixel in the third image, specifically determine the first mapping curve of each target block based on the pixel information of the first and third images, the bit depth information of the first image, the specular ratio and distance coefficient of each target block. Then, based on the pixel information of the first and third images and the first mapping curve of each target block, determine the second mapping curve of each target block. Finally, based on the pixel information and the second mapping curve of the third image, determine the target mapping curve corresponding to each pixel in the third image. In this way, the target mapping curve corresponding to each pixel in the third image is closely related to the image information of the third image. This ensures the accuracy and smoothness of the processing of the third image when subsequent mapping processing of the corresponding pixels is performed based on the determined target mapping curve.

[0105] In this embodiment of the application, S106c1 may specifically include the following S106c11 to S106c14:

[0106] S106c11: Determine the target pixel points in each target block based on the pixel information of each target block in the third image.

[0107] Specifically, the target pixels in each target block can be the pixels with larger actual pixel values ​​in each target block.

[0108] In practical applications, the target pixels in each target block can be set to pixels whose pixel values ​​are greater than or equal to the target value. The target value can be 220, 225, 230, 235, etc., and those skilled in the art can set it according to the actual situation; no specific restrictions are imposed here.

[0109] S106c12: Determine the corresponding mapped pixel value based on the specular ratio, distance coefficient, and pixel value of each target block.

[0110] Specifically, in practical applications, the mapped pixel value corresponding to the target pixel can be determined using the following formula (3):

[0111]

[0112] Among them, KPMin and KPMax are settable thresholds, where KPMin < KPMax, and the amplitude of mapping processing on the third image is restricted by KPMin and KPMax; KPorigin represents the pixel value of the target pixel point; α is the distance coefficient of each target block. According to the principle of the above gain processing, the closer the pixel point in the target block is to the center point of the third image, the smaller the adjustment amount required for the pixel point, that is, the smaller α; K and B are configurable parameters used to flexibly adjust the degree of mapping processing on the third image; HighlightPer is the highlight ratio of each target block, which represents the proportion of pixel points with pseudo-overflow of pixel values in the target block, that is, the proportion of pixel points with pixel values greater than the maximum pixel value that the first image can carry in the target block. The larger the pseudo-overflow ratio, the lower KPy’, and the greater the degree of compression required to obtain the second mapping curve by compressing the first mapping curve subsequently.

[0113] S106c13: Using the pixel value of the target pixel point as the abscissa and the mapped pixel value as the ordinate, obtain the target coordinate points corresponding to each target block.

[0114] Specifically, after determining the mapped pixel value corresponding to the target pixel point, using the pixel value of the target pixel point as the abscissa and the mapped pixel value as the ordinate, obtain a specific coordinate value, that is, obtain the target coordinate points corresponding to each target block, so as to subsequently determine the first mapping curve of the corresponding target block according to the determined target coordinate points.

[0115] In addition, in the actual application process, multiple target pixel points can be selected in a target block, and then based on the multiple target pixel points, multiple target coordinate points in each target block are determined, and the first mapping curve of the corresponding target block is determined according to the multiple target coordinate points. In this way, when subsequently processing the third image based on the first mapping curve determined by the multiple target coordinate points, the accuracy, flexibility, and smoothness of processing the third image can be further ensured.

[0116] S106c14: Determine the first mapping curve of each target block according to the target coordinate points and the first coordinate points.

[0117] Among them, the coordinate value of the first coordinate point is related to the pixel information of the first image and the third image and the bit depth information of the first image.

[0118] Specifically, based on the actual pixel values ​​of each pixel in the first and third images, the ratio of the actual pixel values ​​of each pixel in the first and third images is determined, thereby obtaining the maximum ratio of the actual pixel values ​​of each pixel in the first and third images, which is also the maximum gain value used when performing gain processing on the second image. Further, the maximum pixel value indicated by the bit depth of the first image is determined based on the bit depth information of the first image.

[0119] Based on this, the product of the maximum gain value and the maximum pixel value is calculated, and this product is used as the horizontal and vertical coordinate values ​​respectively to obtain the first coordinate point.

[0120] Furthermore, the aforementioned first mapping curve is a straight line segment or a broken line segment. After determining the aforementioned first coordinate point and the target coordinate point corresponding to each target block, the zero point (0, 0), the target coordinate point, and the first coordinate point are connected to obtain the first mapping curve for each target block.

[0121] For example, such as Figure 3 As shown, the first coordinate point is K, the first target coordinate point corresponding to the first target block is P1, the first target coordinate point corresponding to the first target block is P2, the first target coordinate point corresponding to the first target block is P3, and the first target coordinate point corresponding to the first target block is P4. Based on this, connecting the zero point O, the first target coordinate point P1, and the first coordinate point K yields the first mapping curve of the first target block; connecting the zero point O, the second target coordinate point P2, and the first coordinate point K yields the first mapping curve of the second target block; connecting the zero point O, the third target coordinate point P3, and the first coordinate point K yields the first mapping curve of the third target block; connecting the zero point O, the fourth target coordinate point P4, and the first coordinate point K yields the first mapping curve of the fourth target block.

[0122] In the embodiments provided in this application, when determining the first mapping curve for each target block, the target pixels in each target block are determined based on the pixel information of each target block in the third image. Then, the corresponding mapped pixel value is determined based on the specular ratio, distance coefficient, and pixel value of each target block. On this basis, the target coordinate point corresponding to each target block is obtained by using the pixel value of the target pixel as the abscissa and the mapped pixel value as the ordinate. The first mapping curve for each target block is then determined based on the target coordinate point and the first coordinate point. The coordinate value of the first coordinate point is related to the pixel information of the first and third images, and the bit depth information of the first image. In this way, determining the first mapping curve for each target block in the third image based on the image information of the third image ensures that the determined first mapping curve is closely related to the image information of the third image. This guarantees the accuracy and smoothness of the processing of the third image when subsequently processed based on the first mapping curve of each target block.

[0123] In this embodiment of the application, S106c2 may specifically include the following S106c21 and S106c22:

[0124] S106c21: Determine the target ratio based on the pixel information of the first and third images.

[0125] The pixel information of the first and third images includes the actual pixel values ​​of each pixel in the first and third images.

[0126] Specifically, based on the actual pixel values ​​of each pixel in the first image and the third image, the ratio of the actual pixel values ​​of each pixel in the first image and the third image is determined, thereby obtaining the maximum ratio of the actual pixel values ​​of each pixel in the first image and the third image, which is also the maximum gain value used when performing gain processing on the second image, and this maximum gain value is determined as the target ratio.

[0127] S106c22: Based on the target ratio, proportionally reduce the ordinate values ​​of each coordinate point in the first mapping curve to obtain the second mapping curve for each target block.

[0128] Specifically, after determining the first mapping curve and the aforementioned target ratio for each target block, for the first mapping curve of each target block, the horizontal coordinate value of the first mapping curve is kept unchanged, and the vertical coordinate value of the first mapping curve is compressed proportionally according to the aforementioned target ratio to obtain the second mapping curve for each target block.

[0129] For example, if the bit depth of the first image is 8 bits, and the maximum ratio of the actual pixel values ​​of each pixel in the first and third images is 'a', then... Figure 4As shown, the first mapping curve for a target block is L1. Based on this, keeping the abscissa values ​​of each coordinate point in curve L1 unchanged, the ordinate values ​​of each coordinate point in curve L1 are reduced by a factor of 'a', thus obtaining curve L2. Curve L2 is the second mapping curve for the target block. The maximum output value of the second mapping curve is 255.

[0130] In the embodiments provided in this application, when determining the second mapping curve for each target block, a target ratio is determined based on the pixel information of the first and third images. Then, the ordinate values ​​of each coordinate point in the first mapping curve are proportionally reduced according to the target ratio to obtain the second mapping curve for each target block. In this way, on the one hand, the curve path of the second mapping curve is similar to that of the corresponding first mapping curve, meaning the mapping rule indicated by the second mapping curve is similar to the basic mapping rule described above. This ensures the accuracy and smoothness of the processing of the third image when it is subsequently processed based on the second mapping curve of each target block. On the other hand, by proportionally compressing the ordinate values ​​of the first mapping curve, the output values ​​of the obtained second mapping curve are all limited to the maximum pixel value indicated by the bit depth of the first image. This allows the bit depth of the third image to be restored to the bit depth of the first image after processing the third image based on the second mapping curve.

[0131] In this embodiment of the application, S106c3 may specifically include the following S106c31 to S106c33:

[0132] S106c31: Based on the pixel information of the third image, determine the target distance between each pixel in the third image and the boundary of the corresponding target block.

[0133] Specifically, the pixel information of the third image may include the pixel position of each pixel in the third image, and may also include the pixel position range of the boundary of each target block in the third image.

[0134] Based on this, the target distance between each pixel in the third image and the boundary of the target block it belongs to is determined according to the pixel position of each pixel in the third image and the pixel position range of the boundary of each target block in the third image.

[0135] S106c32: When the target distance corresponding to a pixel is greater than or equal to a distance threshold, the second mapping curve of the target block where the pixel is located is determined as the target mapping curve corresponding to the pixel.

[0136] Specifically, when the target distance between a pixel and the boundary of the target block it belongs to is large, that is, when the target distance is greater than or equal to the distance threshold, the second mapping curve of the target block where the pixel belongs is directly used as the target mapping curve corresponding to the pixel, and then the pixel is mapped through the target mapping curve.

[0137] The specific value of the aforementioned distance threshold can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here.

[0138] S106c33: When the target distance is less than the distance threshold, determine the target mapping curve corresponding to the pixel based on the second mapping curves of the K target blocks adjacent to the pixel and the distances between the pixel and the center points of the K target blocks.

[0139] Where K is an integer greater than 1.

[0140] Furthermore, the K target blocks adjacent to a pixel include the target block containing the pixel, and there is no overlap between the K target blocks.

[0141] Specifically, when the target distance between a pixel and the boundary of the target block it belongs to is small, that is, when the target distance is less than the aforementioned distance threshold, the second target curves of the K target blocks adjacent to the pixel are fused using a bilinear interpolation algorithm to obtain the target mapping curve corresponding to the pixel.

[0142] Specifically, when the target distance is less than the aforementioned distance threshold, K neighboring target blocks are determined based on the pixel position of the pixel and the pixel position range of the boundary of each target block in the third image. Based on this, the distances between the pixel and the center points of the K target blocks are calculated respectively. Then, based on the second mapping curves of the K neighboring target blocks and the distances between the pixel and the center points of the K target blocks, the target mapping curve corresponding to the pixel is determined.

[0143] In practical applications, the target mapping curve obtained by fusion can be determined using the following formula (4):

[0144]

[0145] Where L represents the target mapping curve obtained by fusing the second target curves of the K neighboring target blocks of a pixel, d1 represents the distance from the pixel to the center point of its first neighboring target block, d2 represents the distance from the pixel to the center point of its second neighboring target block, and d... KL1 represents the distance from a pixel to the center point of its Kth neighboring target block, L2 represents the second mapping curve of the first neighboring target block of the pixel, and L3 represents the second mapping curve of the second neighboring target block of the pixel. K The second mapping curve represents the Kth target block adjacent to the pixel.

[0146] For example, such as Figure 5 As shown, pixel P in the third image is located within target block C2, and the target distance between pixel P and the boundary of target block C2 is less than the aforementioned distance threshold. Therefore, based on the pixel information of the third image, four target blocks adjacent to pixel P are identified: target block C2, target block C3, target block C4, and target block C5. The distance from pixel P to the center point of target block C2 is d. C2 The distance from pixel P to the center point of target block C3 is d. C3 The distance from pixel P to the center point of target block C4 is d. C4 The distance from pixel P to the center point of target block C5 is d. C5 Furthermore, the second mapping curve for target block C2 is L. C2 The second mapping curve of target block C3 is L C3 The second mapping curve of target block C4 is L C4 The second mapping curve of target block C5 is L C5 Based on this, the target mapping curve L corresponding to pixel P can be obtained using the following formula. P To confirm:

[0147]

[0148] In the embodiments provided in this application, when determining the target mapping curve corresponding to each pixel in the third image, specifically, the target distance between each pixel in the third image and the boundary of the corresponding target block is determined based on the pixel information of the third image. Based on this, if the target distance corresponding to the pixel is greater than or equal to a distance threshold, the second mapping curve of the target block where the pixel is located is determined as the target mapping curve corresponding to the pixel; otherwise, if the target distance is less than the distance threshold, the target mapping curve corresponding to the pixel is determined based on the second mapping curves of the K target blocks adjacent to the pixel and the distances between the pixel and the center points of the K target blocks. Here, K is an integer greater than 1. In this way, by combining the distances from each pixel to the boundaries of each target block, the target mapping curve corresponding to each pixel is determined. When the distance between a pixel and the boundary of a certain target block is relatively close, a bilinear interpolation algorithm is used to fuse the second target curves of the K target blocks adjacent to that pixel to obtain the target mapping curve corresponding to that pixel. This avoids abrupt changes when mapping each pixel in the third image using the target mapping curve, thus ensuring the accuracy and smoothness of the mapping process for the third image and guaranteeing the image quality of the obtained target image.

[0149] In this embodiment of the application, S106d may specifically include the following S106d1 to S106d3:

[0150] S106d1: Obtain the pixel value of each pixel in the third image and the target mapping curve corresponding to each pixel.

[0151] Specifically, after determining the target mapping curve corresponding to each pixel in the third image, the correspondence between each pixel in the third image and its corresponding target mapping curve can be stored in the image processing device. Based on this, when performing mapping processing on each pixel in the third image, the pixel value of each pixel in the third image is obtained, and the target mapping curve corresponding to each pixel is found by looking up a table.

[0152] S106d2: Determine the second coordinate point in the target mapping curve corresponding to each pixel based on the pixel value.

[0153] The x-coordinate of the second coordinate point is the pixel value of the pixel to be processed.

[0154] Specifically, for each pixel in the third image, after obtaining the pixel value of that pixel, the coordinate point whose horizontal coordinate value is equal to the pixel value of that pixel is found from the target mapping curve corresponding to that pixel, which is the aforementioned second coordinate point.

[0155] S106d3: Adjust the pixel value of each pixel to the ordinate value of the corresponding second coordinate point to obtain the target image.

[0156] Specifically, for each pixel in the third image, after determining the second coordinate point corresponding to that pixel, the pixel value of that pixel is adjusted to the ordinate value of the corresponding second coordinate point.

[0157] In other words, in the image processing method provided in this application embodiment, when mapping each pixel in the third image, the target mapping curve corresponding to each pixel is found by looking up a table. Based on this, the horizontal coordinate of the target mapping curve is used as the input value, that is, the original actual pixel value of each pixel, and the vertical coordinate of the target mapping curve is used as the output value, that is, the pixel value to be adjusted for each pixel. The mapping process is performed on the corresponding pixels until each pixel in the third image has been processed to obtain the target image.

[0158] The embodiments provided in this application, when obtaining a target image by mapping each pixel in a third image according to a target mapping curve, specifically involve acquiring the pixel value of each pixel in the third image and the target mapping curve corresponding to each pixel. Then, based on the pixel value of each pixel, a second coordinate point in the target mapping curve corresponding to the pixel is determined. The horizontal coordinate of the second coordinate point is the pixel value of the pixel, and the pixel value of each pixel is adjusted to the vertical coordinate value of the corresponding second coordinate point to obtain the target image. In this way, while eliminating the image's shadow phenomenon and avoiding the loss of image information, it also ensures that the image's bit depth remains unchanged, i.e., without increasing the storage space occupied by the image.

[0159] The image processing method provided in the first aspect of this application can be executed by an image processing apparatus. This application uses an image processing apparatus executing the above-described image processing method as an example to illustrate the image processing apparatus provided in the second aspect of this application.

[0160] like Figure 6 As shown, this application embodiment provides an image processing apparatus 600, which may include the processing unit 602 described below.

[0161] The processing unit 602 is used to adjust the bit depth of the first image to obtain a second image, wherein the bit depth of the second image is greater than the bit depth of the first image;

[0162] The processing unit 602 is also used to perform gain processing on the second image to obtain a third image;

[0163] The processing unit 602 is further configured to perform mapping processing on each pixel in the third image based on the image information of the first image and the third image to obtain a target image, wherein the bit depth of the target image is the same as the bit depth of the first image.

[0164] In the image processing apparatus 600 provided in this application embodiment, during the process of processing a first image to obtain a target image, the first image is first subjected to bit-increment processing to obtain a second image with a larger bit depth. Then, the bit-incremented image is subjected to gain processing to obtain a third image. Based on this, each pixel in the third image is mapped according to the image information of the first and third images to compress the third image, thereby obtaining a target image with the same bit depth as the first image. In other words, through the above image processing method, when processing an image, bit-increment processing is performed on the image to be processed, followed by gain processing, and then special mapping processing is used to restore the bit depth of the image. This eliminates the image's shadow phenomenon through gain processing, avoids pixel value overflow during image gain processing, and ensures that the final bit depth of the image does not change. This avoids image information loss, thus ensuring imaging quality without increasing the storage space occupied by the image.

[0165] In this embodiment of the application, the processing unit 602 is specifically used to: multiply the pixel value of each pixel in the second image by its corresponding target magnification to obtain the third image; wherein, the target magnification corresponding to each pixel is negatively correlated with the pixel value of the pixel.

[0166] The embodiments provided in this application perform gain processing on the second image by multiplying the pixel value of each pixel in the second image by its corresponding target magnification, thereby obtaining the third image. The target magnification corresponding to each pixel is negatively correlated with the pixel value. This eliminates shadows in the second image while avoiding pixel value overflow, thus preventing image information loss and ensuring the image quality and integrity of the obtained third image.

[0167] In this embodiment, the processing unit 602 is specifically configured to: divide the third image into N image blocks, and determine Q target blocks based on the N image blocks, wherein each target block includes M adjacent image blocks, the target block is square, N, M, and Q are all positive integers, M is less than N, and Q is less than N; determine the highlight ratio of each target block and the distance coefficient of each target block relative to the center point of the third image based on the image information of the third image, wherein the highlight ratio is used to indicate the proportion of the number of pixels in the target block whose pixel value is greater than the target pixel value to the total number of pixels in the target block; determine the target mapping curve corresponding to each pixel in the third image based on the image information of the first image and the third image, the highlight ratio of each target block, and the distance coefficient; and perform mapping processing on each pixel in the third image according to the target mapping curve to obtain the target image.

[0168] In the embodiments provided in this application, after obtaining the third image, the third image is divided into N image blocks, and Q target blocks are determined based on the N image blocks, wherein each target block includes M adjacent image blocks. Based on this, the highlight ratio of each target block and the distance coefficient of each target block relative to the center point of the third image are determined according to the image information of the third image. Further, based on the image information of the first and third images, the highlight ratio and distance coefficient of each target block, a target mapping curve corresponding to each pixel in the third image is determined, and each pixel in the third image is mapped according to the target mapping curve to obtain the target image. In this way, on the one hand, the comprehensiveness and smoothness of the mapping processing of each pixel in the third image are ensured, thereby ensuring that the obtained target image has better image quality; on the other hand, the bit depth of the third image is restored to the bit depth of the first image through mapping processing, without increasing the storage space occupied by the target image.

[0169] In this embodiment of the application, the processing unit 602 is specifically used to: determine the highlight ratio of each target block according to the pixel information of each target block in the third image and the bit depth information of the third image; and determine the distance coefficient of each target block relative to the center point of the third image according to the pixel coordinates of the center point of each target block and the pixel size of the third image.

[0170] The embodiments provided in this application determine the highlight ratio of each target block based on the pixel information of each target block in the third image and the bit depth information of the third image, and determine the distance coefficient of each target block relative to the center point of the third image based on the pixel coordinates of the center point of each target block and the pixel size of the third image. In this way, when subsequent mapping processing is performed on the pixels in the corresponding target blocks based on the determined highlight ratio and distance coefficient, the mapping processing result of the third image is ensured to be related to the image information of the third image, thereby ensuring the accuracy of the mapping processing of the third image and guaranteeing the image quality of the target image.

[0171] In this embodiment of the application, the processing unit 602 is specifically used to: determine a first mapping curve for each target block based on the pixel information of the first image and the third image, the bit depth information of the first image, the specular ratio and distance coefficient of each target block; determine a second mapping curve for each target block based on the pixel information of the first image and the third image, and the first mapping curve of each target block; and determine the target mapping curve corresponding to each pixel in the third image based on the pixel information of the third image and the second mapping curve.

[0172] The embodiments provided in this application, when determining the target mapping curve corresponding to each pixel in the third image, specifically determine the first mapping curve of each target block based on the pixel information of the first and third images, the bit depth information of the first image, the specular ratio and distance coefficient of each target block. Then, based on the pixel information of the first and third images and the first mapping curve of each target block, determine the second mapping curve of each target block. Finally, based on the pixel information and the second mapping curve of the third image, determine the target mapping curve corresponding to each pixel in the third image. In this way, the target mapping curve corresponding to each pixel in the third image is closely related to the image information of the third image. This ensures the accuracy and smoothness of the processing of the third image when subsequent mapping processing of the corresponding pixels is performed based on the determined target mapping curve.

[0173] In this embodiment of the application, the processing unit 602 is specifically used to: determine the target pixel in each target block according to the pixel information of each target block in the third image; determine the corresponding mapped pixel value according to the highlight ratio, distance coefficient and pixel value of each target block; obtain the target coordinate point corresponding to each target block by using the pixel value of the target pixel as the abscissa and the mapped pixel value as the ordinate; determine the first mapping curve of each target block according to the target coordinate point and the first coordinate point; wherein, the coordinate value of the first coordinate point is related to the pixel information of the first image and the third image and the bit depth information of the first image.

[0174] In the embodiments provided in this application, when determining the first mapping curve for each target block, the target pixels in each target block are determined based on the pixel information of each target block in the third image. Then, the corresponding mapped pixel value is determined based on the specular ratio, distance coefficient, and pixel value of each target block. On this basis, the target coordinate point corresponding to each target block is obtained by using the pixel value of the target pixel as the abscissa and the mapped pixel value as the ordinate. The first mapping curve for each target block is then determined based on the target coordinate point and the first coordinate point. The coordinate value of the first coordinate point is related to the pixel information of the first and third images, and the bit depth information of the first image. In this way, determining the first mapping curve for each target block in the third image based on the image information of the third image ensures that the determined first mapping curve is closely related to the image information of the third image. This guarantees the accuracy and smoothness of the processing of the third image when subsequently processed based on the first mapping curve of each target block.

[0175] In this embodiment of the application, the processing unit 602 is specifically used to: determine the target ratio based on the pixel information of the first image and the third image; and proportionally reduce the ordinate value of each coordinate point in the first mapping curve according to the target ratio to obtain the second mapping curve of each target block.

[0176] In the embodiments provided in this application, when determining the second mapping curve for each target block, a target ratio is determined based on the pixel information of the first and third images. Then, the ordinate values ​​of each coordinate point in the first mapping curve are proportionally reduced according to the target ratio to obtain the second mapping curve for each target block. In this way, on the one hand, the curve path of the second mapping curve is similar to that of the corresponding first mapping curve, meaning the mapping rule indicated by the second mapping curve is similar to the basic mapping rule described above. This ensures the accuracy and smoothness of the processing of the third image when it is subsequently processed based on the second mapping curve of each target block. On the other hand, by proportionally compressing the ordinate values ​​of the first mapping curve, the output values ​​of the obtained second mapping curve are all limited to the maximum pixel value indicated by the bit depth of the first image. This allows the bit depth of the third image to be restored to the bit depth of the first image after processing the third image based on the second mapping curve.

[0177] In this embodiment of the application, the processing unit 602 is specifically used to: determine the target distance between each pixel in the third image and the boundary of the corresponding target block based on the pixel information of the third image; if the target distance corresponding to the pixel is greater than or equal to a distance threshold, determine the second mapping curve of the target block where the pixel is located as the target mapping curve corresponding to the pixel; if the target distance is less than the distance threshold, determine the target mapping curve corresponding to the pixel based on the second mapping curves of the K target blocks adjacent to the pixel and the distance between the pixel and the center point of the K target blocks respectively; wherein, K is an integer greater than 1.

[0178] In the embodiments provided in this application, when determining the target mapping curve corresponding to each pixel in the third image, specifically, the target distance between each pixel in the third image and the boundary of the corresponding target block is determined based on the pixel information of the third image. Based on this, if the target distance corresponding to the pixel is greater than or equal to a distance threshold, the second mapping curve of the target block where the pixel is located is determined as the target mapping curve corresponding to the pixel; otherwise, if the target distance is less than the distance threshold, the target mapping curve corresponding to the pixel is determined based on the second mapping curves of the K target blocks adjacent to the pixel and the distances between the pixel and the center points of the K target blocks. Here, K is an integer greater than 1. In this way, by combining the distances from each pixel to the boundaries of each target block, the target mapping curve corresponding to each pixel is determined. When the distance between a pixel and the boundary of a certain target block is relatively close, a bilinear interpolation algorithm is used to fuse the second target curves of the K target blocks adjacent to that pixel to obtain the target mapping curve corresponding to that pixel. This avoids abrupt changes when mapping each pixel in the third image using the target mapping curve, thus ensuring the accuracy and smoothness of the mapping process for the third image and guaranteeing the image quality of the obtained target image.

[0179] In this embodiment of the application, the processing unit 602 is specifically used to: obtain the pixel value of each pixel in the third image and the target mapping curve corresponding to each pixel; determine the second coordinate point in the target mapping curve corresponding to the pixel based on the pixel value of each pixel, wherein the horizontal coordinate value of the second coordinate point is the pixel value of the pixel; and adjust the pixel value of each pixel to the vertical coordinate value of the corresponding second coordinate point to obtain the target image.

[0180] The embodiments provided in this application, when obtaining a target image by mapping each pixel in a third image according to a target mapping curve, specifically involve acquiring the pixel value of each pixel in the third image and the target mapping curve corresponding to each pixel. Then, based on the pixel value of each pixel, a second coordinate point in the target mapping curve corresponding to the pixel is determined. The horizontal coordinate of the second coordinate point is the pixel value of the pixel, and the pixel value of each pixel is adjusted to the vertical coordinate value of the corresponding second coordinate point to obtain the target image. In this way, while eliminating the image's shadow phenomenon and avoiding the loss of image information, it also ensures that the image's bit depth remains unchanged, i.e., without increasing the storage space occupied by the image.

[0181] The image processing device 600 in this embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This embodiment does not specifically limit the specific type of device.

[0182] The image processing device 600 in this embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this embodiment does not specifically limit its use.

[0183] The image processing apparatus 600 provided in the second aspect embodiment of this application is capable of realizing Figure 1 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0184] Optionally, such as Figure 7As shown, this application embodiment also provides an electronic device 700, including a processor 702 and a memory 704. The memory 704 stores a program or instructions that can be executed by the processor 702. When the program or instructions are executed by the processor 702, they implement the various steps of the image processing method embodiment of the first aspect described above and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0185] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.

[0186] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0187] The electronic device 800 includes, but is not limited to, components such as: radio frequency unit 801, network module 802, audio output unit 803, input unit 804, sensor 805, display unit 806, user input unit 807, interface unit 808, memory 809, and processor 810.

[0188] Those skilled in the art will understand that the electronic device 800 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 810 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 8 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0189] The electronic device 800 of this application embodiment can be used to implement the various steps of the above-described first aspect image processing method embodiment.

[0190] The processor 810 is used to adjust the bit depth of the first image to obtain a second image, wherein the bit depth of the second image is greater than the bit depth of the first image.

[0191] The processor 810 is also used to perform gain processing on the second image to obtain a third image.

[0192] The processor 810 is also configured to perform mapping processing on each pixel in the third image based on the image information of the first image and the third image to obtain a target image, wherein the bit depth of the target image is the same as the bit depth of the first image.

[0193] In this embodiment, during the processing of the first image to obtain the target image, the first image is first bit-incremented to obtain a second image with a larger bit depth. Then, the bit-incremented image is subjected to gain processing to obtain a third image. Based on this, each pixel in the third image is mapped according to the image information of the first and third images to compress the third image, thereby obtaining a target image with the same bit depth as the first image. In other words, through the above image processing method, the image to be processed is bit-incremented and then gain-processed, and then the bit depth of the image is restored through special mapping processing. This eliminates the image's shadow phenomenon through gain processing, avoids pixel value overflow during image gain processing, and ensures that the final bit depth of the image does not change. This avoids image information loss, thus ensuring imaging quality without increasing the storage space occupied by the image.

[0194] Optionally, the processor 810 is specifically used to: multiply the pixel value of each pixel in the second image by its corresponding target magnification to obtain the third image; wherein the target magnification corresponding to each pixel is negatively correlated with the pixel value of the pixel.

[0195] The embodiments provided in this application perform gain processing on the second image by multiplying the pixel value of each pixel in the second image by its corresponding target magnification, thereby obtaining the third image. The target magnification corresponding to each pixel is negatively correlated with the pixel value. This eliminates shadows in the second image while avoiding pixel value overflow, thus preventing image information loss and ensuring the image quality and integrity of the obtained third image.

[0196] Optionally, the processor 810 is specifically configured to: divide the third image into N image blocks, and determine Q target blocks based on the N image blocks, wherein each target block includes M adjacent image blocks, the target block is square, N, M, and Q are all positive integers, M is less than N, and Q is less than N; determine the highlight ratio of each target block and the distance coefficient of each target block relative to the center point of the third image based on the image information of the third image, wherein the highlight ratio is used to indicate the proportion of pixels in the target block whose pixel value is greater than the target pixel value to the total number of pixels in the target block; determine the target mapping curve corresponding to each pixel in the third image based on the image information of the first image and the third image, the highlight ratio of each target block, and the distance coefficient; and perform mapping processing on each pixel in the third image according to the target mapping curve to obtain the target image.

[0197] In the embodiments provided in this application, after obtaining the third image, the third image is divided into N image blocks, and Q target blocks are determined based on the N image blocks, wherein each target block includes M adjacent image blocks. Based on this, the highlight ratio of each target block and the distance coefficient of each target block relative to the center point of the third image are determined according to the image information of the third image. Further, based on the image information of the first and third images, the highlight ratio and distance coefficient of each target block, a target mapping curve corresponding to each pixel in the third image is determined, and each pixel in the third image is mapped according to the target mapping curve to obtain the target image. In this way, on the one hand, the comprehensiveness and smoothness of the mapping processing of each pixel in the third image are ensured, thereby ensuring that the obtained target image has better image quality; on the other hand, the bit depth of the third image is restored to the bit depth of the first image through mapping processing, without increasing the storage space occupied by the target image.

[0198] Optionally, the processor 810 is specifically configured to: determine the highlight ratio of each target block based on the pixel information of each target block in the third image and the bit depth information of the third image; and determine the distance coefficient of each target block relative to the center point of the third image based on the pixel coordinates of the center point of each target block and the pixel size of the third image.

[0199] The embodiments provided in this application determine the highlight ratio of each target block based on the pixel information of each target block in the third image and the bit depth information of the third image, and determine the distance coefficient of each target block relative to the center point of the third image based on the pixel coordinates of the center point of each target block and the pixel size of the third image. In this way, when subsequent mapping processing is performed on the pixels in the corresponding target blocks based on the determined highlight ratio and distance coefficient, the mapping processing result of the third image is ensured to be related to the image information of the third image, thereby ensuring the accuracy of the mapping processing of the third image and guaranteeing the image quality of the target image.

[0200] Optionally, the processor 810 is specifically configured to: determine a first mapping curve for each target block based on the pixel information of the first image and the third image, the bit depth information of the first image, the specular ratio and distance coefficient of each target block; determine a second mapping curve for each target block based on the pixel information of the first image and the third image, and the first mapping curve of each target block; and determine the target mapping curve corresponding to each pixel in the third image based on the pixel information of the third image and the second mapping curve.

[0201] The embodiments provided in this application, when determining the target mapping curve corresponding to each pixel in the third image, specifically determine the first mapping curve of each target block based on the pixel information of the first and third images, the bit depth information of the first image, the specular ratio and distance coefficient of each target block. Then, based on the pixel information of the first and third images and the first mapping curve of each target block, determine the second mapping curve of each target block. Finally, based on the pixel information and the second mapping curve of the third image, determine the target mapping curve corresponding to each pixel in the third image. In this way, the target mapping curve corresponding to each pixel in the third image is closely related to the image information of the third image. This ensures the accuracy and smoothness of the processing of the third image when subsequent mapping processing of the corresponding pixels is performed based on the determined target mapping curve.

[0202] Optionally, the processor 810 is specifically configured to: determine the target pixel in each target block based on the pixel information of each target block in the third image; determine the corresponding mapped pixel value based on the highlight ratio, distance coefficient, and pixel value of the target pixel in each target block; obtain the target coordinate point corresponding to each target block by using the pixel value of the target pixel as the abscissa and the mapped pixel value as the ordinate; and determine the first mapping curve of each target block based on the target coordinate point and the first coordinate point; wherein the coordinate value of the first coordinate point is related to the pixel information of the first image and the third image, and the bit depth information of the first image.

[0203] In the embodiments provided in this application, when determining the first mapping curve for each target block, the target pixels in each target block are determined based on the pixel information of each target block in the third image. Then, the corresponding mapped pixel value is determined based on the specular ratio, distance coefficient, and pixel value of each target block. On this basis, the target coordinate point corresponding to each target block is obtained by using the pixel value of the target pixel as the abscissa and the mapped pixel value as the ordinate. The first mapping curve for each target block is then determined based on the target coordinate point and the first coordinate point. The coordinate value of the first coordinate point is related to the pixel information of the first and third images, and the bit depth information of the first image. In this way, determining the first mapping curve for each target block in the third image based on the image information of the third image ensures that the determined first mapping curve is closely related to the image information of the third image. This guarantees the accuracy and smoothness of the processing of the third image when subsequently processed based on the first mapping curve of each target block.

[0204] Optionally, the processor 810 is specifically used to: determine the target ratio based on the pixel information of the first image and the third image; and proportionally reduce the ordinate value of each coordinate point in the first mapping curve based on the target ratio to obtain the second mapping curve for each target block.

[0205] In the embodiments provided in this application, when determining the second mapping curve for each target block, a target ratio is determined based on the pixel information of the first and third images. Then, the ordinate values ​​of each coordinate point in the first mapping curve are proportionally reduced according to the target ratio to obtain the second mapping curve for each target block. In this way, on the one hand, the curve path of the second mapping curve is similar to that of the corresponding first mapping curve, meaning the mapping rule indicated by the second mapping curve is similar to the basic mapping rule described above. This ensures the accuracy and smoothness of the processing of the third image when it is subsequently processed based on the second mapping curve of each target block. On the other hand, by proportionally compressing the ordinate values ​​of the first mapping curve, the output values ​​of the obtained second mapping curve are all limited to the maximum pixel value indicated by the bit depth of the first image. This allows the bit depth of the third image to be restored to the bit depth of the first image after processing the third image based on the second mapping curve.

[0206] Optionally, the processor 810 is specifically configured to: determine the target distance between each pixel in the third image and the boundary of the corresponding target block based on the pixel information of the third image; if the target distance corresponding to the pixel is greater than or equal to a distance threshold, determine the second mapping curve of the target block where the pixel is located as the target mapping curve corresponding to the pixel; if the target distance is less than the distance threshold, determine the target mapping curve corresponding to the pixel based on the second mapping curves of the K target blocks adjacent to the pixel and the distances between the pixel and the center points of the K target blocks respectively; wherein, K is an integer greater than 1.

[0207] In the embodiments provided in this application, when determining the target mapping curve corresponding to each pixel in the third image, specifically, the target distance between each pixel in the third image and the boundary of the corresponding target block is determined based on the pixel information of the third image. Based on this, if the target distance corresponding to the pixel is greater than or equal to a distance threshold, the second mapping curve of the target block where the pixel is located is determined as the target mapping curve corresponding to the pixel; otherwise, if the target distance is less than the distance threshold, the target mapping curve corresponding to the pixel is determined based on the second mapping curves of the K target blocks adjacent to the pixel and the distances between the pixel and the center points of the K target blocks. Here, K is an integer greater than 1. In this way, by combining the distances from each pixel to the boundaries of each target block, the target mapping curve corresponding to each pixel is determined. When the distance between a pixel and the boundary of a certain target block is relatively close, a bilinear interpolation algorithm is used to fuse the second target curves of the K target blocks adjacent to that pixel to obtain the target mapping curve corresponding to that pixel. This avoids abrupt changes when mapping each pixel in the third image using the target mapping curve, thus ensuring the accuracy and smoothness of the mapping process for the third image and guaranteeing the image quality of the obtained target image.

[0208] Optionally, the processor 810 is specifically used to: obtain the pixel value of each pixel in the third image and the target mapping curve corresponding to each pixel; determine the second coordinate point in the target mapping curve corresponding to the pixel based on the pixel value of each pixel, wherein the horizontal coordinate value of the second coordinate point is the pixel value of the pixel; and adjust the pixel value of each pixel to the vertical coordinate value of the corresponding second coordinate point to obtain the target image.

[0209] The embodiments provided in this application, when obtaining a target image by mapping each pixel in a third image according to a target mapping curve, specifically involve acquiring the pixel value of each pixel in the third image and the target mapping curve corresponding to each pixel. Then, based on the pixel value of each pixel, a second coordinate point in the target mapping curve corresponding to the pixel is determined. The horizontal coordinate of the second coordinate point is the pixel value of the pixel, and the pixel value of each pixel is adjusted to the vertical coordinate value of the corresponding second coordinate point to obtain the target image. In this way, while eliminating the image's shadow phenomenon and avoiding the loss of image information, it also ensures that the image's bit depth remains unchanged, i.e., without increasing the storage space occupied by the image.

[0210] It should be understood that, in this embodiment, the input unit 804 may include a graphics processing unit (GPU) 8041 and a microphone 8042. The GPU 8041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 806 may include a display panel 8061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 807 includes at least one of a touch panel 8071 and other input devices 8072. The touch panel 8071 is also called a touch screen. The touch panel 8071 may include a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0211] The memory 809 can be used to store software programs and various data. The memory 809 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 809 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 809 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0212] Processor 810 may include one or more processing units; optionally, processor 810 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 810.

[0213] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the first aspect of the image processing method embodiment described above and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0214] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0215] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described first aspect image processing method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0216] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0217] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the image processing method embodiment of the first aspect described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0218] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0219] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0220] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An image processing method, characterized in that, include: Adjust the bit depth of the first image to obtain the second image, wherein the bit depth of the second image is greater than that of the first image; Gain processing is performed on the second image to obtain the third image; Based on the image information of the first image and the third image, each pixel in the third image is mapped to obtain a target image, wherein the bit depth of the target image is the same as the bit depth of the first image. The step of mapping each pixel in the third image based on the image information of the first image and the third image to obtain the target image includes: The third image is divided into N image blocks, and Q target blocks are determined based on the N image blocks. Each target block includes M adjacent image blocks. The target block is square. N, M and Q are all positive integers, M is less than N and Q is less than N. Based on the image information of the third image, the highlight ratio of each target block and the distance coefficient of each target block relative to the center point of the third image are determined, wherein the highlight ratio is used to indicate the proportion of pixels in the target block whose pixel value is greater than the target pixel value to the total number of pixels in the target block; Based on the image information of the first image and the third image, the highlight ratio and distance coefficient of each target block, the target mapping curve corresponding to each pixel in the third image is determined; The target image is obtained by mapping each pixel in the third image according to the target mapping curve.

2. The image processing method according to claim 1, characterized in that, The step of performing gain processing on the second image to obtain the third image includes: Multiply the pixel value of each pixel in the second image by its corresponding target magnification to obtain the third image; The target magnification corresponding to each pixel is negatively correlated with the pixel value of that pixel.

3. The image processing method according to claim 1 or 2, characterized in that, The step of determining the target mapping curve corresponding to each pixel in the third image based on the image information of the first image and the third image, the specular ratio and distance coefficient of each target block, includes: Based on the pixel information of the first image and the third image, the bit depth information of the first image, the specular ratio and distance coefficient of each target block, a first mapping curve for each target block is determined; Based on the pixel information of the first image and the third image, and the first mapping curve of each target block, a second mapping curve of each target block is determined; Based on the pixel information of the third image and the second mapping curve, the target mapping curve corresponding to each pixel in the third image is determined.

4. The image processing method according to claim 3, characterized in that, The step of determining the first mapping curve for each target block based on the pixel information of the first image and the third image, the bit depth information of the first image, the specular ratio and distance coefficient of each target block, includes: The target pixels in each target block are determined based on the pixel information of each target block in the third image; The corresponding mapped pixel value is determined based on the specular ratio, distance coefficient, and pixel value of each target pixel. Using the pixel value of the target pixel as the x-coordinate and the mapped pixel value as the y-coordinate, the target coordinate point corresponding to each target block is obtained; Based on the target coordinate point and the first coordinate point, determine the first mapping curve for each target block; The coordinates of the first coordinate point are related to the pixel information of the first image and the third image, and the bit depth information of the first image.

5. An image processing apparatus, characterized in that, include: The processing unit is used to adjust the bit depth of the first image to obtain a second image, wherein the bit depth of the second image is greater than the bit depth of the first image; The processing unit is further configured to perform gain processing on the second image to obtain a third image; The processing unit is further configured to perform mapping processing on each pixel in the third image based on the image information of the first image and the third image to obtain a target image, wherein the bit depth of the target image is the same as the bit depth of the first image. The processing unit is specifically used for: The third image is divided into N image blocks, and Q target blocks are determined based on the N image blocks. Each target block includes M adjacent image blocks. The target block is square. N, M and Q are all positive integers, M is less than N and Q is less than N. Based on the image information of the third image, the highlight ratio of each target block and the distance coefficient of each target block relative to the center point of the third image are determined, wherein the highlight ratio is used to indicate the proportion of pixels in the target block whose pixel value is greater than the target pixel value to the total number of pixels in the target block; Based on the image information of the first image and the third image, the highlight ratio and distance coefficient of each target block, the target mapping curve corresponding to each pixel in the third image is determined; The target image is obtained by mapping each pixel in the third image according to the target mapping curve.

6. The image processing apparatus according to claim 5, characterized in that, The processing unit is specifically used for: Multiply the pixel value of each pixel in the second image by its corresponding target magnification to obtain the third image; The target magnification corresponding to each pixel is negatively correlated with the pixel value of that pixel.

7. The image processing apparatus according to claim 5 or 6, characterized in that, The processing unit is specifically used for: Based on the pixel information of the first image and the third image, the bit depth information of the first image, the specular ratio and distance coefficient of each target block, a first mapping curve for each target block is determined; Based on the pixel information of the first image and the third image, and the first mapping curve of each target block, a second mapping curve of each target block is determined; Based on the pixel information of the third image and the second mapping curve, the target mapping curve corresponding to each pixel in the third image is determined.

8. The image processing apparatus according to claim 7, characterized in that, The processing unit is specifically used for: The target pixels in each target block are determined based on the pixel information of each target block in the third image; The corresponding mapped pixel value is determined based on the specular ratio, distance coefficient, and pixel value of each target pixel. Using the pixel value of the target pixel as the x-coordinate and the mapped pixel value as the y-coordinate, the target coordinate point corresponding to each target block is obtained; Based on the target coordinate point and the first coordinate point, determine the first mapping curve for each target block; The coordinates of the first coordinate point are related to the pixel information of the first image and the third image, and the bit depth information of the first image.

Citation Information

Patent Citations

  • Image collection method, image collection device and electronic equipment

    CN113438400A