Image processing device and method, equipment and storage medium

By calculating the multi-directional grayscale gradient information of pixel points after image sharpening and performing grayscale value compensation, the problem of ringing effect after image sharpening is solved, and the image display effect is improved.

CN119850466APending Publication Date: 2025-04-18BEIJING ESWIN COMPUTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411907625.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The ringing effect is prone to occur after image sharpening processing, which causes the image grayscale value to oscillate and affects the display effect.

Method used

By calculating the grayscale gradient information in multiple directions of each pixel point, the compensation factor is calculated, and the grayscale value of the pixel point is compensated to control it within the reference grayscale range.

Benefits of technology

It effectively reduces the ringing effect and improves the display effect of the image. Especially when pixel points form multiple direction edges, it has better applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850466A_ABST
    Figure CN119850466A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing device and method, equipment and a storage medium, and relates to the technical field of image processing. The device comprises a sharpening module configured to sharpen an image to be processed to obtain a first image; the processing module is configured to calculate gray gradient information in multiple directions corresponding to each pixel point based on the gray value of each pixel point included in the to-be-processed image; the processing module is further configured to calculate a compensation factor corresponding to each pixel point based on the gray scale gradient information of the multiple directions corresponding to each pixel point, and the compensation factor is used for controlling the gray scale value of the corresponding pixel point within a reference gray scale range; and the compensation module is configured to compensate each pixel point included in the first image based on the compensation factor corresponding to each pixel point to obtain a second image. The gray value of the pixel point is compensated by using the compensation factor, and the gray value of the pixel point can be controlled in the reference gray range, so that the ringing effect is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to an image processing apparatus, method, device and storage medium. Background Art

[0002] Image sharpening is an image processing technology used to highlight and enhance the edges and contours of objects in an image to make the image clearer. However, image sharpening is prone to cause ringing effects. The ringing effect refers to the grayscale value fluctuations at the locations where the grayscale value changes dramatically in the sharpened image, which affects the image display effect. Therefore, an image processing device is needed to process the sharpened image to reduce the ringing effect and ensure the image display effect. Summary of the invention

[0003] The embodiments of the present application provide an image processing apparatus, method, device and storage medium, which can be used to compensate the grayscale value of the pixel points of the sharpened image to reduce the ringing effect. The technical solution is as follows:

[0004] On the one hand, an embodiment of the present application provides an image processing device, which includes: a sharpening module, configured to perform sharpening processing on an image to be processed to obtain a first image; a processing module, configured to calculate grayscale gradient information in multiple directions corresponding to each pixel point based on the grayscale value of each pixel point included in the image to be processed; the processing module is also configured to calculate a compensation factor corresponding to each pixel point based on the grayscale gradient information in multiple directions corresponding to each pixel point, the compensation factor being used to control the grayscale value of the corresponding pixel point within a reference grayscale range; and a compensation module, configured to compensate each pixel point included in the first image based on the compensation factor corresponding to each pixel point to obtain a second image.

[0005] In one possible implementation, the processing module is configured to: calculate the compensation factors in multiple directions corresponding to each pixel point based on the grayscale gradient information in multiple directions corresponding to each pixel point; calculate the compensation factors corresponding to each pixel point based on the compensation factors in multiple directions corresponding to each pixel point.

[0006] In one possible implementation, the processing module is configured as follows: for each pixel point among the various pixel points, grayscale values ​​of multiple pixel points centered on this pixel point are obtained in multiple directions; for each of the multiple directions, based on the grayscale values ​​of the multiple pixel points obtained in this direction, the grayscale gradient information of this direction corresponding to this pixel point is calculated.

[0007] In a possible implementation, for each of multiple directions, the grayscale values ​​of multiple pixels acquired in this direction include the grayscale values ​​of the pixels of the first part and the grayscale values ​​of the pixels of the second part, and the pixels of the first part and the second part are divided with this pixel as the center; the processing module is configured to: calculate the first gradient information corresponding to the pixels of the first part based on the grayscale values ​​of the pixels of the first part; calculate the second gradient information corresponding to the pixels of the second part based on the grayscale values ​​of the pixels of the second part; and obtain the grayscale gradient information of this direction corresponding to this pixel based on the first gradient information and the second gradient information.

[0008] In a possible implementation manner, the reference grayscale ranges corresponding to the pixels are different.

[0009] In one possible implementation, the processing module is configured to: for each pixel among the various pixel points, obtain the grayscale values ​​of multiple pixel points centered on this pixel point in at least one direction; and obtain the reference grayscale range corresponding to this pixel point based on the maximum grayscale value and the minimum grayscale value among the grayscale values ​​of the multiple pixel points.

[0010] On the other hand, an image processing method is provided, the method comprising: sharpening an image to be processed to obtain a first image; calculating grayscale gradient information in multiple directions corresponding to each pixel point based on the grayscale value of each pixel point included in the image to be processed; calculating a compensation factor corresponding to each pixel point based on the grayscale gradient information in multiple directions corresponding to each pixel point, the compensation factor being used to control the grayscale value of the corresponding pixel point within a reference grayscale range; and compensating each pixel point included in the first image based on the compensation factor corresponding to each pixel point to obtain a second image.

[0011] In a possible implementation, the compensation factor corresponding to each pixel is calculated based on the grayscale gradient information in multiple directions corresponding to each pixel, including: calculating the compensation factors in multiple directions corresponding to each pixel based on the grayscale gradient information in multiple directions corresponding to each pixel; calculating the compensation factors corresponding to each pixel based on the compensation values ​​in multiple directions corresponding to each pixel.

[0012] In a possible implementation, based on the grayscale values ​​of each pixel included in the image to be processed, multi-directional grayscale gradient information corresponding to each pixel is calculated, including: for each pixel among the pixels, the grayscale values ​​of multiple pixels centered on this pixel are obtained in multiple directions; for each of the multiple directions, based on the grayscale values ​​of the multiple pixels obtained in this direction, the grayscale gradient information in this direction corresponding to this pixel is calculated.

