Image processing method and device, electronic equipment, storage medium and chip

Through the application of histogram statistics and mapping functions of image blocks, the limitations of the overall brightness processing of dark scenes in the prior art are solved, the local contrast enhancement of the image is achieved, and the visual experience is improved.

CN119963468APending Publication Date: 2025-05-09BEIJING X RING TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510128872.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-27
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

The prior art can only process the overall brightness when adjusting dark scenes in images, which has limitations and cannot meet the high contrast requirements.

Method used

By performing histogram statistics on the Y channel components of each image block, the first mapping function of each image block is obtained, and the image block where the target pixel is located and its adjacent image blocks are determined. Pixel mapping is performed based on these mapping functions, and the target pixel value is determined in combination with the mapping function of the previous frame.

Benefits of technology

The local contrast enhancement processing of the image is realized, giving users a better visual experience, and overcoming the limitations of contrast adjustment in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963468A_ABST
    Figure CN119963468A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method and device, electronic equipment, a storage medium and a chip, and the method comprises the steps: carrying out the histogram statistics of a Y channel component of each image block, obtaining a first mapping function corresponding to each image block, determining a target image block where a target pixel is located, and obtaining a second mapping function corresponding to each image block, according to the target image block and an adjacent image block of the target image block, pixel mapping is carried out based on mapping functions corresponding to the target image block and the adjacent image block, a first pixel value is determined, a target pixel value is obtained according to the first pixel value and a second pixel value, and the second pixel value is a pixel value determined based on a second mapping function of a previous frame. According to the embodiment of the invention, the brightness of each image block is subjected to segmented control, so that local contrast enhancement processing of the image is realized, and better visual experience is provided for a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular to an image processing method and device, electronic equipment, storage medium and chip. Background Art

[0002] With the development of technology, people have higher and higher requirements for the quality of pictures and videos they watch, and the display capabilities of monitors are getting better and better. For example, monitors can display higher and higher brightness. Therefore, the requirements for image contrast are also getting higher and higher.

[0003] The contrast of the image needs to be adjusted according to the capabilities of the display. When adjusting the dark scenes in the image, only the overall brightness of the dark scene content can be processed, which has certain limitations. Summary of the invention

[0004] The present disclosure provides an image processing method and device, an electronic device, a storage medium and a chip to solve the problems in the related art.

[0005] A first aspect of the present disclosure provides an image processing method, the method comprising:

[0006] Performing histogram statistics on the channel components of each image block to obtain a first mapping function corresponding to each image block, wherein the image block is obtained by dividing the image to be processed;

[0007] Determine a target image block where a target pixel is located, and adjacent image blocks of the target image block;

[0008] Perform pixel mapping based on the mapping functions corresponding to the target image block and the adjacent image blocks to determine a first pixel value;

[0009] A target pixel value is obtained according to the first pixel value and the second pixel value, wherein the second pixel value is a pixel value determined by a second mapping function based on a previous frame.

[0010] In the embodiment of the present disclosure, the channel component includes a Y channel component.

[0011] In some embodiments of the present disclosure, determining the target image block where the target pixel is located and the adjacent image blocks of the target image block includes:

[0012] Determine the position information of the target pixel in the target image block;

[0013] The adjacent image blocks of the target image block are determined according to the mapping relationship between the preset position information and the adjacent image blocks.

[0014] In some embodiments of the present disclosure, before determining the target image block where the target pixel is located and the adjacent image blocks of the target image block, the method further includes:

[0015] It is determined whether the target image block has at least one adjacent image block.

[0016] In some embodiments of the present disclosure, performing pixel mapping based on mapping functions corresponding to the target image block and the adjacent image blocks to determine the first pixel value includes:

[0017] If it is determined that the target image block has at least one adjacent image block, respectively determine the third pixel value based on the first mapping function corresponding to the at least one adjacent image block;

[0018] Determine a fourth pixel value based on a first mapping function corresponding to the target image block;

[0019] A first pixel value is determined according to the third pixel value and the fourth pixel value.

[0020] In some embodiments of the present disclosure, the method further includes:

[0021] If it is determined that the target image block does not have the adjacent image block, determining the first pixel value based on a first mapping function corresponding to the target image block;

[0022] The first pixel value is determined as the target pixel value.

[0023] In some embodiments of the present disclosure, performing histogram statistics on the Y channel component of each image block to obtain the first mapping function corresponding to each image block includes:

[0024] Determining a contrast intensity factor for each image block, the contrast intensity factor being related to the number of pixels in the pixel value interval;

[0025] Reshaping the corresponding histograms according to the comparison intensity factors to obtain a reshaped histogram;

[0026] The corresponding first mapping function is obtained according to the reshaped histogram.

[0027] In some embodiments of the present disclosure, reshaping the corresponding histograms according to the contrast intensity factors to obtain the reshaped histograms includes:

[0028] If the number of pixels of the target pixel is greater than the comparison intensity factor, calculating the difference between the number of pixels of the target pixel and the comparison intensity factor;

[0029] Calculating an average adjustment amount of each histogram according to the difference value and a maximum pixel value in the target image block;

[0030] All histograms in each image block are reshaped according to the average adjustment amount to obtain a reshaped histogram.

[0031] In some embodiments of the present disclosure, obtaining the corresponding first mapping function according to the reshaped histogram includes:

[0032] Accumulating the reshaped histograms to obtain a histogram accumulation function;

