Image processing method, device, computer equipment and medium based on dithering processing

By using an image processing method based on dither processing on the LCD display and processing the image by staggering the dither matrix, the problems of flicker, stripes and block effects are solved, improving the visual perception and avoiding periodic changes in low-gray solid-color images.

CN113590071BActive Publication Date: 2025-01-21UNILUMIN GRP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110677308.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-18
Publication Date
2025-01-21
Estimated Expiration
2041-06-18

AI Technical Summary

Technical Problem

When using the pixel jitter method to the LCD display for image processing, flicker, stripe and block effects occur. Especially in low-gray solid-color images, the block effect shows periodic changes, affecting the visual perception.

Method used

By obtaining the image to be processed and the corresponding initial dither matrix, the superposition value is determined according to the coordinate position of the pixel point, and the superposition process is performed to obtain the staggered dither matrix, and then the image is dithered to avoid flickering caused by synchronous changes.

Benefits of technology

By spatially staggering the dithering method, the visual perception is improved, the periodic changes in space of the block effect of low gray solid colors are avoided, and the display effect of the image is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113590071B_ABST
    Figure CN113590071B_ABST
Patent Text Reader

Abstract

The present application relates to an image processing method, device, computer equipment and medium based on jitter processing, the method comprising obtaining an image to be processed and an initial jitter matrix corresponding to the image to be processed; for multiple pixels included in the image to be processed, determining the superimposed values ​​corresponding to each pixel according to the coordinate position of each pixel in the image to be processed; for each pixel included in the image to be processed, superimposing the superimposed values ​​corresponding to the corresponding pixel and the initial jitter matrix respectively to obtain the staggered jitter matrix corresponding to each pixel; based on the obtained staggered jitter matrices, performing jitter processing on the image to be processed to convert the image to be processed into the corresponding target image. The use of this method can improve visual perception.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of display control technology, and in particular to an image processing method, device, computer equipment and medium based on dithering processing. Background Art

[0002] The pixel dithering method is mainly based on the visual inertia of the human eye. Its principle is to distribute the high-bit display information to adjacent spaces through the dithering matrix calculation, so that the image quality is significantly improved to increase the grayscale level of the display. However, when the pixel dithering method is applied to LCD display screens for image processing, flickering, stripes and block effects occur due to the lack of the dithering matrix and other reasons. To solve the above problems, the existing solution considers combining the inter-frame error accumulation with the rotating dithering matrix processing method, but in the case of low-gray pure color images, the block effect will still show periodic changes in space and is easy to be observed, resulting in poor visual perception. Summary of the invention

[0003] Based on this, it is necessary to provide an image processing method, device, computer equipment and medium based on dithering processing that can improve visual perception in response to the above technical problems.

[0004] In a first aspect, this embodiment provides an image processing method based on dithering processing, the method comprising:

[0005] Acquire an image to be processed and an initial dithering matrix corresponding to the image to be processed;

[0006] For a plurality of pixel points included in the image to be processed, determining a superposition value corresponding to each pixel point according to a coordinate position of each pixel point in the image to be processed;

[0007] For each pixel point included in the image to be processed, the superposition value corresponding to the corresponding pixel point and the initial jitter matrix are respectively superimposed to obtain the staggered jitter matrices corresponding to each pixel point;

[0008] Based on the obtained staggered dithering matrices, dithering is performed on the image to be processed to convert the image to be processed into a corresponding target image.

[0009] In a second aspect, this embodiment provides an image processing device based on dithering processing, the device comprising:

[0010] An acquisition module, used for acquiring an image to be processed and an initial jitter matrix corresponding to the image to be processed;

[0011] A first processing module, for determining, for a plurality of pixel points included in the image to be processed, a superposition value corresponding to each pixel point according to a coordinate position of each pixel point in the image to be processed;

[0012] A second processing module is used to perform superposition processing on the superposition value corresponding to each pixel point included in the image to be processed and the initial jitter matrix, so as to obtain the staggered jitter matrix corresponding to each pixel point;

[0013] The dither processing module is used to perform dither processing on the image to be processed based on the obtained staggered dither matrices, so as to convert the image to be processed into a corresponding target image.

[0014] In a third aspect, this embodiment provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0015] Acquire an image to be processed and an initial dithering matrix corresponding to the image to be processed;

[0016] For a plurality of pixel points included in the image to be processed, determining a superposition value corresponding to each pixel point according to a coordinate position of each pixel point in the image to be processed;

[0017] For each pixel point included in the image to be processed, the superposition value corresponding to the corresponding pixel point and the initial jitter matrix are respectively superimposed to obtain the staggered jitter matrices corresponding to each pixel point;

[0018] Based on the obtained staggered dithering matrices, dithering is performed on the image to be processed to convert the image to be processed into a corresponding target image.

[0019] In a fourth aspect, this embodiment provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0020] Acquire an image to be processed and an initial dithering matrix corresponding to the image to be processed;

[0021] For a plurality of pixel points included in the image to be processed, determining a superposition value corresponding to each pixel point according to a coordinate position of each pixel point in the image to be processed;

[0022] For each pixel point included in the image to be processed, the superposition value corresponding to the corresponding pixel point and the initial jitter matrix are respectively superimposed to obtain the staggered jitter matrices corresponding to each pixel point;

[0023] Based on the obtained staggered dithering matrices, dithering is performed on the image to be processed to convert the image to be processed into a corresponding target image.

[0024] The above-mentioned image processing method, device, computer equipment and medium based on dithering processing determine the superimposed values ​​corresponding to each pixel point according to the coordinate position of each pixel point in the image to be processed, so as to correspond different pixel points to different staggered dithering matrices. By using different dithering matrices in different spaces on the same frame image, the flickering phenomenon caused by synchronous changes is avoided based on a spatially staggered dithering method, the visual perception is improved, and the problem of periodic changes in space caused by the block effect of low-gray pure color parts is avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A diagram showing an application environment of an image processing method based on dithering processing in one embodiment;

[0026] Figure 2 is a schematic flow chart of an image processing method based on dithering processing in one embodiment;

[0027] Figure 3 is a principle block diagram of performing dithering processing on the image to be processed in one embodiment;

[0028] Figure 4 A schematic diagram of performing synchronous jittering and staggered jittering based on a jitter table in an embodiment;

[0029] Figure 5 A schematic diagram of a staggered jitter matrix and a staggered jitter table formed after expansion in one embodiment;

[0030] Figure 6 is a principle block diagram of an image processing method based on dithering processing in another embodiment;

[0031] Figure 7 A schematic diagram of a flow chart of an application case in an embodiment;