[0013] In a possible implementation, for each of multiple directions, the grayscale values ​​of multiple pixels acquired in this direction include the grayscale values ​​of the pixels of the first part and the grayscale values ​​of the pixels of the second part, and the pixels of the first part and the pixels of the second part are divided with this pixel as the center; based on the grayscale values ​​of the multiple pixels acquired in this direction, the grayscale gradient information of this direction corresponding to this pixel is calculated, including: based on the grayscale values ​​of the pixels of the first part, calculating the first gradient information corresponding to the pixels of the first part; based on the grayscale values ​​of the pixels of the second part, calculating the second gradient information corresponding to the pixels of the second part; based on the first gradient information and the second gradient information, obtaining the grayscale gradient information of this direction corresponding to this pixel.

[0014] In a possible implementation manner, the reference grayscale ranges corresponding to the pixels are different.

[0015] In a possible implementation, based on the grayscale gradient information in multiple directions corresponding to each pixel point, before calculating the compensation factor corresponding to each pixel point, it also includes: for each pixel point among the pixels, obtaining the grayscale values ​​of multiple pixels centered on this pixel point in at least one direction; based on the maximum grayscale value and the minimum grayscale value among the grayscale values ​​of the multiple pixels, obtaining the reference grayscale range corresponding to this pixel point.

[0016] On the other hand, a display chip is provided, and the display chip includes any one of the above-mentioned image processing devices.

[0017] On the other hand, a computer device is provided, comprising a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor so that the computer device implements any of the above-mentioned image processing methods.

[0018] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor so that a computer implements any of the above-mentioned image processing methods.

[0019] The technical solution provided by this application brings at least the following beneficial effects:

[0020] In the solution of the present application, the grayscale gradient information of multiple directions corresponding to each pixel is calculated, and the compensation factor corresponding to each pixel is calculated based on the grayscale gradient information of multiple directions corresponding to each pixel, and the grayscale value of the pixel is adjusted using the compensation factor to reduce the ringing effect. Since the compensation factor is obtained based on the grayscale gradient information of multiple directions, the grayscale gradients of multiple directions of the pixel are all considered, so it is more applicable to the situation where the edges of multiple directions formed by the pixel points are better. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 is a structural schematic diagram of an image processing device provided in an embodiment of the present application;

[0023] Figure 2 is a schematic diagram of an edge detection template provided in an embodiment of the present application;

[0024] Figure 3 is a schematic diagram of a calculation result of a compensation factor provided in an embodiment of the present application;

[0025] Figure 4 is a schematic diagram of a maximum value detection template provided in an embodiment of the present application;

[0026] Figure 5 is a structural schematic diagram of another image processing device provided in an embodiment of the present application;

[0027] Figure 6 is a flow chart of an image processing method provided by an embodiment of the present application;

[0028] Figure 7 is a structural schematic diagram of an image processing device provided in an embodiment of the present application;

[0029] Figure 8 It is a structural schematic diagram of another image processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0031] In the field of image processing technology, acutance is often used to describe the speed of image information transition at the boundary. High grayscale contrast images have very fast transition speed, which can form clear edges and high acutance; while low grayscale contrast images have a certain transition buffer, which is reflected in the image as blurred edges and low acutance.

[0032] Image sharpening is an image processing technology used to highlight and strengthen the edges and contours of the scene in the image to make the image clearer. Image sharpening reduces blur in the image and enhances the grayscale contrast by enhancing the detailed edges and contours of the image. In the case of excessive or improper image sharpening, a ringing effect will exist in the sharpened image. The ringing effect refers to the grayscale value oscillation at the place where the grayscale value of the output image changes dramatically, and this phenomenon affects the quality of the restored image and the sharpening effect. Therefore, an image processing device is needed to process the sharpened image to reduce the ringing effect and ensure the display effect of the image.

[0033] In the related art, a single-direction classifier is used to obtain the grayscale gradient information corresponding to the pixel points of the sharpened image, and a compensation value is added to the grayscale value of the pixel point according to the grayscale gradient information corresponding to the pixel point to increase or decrease the grayscale value, thereby reducing the ringing effect. However, this single-direction classifier is only applicable to edges in a single direction formed by pixel points. For edges in multiple directions formed by pixel points, the applicability is poor.

[0034] An embodiment of the present application provides an image processing device for processing a sharpened image to reduce the ringing effect, and the device has good applicability to edges in multiple directions composed of pixel points. An embodiment of the present application provides an implementation environment, which may include a processing device. The processing device may be the image processing device provided in the embodiment of the present application, or include the image processing device provided in the embodiment of the present application. For example, the image processing device provided in the embodiment of the present application may be implemented as a hardware circuit included in the processing device. For another example, the processing device includes a processor, and the image processing device is implemented by the processor running software. Alternatively, a part of the image processing device can be implemented by the processor running software, and the rest can be implemented by the hardware circuit included in the processing device.

[0035] Exemplarily, the processing device is any device with image processing function, such as a terminal or a server. The terminal can be any electronic product that can interact with the user through one or more methods such as keyboard, touch pad, touch screen, remote control, voice interaction or handwriting device, such as a personal computer (PC), mobile phone, smart phone, personal digital assistant (PDA), wearable device, pocket PC (PPC), tablet computer, smart car machine, smart TV, smart speaker, etc. The server can be a single server or a server cluster composed of multiple servers.

[0036] Those skilled in the art should understand that the above-mentioned processing equipment is only an example, and other existing or future devices that are applicable to the present application should also be included in the scope of protection of the present application and are included here by reference.

[0037] Figure 1 Schematic diagram of the structure of an image processing device provided in an embodiment of the present application. Figure 1 As shown, the device includes a sharpening module 101, a processing module 102 and a compensation module 103. The sharpening module 101 and the processing module 102 are both connected to the compensation module 103. The sharpening module 101 is configured to perform sharpening processing on the image to be processed to obtain a first image; the processing module 102 is configured to calculate the grayscale gradient information of multiple directions corresponding to each pixel point based on the grayscale value of each pixel point included in the image to be processed; the processing module 102 is also configured to calculate the compensation factor corresponding to each pixel point based on the grayscale gradient information of multiple directions corresponding to each pixel point, and the compensation factor is used to control the grayscale value of the corresponding pixel point within the reference grayscale range; the compensation module 103 is configured to process each pixel point included in the first image based on the compensation factor corresponding to each pixel point to obtain a second image.