[0033] The histogram accumulation function is normalized to obtain the first mapping function.

[0034] In some embodiments of the present disclosure, obtaining a target pixel value according to the first pixel value and the second pixel value includes:

[0035] The first pixel value and the second pixel value are fused according to a preset first fusion coefficient and a preset second fusion coefficient to obtain the target pixel value.

[0036] A second aspect of the present disclosure provides an image processing device, the device comprising:

[0037] A statistical unit, used for performing histogram statistics on the Y channel component of each image block to obtain a first mapping function corresponding to each image block, wherein the image block is obtained by dividing the image to be processed;

[0038] A first determining unit, used to determine a target image block where a target pixel is located, and adjacent image blocks of the target image block;

[0039] A second determining unit, configured to perform pixel mapping based on the mapping functions corresponding to the target image block and the adjacent image blocks, to determine a first pixel value;

[0040] The third determination unit is configured to obtain a target pixel value according to the first pixel value and the second pixel value, wherein the second pixel value is a pixel value determined by a second mapping function based on a previous frame.

[0041] In some embodiments of the present disclosure, the second determining unit is further configured to:

[0042] Determine the position information of the target pixel in the target image block;

[0043] The adjacent image blocks of the target image block are determined according to the mapping relationship between the preset position information and the adjacent image blocks.

[0044] In some embodiments of the present disclosure, the device further comprises:

[0045] The fourth determining unit is configured to determine whether the target image block has at least one adjacent image block before the first determining unit determines the target image block where the target pixel is located and the adjacent image blocks of the target image block.

[0046] In some embodiments of the present disclosure, the second determining unit is further configured to:

[0047] If it is determined that the target image block has at least one adjacent image block, respectively determine the third pixel value based on the first mapping function corresponding to the at least one adjacent image block;

[0048] Determine a fourth pixel value based on a first mapping function corresponding to the target image block;

[0049] A first pixel value is determined according to the third pixel value and the fourth pixel value.

[0050] In some embodiments of the present disclosure, the device further comprises:

[0051] a fifth determining unit, configured to determine the first pixel value based on a first mapping function corresponding to the target image block if it is determined that the target image block does not have the adjacent image block;

[0052] The third determining unit is further configured to determine the first pixel value as the target pixel value.

[0053] In some embodiments of the present disclosure, the statistical unit includes:

[0054] A first determination module, configured to determine a contrast intensity factor of each image block, wherein the contrast intensity factor is related to the number of pixels in the pixel value interval;

[0055] A reshaping module, used for reshaping the corresponding histograms according to the contrast intensity factor to obtain a reshaped histogram;

[0056] The second determination module is used to obtain the corresponding first mapping function according to the reshaped histogram.

[0057] In some embodiments of the present disclosure, the remodeling module is further used to:

[0058] If the number of pixels of the target pixel is greater than the comparison intensity factor, calculating the difference between the number of pixels of the target pixel and the comparison intensity factor;

[0059] Calculating an average adjustment amount of each histogram according to the difference value and a maximum pixel value in the target image block;

[0060] All histograms in each image block are reshaped according to the average adjustment amount to obtain a reshaped histogram.

[0061] In some embodiments of the present disclosure, the second determining module is further configured to:

[0062] Accumulating the reshaped histograms to obtain a histogram accumulation function;

[0063] The histogram accumulation function is normalized to obtain the first mapping function.

[0064] In some embodiments of the present disclosure, the third determining unit is further configured to:

[0065] The first pixel value and the second pixel value are fused according to a preset first fusion coefficient and a preset second fusion coefficient to obtain the target pixel value.

[0066] The third aspect embodiment of the present disclosure proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect embodiment of the present disclosure.

[0067] The fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the first aspect embodiment of the present disclosure.

[0068] The fifth aspect embodiment of the present disclosure proposes a chip, which includes one or more interfaces and one or more processors; the interface is used to receive signals from a memory of an electronic device and send signals to the processor, the signals include computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes the method described in the first aspect embodiment of the present disclosure.

[0069] In summary, according to the image processing method proposed in the present disclosure, the method includes performing histogram statistics on the Y channel component of each image block to obtain the first mapping function corresponding to each image block, wherein the image block is obtained by dividing the image to be processed, determining the target image block where the target pixel is located, and the adjacent image blocks of the target image block, performing pixel mapping based on the mapping functions corresponding to the target image block and the adjacent image blocks, determining the first pixel value, and obtaining the target pixel value according to the first pixel value and the second pixel value, wherein the second pixel value is a pixel value determined by the second mapping function based on the previous frame. This embodiment performs segmented control on the brightness of each image block to achieve local contrast enhancement processing of the image to give users a better visual experience.

[0070] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0072] Figure 1 A flowchart of an image processing method provided by an embodiment of the present disclosure;

[0073] Figure 2 A flowchart of an image processing method provided by an embodiment of the present disclosure;

[0074] Figure 3 A flowchart of an image processing method provided by an embodiment of the present disclosure;

[0075] Figure 4 A flowchart of an image processing method provided by an embodiment of the present disclosure;

[0076] Figure 5 A flowchart of an image processing method provided by an embodiment of the present disclosure;

[0077] Figure 6 A flowchart of an image processing method provided by an embodiment of the present disclosure;

[0078] Figure 7 A flowchart of an image processing method provided by an embodiment of the present disclosure;

[0079] Figure 8 A schematic diagram of the principle of an image processing method provided by an embodiment of the present disclosure;