[0032] Figure 8 is a structural block diagram of an image processing device based on dithering processing in one embodiment;

[0033] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0035] The image processing method based on dithering provided in this application can be applied to Figure 1 In the application environment shown in FIG. 1 , the image acquisition device 102 communicates with the computer device 104 via a network. Figure 1 In the application environment shown, first, the computer device 104 acquires the image to be processed transmitted via the image acquisition device 102, and the initial jitter matrix corresponding to the image to be processed; then, the computer device 104 determines the superimposed values ​​corresponding to each pixel point for a plurality of pixel points included in the image to be processed according to the coordinate position of each pixel point in the image to be processed; then, the computer device 104 performs superimposed processing on the superimposed values ​​corresponding to the corresponding pixel point and the initial jitter matrix for each pixel point included in the image to be processed, so as to obtain the staggered jitter matrices corresponding to each pixel point; finally, the computer device 104 performs jitter processing on the image to be processed based on the obtained staggered jitter matrices, so as to convert the image to be processed into the corresponding target image.

[0036] exist Figure 1 In the application environment shown, the image acquisition device 102 may be a camera, a video camera, a scanner, or other terminal devices with a camera function pre-set at a corresponding shooting location. The computer device 104 may be a terminal or a server. It should be noted that the terminal may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented as an independent server or a server cluster consisting of multiple servers.

[0037] In one embodiment, Figure 2 As shown, a method for image processing based on dithering is provided, and the method is applied to Figure 1 The computer device in the example is used to illustrate, including the following steps:

[0038] Step S202, obtaining an image to be processed and an initial dithering matrix corresponding to the image to be processed.

[0039] Specifically, the image to be processed may be a channel image corresponding to one of the three color channels of an RGB color image. The initial jitter matrix may be obtained by the following derivation formula (2) when the matrix M1 is known:

[0040]

[0041] In one embodiment, through the above derivation formula (2) and Un=1, the initial jitter matrix M is derived as shown in formula (3):

[0042]

[0043] In one embodiment, in addition to being able to derive the initial jitter matrix based on the above-mentioned derivation formula (2), the computer device can also be based on a preset splicing rule, with the preset 2×2 jitter matrix as the splicing basis, and after several splicing, further obtain the initial jitter matrix required in this embodiment. It should be noted that the above-mentioned splicing rule can be: based on the preset 2×2 jitter matrix, splicing is performed multiple times in sequence from top to bottom or from left to right, and the arrangement position of the corresponding elements in the jitter matrix will be changed during each splicing process. Finally, after multiple splicing according to the above-mentioned splicing rules, the initial jitter matrix is ​​obtained. Exemplarily, based on the above-mentioned custom splicing method, with the preset jitter matrix As the basis for splicing, after splicing 4 times in a top-down order, the initial jitter matrix M is shown in formula (4):

[0044]

[0045] Based on the above formula (4), it can be understood that when performing the second splicing, the matrix object to be spliced ​​is When performing the third splicing, the corresponding matrix object is inserted in the second row and first column of the matrix M. Based on formula (4), it can be seen that the matrix object inserted at this time is

[0046] Step S204: for a plurality of pixel points included in the image to be processed, determining the superposition value corresponding to each pixel point according to the coordinate position of each pixel point in the image to be processed.

[0047] Specifically, the superposition value corresponding to each pixel point is determined according to the coordinate position of each pixel point in the image to be processed, including: with respect to the coordinate position of each pixel point in the image to be processed, the coordinate position corresponding to the corresponding pixel point is rounded according to a preset rounding value to obtain a corresponding superposition adjustment value; according to the superposition adjustment value, the superposition value corresponding to each pixel point is determined according to the setting rule that the difference between the staggered jitter matrices corresponding to adjacent pixel points in the row direction meets the first preset condition, and the difference between the staggered jitter matrices corresponding to adjacent pixel points in the vertical direction meets the second preset condition.

[0048] In one embodiment, the computer device determines the superposition value I corresponding to each pixel point according to the following formula:

[0049]

[0050] Wherein, x is the horizontal coordinate of the corresponding pixel point in the image to be processed, and y is the vertical coordinate of the corresponding pixel point in the image to be processed. That is, the horizontal coordinate corresponding to the corresponding pixel point is rounded according to the preset rounding value (in the current embodiment, the rounding value is 4. Of course, in other embodiments, the rounding value can also be other values, which is not limited to the embodiments of the present application), and the first superposition adjustment value is obtained. That is, the second superposition adjustment value is obtained by rounding the ordinate corresponding to the corresponding pixel point according to a preset rounding value (in the current embodiment, the rounding value is 4). "2×Ix" is the first superposition object determined by taking 2 as the first difference between the staggered jitter matrices corresponding to adjacent pixel points in the row direction; That is, the second superposition object is determined by taking the second difference between the staggered jitter matrices corresponding to the vertically adjacent pixel points as 1. In the current embodiment, the first superposition object and the second superposition object are summed to obtain the superposition value I corresponding to each pixel point. Of course, the above-mentioned first difference and second difference can also be taken as other values ​​or value ranges, as long as the technical effect of different staggered jitter matrices corresponding to different pixel points can be achieved, and the embodiment of the present application does not limit this.

[0051] In the above embodiment, the superposition value corresponding to each pixel point is determined according to the coordinate position of each pixel point in the image to be processed, so that different pixel points are corresponded to different staggered jitter matrices, and the flickering phenomenon caused by synchronous changes is avoided by staggered jitter.

[0052] Step S206: for each pixel point included in the image to be processed, the superposition value corresponding to the corresponding pixel point and the initial dither matrix are superimposed respectively to obtain the staggered dither matrix corresponding to each pixel point.

[0053] Specifically, the superimposed values ​​corresponding to the corresponding pixel points and the initial jitter matrix are superimposed respectively to obtain the staggered jitter matrices corresponding to each pixel point, including: for each pixel point, the superimposed values ​​corresponding to the corresponding pixel point and each element in the initial jitter matrix are superimposed and calculated to obtain the intermediate jitter matrices corresponding to each pixel point; for the intermediate jitter matrix corresponding to each pixel point, each element in the intermediate jitter matrix corresponding to the corresponding pixel point is calculated modulo a preset jitter matrix size to obtain the staggered jitter matrices corresponding to each pixel point.