[0038] Exemplarily, the image processing device further includes an acquisition module, which is configured to acquire an image to be processed. The image to be processed includes a plurality of pixels, each pixel corresponding to a grayscale value. In an embodiment of the present application, the image to be processed may be a grayscale image, and when the image to be processed is a grayscale image, the grayscale value corresponding to the pixel may be referred to as the brightness of the pixel.

[0039] The embodiment of the present application does not limit the manner of sharpening the image to be processed. For example, the sharpening module 101 uses a spatial domain algorithm or a frequency algorithm to sharpen the image to be processed to obtain a first image. The spatial domain algorithm and the frequency algorithm can refer to the contents of the relevant technology, and the embodiment of the present application will not be further described.

[0040] In some embodiments, the processing module 102 is configured to: for each pixel point among the pixels, obtain the grayscale values ​​of multiple pixels centered on the pixel point in multiple directions; for each direction among the multiple directions, based on the grayscale values ​​of the multiple pixels obtained in the direction, calculate the grayscale gradient information of the direction corresponding to the pixel point. By obtaining the grayscale values ​​of the multiple pixels centered on each pixel point, the calculated grayscale gradient information is relatively consistent with the actual grayscale change, and the accuracy of the grayscale gradient information is high.

[0041] Exemplarily, the multiple directions include a horizontal direction, a vertical direction, a 45-degree direction, and a 135-degree direction. The 45-degree direction may be a direction from the upper right to the lower left and at a 45-degree angle to the horizontal direction, and the 135-degree direction is a direction perpendicular to the 45-degree direction. By acquiring the grayscale values ​​of the pixel points in more directions, the grayscale gradient information subsequently acquired is more comprehensive, and thus the accuracy of the compensation factor corresponding to the acquired pixel point is higher.

[0042] In a possible implementation, for each of the multiple directions, the number of pixels on both sides of the pixel in this direction may not be able to make the pixel at the center. In this case, the grayscale value of the pixel can be copied so that the grayscale value of the pixel is at the center of the grayscale value of the obtained pixel. Taking the horizontal direction as an example, when the pixel is the first pixel in the horizontal direction of the image to be processed, the grayscale value of the pixel can be copied a first number of times to obtain a first number of grayscale values. Thus, for this pixel, the grayscale values ​​obtained in the horizontal direction are arranged in the following order: the first number of grayscale values ​​obtained by copying, the grayscale value of this pixel, and the grayscale values ​​of the first number of continuous pixels to the right starting from this pixel. The principles of other directions are the same and will not be repeated here. The first number can be determined based on experience or actual needs, and the embodiments of the present application are not limited to this.

[0043] In a possible implementation, the direction of the pixels to be acquired and the number of pixels to be acquired are determined according to an edge detection template. The size of the edge detection template can be adapted to the resolution of the image to be processed, and the embodiment of the present application does not limit this. For example, an edge detection template with a size of 13*13 is used. The size of 13*13 means that the length of the edge detection template in the horizontal direction is the length of 13 pixels, and the length in the vertical direction is the length of 13 pixels.

[0044] Figure 2 is a schematic diagram of an edge detection template provided in an embodiment of the present application. Figure 2 For any pixel point, this pixel point is taken as the center of the cross-shaped pattern of the edge detection template, and the grayscale value of the pixel point in each direction is obtained according to the cross-shaped image. Figure 2 The cross-shaped pattern in the figure is filled with black, and the cross-shaped area is divided into an upper area, a lower area, a left area, a right area, an upper left area, a lower left area, an upper right area, and a lower right area. The upper area and the lower area are both vertical areas, the left area and the right area are both horizontal areas, the upper left area and the lower right area are both 135 degree areas, and the lower left area and the upper right area are both 45 degree areas.

[0045] Exemplarily, for each pixel in each pixel, after the grayscale values ​​of multiple pixels centered on the pixel are obtained, the grayscale values ​​of the multiple pixels are divided with the grayscale value of the pixel as the center, and are respectively referred to as the grayscale values ​​of the pixels in the first part and the grayscale values ​​of the pixels in the second part. That is, in some embodiments, for each direction in multiple directions, the grayscale values ​​of the multiple pixels obtained in this direction include the grayscale values ​​of the pixels in the first part and the grayscale values ​​of the pixels in the second part, and the pixels in the first part and the pixels in the second part are divided with the pixel as the center.

[0046] In an embodiment of the present application, dividing with the grayscale value of this pixel as the center means directly dividing according to the arrangement position of the obtained grayscale values, rather than re-sorting the grayscale values ​​according to the size of the grayscale values, and then dividing with the grayscale value of this pixel as the center value. For example, the grayscale values ​​obtained in the horizontal direction are arranged in the following order: the first number of grayscale values ​​obtained by copying, the grayscale value of this pixel, and the grayscale values ​​of the first number of consecutive pixels to the right starting from this pixel. Thus, in the horizontal direction, the grayscale values ​​of the pixels in the first part include the first number of grayscale values ​​obtained by copying, and the grayscale values ​​of the pixels in the second part include the grayscale values ​​of the first number of consecutive pixels to the right starting from this pixel. The principles in other directions are the same and will not be repeated here.

[0047] Exemplarily, for each of the multiple directions, when the grayscale values ​​of the multiple pixels obtained include the grayscale values ​​of the pixels of the first part and the grayscale values ​​of the pixels of the second part, the processing module 102 is configured to: calculate the first gradient information corresponding to the pixels of the first part based on the grayscale values ​​of the pixels of the first part; calculate the second gradient information corresponding to the pixels of the second part based on the grayscale values ​​of the pixels of the second part; and obtain the grayscale gradient information of this direction corresponding to this pixel based on the first gradient information and the second gradient information. The grayscale gradient information corresponding to the pixels of the two parts is first calculated, and then the grayscale gradient information of this direction corresponding to the pixels is calculated based on the grayscale gradient information corresponding to the pixels of the two parts. The calculated grayscale gradient information has a good adaptability to the actual grayscale change, and the accuracy of the grayscale gradient information is high.