[0080] Fig. 9 A schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure;

[0081] Fig.10 A schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure;

[0082] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;

[0083] Fig.12 A schematic diagram of the structure of a chip provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0084] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0085] With the development of technology, people have higher and higher requirements for the quality of pictures and videos they watch, and the display capabilities of monitors are getting better and better. For example, monitors can display higher and higher brightness. Therefore, the requirements for image contrast are also getting higher and higher.

[0086] The contrast of the image needs to be adjusted according to the capabilities of the display. When adjusting the dark scenes in the image, only the overall brightness of the dark scene content can be processed, which has certain limitations.

[0087] Therefore, in order to solve the problems existing in the related art, the present disclosure proposes an image processing method, performing histogram statistics on the Y channel component of each image block to obtain a first mapping function corresponding to each image block, wherein the image block is obtained by dividing the image to be processed, determining the target image block where the target pixel is located, and the adjacent image blocks of the target image block, performing pixel mapping based on the mapping functions corresponding to the target image block and the adjacent image blocks, determining a first pixel value, and obtaining a target pixel value according to the first pixel value and the second pixel value, wherein the second pixel value is a pixel value determined based on the second mapping function of the previous frame.

[0088] This solution achieves local contrast enhancement of the image by segmentally controlling the brightness of each image block, giving users a better visual experience.

[0089] The embodiments of the present disclosure are not exhaustive, but are only illustrative of some embodiments, and are not intended to be a specific limitation on the scope of protection of the present disclosure. In the absence of contradiction, each step in a certain embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a certain embodiment can also be implemented as an independent embodiment, and the order of the steps in a certain embodiment can be arbitrarily exchanged. In addition, the optional implementation methods in a certain embodiment can be arbitrarily combined; in addition, the embodiments can be arbitrarily combined, for example, some or all of the steps of different embodiments can be arbitrarily combined, and a certain embodiment can be arbitrarily combined with the optional implementation methods of other embodiments.

[0090] In each embodiment of the present disclosure, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between the embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form a new embodiment based on their internal logical relationships.

[0091] The terms used in the embodiments of the present disclosure are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure.

[0092] In the embodiments of the present disclosure, unless otherwise specified, elements expressed in the singular form, such as "a", "an", "the", "above", "said", "aforementioned", "this", etc., may mean "one and only one", or "one or more", "at least one", etc. For example, when using articles such as "a", "an", "the" in English in translation, the noun after the article may be understood as a singular expression or a plural expression.

[0093] In some embodiments, terms such as "in response to ...", "in response to determining ...", "in the case of ...", "at the time of ...", "when ...", "if ...", "if ...", etc. can be used interchangeably.

[0094] In some embodiments, terms such as "greater than", "greater than or equal to", "not less than", "more than", "more than or equal to", "not less than", "higher than", "higher than or equal to", "not lower than", and "above" can be replaced with each other, and terms such as "less than", "less than or equal to", "not greater than", "less than", "less than or equal to", "no more than", "lower than", "lower than or equal to", "not higher than", and "below" can be replaced with each other.

[0095] The prefixes such as "first" and "second" in the embodiments of the present disclosure are only for distinguishing different description objects and do not constitute any restrictions on the position, order, priority, quantity or content of the description objects. For the statement of the description objects, please refer to the description in the context of the claims or embodiments, and no unnecessary restrictions should be constituted due to the use of prefixes.

[0096] In the embodiments of the present disclosure, “plurality” refers to two or more.

[0097] In the embodiments of the present disclosure, terms such as "import", "input", and "read in" can be used interchangeably.

[0098] In some embodiments, devices, etc. can be interpreted as physical or virtual, and their names are not limited to the names recorded in the embodiments. Terms such as "device", "equipment", "device", "circuit", "network element", "node", "function", "unit", "section", "system", "network", "chip", "chip system", "entity", and "subject" can be used interchangeably.

[0099] In some embodiments, the terms "terminal", "terminal device", "user equipment (UE)", "user terminal" "mobile station (MS)", "mobile terminal (MT)", subscriber station, mobile unit, subscriber unit, wireless unit, remote unit, mobile device (mobile device), wireless device (wireless device), wireless communication device (wireless communication device), remote device (remote device), mobile subscriber station (mobile subscriber station), access terminal (access terminal), mobile terminal (mobile terminal), wireless terminal (wireless terminal), remote terminal (remote terminal), handset (handset), user agent (user agent), mobile client (mobile client), client (client) and the like can be used interchangeably.

[0100] Figure 1 This is a flowchart of an image processing method provided by an embodiment of the present disclosure. The method can be used in display fields / image rendering scenarios, for example, by a terminal with integrated image processing function or an image processor in the terminal, or by a server in a video transcoding scenario. Furthermore, it can also be applied to the ISP (Image Signal Processing) end to perform a photo-taking process, which is not limited by the present disclosure. Figure 1 As shown, the image processing method includes steps 101-104.

[0101] Step 101, performing histogram statistics on the Y channel component of each image block to obtain a first mapping function corresponding to each image block, wherein the image block is obtained by dividing the image to be processed.

[0102] Before displaying the video to be processed / the image to be processed, the input video to be processed is decoded by a decoder to obtain the image to be processed. The image to be processed described in the embodiment of the present disclosure is a YUV image.