[0054] In one embodiment, a computer device selects a corresponding range limiting parameter L based on the dimension of the initial jitter matrix, and sets the size of the jitter matrix according to the selected range limiting parameter L. In one embodiment, on the one hand, not only can the "L×L" and other calculation methods be used to set the size of the jitter matrix, but other calculation methods can also be used, which is not limited in the embodiment of the present application. On the other hand, a computer device performs a remainder calculation based on the "rem(*)" function calculation formula. Exemplarily, the computer device substitutes each element in the intermediate jitter matrix corresponding to the corresponding pixel point into the above-mentioned function calculation formula, and performs a remainder calculation according to the jitter matrix size set based on the "L×L" calculation method, so as to limit the value of each element in the initial jitter matrix to a preset value range. Wherein:

[0055] First, it should be noted that the range-limiting parameter L is differentiated according to the initial jitter matrix. In one embodiment, if the initial jitter matrix is ​​spliced ​​by a custom splicing method, then in the current embodiment, the value of L is 2. In one embodiment, if the initial jitter matrix is ​​derived according to a formula, then in the current embodiment, the value of L is 4.

[0056] Secondly, it should be noted that the image jitter processing is to compare a single pixel in the image with multiple values ​​set in a preset jitter table in sequence to perform jitter. In this embodiment, in order to solve problems such as flickering and block effects, spatial staggered jitter is added when the image to be processed is jittered. However, spatial staggered jitter does not refer to spatial jitter. It refers to spatially staggering the jitter comparison starting point of each pixel in the jitter table, thereby disrupting the spatial synchronization of the jitter. Figure 3 As shown, synchronous dithering means that each pixel in the image to be processed starts to be compared from the first value of the dithering table. Since the dithering table and dithering rules used are consistent, when the synchronous dithering is applied to a pure color image, a very obvious synchronous change will appear. This synchronous change will cause obvious flickering in the low gray stage. However, in this embodiment, the dithering comparison starting point of each pixel in the dithering table is changed (i.e., the dithering rule of the pixel is changed). Under the current processing method, although each pixel has undergone the comparison dithering processing from a1 to a16, due to the different dithering rules, the flickering phenomenon caused by the synchronous change will not appear, which in turn improves the overall visual perception and avoids the generation of block effects.

[0057] Step S208: Based on the obtained staggered dithering matrices, dithering is performed on the image to be processed to convert the image to be processed into a corresponding target image.

[0058] Specifically, please refer to Figure 5, the computer device performs jitter processing on the image to be processed based on the obtained staggered jitter matrices, and, in the process of jitter processing, for each pixel in the image to be processed, the computer device splits the 12-bit data corresponding to each pixel into high 8-bit data D1 and low 4-bit data D2. Moreover, when the computer device performs jitter processing on each pixel in the image to be processed, the low 4-bit data D2 of the corresponding pixel is compared with the jitter comparison value D3 taken out from the staggered jitter matrix, and when the low 4-bit data D2 is greater than the taken jitter comparison value D3, the corresponding high 8-bit data D1 is added with a preset value (of course, the superposition value here can be set according to actual needs, and the embodiment of the present application is not limited to this), so that the pixel value of the corresponding pixel meets the target pixel value. Otherwise, the corresponding high 8-bit data D1 is retained, so that the pixel value of the corresponding pixel after retaining the high-bit area data unchanged meets the target pixel value. Finally, based on all the pixel points that meet the target pixel value in the image to be processed, the target image (i.e., output 8-bit display data) is obtained.

[0059] In one embodiment, the jitter comparison value D3 can be determined based on the relative coordinate position of the jitter area where the corresponding pixel point is located, the jitter frame number where the corresponding pixel point is currently located, and when the image to be processed is a channel image corresponding to one of the three color channels of a color image, the channel sequence number corresponding to the channel image. It should be noted that: (1) the jitter frame number where the corresponding pixel point is currently located refers to the frame number of 16 jitter frames generated after a frame of image is jittered by 4 bits, wherein the value range of the frame number is 0 to 15; in one embodiment, the jitter frame number can be determined by a frame counter, and of course other frame number counting methods can also be used, which is not limited in the embodiment of the present application. (2) The channel number refers to the number of the three channels corresponding to the color image. In order to distinguish the jitter table and facilitate the calculation of the jitter comparison value D3, the channel number can be 0, 1 and 2. For example, when the image to be processed in the R channel is jittered, the channel number can be 0; when the image to be processed in the G channel is jittered, the channel number can be 1. Of course, in order to facilitate subsequent value calculations, the channel number can also be other values, which is not limited in the embodiments of the present application. (3) The relative coordinate position of the jitter area where the corresponding pixel point is located refers to the coordinate position of the corresponding pixel point in the jitter block.

[0060] In the above embodiment, when the computer device performs dithering processing on each pixel in the image to be processed, the lower 4-bit data D2 of the corresponding pixel is taken and compared with the dithering comparison value D3 taken out from the staggered dithering matrix. Since the calculation result of the dithering comparison value D3 includes the spatial dithering in the same frame to eliminate the blocking effect, as well as the staggered dithering of the three channels, the brightness change effect can be reduced at low gray levels.

[0061] In the above-mentioned image processing method based on dithering, the superimposed values ​​corresponding to each pixel are determined according to the coordinate position of each pixel in the image to be processed, so as to correspond different pixel points to different staggered dithering matrices. By using different dithering matrices in different spaces on the same frame image, the flickering phenomenon caused by synchronous changes is avoided based on a spatially staggered dithering method, the visual perception is improved, and the problem of periodic changes in space caused by the block effect of low-gray pure color parts is avoided.

[0062] In one embodiment, based on the obtained staggered dithering matrices, dithering is performed on the image to be processed to convert the image to be processed into a corresponding target image, including:

[0063] (1) Each staggered jitter matrix is ​​converted into a staggered jitter table in the form of a one-dimensional array.

[0064] It can be understood that in the current embodiment, the computer device will convert each staggered jitter matrix into a staggered jitter table in the form of a one-dimensional array according to the character string conversion method. Exemplarily, first, a multidimensional array tempArr will be defined by the computer device; then, the computer device will use the character string conversion method to convert tempArr into a character string tempStr; finally, the computer device will use the split() method to split the character string tempStr into corresponding one-dimensional arrays. Of course, in other embodiments, other one-dimensional array conversion methods may also be used, such as using a recursive method, etc., which is not limited in the embodiments of the present application.

[0065] (2) For each pixel point included in the image to be processed, a target comparison value is taken from the corresponding staggered jitter table according to the relative coordinate position of the jitter region where the corresponding pixel point is located.