[0048] In a possible implementation, the first gradient information is obtained by calculating the grayscale values ​​of the pixels of the first part using a gradient operator, and the second gradient information is obtained by calculating the grayscale values ​​of the pixels of the second part using a gradient operator. The gradient operator includes a plurality of coefficients, wherein the number of coefficients is an odd number and the sum of the plurality of coefficients is 0, and the value of the coefficient located in the center of the plurality of coefficients is the largest. The number of coefficients included in the gradient operator may be less than the number of grayscale values ​​of the pixels of the first part, in which case the first gradient information may be calculated in a convolution manner.

[0049] For example, when the number of coefficients included in the gradient operator is the second number, the number of pixel points in the first part is the third number, and the second number is less than the third number, the gradient operator is first used to calculate the first second number of grayscale values, and then slides back one grayscale value, and uses the gradient operator to calculate the second grayscale value to the second number plus 1 grayscale value. The calculation method of the second gradient information is the same in principle and will not be repeated here.

[0050] by Figure 2 Taking the left area as an example, the grayscale value of the pixel corresponding to the left area is the grayscale value of the first part of the pixel obtained in the horizontal direction, and the obtained grayscale value includes grayscale value 1 to grayscale value 6, which are called left1 to left2 respectively. The gradient operator is [-1, -2, 6, -2, -1], so the first gradient information left_det is calculated according to the following formula:

[0051] left_det=ABS(left1*(-1)+left2*(-2)+left3*(6)+left4*(-2)+left5*(-1))+ABS(left2*(-1)+left3*(-2)+left4*(6)+left5*(-2)+left6*(-1));

[0052] Among them, ABS stands for absolute value.

[0053] exist Figure 2 In the figure, the grayscale value of the pixel corresponding to the right area is the grayscale value of the pixel of the second part obtained in the horizontal direction, the grayscale value of the pixel corresponding to the upper area is the grayscale value of the pixel of the first part obtained in the vertical direction, the grayscale value of the pixel corresponding to the lower area is the grayscale value of the pixel of the second part obtained in the vertical direction, the grayscale value of the pixel corresponding to the upper left area is the grayscale value of the pixel of the first part obtained in the 135 degree direction, the grayscale value of the pixel corresponding to the lower right area is the grayscale value of the pixel of the second part obtained in the 135 degree direction, the grayscale value of the pixel corresponding to the upper right area is the grayscale value of the pixel of the first part obtained in the 45 degree direction, and the grayscale value of the pixel corresponding to the lower left area is the grayscale value of the pixel of the second part obtained in the 45 degree direction. The method of calculating the first gradient information and the second gradient information based on these grayscale values ​​is the same as the principle of calculating left_det, which will not be repeated here.

[0054] In a possible implementation, for each of the multiple directions, after obtaining the first gradient information and the second gradient information, the minimum value of the first gradient information and the second gradient information is used as the grayscale gradient information of the direction corresponding to the pixel. Since the grayscale value of the non-edge area changes less than that of the edge area, by using the minimum value of the first gradient information and the second gradient information as the grayscale gradient information, the probability of the non-edge area being judged as the edge area can be reduced, thereby reducing the probability of adjusting the grayscale value of the pixel point in the edge area to cause a poor image display effect.

[0055] Exemplarily, for each pixel point in each pixel point, the grayscale gradient information det_h in the horizontal direction, the grayscale gradient information det_v in the vertical direction, the grayscale gradient information det_45 in the 45 degree direction, and the grayscale gradient information det_135 in the 135 degree direction corresponding to the pixel point are calculated according to the following formula:

[0056] det_h=MIN(left_det, right_det);

[0057] det_v=MIN(up_det, down_det);

[0058] det_45=MIN(rup_det, ldown_det);

[0059] det_135=MIN(lup_det, rdown_det);

[0060] Among them, MIN means taking the minimum value of two values, left_det represents the first gradient information in the horizontal direction, right_det represents the second gradient information in the horizontal direction, up_det represents the first gradient information in the vertical direction, down_det represents the second gradient information in the vertical direction, rup_det represents the first gradient information in the 45 degree direction, ldown_det represents the second gradient information in the 45 degree direction, lup_det represents the first gradient information in the 135 degree direction, and rdown_det represents the second gradient information in the 135 degree direction.

[0061] Exemplarily, when grayscale gradient information in multiple directions is obtained, the processing module 102 is configured to: calculate the compensation factors in multiple directions corresponding to each pixel based on the grayscale gradient information in multiple directions corresponding to each pixel; calculate the compensation factors corresponding to each pixel based on the compensation factors in multiple directions corresponding to each pixel. By calculating the compensation factors corresponding to the pixels according to the compensation factors in multiple directions, the calculated compensation factors are affected by various directions, so that they are more applicable to various edges formed by the pixels.

[0062] In a possible implementation, for the grayscale gradient information of each direction corresponding to each pixel point, the compensation factor of this direction corresponding to this pixel point increases as the grayscale gradient information increases, and the range of the compensation factor is [0, 1]. For example, for each direction corresponding to each pixel point, when the grayscale gradient information of this direction is less than or equal to the reference grayscale gradient value TH0, the compensation factor gain of this direction is equal to 0; when the grayscale gradient information of this direction is greater than TH0, the compensation factor gain of this direction is calculated according to the following formula, and the requirement that the compensation factor gain of this direction is within the range of [0, 1] is satisfied:

[0063] gain = (det - TH0) * SPL;

[0064] Among them, det represents the grayscale gradient information in this direction, and the sizes of TH0 and SPL are determined based on experience or actual needs, and the embodiments of the present application are not limited to this. Figure 3 It is a schematic diagram of the calculation result of a compensation factor provided in an embodiment of the present application.