[0103] In another implementation process of the embodiment of the present disclosure, if the input is an RGB image, a preset conversion algorithm (such as an RGB2YUV conversion matrix) is used to convert it into a YUV image.

[0104] Divide the image I to be processed into blocks and obtain S h ×S w Image block I s Specifically, the number of image blocks can be determined according to the processing resource situation or business requirements, and is not limited in the specific embodiments of the present disclosure.

[0105] For the image blocks obtained by block division, the Y channel component of each image block is histogram counted. s , the total number of pixels is N = W × H. Let n i Represents the number of pixels with pixel value i in the image to be processed, then Where M is the possible maximum value of the pixel in the image I to be processed.

[0106] The histogram is represented as

[0107] The first mapping function is calculated to achieve local brightness processing of the image to be processed through the first mapping function. In the embodiment of the present disclosure, only the histogram of the Y channel component in the YUV image is counted, and Y represents brightness (Luminance or Luma) to achieve local brightness adjustment of the image.

[0108] In the embodiment of the present disclosure, each image block corresponds to a unique first mapping function. For the first mapping function, reference may be made to any implementation method in the related art, and thus it will not be described in detail here.

[0109] Step 102: determine the target image block where the target pixel is located, and the adjacent image blocks of the target image block.

[0110] The target pixel described in the embodiment of the present disclosure is also the current processing pixel.

[0111] The purpose of determining the target image block and the adjacent image blocks where the target pixel is located is to introduce the adjacent image blocks so that the change of contrast between the image blocks can be smoothly transitioned (ie, inter-block smoothing) when processing the target image block.

[0112] Adjacent image blocks are image blocks adjacent to the target image block. In practical applications, a target image block may have no adjacent image blocks, or may have one adjacent image block, two adjacent image blocks, or three adjacent image blocks. Specifically, it needs to be determined according to the actual position of the target image block in the image to be processed. The specific number of adjacent image blocks is not limited in the embodiments of the present disclosure.

[0113] Step 103: Perform pixel mapping based on the mapping functions corresponding to the target image block and the adjacent image blocks to determine a first pixel value.

[0114] A first pixel value is calculated based on the first mapping function determined in step 101 .

[0115] In one implementation, pixel mapping may be performed based on a first mapping function corresponding to the target image block to determine the first pixel value.

[0116] In another implementation, pixel mapping may be performed based on the first mapping function corresponding to the target image block and the first mapping functions corresponding to the adjacent image blocks, and the first pixel value may be determined by the results of at least two pixel mappings. When the first pixel value is determined by the results of at least two pixel mappings, the results of the at least two pixel mappings may be weighted averaged to determine the first pixel value.

[0117] Step 104: Obtain a target pixel value according to the first pixel value and the second pixel value, wherein the second pixel value is a pixel value determined by a second mapping function based on a previous frame.

[0118] The target pixel value is the final pixel value of the image to be processed (the nth frame image). When determining the target pixel value, a second pixel value is introduced. The second pixel value is the pixel value of the previous frame of the image to be processed (i.e., the n-1th frame image) to achieve a smooth transition between images (time domain smoothing).

[0119] In one implementation of the embodiment of the present disclosure, the first pixel value and the second pixel value are fused to determine the target pixel value.

[0120] In summary, according to the image processing method proposed in the present disclosure, the method includes performing histogram statistics on the Y channel component of each image block to obtain the first mapping function corresponding to each image block, wherein the image block is obtained by dividing the image to be processed, determining the target image block where the target pixel is located, and the adjacent image blocks of the target image block, performing pixel mapping based on the mapping functions corresponding to the target image block and the adjacent image blocks, determining the first pixel value, and obtaining the target pixel value according to the first pixel value and the second pixel value, wherein the second pixel value is a pixel value determined by the second mapping function based on the previous frame. This embodiment performs segmented control on the brightness of each image block to achieve local contrast enhancement processing of the image to give users a better visual experience.

[0121] Figure 2 The following further shows a flowchart of an image processing method proposed in the present disclosure. Figure 1 The embodiment shown further explains step 102. Figure 2 The following steps may be included:

[0122] Step 201: Determine the position information of the target pixel in the target image block.

[0123] The embodiment of the present disclosure determines the position information of the target image block, and its purpose is to determine the adjacent image blocks based on the position information to achieve smoothing between blocks, so that the image can have a smooth transition and make the image more realistic.

[0124] In some embodiments, the position information may be the regional position information of the target pixel in the target image block, see Figure 3 , Figure 3 A schematic diagram of an image block provided by an embodiment of the present disclosure is shown. When determining the position information of a target pixel, the center position of the target image block may be determined first, and the target image block may be divided into four regions (upper left region, upper right region, lower left region, and lower right region) with the center position as the origin. The position information of the target pixel is determined based on the four divided regions, as shown in FIG. Figure 3 , the target pixel is located in the upper left area of ​​image block 8.

[0125] In practical applications, when determining the position information of the target pixel in the target image block, the coordinate information of the center position of the target image block can be determined first, and the regional position information of the target image block where the target pixel is located can be determined by judging the coordinate information. The specific implementation method is not limited in the embodiments of the present disclosure.

[0126] It should be noted that Figure 3The exemplary description is only given to facilitate the understanding of the target pixel, the target image block and the adjacent image blocks, but does not limit the number of image blocks into which the image to be processed is divided, and the position of the target pixel is limited.

[0127] Step 202: Determine the adjacent image blocks of the target image block according to the mapping relationship between the preset position information and the adjacent image blocks.