[0066] Specifically, for each pixel point included in the image to be processed, a target comparison value is taken out from the corresponding staggered jitter table according to the relative coordinate position of the jitter area where the corresponding pixel point is located, including: for each pixel point included in the target image, the relative coordinate position of the jitter area where the corresponding pixel point is located is obtained; the relative coordinate position is converted into a one-dimensional coordinate value, and the converted one-dimensional coordinate value is added to the jitter frame number where the corresponding pixel point is currently located to obtain a corresponding jitter index value; according to a preset jitter matrix size, modulo calculations are performed on each of the obtained jitter index values ​​to obtain a corresponding staggered jitter index value; for each pixel point included in the image to be processed, the target comparison value is taken out from the corresponding staggered jitter table according to the staggered jitter index value corresponding to the corresponding pixel point.

[0067] In one embodiment, the relative coordinate position of the jitter area where the corresponding pixel point is located is a two-dimensional coordinate, in order to facilitate the subsequent value calculation. When the image to be processed is a channel image corresponding to one of the three color channels of the color image, the target comparison value can be obtained by referring to the following implementation steps:

[0068] First, the relative coordinate position is converted into a one-dimensional coordinate by a computer device based on a preset one-dimensional coordinate conversion processing method.

[0069] Next, the computer device performs superposition calculation on the obtained horizontal coordinate value of the one-dimensional coordinate, the vertical coordinate value of the one-dimensional coordinate, the jitter frame number of the corresponding pixel point, and the channel number corresponding to the corresponding channel image. In one embodiment, the superposition calculation can be performed according to the following formula (7) to obtain the corresponding initial jitter index value:

[0070] a1A+b1B+...+n1N;(7)

[0071] Among them, A, B and N are all superposition calculation objects, and a1, b1 and n1 are all pre-assigned weight values.

[0072] Then, the computer device performs an out-of-bounds processing on the obtained initial jitter index value to obtain a corresponding staggered jitter index value. It should be noted that the out-of-bounds processing is to perform a remainder calculation on the initial jitter index value according to a preset jitter matrix size. In one embodiment, the computer device performs a remainder calculation based on the "rem(*)" function calculation formula. Since the calculation principle of the function calculation formula has been described in detail in step S206, the embodiment of the present application will not be described in detail here.

[0073] Finally, for each pixel point included in the image to be processed, the computer device uses the index positioning method to bring the offset jitter index value corresponding to the corresponding pixel point into the corresponding offset jitter table to locate the target comparison value. Among them, for a pixel point with a fixed position (i.e., a fixed relative coordinate position) and a fixed channel (i.e., a fixed channel number), only the jitter frame number changes during the jitter process.

[0074] (3) For each pixel point in the image to be processed, image data corresponding to each pixel point is obtained, wherein the image data includes low-bit area image data and high-bit area image data.

[0075] (4) The low-order area image data corresponding to each pixel point is compared with the target comparison value taken out from the corresponding staggered jitter table, and when the low-order area image data corresponding to the corresponding pixel point is greater than the taken out target comparison value, the high-order area image data in the corresponding pixel point is adjusted to a preset value so that the pixel value of the corresponding pixel point meets the target pixel value.

[0076] Specifically, the computer device compares the low-order image data in each pixel with the corresponding target comparison value, and adjusts the high-order image data in the corresponding pixel based on the current comparison result so that the pixel value of the corresponding pixel meets the target pixel value.

[0077] In one of the embodiments, a computer device inputs the low-order image data in each pixel of the image to be processed and the corresponding target comparison value into a comparator for value comparison, and the comparison result output by the comparator can be 0 or 1. Among them, the comparison result "0" represents that the low-order image data is greater than the extracted target comparison value, and the comparison result "1" represents that the low-order image data is less than or equal to the extracted target comparison value. In the current embodiment, the computer device will adjust the high-order image data in the corresponding pixel point based on the current comparison result and the preset adjustment strategy so that the pixel value of the corresponding pixel point meets the target pixel value. It can be understood that the preset adjustment strategy can be to adjust the high-order image data to a preset value. Of course, the adjustment strategy can also be set based on the comparison result output by the comparator, and the embodiments of the present application are not limited to this.

[0078] (5) When the low-order image data in the corresponding pixel point is not greater than the extracted target comparison value, the high-order image data in the corresponding pixel point is retained unchanged, so that the pixel value of the corresponding pixel point after retaining the high-order image data unchanged satisfies the target pixel value.

[0079] It can be understood that, based on the above embodiment, when the comparison result output by the comparator is determined to be "1", the high-order area image data in the corresponding pixel point needs to be retained so that the pixel value of the corresponding pixel point after retaining the high-order area image data unchanged satisfies the target pixel value.

[0080] (6) Based on all the pixels in the image to be processed that meet the target pixel value, the target image is obtained.

[0081] In the current embodiment, the computer device obtains the target image (ie, outputs 8-bit display data) based on all pixel points in the image to be processed that meet the target pixel value.

[0082] In the above embodiment, the computer device takes out the target comparison value D3 from the corresponding staggered jitter table and compares it with the intercepted low 4-bit data D2 of the corresponding pixel point, and adjusts the high-order image data in the corresponding pixel point based on the comparison result of the two, so that the pixel value of the corresponding pixel point meets the target pixel value, thereby completing the jitter processing of the single channel. Currently, through the RGB three-channel staggered jitter method, the minimum observation distance is shortened from 1 meter to 0.5 meters in the 0.9 pitch 320*180 size LED display device test, shortening the minimum observation distance of the jitter effect of the low gray part.

[0083] In one embodiment, the image to be processed is a channel image corresponding to one of the three color channels of the color image, and the method further includes: acquiring the channel images of each color channel in the three color channels, and obtaining target images respectively after dithering processing; merging the target images corresponding to each color channel respectively to obtain a display output image.