[0065] Exemplarily, the processing module 102 is configured to: for each pixel point among the pixels, calculate the product of the compensation factors in multiple directions corresponding to the pixel point; based on the product, obtain the compensation factor corresponding to the pixel point. Take the compensation factors in multiple directions including the compensation factor gain_h in the horizontal direction, the compensation factor gain_v in the vertical direction, the compensation factor gain_45 in the 45-degree direction, and the compensation factor gain_135 in the 135-degree direction as an example. The product of the compensation factors in multiple directions corresponding to the pixel point is as follows:

[0066] product=gain_h*gain_v*gain_45*gain_135.

[0067] Exemplarily, the obtained product is directly used as the compensation factor corresponding to the pixel point, or the compensation factor ring_gain corresponding to the pixel point is calculated according to the following formula:

[0068] ring_gain = product * k + b;

[0069] The values ​​of k and b are determined based on experience or actual needs, and k is not equal to 0.

[0070] In the embodiment of the present application, the first image and the image to be processed include the same pixels. Exemplarily, for each pixel in the first image, when the grayscale value of the pixel is greater than the maximum value of the reference grayscale range, the grayscale value of the pixel is reduced based on the compensation factor corresponding to the pixel, so that the reduced grayscale value is within the reference grayscale range; when the grayscale value of the pixel is less than the minimum value of the reference grayscale range, the grayscale value of the pixel is increased based on the compensation factor corresponding to the pixel, so that the increased grayscale value is within the reference grayscale range; when the grayscale value of the pixel is within the reference grayscale range, the grayscale value of the pixel is kept unchanged.

[0071] Thus, by processing each pixel point included in the first image to obtain the second image, the grayscale values ​​of the pixel points included in the second image can be controlled within the reference grayscale range, and the ringing effect is reduced.

[0072] For example, for each pixel in the first image, when the grayscale value Ysp of the pixel is within the reference grayscale range, the grayscale value of the pixel remains unchanged, that is, the adjusted grayscale value Yout of the pixel is equal to Ysp; when the grayscale value Ysp of the pixel is greater than the maximum value of the reference grayscale range, the adjusted grayscale value Yout of the pixel is calculated according to the following formula:

[0073] Yout=Ysp–(Ysp-Ymax)*(1–ring_gain);

[0074] Among them, Ymax represents the maximum value of the reference grayscale range, and ring_gain represents the compensation factor corresponding to this pixel.

[0075] Furthermore, for each pixel in the first image, when the grayscale value Ysp of the pixel is less than the minimum value of the reference grayscale range, the adjusted grayscale value Yout of the pixel is calculated according to the following formula:

[0076] Yout=Ysp+(Ymin-Ysp)*(1–ring_gain);

[0077] Among them, Ymin represents the minimum value of the reference grayscale range, and ring_gain represents the compensation factor corresponding to this pixel.

[0078] In some embodiments, the processing module 102 is further configured to: obtain a reference grayscale range corresponding to each pixel point. The reference grayscale range corresponding to each pixel point may be different, thereby providing high flexibility.

[0079] Exemplarily, the processing module 102 is configured to: for each pixel among the pixels, obtain the grayscale values ​​of multiple pixels centered at the pixel in at least one direction; based on the maximum grayscale value and the minimum grayscale value among the grayscale values ​​of the multiple pixels, obtain the reference grayscale range corresponding to the pixel. For example, the maximum grayscale value among the grayscale values ​​of the multiple pixels is used as the maximum value of the reference grayscale range corresponding to the pixel; the minimum grayscale value among the grayscale values ​​of the multiple pixels is used as the minimum value of the reference grayscale range corresponding to the pixel. Wherein, at least one direction includes but is not limited to the horizontal direction or the vertical direction.

[0080] In a possible implementation, for each direction in at least one direction, the number of pixels on both sides of the pixel in this direction may not be able to make this pixel at the center. In this case, the grayscale value of this pixel can be copied so that the grayscale value of this pixel is at the center of the grayscale value of the obtained pixel. Taking the horizontal direction as an example, when the pixel is the first pixel in the horizontal direction of the image to be processed, the grayscale value of this pixel can be copied a fourth number of times to obtain a fourth number of grayscale values. Thus, for this pixel, the grayscale values ​​obtained in the horizontal direction are arranged in the following order: the fourth number of grayscale values ​​obtained by copying, the grayscale value of this pixel, and the grayscale values ​​of the fourth number of pixels to the right starting from this pixel. The principles of other directions are the same and will not be repeated here. The fourth number can be determined based on experience or actual needs, and the embodiments of the present application are not limited to this.

[0081] In some embodiments, the direction of the pixels to be acquired and the number of pixels to be acquired are determined according to the maximum detection template. The size of the maximum detection template can be adapted to the resolution of the image to be processed, and the embodiments of the present application are not limited to this. For example, a maximum detection template with a size of 13*13 is used. Among them, the size of 13*13 means that the horizontal length of this maximum detection template is the length of 13 pixels, and the vertical length is the length of 13 pixels.

[0082] Figure 4 is a schematic diagram of a maximum value detection template provided in an embodiment of the present application. Figure 4 For each pixel point in each pixel point, this pixel point can be used as the center of the maximum value detection template, and the grayscale values ​​of 13 pixels are obtained in the horizontal direction and the vertical direction respectively. The maximum grayscale value among the grayscale values ​​of the 26 pixels obtained is used as the maximum value of the reference grayscale range corresponding to this pixel point, and the minimum grayscale value among the grayscale values ​​of the 26 pixels obtained is used as the minimum value of the reference grayscale range corresponding to this pixel point.

[0083] In one possible implementation, the processing module 102 is configured to: obtain initial grayscale values ​​of multiple pixels centered on the pixel in at least one direction; perform denoising on the initial grayscale values ​​of the multiple pixels to obtain grayscale values ​​of the multiple pixels. After performing denoising, the grayscale value includes less noise, and the calculation result obtained by calculating based on the grayscale value is more accurate. The denoising operation can be a filtering operation, and the filtering operation can be performed by using a finite impulse response (FIR) filter or an infinite impulse response (IIR) filter.