[0128] In the embodiment of the present disclosure, the mapping relationship between the preset position information and the adjacent image blocks includes but is not limited to the following:

[0129] 1) If the target pixel is located in the upper left area of ​​the target image block, the left image block, the upper image block, and the upper left image block of the target image block are selected as adjacent image blocks.

[0130] 2) If the target pixel is located in the upper right area of ​​the target image block, the right image block, the upper image block, and the upper right image block of the target image block are selected as adjacent image blocks.

[0131] 3) If the target pixel is located in the lower left area of ​​the target image block, the left image block, the lower image block, and the lower left image block of the target image block are selected as adjacent image blocks.

[0132] 4) If the target pixel is located in the lower right area of ​​the target image block, the right image block, the lower image block, and the lower right image block of the target image block are selected as adjacent image blocks.

[0133] Please continue to participate Figure 3 , the target pixel is located in the upper left area of ​​the target image block (image block 8), which is applicable to 1) in the mapping relationship between the preset position information and the adjacent image blocks, that is, Figure 3 Number 1 (image block 5), number 2 (image block 4) and number 3 (image block 7) are adjacent image blocks of the target image block (image block 8).

[0134] Figure 3 The example in this description is that the target image block has three adjacent image blocks. However, in actual applications, there may be scenarios where the target image block has no adjacent image blocks, such as edge image blocks of the image to be processed. Figure 3 , if the target pixel is located at the area position information of number 4 (image block 1), then the target image block (image block 1) has no adjacent image blocks. There may also be a scenario where the target image block has one adjacent image block or two adjacent image blocks, which will not be described one by one here.

[0135] Figure 4 The flowchart of an image processing method proposed in the present disclosure is further shown. The method comprises the following steps:

[0136] Step 401 , performing histogram statistics on the Y channel component of each image block to obtain a first mapping function corresponding to each image block.

[0137] For step 401, please refer to the detailed description of step 101, and the embodiment of the present disclosure will not be described in detail here.

[0138] Step 402: Determine whether the target image block has at least one adjacent image block.

[0139] If it is determined that the target image block has at least one adjacent image block, step 403 is executed; if it is determined that the target image block does not have the adjacent image block, step 407 is executed.

[0140] When determining whether there are adjacent image blocks, the method described in step 201 may be used but is not limited thereto, and will not be described in detail herein.

[0141] Step 403: Determine third pixel values ​​based on the first mapping function corresponding to at least one adjacent image block.

[0142] It can be seen from the above embodiments that each image block corresponds to a first mapping function, and the first mapping functions corresponding to different image blocks may be the same or different, which is not specifically limited.

[0143] After the adjacent image blocks are determined, the corresponding third pixel values ​​are obtained according to the first mapping functions corresponding to the adjacent image blocks. If there is one adjacent image block, one third pixel value is determined; if there are two adjacent image blocks, two third pixel values ​​are determined; if there are three adjacent image blocks, three third pixel values ​​are determined.

[0144] When determining the third pixel value, the following formula may be used for calculation:

[0145]

[0146] Wherein, LTMCurve(p) is the first mapping function, l is the number of adjacent image blocks, and in the disclosed embodiment, l=0, 1, 2, 3.

[0147] Step 404: determine a fourth pixel value based on the first mapping function corresponding to the target image block.

[0148] When determining the fourth pixel value, the following formula may be used for calculation:

[0149]

[0150] Among them, 0 represents the target image block.

[0151] Step 405: Determine a first pixel value according to the third pixel value and the fourth pixel value.

[0152] When determining the first pixel value, the following formula may be used for calculation:

[0153]

[0154] Among them, distance l is the normalized distance between the target pixel and the adjacent image block or the target image block.

[0155] When determining the normalized distance, the distance from the target pixel to the center line of the target image block or the adjacent image block is calculated. The center line is an extension line with the origin of the image block as the endpoint in the X-axis direction and the Y-axis direction respectively. The normalized distance is the vertical distance from the target pixel to the center line.

[0156] In some embodiments, when normalizing the distance, the normalization of the target pixel to the center line of the target image block or the adjacent image block in the vertical (Y-axis) direction may be calculated first, and then the normalization in the horizontal (X-axis) direction may be calculated. Alternatively, when normalizing the distance, the normalization of the target pixel to the center line of the target image block or the adjacent image block in the horizontal (X-axis) direction may be calculated first, and then the normalization in the vertical (Y-axis) direction may be calculated. Specifically, the processing steps for normalizing the distance are not limited.

[0157] When normalizing the distance, any method in the related art may be used but is not limited to be implemented, so it will not be described in detail here.

[0158] Step 406: Obtain a target pixel value according to the first pixel value and the second pixel value.

[0159] In some embodiments, the first pixel value and the second pixel value are fused according to a preset first fusion coefficient and a preset second fusion coefficient to obtain the target pixel value.

[0160] When performing fusion processing, the following formula can be used for calculation:

[0161] p out =α×p o +(1-α)×p o_prev , α∈[0,1]

[0162] Among them, α is the fusion coefficient, and α is an empirical value parameter, which can be set according to business requirements. Specifically, the embodiments of the present disclosure do not limit it.

[0163] The target pixel value calculated based on the first pixel value and the second pixel value can avoid inter-frame jitter.

[0164] Step 407: Determine the first pixel value based on a first mapping function corresponding to the target image block.