[0084] Specifically, Figure 6 As shown, the channel image of each color channel in the three color channels is obtained by the computer device, and the target image (i.e. Figure 6 The target images corresponding to the color channels are merged by using the corresponding image merging method to obtain a 24-bit display output image.

[0085] In one of the embodiments, a computer device calculates the brightness result of the three-channel staggered dithering according to the brightness conversion formula Y=k1×R+k2×G+k3×B, where k1, k2 and k3 are conversion coefficients, which are all related to the color gamut. It can be seen that the change of one of the R, G, and B channels will cause the change of Y. Therefore, in the current embodiment, after staggering the above three R, G, and B channels, the brightness change level of the target image will be expanded from the previous 1 level to 8 levels, so that when processing low-gray images, the brightness change effect can be reduced and the visual perception can be improved. Among them:

[0086] (1) The brightness result of three-channel synchronous dithering is:

[0087] Y1=k1×R+k2×G+k3×B;

[0088] Y2=k1×(R+1)+k2×(G+1)+k3×(B+1).

[0089] (2) The brightness results of the three-channel staggered dithering are:

[0090] Y1=k1×R+k2×G+k3×B;

[0091] Y2=k1×(R+1)+k2×G+k3×B;

[0092] Y3=k1×R+k2×(G+1)+k3×B;

[0093] Y4 = k1 × R + k2 × G + k3 × (B + 1);

[0094] Y5=k1×(R+1)+k2×(G+1)+k3×B;

[0095] Y6=k1×(R+1)+k2×G+k3×(B+1);

[0096] Y7=k1×R+k2×(G+1)+k3×(B+1);

[0097] Y8=k1×(R+1)+k2×(G+1)+k3×(B+1).

[0098] It should be noted that the three-channel staggered jitter does not change the jitter effect of a single channel of a single pixel, so the overall jitter effect remains unchanged.

[0099] In one embodiment, before performing a dithering process on the image to be processed, the method further includes: obtaining the sub-pixel data length corresponding to each pixel point in the image to be processed, and when the sub-pixel data length of the corresponding pixel point is less than a preset length, performing data bit expansion processing on the sub-pixel data length of the corresponding pixel point to expand the sub-pixel data length of the corresponding pixel point to the preset length, wherein the data bit expansion processing method includes at least one of a linear mapping method and a gamma correction method.

[0100] Specifically, a 4-bit jittered image requires 16 jittered frames to be displayed, so the frame rate of the processing system is required to be 16 times the original frame rate. Figure 6 As shown, the input data source can be 24 bits or 36 bits, wherein, when the input data source is 36 bits, the computer device can directly split it into 12 bits of R data, 12 bits of G data and 12 bits of B data; wherein, the R data will be input into the dithering processing module based on channel 1 for dithering processing, and the R dithering result will be output; the G data will be input into the dithering processing module based on channel 2 for dithering processing, and the G dithering result will be output; the B data will be input into the dithering processing module based on channel 3 for dithering processing, and the B dithering result will be output. In one embodiment, if the input data source is 24 bits, the computer device performs data bit expansion processing on the current input data source, so that the expanded data source can be split into RGB channels.

[0101] In one embodiment, the data bit expansion process can be performed by a linear mapping method and / or a gamma correction method. In one embodiment, the linear mapping is performed by a computer device based on the following formula (10):

[0102] F(A)=A×FBmax / FPmax;(10)

[0103] In formula (10), A is the grayscale value before expansion (0-255), F(A) is the grayscale value after expansion, and FBmax represents the maximum grayscale value after expansion (4095 (2 12 -1), FPmax indicates the maximum grayscale value before expansion, 255 (2 8 -1). In one embodiment, the computer device performs gamma correction based on the following formula (11):

[0104]

[0105] In formula (11), gm represents the gamma coefficient. In one embodiment, after rounding the expanded grayscale value F(A) obtained based on formula (10) and formula (11), the expanded 12-bit grayscale value can be obtained.

[0106] In the above embodiment, before dithering the image to be processed, the sub-pixel data length of the corresponding pixel point is extended to a preset length to ensure that the extended sub-pixel data length can meet the 12-bit grayscale value, providing a reliable data source for subsequent dithering processing.

[0107] In one embodiment, low gray consistency correction will be used as an example for explanation. In the LED screen rental market, color inconsistency caused by mixed batches of screens often occurs. The reason for this phenomenon is that the lamp beads in each batch are not consistent, and the brightness and chromaticity of the maximum grayscale are inconsistent. When calibrating consistency, the lower limit of each channel in the mixed batch is usually used as a limit for consistency calibration. For example, when adjusting the consistency of a lamp with 800 brightness and a lamp with 1000 brightness, the brightness of 1000 is multiplied by a coefficient of 0.8. This processing is problematic in the digital system. The grayscale 6 brightness of the 800 brightness lamp is 6×800 / 256. After adjustment, the grayscale 6 brightness of the 1000 brightness should be 6×0.8×1000 / 2 56, where 6×0.8 is the adjustment part, that is, you need to input the grayscale value of 4.8 for the 1000 brightness lamp to be consistent with the grayscale 6 of the 800 brightness lamp, but there is no 4.8 in the 8-bit grayscale, only 4 or 5, so no matter whether you take 4 or 5, the effect of the 1000 brightness lamp is different from that of the 800 brightness lamp, but if it is 10-bit grayscale, you can get a value of 4.75 that is closer to the grayscale value of 4.8. The more bits, the closer to this adjustment value, so you only need to make a mapping table, using the grayscale of the low-brightness screen as the standard to map the grayscale value of the high-brightness screen after the grayscale is expanded, so as to achieve consistency correction. Figure 7 As shown, in the current embodiment, in order to achieve consistency calibration of 256 grayscale levels of two screens, the following steps need to be implemented:

[0108] (1) Set 0 as the initial calibration grayscale value.

[0109] (2) Generate an 8-bit calibrated grayscale pure color image according to the calibrated grayscale value, and display the calibrated grayscale pure color image on a low-brightness screen.

[0110] (3) The grayscale value after expansion is fuzzy calculated by the ratio relationship of the two maximum brightnesses measured before calibration, wherein the fuzzy calculation formula is:

[0111]

[0112] (4) Displaying the expanded image data on the highlight screen.

[0113] (5) Compare the low-brightness screen and the high-brightness screen to see if they are consistent, where “consistent” means that the display effect of the high-brightness screen is closest to the display result of the low-brightness screen.

[0114] (6) If the difference between the low-brightness screen and the high-brightness screen is obvious, the 12-bit grayscale value of the high-brightness screen is fine-tuned (±1), and a 12-bit grayscale image is generated, and the process returns to step (4) to display the expanded image data on the high-brightness screen again; if the grayscales of the two screens are consistent, the process proceeds to step (7).

[0115] (7) Save the mapping relationship between the low-brightness screen grayscale value and the high-brightness screen grayscale value.

[0116] (8) All grayscales are calibrated in sequence according to the above steps (2) to (7) until all grayscale calibrations are completed.

[0117] In the above embodiment, the grayscale of the low-brightness screen is used as the standard to demap the grayscale value of the high-brightness screen after the grayscale is expanded, thereby ensuring the grayscale consistency between the two screens and avoiding the color inconsistency problem caused by mixed batches of screens.

[0118] It should be understood that although Figure 2 and Figure 7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 7 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0119] In one embodiment, Figure 8 As shown, an image processing device 800 based on dithering processing is provided, comprising: an acquisition module 801, a first processing module 802, a second processing module 803 and a dithering processing module 804, wherein:

[0120] The acquisition module 801 is used to acquire the image to be processed and the initial dither matrix corresponding to the image to be processed.

[0121] The first processing module 802 is used to determine, for a plurality of pixel points included in the image to be processed, a superposition value corresponding to each pixel point according to a coordinate position of each pixel point in the image to be processed.

[0122] The second processing module 803 is used to perform superposition processing on the superposition value corresponding to each pixel point included in the image to be processed and the initial dither matrix, so as to obtain the staggered dither matrix corresponding to each pixel point.

[0123] The dither processing module 804 is used to perform dither processing on the image to be processed based on the obtained staggered dither matrices, so as to convert the image to be processed into a corresponding target image.

[0124] In one of the embodiments, the first processing module 802 is also used to round the coordinate position corresponding to each pixel point in the image to be processed according to a preset rounding value to obtain a corresponding overlay adjustment value; according to the overlay adjustment value, the overlay value corresponding to each pixel point is determined according to the setting rule that the difference between the staggered jitter matrices corresponding to adjacent pixel points in the row direction satisfies the first preset condition, and the difference between the staggered jitter matrices corresponding to adjacent pixel points in the vertical direction satisfies the second preset condition.

[0125] In one embodiment, the second processing module 803 is also used to perform superposition calculations on the superposition values ​​corresponding to the corresponding pixel points and each element in the initial jitter matrix for each pixel point, so as to obtain intermediate jitter matrices corresponding to each pixel point; for the intermediate jitter matrices corresponding to each pixel point, each element in the intermediate jitter matrix corresponding to the corresponding pixel point is calculated modulo a preset jitter matrix size to obtain staggered jitter matrices corresponding to each pixel point.

[0126] In one embodiment, the jitter processing module 804 is further used to convert each staggered jitter matrix into a staggered jitter table in the form of a one-dimensional array; for each pixel point included in the image to be processed, according to the relative coordinate position of the jitter area where the corresponding pixel point is located, the target comparison value is taken out from the corresponding staggered jitter table; for each pixel point in the image to be processed, the image data corresponding to each pixel point is obtained, and the image data includes low-order area image data and high-order area image data; the low-order area image data corresponding to each pixel point is compared with the target comparison value taken out from the corresponding staggered jitter table, and when the low-order area image data corresponding to the corresponding pixel point is greater than the taken out target comparison value, the high-order area image data in the corresponding pixel point is adjusted to a preset value so that the pixel value of the corresponding pixel point meets the target pixel value; when the low-order area image data in the corresponding pixel point is not greater than the taken out target comparison value, the high-order area image data in the corresponding pixel point is retained unchanged, so that the pixel value of the corresponding pixel point after retaining the high-order area image data unchanged meets the target pixel value; based on all pixel points in the image to be processed that meet the target pixel value, a target image is obtained.

[0127] In one of the embodiments, the jitter processing module 804 is also used to obtain the relative coordinate position of the jitter area where the corresponding pixel point is located for each pixel point included in the target image; convert the relative coordinate position into a one-dimensional coordinate value, and add the converted one-dimensional coordinate value to the jitter frame number where the corresponding pixel point is currently located to obtain the corresponding jitter index value; according to the preset jitter matrix size, perform modulo calculation on each jitter index value obtained to obtain the corresponding staggered jitter index value; for each pixel point included in the image to be processed, take out the target comparison value from the corresponding staggered jitter table according to the staggered jitter index value corresponding to the corresponding pixel point.

[0128] In one embodiment, the image to be processed is a channel image corresponding to one of the three color channels of the color image, and the device further includes a merging module, wherein:

[0129] The merging module is used to obtain the channel images of each color channel in the three color channels and obtain the target images after dithering; the target images corresponding to each color channel are merged to obtain the display output image.

[0130] In one embodiment, the device further comprises an expansion processing module, wherein:

[0131] An expansion processing module is used to obtain the sub-pixel data length corresponding to each pixel point in the image to be processed, and when the sub-pixel data length of the corresponding pixel point is less than a preset length, perform data bit expansion processing on the sub-pixel data length of the corresponding pixel point to expand the sub-pixel data length of the corresponding pixel point to the preset length, wherein the data bit expansion processing method includes at least one of a linear mapping method and a gamma correction method.

[0132] The above-mentioned image processing device based on dithering processing determines the superimposed value corresponding to each pixel point according to the coordinate position of each pixel point in the image to be processed, so as to correspond different pixel points to different staggered dithering matrices. By using different dithering matrices in different spaces on the same frame image, the flickering phenomenon caused by synchronous changes is avoided based on a spatially staggered dithering method, the visual perception is improved, and the problem of periodic changes in space caused by the block effect of low-gray pure color parts is avoided.

[0133] For the specific definition of the image processing device based on dithering processing, please refer to the definition of the image processing method based on dithering processing in the above text, which will not be repeated here. Each module in the above image processing device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0134] In one embodiment, a computer device is provided. The computer device may be a terminal or a server. The internal structure diagram thereof may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory and a communication interface connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an image processing method based on jitter processing is implemented.