[0084] Taking the use of an N-order FIR filter as an example, the value of N corresponds to the number of grayscale values ​​of pixels obtained in each direction. For example, the number of grayscale values ​​of pixels obtained in each direction is equal to N+1. Exemplarily, when the grayscale values ​​of 13 pixels are obtained in both the horizontal and vertical directions, N is 12. An N-order FIR filter is used for horizontal filtering and vertical filtering. The filtering output in the horizontal direction is represented as Ylpfh, and the filtering output in the vertical direction is represented as Ylpfv. Then, for the filtering output Ylpfh in the horizontal direction, the maximum value Yhmax and the minimum value Yhmin are found in the maximum detection template; for the filtering output Ylpfv in the vertical direction, the maximum value Yvmax and Yvmin are found in the maximum detection template. Afterwards, the maximum values ​​in the horizontal and vertical directions and the minimum values ​​in the horizontal and vertical directions are compared to obtain the maximum and minimum values ​​of the reference grayscale range corresponding to this pixel.

[0085] In some embodiments, the multiple modules included in the image processing device may all be modules implemented by hardware circuits, or the multiple modules may all be modules implemented by software, or the multiple modules may include modules implemented by hardware circuits and modules implemented by software. The division of modules may be determined based on experience or actual needs, and the embodiments of the present application do not limit this. Each module may include multiple sub-modules, and the functions of each module are implemented by the sub-modules it includes.

[0086] Figure 5 is a schematic diagram of the structure of another image processing device provided in an embodiment of the present application. Figure 5 As shown, the image processing device includes a sharpening module, a processing module and a compensation module, wherein the processing module includes a filtering submodule, a maximum detection submodule and an edge detection submodule. The connection relationship between the sharpening module, the filtering submodule, the maximum detection submodule, the edge detection submodule and the compensation module is as follows: Figure 5As shown. Among them, the sharpening module is used to sharpen the image to be processed to obtain the first image. The filtering submodule is used to filter the initial grayscale value of the acquired pixel point to remove the noise in the initial grayscale value. The maximum value detection submodule is used to obtain the maximum value of the reference grayscale range corresponding to the pixel point. The edge detection submodule is used to obtain the compensation factor corresponding to the pixel point. The compensation module is used to compensate the grayscale value of the pixel point of the first image based on the compensation factor corresponding to the pixel point, so as to control the grayscale value of the pixel point within the reference grayscale range, and output the adjusted grayscale value.

[0087] In the image processing device provided in the embodiment of the present application, the grayscale gradient information in multiple directions corresponding to each pixel is calculated, and the compensation factor corresponding to each pixel is calculated based on the grayscale gradient information in multiple directions of each pixel, and the grayscale value of the pixel is adjusted using the compensation factor to reduce the ringing effect. Since the compensation factor is obtained based on the grayscale gradient information in multiple directions, the grayscale gradients in multiple directions of the pixel are all considered, so it is more applicable to the situation where the edges in multiple directions are formed by the pixel points.

[0088] The present application embodiment provides an image processing method, which can be executed by a processing device. The flowchart of the method is as follows: Figure 6 As shown, including but not limited to steps 601 to 604.

[0089] In step 601, a sharpening process is performed on the image to be processed to obtain a first image.

[0090] In step 602, based on the grayscale value of each pixel included in the image to be processed, grayscale gradient information in multiple directions corresponding to each pixel is calculated.

[0091] In some embodiments, based on the grayscale values ​​of each pixel point included in the image to be processed, the grayscale gradient information of multiple directions corresponding to each pixel point is calculated, including: for each pixel point among the pixels, the grayscale values ​​of multiple pixels points centered on this pixel point are obtained in multiple directions; for each of the multiple directions, based on the grayscale values ​​of the multiple pixels points obtained in this direction, the grayscale gradient information of this direction corresponding to this pixel point is calculated.

[0092] Exemplarily, for each of the multiple directions, the grayscale values ​​of the multiple pixels obtained in this direction include the grayscale values ​​of the pixels of the first part and the grayscale values ​​of the pixels of the second part, and the grayscale values ​​of the pixels of the first part and the grayscale values ​​of the pixels of the second part are divided around the grayscale value of this pixel; based on the grayscale values ​​of the multiple pixels obtained in this direction, the grayscale gradient information of this direction corresponding to this pixel is calculated, including: based on the grayscale values ​​of the pixels of the first part, calculating the first gradient information corresponding to the pixels of the first part; based on the grayscale values ​​of the pixels of the second part, calculating the second gradient information corresponding to the pixels of the second part; based on the first gradient information and the second gradient information, obtaining the grayscale gradient information of this direction corresponding to this pixel.

[0093] In step 603, based on the grayscale gradient information in multiple directions corresponding to each pixel point, a compensation factor corresponding to each pixel point is calculated, and the compensation factor is used to control the grayscale value of the corresponding pixel point within a reference grayscale range.

[0094] In some embodiments, based on the grayscale gradient information in multiple directions corresponding to each pixel point, the compensation factor corresponding to each pixel point is calculated, including: based on the grayscale gradient information in multiple directions corresponding to each pixel point, the compensation factor in multiple directions corresponding to each pixel point is calculated; based on the compensation factor in multiple directions corresponding to each pixel point, the compensation factor corresponding to each pixel point is calculated.

[0095] Exemplarily, based on the compensation factors in multiple directions corresponding to each pixel point, the compensation factors corresponding to each pixel point are calculated, including: for each pixel point among the pixels, calculating the product of the compensation factors in multiple directions corresponding to this pixel point; based on the product, obtaining the compensation factor corresponding to this pixel point.

[0096] In some embodiments, the reference grayscale ranges corresponding to the pixels are different.

[0097] Exemplarily, before calculating the compensation factor corresponding to each pixel point based on the grayscale gradient information in multiple directions corresponding to each pixel point, the method also includes: for each pixel point among the pixels, obtaining the grayscale values ​​of multiple pixels centered on this pixel point in at least one direction; based on the maximum grayscale value and the minimum grayscale value among the grayscale values ​​of the multiple pixel points, obtaining the reference grayscale range corresponding to this pixel point.

[0098] In one possible implementation, grayscale values ​​of multiple pixels centered on the pixel are obtained in at least one direction, including: obtaining initial grayscale values ​​of multiple pixels centered on the pixel in at least one direction; and denoising the initial grayscale values ​​of the multiple pixels to obtain grayscale values ​​of the multiple pixels.