[0165] This step is performed in a scenario where it is determined that the target image block does not have an adjacent image block, and the first mapping function corresponding to the target image block is directly used to obtain the final pixel value (target pixel value).

[0166] Step 408: determine the first pixel value as the target pixel value.

[0167] Figure 5 The following further shows a flowchart of an image processing method proposed in the present disclosure. Figure 1 The embodiment shown further explains step 101. Figure 5 The following steps may be included:

[0168] Step 501 : determining a contrast intensity factor of each image block, wherein the contrast intensity factor is related to the number of pixels in the pixel value interval.

[0169] The contrast intensity factor can be calculated by the following formula in the embodiment of the present disclosure:

[0170]

[0171] in, Related to the number of pixels in the pixel value interval, its value is [0, 1], N is the image block I s The total number of pixels.

[0172] In the disclosed embodiment, is an editable setting value, which can be set according to the contrast requirements. If the contrast is strong, Set to a larger value. If the contrast is weak, Set to a smaller value.

[0173] Specifically, the pixel value range [0, M] is divided into four segments, namely low brightness interval R1 = [0, M1], medium low brightness interval R2 = [M1+1, M2], medium high brightness interval R3 = [M2+1, M3], and high brightness interval R4 = [M3+1, M].

[0174] It should be noted that the number of the above brightness interval divisions is only an exemplary display, not a limitation on the specific number. The embodiment of the present disclosure does not limit the number of the brightness interval divisions.

[0175] Step 502: reshape the corresponding histograms according to the contrast intensity factors to obtain a reshaped histogram.

[0176] Histogram Hist for each image block s Reshape and get the adjusted histogram

[0177] When reshaping the histogram, it can be implemented in the following ways but not limited to: Figure 6 As shown, the method includes:

[0178] Step 5021: If the number of pixels of the target pixel is greater than the comparison intensity factor, the difference between the number of pixels of the target pixel and the comparison intensity factor is calculated.

[0179] The purpose of calculating the difference is to reduce the number of pixels with pixel value i.

[0180] Calculating the difference It can be calculated by the following formula:

[0181]

[0182] in, Represents the number of pixels with pixel value i in the image, is the comparison strength factor.

[0183] Step 5022: Calculate the average adjustment amount of each histogram according to the difference value and the maximum pixel value in the target image block.

[0184] The purpose of calculating the average adjustment amount is to average the number of pixels corresponding to the difference value determined in step 5021 in the histogram corresponding to other pixel values.

[0185] In calculating the average adjustment It can be calculated by the following formula:

[0186]

[0187] Step 5023: reshape all histograms in each image block according to the average adjustment amount to obtain a reshaped histogram.

[0188] When reshaping, it can be obtained by the following formula:

[0189]

[0190] Step 503: Obtain the corresponding first mapping function according to the reshaped histogram.

[0191] In the embodiment of the present disclosure, when obtaining the corresponding first mapping function according to the reshaped histogram, it can be implemented in the following manner but not limited to: Figure 7 As shown, the method includes:

[0192] Step 5031, accumulating the reshaped histogram to obtain a histogram accumulation function.

[0193] First, the adjusted histogram is accumulated to obtain the histogram accumulation function HistSum s (k):

[0194]

[0195] Step 5032: Normalize the histogram accumulation function to obtain the first mapping function.

[0196] Then, the histogram accumulation function HistSum s (k) Normalize and obtain the mapping function of the target image block where the target pixel is located, as shown in the following formula:

[0197] LTMCurve s (k) = HistSum s (k) / HistSum s (m),k=0,1,2......M

[0198] The above embodiments have described the image processing method in detail. Figure 8 Further showing a schematic diagram of an image processing method proposed in the present disclosure, Figure 8 It can be understood as a summary of the above embodiments. Figure 8 The schematic diagram shown can realize the processing of the image to be processed, avoid image over-scaling, realize local processing of the image, enhance the local contrast, and ensure the overall color vividness of the image.

[0199] Corresponding to the above-mentioned image processing method, the present invention further provides an image processing device. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be described in detail in the present invention.

[0200] Fig. 9 The following is a schematic diagram of the structure of an image processing device 900 provided in an embodiment of the present disclosure. The image processing device includes:

[0201] A statistical unit 91 is used to perform histogram statistics on the Y channel component of each image block to obtain a first mapping function corresponding to each image block, wherein the image block is obtained by dividing the image to be processed;

[0202] A first determining unit 92, configured to determine a target image block where a target pixel is located, and adjacent image blocks of the target image block;

[0203] A second determining unit 93 is configured to perform pixel mapping based on the mapping functions corresponding to the target image block and the adjacent image blocks to determine a first pixel value;

[0204] The third determination unit 94 is configured to obtain a target pixel value according to the first pixel value and the second pixel value, wherein the second pixel value is a pixel value determined by a second mapping function based on a previous frame.

[0205] In summary, according to the image processing device proposed in the present disclosure, the device includes performing histogram statistics on the Y channel component of each image block to obtain the first mapping function corresponding to each image block, wherein the image block is obtained by dividing the image to be processed, determining the target image block where the target pixel is located, and the adjacent image blocks of the target image block, performing pixel mapping based on the mapping functions corresponding to the target image block and the adjacent image blocks, determining the first pixel value, and obtaining the target pixel value according to the first pixel value and the second pixel value, wherein the second pixel value is a pixel value determined by the second mapping function based on the previous frame. This embodiment performs segmented control on the brightness of each image block to achieve local contrast enhancement processing of the image to give the user a better visual experience.