[0135] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0136] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining an image to be processed and an initial jitter matrix corresponding to the image to be processed; for multiple pixel points included in the image to be processed, determining the superimposed values ​​corresponding to each pixel point according to the coordinate position of each pixel point in the image to be processed; for each pixel point included in the image to be processed, superimposing the superimposed values ​​corresponding to the corresponding pixel point and the initial jitter matrix respectively to obtain staggered jitter matrices corresponding to each pixel point; and performing jitter processing on the image to be processed based on the obtained staggered jitter matrices to convert the image to be processed into a corresponding target image.

[0137] In one embodiment, when the processor executes the computer program, the following steps are also implemented: for the coordinate position of each pixel point in the image to be processed, the coordinate position corresponding to the corresponding pixel point is rounded according to a preset rounding value to obtain a corresponding overlay adjustment value; according to the overlay adjustment value, the overlay value corresponding to each pixel point is determined according to the setting rule that the difference between the staggered jitter matrices corresponding to adjacent pixel points in the row direction meets the first preset condition, and the difference between the staggered jitter matrices corresponding to adjacent pixel points in the vertical direction meets the second preset condition.

[0138] In one embodiment, when the processor executes the computer program, the following steps are also implemented: for each pixel point, the superposition value corresponding to the corresponding pixel point is superimposed with each element in the initial jitter matrix to obtain the intermediate jitter matrix corresponding to each pixel point; for the intermediate jitter matrix corresponding to each pixel point, each element in the intermediate jitter matrix corresponding to the corresponding pixel point is modulo calculated according to a preset jitter matrix size to obtain the staggered jitter matrix corresponding to each pixel point.