[0099] In step 604, each pixel point included in the first image is processed based on the compensation factor corresponding to each pixel point to obtain a second image.

[0100] In the image processing method provided in the embodiment of the present application, the grayscale gradient information in multiple directions corresponding to each pixel is calculated, and the compensation factor corresponding to each pixel is calculated based on the grayscale gradient information in multiple directions of each pixel, and the grayscale value of the pixel is adjusted using the compensation factor to reduce the ringing effect. Since the compensation factor is obtained based on the grayscale gradient information in multiple directions, the grayscale gradients in multiple directions of the pixel are all considered, so it is more applicable to the situation where the edges in multiple directions are formed by the pixel points.

[0101] It should be noted that the device provided in the above embodiment only uses the division of the above functional modules as an example to implement its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the method provided in the above embodiment belongs to the same concept as the device embodiment, and its specific implementation process is detailed in the device embodiment, which will not be repeated here.

[0102] Figure 7 It is a structural diagram of an image processing device provided by an embodiment of the present application. The device may have relatively large differences due to different configurations or performances, and may include one or more processors 701 and one or more memories 702, wherein at least one computer program is stored in one or more memories 702, and at least one computer program is loaded and executed by the one or more processors 701, so that the device implements the image processing methods provided by the above-mentioned various method embodiments. Of course, the device may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the device may also include other components for implementing the functions of the device, which will not be described in detail here. Figure 7 The image processing device shown may be a computer device.

[0103] In an exemplary embodiment, a computer device is also provided, which can implement the image processing methods provided in the above-mentioned various method embodiments. The computer device can be, for example, a smart phone, a tablet computer, a player, a laptop computer or a desktop computer. The terminal may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal or other names. The computer device can also be a server or any other device that can implement the above-mentioned image processing method.

[0104] See also Figure 8, shows a schematic diagram of the structure of an image processing device provided by an embodiment of the present application, the image processing device 800 includes an image processing device 801, and the image processing device 801 includes various units for executing instructions. Figure 8 In the embodiment, the image processing device 801 is coupled to the memory 802, and it should be understood that the image processing apparatus 800 also supports other memory configurations known in the art.

[0105] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. At least one computer program is stored in the computer-readable storage medium. The at least one computer program is loaded and executed by the image processing device 801 to enable the computer device 800 to implement any of the above-mentioned image processing methods.

[0106] The memory 802 may also include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction, and the at least one instruction is used to be executed by the processing device 801 so that the computer device 800 implements the image processing method provided by the above method embodiment.

[0107] In one possible implementation, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0108] Figure 8 Also shown is a display 806 coupled to the image processing device 801. For example, the display 806 is connected to the display controller 804, and the display controller 804 is also connected to the image processing device 801, so that the display 806 is coupled to the image processing device 801. In some cases, the image processing device 800 can be used for wireless communication. Figure 8 Also shown are a speaker 809 and a microphone 810 coupled to the image processing device 801 via a codec 811 ; and a wireless antenna 808 coupled to the wireless controller 805 .

[0109] The display 806 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos and any combination thereof. When the display 806 is a touch display screen, the display 806 also has the ability to collect touch signals on the surface or above the surface of the display 806. At this time, the display 806 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display 806 can be one, set on the front panel of the terminal; in other embodiments, the display 806 can be at least two, respectively set on different surfaces of the terminal or in a folding design; in other embodiments, the display 806 can be a flexible display screen, set on a curved surface or a folding surface of the terminal. Even, the display 806 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display 806 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode) and the like.

[0110] Microphone 810 is used to collect sound waves from the user and the environment, and input the sound waves to the image processing device 801 for processing. For the purpose of stereo acquisition or noise reduction, there can be multiple microphones 810, which are respectively arranged at different parts of the terminal. Microphone 810 can also be an array microphone or an omnidirectional acquisition microphone. Speaker 809 is used to convert electrical signals from image processing device 801 into sound waves. Speaker 809 can be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as ranging.

[0111] The image processing device 801 and the memory 802 may be included in a system-in-package or system-on-chip device.

[0112] Input device 807 and power supply 803 are coupled to system-on-chip device 812. Optionally, as Figure 8 As shown, when one or more optional blocks are present, the display 806, input device 807, speaker 809, microphone 810, wireless antenna 808, and power supply 803 are external to the system-on-chip device 812. However, each of the display 806, input device 807, speaker 809, microphone 810, wireless antenna 808, and power supply 803 may be coupled to a component of the system-on-chip device 812, such as an interface or controller.

[0113] The power supply 803 is used to power various components in the terminal. The power supply 803 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 803 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0114] In one possible implementation, the image processing device 801 and the memory 802 may be integrated into a set-top box, a server, a music player, a video player, an entertainment unit, a navigation device, a personal digital assistant (PDA), a fixed location data unit, a computer, a laptop computer, a tablet computer, a communication device, a mobile phone, or other similar devices.

[0115] The method described in conjunction with the embodiments of the present application can be directly implemented in a software module executed by an image processing device. The software module can reside in a random access memory (RAM) memory, a flash memory, a read only memory (ROM) memory, an erasable programmable read only memory (EPROM) memory, an electrically erasable programmable read only memory (EEPROM) memory, a register, a hard disk, a removable disk, a compact disc read only memory (CDROM) or any other form of storage medium known in the art. The storage medium is coupled to the processing device so that the image processing device can read information from the storage medium and write information to the storage medium. Optionally, the storage medium can be integrated with the image processing device.

[0116] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the image processing device. The image processing device may include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.

[0117] In an exemplary embodiment, a chip is also provided, the chip includes a processor and a memory, and at least one computer program is stored in the memory. The at least one computer program is loaded and executed by one or more processors, so that a computer device equipped with the chip implements any of the above-mentioned image processing methods. In an exemplary embodiment, a chip is also provided, the chip includes any of the above-mentioned image processing devices.