[0206] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig.10 As shown, the second determining unit 93 is further used for:

[0207] Determine the position information of the target pixel in the target image block;

[0208] The adjacent image blocks of the target image block are determined according to the mapping relationship between the preset position information and the adjacent image blocks.

[0209] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig.10 As shown, the device also includes:

[0210] The fourth determining unit 95 is configured to determine whether the target image block has at least one adjacent image before the first determining unit 92 determines the target image block where the target pixel is located and the adjacent image blocks of the target image block.

[0211] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig.10 As shown, the second determining unit 93 is further used for:

[0212] If it is determined that the target image block has at least one adjacent image, respectively determining a third pixel value based on a first mapping function corresponding to the at least one adjacent image;

[0213] Determine a fourth pixel value based on a first mapping function corresponding to the target image block;

[0214] A first pixel value is determined according to the third pixel value and the fourth pixel value.

[0215] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig.10 As shown, the device also includes:

[0216] A fifth determining unit 96 is configured to determine the first pixel value based on a first mapping function corresponding to the target image block if it is determined that the target image block does not have the adjacent image;

[0217] The third determining unit 94 is further configured to determine the first pixel value as the target pixel value.

[0218] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig.10 As shown, the statistical unit 91 includes:

[0219] A first determination module 911, configured to determine a contrast intensity factor of each image block, wherein the contrast intensity factor is related to the number of pixels in the pixel value interval;

[0220] A reshaping module 912 is used to reshape the corresponding histograms according to the contrast intensity factor to obtain a reshaped histogram;

[0221] The second determination module 913 is used to obtain the corresponding first mapping function according to the reshaped histogram.

[0222] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig.10 As shown, the reshaping module 912 is also used for:

[0223] If the pixel value of the target pixel is greater than the comparison intensity factor, calculating the difference between the pixel value of the target pixel and the comparison intensity factor;

[0224] Calculating an average adjustment amount of each histogram according to the difference value and a maximum pixel value in the target image block;

[0225] All histograms in each image block are reshaped according to the average adjustment amount to obtain a reshaped histogram.

[0226] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig.10 As shown, the determining module 913 is also used for:

[0227] Accumulating the reshaped histograms to obtain a histogram accumulation function;

[0228] The histogram accumulation function is normalized to obtain the first mapping function.

[0229] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig.10 As shown, the third determining unit 94 is further used for:

[0230] The first pixel value and the second pixel value are fused according to a preset first fusion coefficient and a preset second fusion coefficient to obtain the target pixel value.

[0231] Since the device provided in the embodiment of the present disclosure corresponds to the methods provided in the above-mentioned embodiments, the implementation of the method is also applicable to the device provided in the embodiment and will not be described in detail in this embodiment.

[0232] In the embodiments provided in the present application, the methods and devices provided in the embodiments of the present application are introduced. In order to implement the functions in the methods provided in the embodiments of the present application, the electronic device may include a hardware structure and a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. A function of the functions may be executed in the form of a hardware structure, a software module, or a hardware structure plus a software module.

[0233] Fig.11 1 is a block diagram of an electronic device 1000 for implementing the above-mentioned image processing method according to an exemplary embodiment. For example, the electronic device 1000 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0234] Reference Fig.11 , the electronic device 1000 may include one or more of the following components: a processing component 1002 , a memory 1004 , a power component 1006 , a multimedia component 1008 , an audio component 1010 , an input / output (I / O) interface 1012 , a sensor component 1014 , and a communication component 1016 .

[0235] The processing component 1002 generally controls the overall operation of the electronic device 1000, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1002 may include one or more processors 1020 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1002 may include one or more modules to facilitate the interaction between the processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate the interaction between the multimedia component 1008 and the processing component 1002.

[0236] The memory 1004 is configured to store various types of data to support operations on the electronic device 1000. Examples of such data include instructions for any application or method operating on the electronic device 1000, contact data, phone book data, messages, pictures, videos, etc. The memory 1004 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0237] The power supply component 1006 provides power to various components of the electronic device 1000. The power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 1000.

[0238] The multimedia component 1008 includes a screen that provides an output interface between the electronic device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1008 includes a front camera and / or a rear camera. When the electronic device 1000 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0239] The audio component 1010 is configured to output and / or input audio signals. For example, the audio component 1010 includes a microphone (MIC), and when the electronic device 1000 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1004 or sent via the communication component 1016. In some embodiments, the audio component 1010 also includes a speaker for outputting audio signals.

[0240] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0241] The sensor assembly 1014 includes one or more sensors for providing various aspects of status assessment for the electronic device 1000. For example, the sensor assembly 1014 can detect the open / closed state of the electronic device 1000, the relative positioning of components, such as the display and keypad of the electronic device 1000, and the sensor assembly 1014 can also detect the position change of the electronic device 1000 or a component of the electronic device 1000, the presence or absence of user contact with the electronic device 1000, the orientation or acceleration / deceleration of the electronic device 1000, and the temperature change of the electronic device 1000. The sensor assembly 1014 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1014 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0242] The communication component 1016 is configured to facilitate wired or wireless communication between the electronic device 1000 and other devices. The electronic device 1000 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (NewRadio) or a combination thereof. In an exemplary embodiment, the communication component 1016 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1016 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0243] In an exemplary embodiment, the electronic device 1000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0244] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1004 including instructions, and the instructions can be executed by the processor 1020 of the electronic device 1000 to perform the above method for image processing. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0245] The embodiments of the present disclosure further provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the above embodiments of the present disclosure.