[0139] In one embodiment, when the processor executes the computer program, the following steps are also implemented: converting each staggered jitter matrix into a staggered jitter table in the form of a one-dimensional array; for each pixel point included in the image to be processed, taking out a target comparison value from the corresponding staggered jitter table according to the relative coordinate position of the jitter area where the corresponding pixel point is located; for each pixel point in the image to be processed, obtaining image data corresponding to each pixel point, wherein the image data includes low-order area image data and high-order area image data; comparing the low-order area image data corresponding to each pixel point with the target comparison value taken out from the corresponding staggered jitter table, and when the low-order area image data corresponding to the corresponding pixel point is greater than the taken out target comparison value, adjusting the high-order area image data in the corresponding pixel point to a preset value so that the pixel value of the corresponding pixel point meets the target pixel value; when the low-order area image data in the corresponding pixel point is not greater than the taken out target comparison value, keeping the high-order area image data in the corresponding pixel point unchanged, so that the pixel value of the corresponding pixel point after keeping the high-order area image data unchanged meets the target pixel value; based on all pixel points in the image to be processed that meet the target pixel value, a target image is obtained.

[0140] In one embodiment, when the processor executes the computer program, the following steps are also implemented: for each pixel point included in the image to be processed, the relative coordinate position of the jitter area where the corresponding pixel point is located is obtained; the relative coordinate position is converted into a one-dimensional coordinate value, and the converted one-dimensional coordinate value is added to the jitter frame number where the corresponding pixel point is currently located to obtain a corresponding jitter index value; according to a preset jitter matrix size, the modulus calculation is performed on each jitter index value obtained to obtain a corresponding staggered jitter index value; for each pixel point included in the image to be processed, according to the staggered jitter index value corresponding to the corresponding pixel point, the target comparison value is taken out from the corresponding staggered jitter table.

[0141] In one embodiment, the image to be processed is a channel image corresponding to one of the three color channels of the color image, and the processor also implements the following steps when executing the computer program: acquiring the channel image of each color channel in the three color channels, and obtaining the target images respectively after dithering processing; merging the target images corresponding to each color channel to obtain a display output image.

[0142] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the sub-pixel data length corresponding to each pixel point in the image to be processed, and when the sub-pixel data length of the corresponding pixel point is less than a preset length, performing data bit expansion processing on the sub-pixel data length of the corresponding pixel point to expand the sub-pixel data length of the corresponding pixel point to the preset length, wherein the data bit expansion processing method includes at least one of a linear mapping method and a gamma correction method.

[0143] The above-mentioned computer device determines the superimposed value corresponding to each pixel point according to the coordinate position of each pixel point in the image to be processed, so as to correspond different pixel points to different staggered jitter matrices. By using different jitter matrices in different spaces on the same frame image, a spatially staggered jitter method is used to avoid the flickering phenomenon caused by synchronous changes, improve the visual perception, and avoid the problem of periodic changes in space caused by the block effect of low-gray pure color parts.

[0144] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining an image to be processed and an initial jitter matrix corresponding to the image to be processed; for multiple pixel points included in the image to be processed, determining the superimposed values ​​corresponding to each pixel point according to the coordinate position of each pixel point in the image to be processed; for each pixel point included in the image to be processed, superimposing the superimposed values ​​corresponding to the corresponding pixel point and the initial jitter matrix respectively to obtain staggered jitter matrices corresponding to each pixel point; based on the obtained staggered jitter matrices, performing jitter processing on the image to be processed to convert the image to be processed into a corresponding target image.

[0145] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for the coordinate position of each pixel point in the image to be processed, the coordinate position corresponding to the corresponding pixel point is rounded according to a preset rounding value to obtain a corresponding overlay adjustment value; according to the overlay adjustment value, the overlay value corresponding to each pixel point is determined according to the setting rule that the difference between the staggered jitter matrices corresponding to adjacent pixel points in the row direction meets the first preset condition, and the difference between the staggered jitter matrices corresponding to adjacent pixel points in the vertical direction meets the second preset condition.

[0146] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for each pixel point, the superposition value corresponding to the corresponding pixel point is superimposed with each element in the initial jitter matrix to obtain the intermediate jitter matrix corresponding to each pixel point; for the intermediate jitter matrix corresponding to each pixel point, each element in the intermediate jitter matrix corresponding to the corresponding pixel point is modulo calculated according to a preset jitter matrix size to obtain the staggered jitter matrix corresponding to each pixel point.

[0147] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: converting each staggered jitter matrix into a staggered jitter table in the form of a one-dimensional array; for each pixel point included in the image to be processed, taking out a target comparison value from the corresponding staggered jitter table according to the relative coordinate position of the jitter area where the corresponding pixel point is located; for each pixel point in the image to be processed, obtaining image data corresponding to each pixel point, wherein the image data includes low-order area image data and high-order area image data; comparing the low-order area image data corresponding to each pixel point with the target comparison value taken out from the corresponding staggered jitter table, and when the low-order area image data corresponding to the corresponding pixel point is greater than the taken out target comparison value, adjusting the high-order area image data in the corresponding pixel point to a preset value so that the pixel value of the corresponding pixel point meets the target pixel value; when the low-order area image data in the corresponding pixel point is not greater than the taken out target comparison value, keeping the high-order area image data in the corresponding pixel point unchanged, so that the pixel value of the corresponding pixel point after keeping the high-order area image data unchanged meets the target pixel value; based on all pixel points in the image to be processed that meet the target pixel value, a target image is obtained.

[0148] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for each pixel point included in the image to be processed, the relative coordinate position of the jitter area where the corresponding pixel point is located is obtained; the relative coordinate position is converted into a one-dimensional coordinate value, and the converted one-dimensional coordinate value is added to the jitter frame number where the corresponding pixel point is currently located to obtain a corresponding jitter index value; according to a preset jitter matrix size, the modulus calculation is performed on each jitter index value obtained to obtain a corresponding staggered jitter index value; for each pixel point included in the image to be processed, according to the staggered jitter index value corresponding to the corresponding pixel point, the target comparison value is taken out from the corresponding staggered jitter table.

[0149] In one embodiment, the image to be processed is a channel image corresponding to one of the three color channels of the color image. When the computer program is executed by the processor, the following steps are also implemented: obtaining the channel image of each color channel in the three color channels, and obtaining the target images after dithering processing; merging the target images corresponding to each color channel to obtain a display output image.

[0150] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the sub-pixel data length corresponding to each pixel point in the image to be processed, and when the sub-pixel data length of the corresponding pixel point is less than a preset length, performing data bit expansion processing on the sub-pixel data length of the corresponding pixel point to expand the sub-pixel data length of the corresponding pixel point to the preset length, wherein the data bit expansion processing method includes at least one of a linear mapping method and a gamma correction method.