[0118] In an exemplary embodiment, a computer device is also provided, the computer device comprising a processor and a memory, wherein at least one computer program is stored in the memory. The at least one computer program is loaded and executed by one or more processors, so that the computer device implements any of the above-mentioned image processing methods.

[0119] In an exemplary embodiment, a computer-readable storage medium is further provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor of a computer device to enable the computer to implement any of the above-mentioned image processing methods.

[0120] In one possible implementation, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0121] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs any of the above-mentioned image processing methods.

[0122] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions. For example, the first grayscale images involved in this application are all obtained with full authorization.

[0123] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0124] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. An image processing device, characterized in that: The device comprises: A sharpening module, configured to perform sharpening processing on the image to be processed to obtain a first image; A processing module, configured to calculate the grayscale gradient information of multiple directions corresponding to each pixel point based on the grayscale value of each pixel point included in the image to be processed; and calculate the compensation factor corresponding to each pixel point based on the grayscale gradient information of multiple directions corresponding to each pixel point, wherein the compensation factor is used to control the grayscale value of the corresponding pixel point within a reference grayscale range; The compensation module is configured to compensate each pixel point included in the first image based on the compensation factor corresponding to each pixel point to obtain a second image.

2. The device according to claim 1, characterized in that The processing module is configured to: Calculating compensation factors in multiple directions corresponding to each pixel point based on the grayscale gradient information in multiple directions corresponding to each pixel point; Based on the compensation factors in multiple directions corresponding to the pixels, the compensation factors corresponding to the pixels are calculated.

3. The device according to claim 1 or 2, characterized in that: The processing module is configured to: For each of the individual pixel points, grayscale values ​​of multiple pixel points centered on the pixel point are obtained in multiple directions; for each of the multiple directions, grayscale gradient information of the direction corresponding to the pixel point is calculated based on the grayscale values ​​of the multiple pixel points obtained in the direction.

4. The device according to claim 3, characterized in that For each direction of the multiple directions, the grayscale values ​​of the multiple pixels acquired in the direction include the grayscale values ​​of the pixels of the first part and the grayscale values ​​of the pixels of the second part, and the pixels of the first part and the pixels of the second part are divided with the pixel as the center; the processing module is configured to: Calculating first gradient information corresponding to the pixel points of the first part based on the grayscale values ​​of the pixel points of the first part; Calculating second gradient information corresponding to the pixel points of the second part based on the grayscale values ​​of the pixel points of the second part; Based on the first gradient information and the second gradient information, grayscale gradient information of the direction corresponding to the pixel point is obtained.

5. The device according to any one of claims 1, 2 and 4, characterized in that: The reference grayscale ranges corresponding to the various pixel points are different.

6. The device according to any one of claims 1, 2 and 4, characterized in that: The processing module is configured to: For each of the individual pixel points, grayscale values ​​of multiple pixel points centered on the pixel point are obtained in at least one direction; based on the maximum grayscale value and the minimum grayscale value among the grayscale values ​​of the multiple pixel points, a reference grayscale range corresponding to the pixel point is obtained.

7. An image processing method, characterized in that: The method comprises: Performing sharpening processing on the image to be processed to obtain a first image; Based on the grayscale value of each pixel point included in the image to be processed, calculating the grayscale gradient information in multiple directions corresponding to each pixel point; Based on the grayscale gradient information in multiple directions corresponding to each pixel point, a compensation factor corresponding to each pixel point is calculated, wherein the compensation factor is used to control the grayscale value of the corresponding pixel point within a reference grayscale range; Based on the compensation factors corresponding to the pixels, the pixels included in the first image are compensated to obtain a second image.

8. The method according to claim 7, characterized in that The calculating the compensation factor corresponding to each pixel point based on the grayscale gradient information in multiple directions corresponding to each pixel point includes: Calculating compensation factors in multiple directions corresponding to each pixel point based on the grayscale gradient information in multiple directions corresponding to each pixel point; Based on the compensation values ​​in multiple directions corresponding to the pixel points, the compensation factors corresponding to the pixel points are calculated.

9. The method according to claim 7 or 8, characterized in that: The step of calculating multi-directional grayscale gradient information corresponding to each pixel point based on the grayscale value of each pixel point included in the image to be processed includes: For each of the individual pixel points, grayscale values ​​of multiple pixel points centered on the pixel point are obtained in multiple directions; for each of the multiple directions, grayscale gradient information of the direction corresponding to the pixel point is calculated based on the grayscale values ​​of the multiple pixel points obtained in the direction.

10. The method according to claim 9, characterized in that For each direction of the multiple directions, the grayscale values ​​of the multiple pixels acquired in the direction include grayscale values ​​of the pixels of the first part and grayscale values ​​of the pixels of the second part, and the pixels of the first part and the pixels of the second part are divided with the pixel as the center; The step of calculating the grayscale gradient information of the direction corresponding to the pixel points based on the grayscale values ​​of the plurality of pixel points acquired in the direction includes: Calculating first gradient information corresponding to the pixel points of the first part based on the grayscale values ​​of the pixel points of the first part; Calculating second gradient information corresponding to the pixel points of the second part based on the grayscale values ​​of the pixel points of the second part; Based on the first gradient information and the second gradient information, grayscale gradient information of the direction corresponding to the pixel point is obtained.

11. The method according to any one of claims 7, 8 and 10, characterized in that: The reference grayscale ranges corresponding to the various pixel points are different.

12. The method according to any one of claims 7, 8 and 10, characterized in that: Before calculating the compensation factors corresponding to the respective pixels based on the grayscale gradient information in multiple directions corresponding to the respective pixels, the method further includes: For each of the individual pixel points, grayscale values ​​of multiple pixel points centered on the pixel point are obtained in at least one direction; based on the maximum grayscale value and the minimum grayscale value among the grayscale values ​​of the multiple pixel points, a reference grayscale range corresponding to the pixel point is obtained.

13. A display chip, characterized in that: The display chip includes the image processing device as described in any one of claims 1 to 6.

14. A computer device, characterized in that: The computer device includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor so that the computer device implements the image processing method according to any one of claims 7 to 12.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the computer implements the image processing method according to any one of claims 7 to 12.