[0246] For electronic devices that may be chips or chip systems, see Fig.12 Schematic diagram of the chip structure shown. Fig.12 The chip shown includes a processor 1101 and an interface 1102. The number of the processor 1101 may be one or more, and the number of the interface 1102 may be multiple.

[0247] Optionally, the chip further includes a memory 1103, and the memory 1103 is used to store necessary computer programs and data.

[0248] Those skilled in the art may also understand that the various illustrative logical blocks and steps listed in the embodiments of the present application may be implemented by electronic hardware, computer software, or a combination of the two. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the functions for each specific application, but such implementation should not be understood as exceeding the scope of protection of the embodiments of the present application.

[0249] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0250] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

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

[0252] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processing module, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (control method), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.

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

[0254] A person of ordinary skill in the art may understand that all or part of the steps of the method for implementing the above-mentioned embodiment may be completed by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0255] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0256] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. An image processing method, characterized in that: The method comprises: Performing histogram statistics on the channel components of each image block to obtain a first mapping function corresponding to each image block, wherein the image block is obtained by dividing the image to be processed; Determine a target image block where a target pixel is located, and adjacent image blocks of the target image block; Perform pixel mapping based on the mapping functions corresponding to the target image block and the adjacent image blocks to determine a first pixel value; A target pixel value is obtained according to the first pixel value and the second pixel value, wherein the second pixel value is a pixel value determined by a second mapping function based on a previous frame.

2. The method according to claim 1, characterized in that The determining of the target image block where the target pixel is located and the adjacent image blocks of the target image block comprises: Determine the position information of the target pixel in the target image block; The adjacent image blocks of the target image block are determined according to the mapping relationship between the preset position information and the adjacent image blocks.

3. The method according to claim 1, characterized in that Before determining the target image block where the target pixel is located and the adjacent image blocks of the target image block, the method further includes: It is determined whether the target image block has at least one adjacent image block.

4. The method according to claim 3, characterized in that The performing pixel mapping based on the mapping functions corresponding to the target image block and the adjacent image blocks to determine the first pixel value comprises: If it is determined that the target image block has at least one adjacent image block, respectively determine the third pixel value based on the first mapping function corresponding to the at least one adjacent image block; Determine a fourth pixel value based on a first mapping function corresponding to the target image block; A first pixel value is determined according to the third pixel value and the fourth pixel value.

5. The method according to claim 3, characterized in that: The method further comprises: If it is determined that the target image block does not have the adjacent image block, determining the first pixel value based on a first mapping function corresponding to the target image block; The first pixel value is determined as the target pixel value.

6. The method according to claim 1, characterized in that The channel component includes a Y channel component, and the histogram statistics of the channel component of each image block are performed to obtain the first mapping function corresponding to each image block respectively, including: Determining a contrast intensity factor for each image block, the contrast intensity factor being related to the number of pixels in the pixel value interval; Reshaping the corresponding histograms according to the contrast intensity factors to obtain a reshaped histogram; The corresponding first mapping function is obtained according to the reshaped histogram.

7. The method according to claim 6, characterized in that The step of reshaping the corresponding histograms according to the contrast intensity factors to obtain the reshaped histograms includes: If the number of pixels of the target pixel is greater than the comparison intensity factor, calculating the difference between the number of pixels of the target pixel and the comparison intensity factor; Calculating an average adjustment amount of each histogram according to the difference value and a maximum pixel value in the target image block; All histograms in each image block are reshaped according to the average adjustment amount to obtain a reshaped histogram.

8. The method according to claim 6, characterized in that The step of obtaining the first corresponding mapping function according to the reshaped histogram comprises: Accumulating the reshaped histograms to obtain a histogram accumulation function; The histogram accumulation function is normalized to obtain the first mapping function.

9. The method according to claim 1, characterized in that: Obtaining a target pixel value according to the first pixel value and the second pixel value comprises: The first pixel value and the second pixel value are fused according to a preset first fusion coefficient and a preset second fusion coefficient to obtain the target pixel value.

10. An image processing device, characterized in that: The device comprises: A statistical unit, used for performing histogram statistics on the channel components of each image block to obtain a first mapping function corresponding to each image block, wherein the image block is obtained by dividing the image to be processed; A first determining unit, used to determine a target image block where a target pixel is located, and adjacent image blocks of the target image block; A second determining unit, configured to perform pixel mapping based on the mapping functions corresponding to the target image block and the adjacent image blocks, to determine a first pixel value; The third determination unit is configured to obtain a target pixel value according to the first pixel value and the second pixel value, wherein the second pixel value is a pixel value determined by a second mapping function based on a previous frame.

11. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.

13. A chip, characterized in that: The chip comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal and send the signal to the processor, wherein the signal comprises a computer instruction; when the processor executes the computer instruction, the chip executes the method described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Video anti-shake optimization processing method and device and electronic equipment

    CN114586337A

  • Image tone mapping method and device, electronic equipment and storage medium

    CN115330633A

  • Image enhancement method and device, computer equipment and computer readable storage medium

    CN115908150A

  • Method and device for processing image in video

    CN116366987A

  • Image contrast enhancement method, system and device and storage medium

    CN117689553A