[0151] The above-mentioned storage medium determines the superimposed value corresponding to each pixel point according to the coordinate position of each pixel point in the image to be processed, so as to correspond different pixel points to different staggered jitter matrices. By using different jitter matrices in different spaces on the same frame image, a spatially staggered jitter method is used to avoid the flickering phenomenon caused by synchronous changes, improve the visual perception, and avoid the problem of periodic changes in space caused by the block effect of low-gray pure color parts.

[0152] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0153] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0154] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. An image processing method based on dithering, characterized in that: The method comprises: Acquire an image to be processed and an initial dithering matrix corresponding to the image to be processed; For a plurality of pixel points included in the image to be processed, determining a superposition value corresponding to each pixel point according to a coordinate position of each pixel point in the image to be processed; For each pixel point included in the image to be processed, the superposition value corresponding to the corresponding pixel point and the initial jitter matrix are respectively superimposed to obtain the staggered jitter matrices corresponding to each pixel point; Based on the obtained staggered jitter matrices, jitter processing is performed on the image to be processed to convert the image to be processed into a corresponding target image; Determining the superposition values ​​corresponding to each pixel point according to the coordinate position of each pixel point in the image to be processed includes: For the coordinate position of each pixel point in the image to be processed, the coordinate position corresponding to the corresponding pixel point is rounded according to a preset rounding value to obtain a corresponding superposition adjustment value; According to the overlay adjustment value, the overlay value corresponding to each pixel point is determined according to the setting rule that the difference between the staggered jitter matrices corresponding to adjacent pixel points in the row direction meets the first preset condition, and the difference between the staggered jitter matrices corresponding to adjacent pixel points in the vertical direction meets the second preset condition.

2. The method according to claim 1, characterized in that The superimposing values ​​corresponding to the corresponding pixel points and the initial jitter matrix are respectively superimposed to obtain the staggered jitter matrices corresponding to the pixel points, including: For each of the pixel points, respectively, the superposition value corresponding to the corresponding pixel point is superimposed and calculated with each element in the initial jitter matrix to obtain an intermediate jitter matrix corresponding to each pixel point; For the intermediate jitter matrices corresponding to each of the pixel points, each element in the intermediate jitter matrix corresponding to the corresponding pixel point is modulo calculated according to a preset jitter matrix size to obtain the staggered jitter matrices corresponding to each of the pixel points.

3. The method according to claim 1, characterized in that The step of performing dithering processing on the image to be processed based on the obtained staggered dithering matrices to convert the image to be processed into a corresponding target image includes: Convert each of the staggered jitter matrices into a staggered jitter table in a one-dimensional array form; For each pixel point included in the image to be processed, according to the relative coordinate position of the jitter area where the corresponding pixel point is located, a target comparison value is taken out from the corresponding staggered jitter table; For each pixel point in the image to be processed, image data corresponding to each pixel point is obtained, wherein the image data includes low-bit area image data and high-bit area image data; Compare the low-order area image data corresponding to each of the pixel points with the target comparison value taken out from the corresponding staggered jitter table, and when the low-order area image data corresponding to the corresponding pixel point is greater than the taken out target comparison value, adjust the high-order area image data in the corresponding pixel point to a preset value so that the pixel value of the corresponding pixel point meets the target pixel value; When the low-order image data in the corresponding pixel point is not greater than the extracted target comparison value, the high-order image data in the corresponding pixel point is retained unchanged, so that the pixel value of the corresponding pixel point after retaining the high-order image data unchanged satisfies the target pixel value; A target image is obtained based on all pixel points in the image to be processed that meet the target pixel value.

4. The method according to claim 3, characterized in that For each pixel point included in the image to be processed, taking out a target comparison value from a corresponding staggered jitter table according to a relative coordinate position of a jitter region where the corresponding pixel point is located, comprises: For each pixel point included in the image to be processed, obtaining the relative coordinate position of the jitter area where the corresponding pixel point is located; The relative coordinate position is converted into a one-dimensional coordinate value, and the converted one-dimensional coordinate value is added to the jitter frame number where the corresponding pixel point is currently located to obtain a corresponding jitter index value; According to the preset jitter matrix size, respectively performing modulo calculation on each jitter index value obtained to obtain a corresponding staggered jitter index value; For each pixel point included in the image to be processed, a target comparison value is taken out from the corresponding staggered jitter table according to the staggered jitter index value corresponding to the corresponding pixel point.

5. The method according to any one of claims 1 to 4, characterized in that: The image to be processed is a channel image corresponding to one of the three color channels of the color image, and the method further includes: Obtain the channel image of each color channel in the three color channels, and obtain the target images after dithering processing; The target images corresponding to each color channel are merged to obtain a display output image.

6. The method according to claim 5, characterized in that Before the step of performing dithering processing on the image to be processed, the method further includes: Obtain the sub-pixel data length corresponding to each pixel point in the image to be processed, and when the sub-pixel data length of the corresponding pixel point is less than a preset length, perform data bit expansion processing on the sub-pixel data length of the corresponding pixel point to expand the sub-pixel data length of the corresponding pixel point to the preset length, wherein the data bit expansion processing method includes at least one of a linear mapping method and a gamma correction method.

7. An image processing device based on dithering processing, characterized in that: The device comprises: An acquisition module, used for acquiring an image to be processed and an initial jitter matrix corresponding to the image to be processed; A first processing module, for determining, for a plurality of pixel points included in the image to be processed, a superposition value corresponding to each pixel point according to a coordinate position of each pixel point in the image to be processed; A second processing module is used to perform superposition processing on the superposition value corresponding to each pixel point included in the image to be processed and the initial jitter matrix, so as to obtain the staggered jitter matrix corresponding to each pixel point; A dither processing module, used for performing dither processing on the image to be processed based on the obtained staggered dither matrices, so as to convert the image to be processed into a corresponding target image; The first processing module is also used to round the coordinate position corresponding to each pixel point in the image to be processed according to a preset rounding value to obtain a corresponding overlay adjustment value; according to the overlay adjustment value, the overlay value corresponding to each pixel point is determined according to the setting rule that the difference between the staggered jitter matrices corresponding to adjacent pixel points in the row direction satisfies the first preset condition, and the difference between the staggered jitter matrices corresponding to adjacent pixel points in the vertical direction satisfies the second preset condition.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Image variable magnification device and image variable magnification method

    CN104427202A

  • Image frame display method and device, electronic device and storage medium

    CN112738492A