Method, device and electronic device for determining grayscale value of image

By adjusting the grayscale index and dividing the image into multiple sub-image areas, combining the initial grayscale value and template grayscale value, the low grayscale dot problem in LED image display is solved, and the grayscale performance ability of the image is improved.

CN116153246BActive Publication Date: 2025-05-13LEYARD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310188831.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2025-05-13
Estimated Expiration
2043-02-21

AI Technical Summary

Technical Problem

Low gray pockmarks are prone to occur when displaying LED images, and the prior art has not yet proposed an effective solution.

Method used

By determining the predetermined grayscale index of the initial frame image and the restricted grayscale index of the display driver chip, when the restricted grayscale index is less than the predetermined grayscale index, the grayscale index is adjusted, the image is divided into multiple sub-image areas, and the target grayscale value is determined based on the initial grayscale value and the updated template grayscale value.

Benefits of technology

Effectively adjust the grayscale values ​​of multiple sub-image areas, eliminate the low gray spot phenomenon, and improve the grayscale performance of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116153246B_ABST
    Figure CN116153246B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and electronic device for determining the grayscale value of an image. The method comprises: determining a predetermined grayscale index of an initial frame image and a predetermined grayscale index limit of a display driver chip; when the limit grayscale index is less than the predetermined grayscale index, determining an adjustment grayscale index according to the predetermined grayscale index and the limit grayscale index; determining a target row and a target column for dividing the initial frame image according to the adjustment grayscale index; dividing the initial frame image according to the target row and the target column to obtain a plurality of sub-image areas; determining initial grayscale values ​​and template grayscale values ​​respectively corresponding to the plurality of sub-image areas; determining target grayscale values ​​respectively corresponding to the plurality of sub-image areas according to the initial grayscale values ​​and template grayscale values ​​respectively corresponding to the plurality of sub-image areas. The present invention solves the technical problem in the related art that low gray spots are prone to occur when displaying images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a method, device and electronic equipment for determining the grayscale value of an image. Background Art

[0002] In the related art, the grayscale display of LED is usually up to 16 bits, that is, the display capability of 65535 grayscale values. This capability is determined by the display capability of the constant current source display driver chip. Due to the limited display capability, the performance capability of LED images is also limited. To address this problem, the dithering algorithm is introduced in the related art, but after using the dithering algorithm, low gray spots are prone to appear when the LED image is displayed.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present invention provide a method, device and electronic device for determining the grayscale value of an image, so as to at least solve the technical problem in the related art that low-gray pitting phenomenon is easily occurred when displaying an image.

[0005] According to one aspect of an embodiment of the present invention, a method for determining the grayscale value of an image is provided, comprising: determining a predetermined grayscale index of an initial frame image and a limiting grayscale index of a predetermined display driver chip; determining an adjustment grayscale index based on the predetermined grayscale index and the limiting grayscale index when the limiting grayscale index is less than the predetermined grayscale index; determining a target row and a target column for dividing the initial frame image based on the adjusted grayscale index; dividing the initial frame image based on the target rows and the target columns to obtain a plurality of sub-image areas; determining initial grayscale values ​​and template grayscale values ​​respectively corresponding to the plurality of sub-image areas, wherein the template grayscale values ​​respectively corresponding to the plurality of sub-image areas are updated at a predetermined frequency; determining target grayscale values ​​respectively corresponding to the plurality of sub-image areas based on the initial grayscale values ​​and the template grayscale values ​​respectively corresponding to the plurality of sub-image areas.

[0006] Optionally, after dividing the initial frame image according to the target rows and the target columns to obtain a plurality of sub-image areas, the method further includes: determining a template image including a plurality of sub-template areas according to the target rows and the target columns, wherein the plurality of sub-template areas respectively correspond to different template grayscale values, and the number of the sub-template areas is the same as the number of the sub-image areas; determining initial grayscale values ​​and template grayscale values ​​respectively corresponding to the plurality of sub-image areas; and determining target grayscale values ​​respectively corresponding to the plurality of sub-image areas according to the initial grayscale values ​​corresponding to the plurality of sub-image areas and the template grayscale values ​​corresponding to the plurality of sub-template areas.

[0007] Optionally, determining the target grayscale values ​​respectively corresponding to the multiple sub-image areas based on the initial grayscale values ​​and template grayscale values ​​respectively corresponding to the multiple sub-image areas includes: sequentially comparing the decimal grayscale values ​​with the template grayscale values ​​corresponding to the sub-image areas at predetermined positions to obtain comparison results, wherein the predetermined position is the position of a sub-image area among the multiple sub-image areas, and the decimal grayscale value is determined based on the initial grayscale value; determining the target grayscale value in the sub-image area at the predetermined position based on the comparison result, until the target grayscale values ​​respectively corresponding to the multiple sub-image areas are determined.

[0008] Optionally, based on the comparison result, determining the target grayscale value in the sub-image area at the predetermined position, including: when the comparison result is that the decimal grayscale value is greater than or equal to the template grayscale value corresponding to the sub-image area at the predetermined position, determining the initial grayscale index of the sub-image area at the predetermined position plus a fixed value as the target grayscale value; and / or, when the comparison result is that the decimal grayscale value is less than the template grayscale value corresponding to the sub-image area at the predetermined position, determining the initial grayscale index of the sub-image area at the predetermined position as the target grayscale value.

[0009] Optionally, after determining the template grayscale values ​​respectively corresponding to the plurality of sub-image areas, the method further includes: updating the template grayscale values ​​respectively corresponding to the plurality of sub-image areas at the predetermined frequency according to a predetermined rule.

[0010] Optionally, when the limiting grayscale index is less than the predetermined grayscale index, the adjustment grayscale index is determined based on the predetermined grayscale index and the limiting grayscale index, including: when the limiting grayscale index is less than the predetermined grayscale index, the predetermined grayscale index includes a red predetermined grayscale index, a green predetermined grayscale index, and a blue predetermined grayscale index, and the limiting grayscale index includes a red limiting grayscale index, a green limiting grayscale index, and a blue limiting grayscale index, the red adjustment grayscale index, the green adjustment grayscale index, and the blue adjustment grayscale index are determined based on the red predetermined grayscale index, the green predetermined grayscale index, the blue predetermined grayscale index, the red limiting grayscale index, the green limiting grayscale index, and the blue limiting grayscale index.

[0011] Optionally, before determining the predetermined grayscale index of the initial frame image and the limited grayscale index of the predetermined display driver chip, it also includes: when the initial frame image is multiple frames, obtaining a predetermined video stream; extracting multiple frames of the initial frame image of the predetermined video stream.

[0012] According to one aspect of an embodiment of the present invention, a device for determining grayscale values ​​of an image is provided, comprising: a first determination module, for determining a predetermined grayscale index of an initial frame image and a limiting grayscale index of a predetermined display driver chip; a second determination module, for determining an adjustment grayscale index based on the predetermined grayscale index and the limiting grayscale index when the limiting grayscale index is less than the predetermined grayscale index; a third determination module, for determining a target row and a target column for dividing the initial frame image based on the adjusted grayscale index; a division module, for dividing the initial frame image based on the target row and the target column to obtain a plurality of sub-image areas; a fourth determination module, for determining initial grayscale values ​​and template grayscale values ​​respectively corresponding to the plurality of sub-image areas, wherein the template grayscale values ​​respectively corresponding to the plurality of sub-image areas are updated at a predetermined frequency; a fifth determination module, for determining target grayscale values ​​respectively corresponding to the plurality of sub-image areas based on the initial grayscale values ​​and the template grayscale values ​​respectively corresponding to the plurality of sub-image areas.

[0013] According to one aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any of the above-described methods for determining the grayscale value of an image.

[0014] According to one aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above-mentioned methods for determining the grayscale value of an image.

[0015] In an embodiment of the present invention, a predetermined grayscale index of an initial frame image and a limited grayscale index of a predetermined display driver chip are determined. When the limited grayscale index is less than the predetermined grayscale index, an adjustment grayscale index is determined based on the predetermined grayscale index and the limited grayscale index. According to the adjustment grayscale index, a target row and a target column for dividing the initial frame image are determined. According to the target row and the target column, the initial frame image is divided to obtain a plurality of sub-image areas. Template grayscale values ​​corresponding to the plurality of sub-image areas are determined. According to the initial grayscale values ​​and the template grayscale values ​​corresponding to the plurality of sub-image areas, target grayscale values ​​corresponding to the plurality of sub-image areas are determined, thereby achieving the effect of adjusting the grayscale values ​​corresponding to the plurality of sub-image areas. Since under the condition that the limited grayscale index is less than the predetermined grayscale index, it indicates that the capacity of the predetermined display driver chip is insufficient to carry the grayscale value for optimal display of the image, in this case, the current grayscale value of the image can be adjusted so that the image can be displayed better. Moreover, since the grayscale values ​​of multiple sub-image areas are determined based on the initial grayscale values ​​and the template grayscale values ​​updated at a predetermined frequency, the grayscale values ​​corresponding to different sub-image areas will continue to change with the update of the template grayscale values. Therefore, the problem of low-gray spots can be visually eliminated, thereby solving the technical problem of low-gray spots that are prone to occur when displaying images in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0017] Figure 1 is a flow chart of a method for determining a grayscale value of an image according to an embodiment of the present invention;

[0018] Figure 2 It is a schematic diagram of a process provided by an optional implementation mode of the present application;

[0019] Figure 3 is a schematic diagram of template grayscale values ​​provided in an optional embodiment of the present invention;

[0020] Figure 4 is a schematic diagram of grayscale values ​​of an updated template provided in an optional embodiment of the present invention;

[0021] Figure 5 4 is a structural block diagram of a device for determining a grayscale value of an image according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] Example 1

[0025] According to an embodiment of the present invention, an embodiment of a method for determining the grayscale value of an image is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0026] Figure 1 is a flow chart of a method for determining a grayscale value of an image according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0027] Step S102, determining a predetermined grayscale index of the initial frame image and a predetermined grayscale index limit of the display driver chip;

[0028] In step S102 provided in the present application, the initial frame image can be an image frame extracted from a video stream, or an image frame directly acquired. The predetermined grayscale index is the grayscale value that the image can best display, and can be the grayscale value obtained after the original image passes through the image data processing optimization module, such as 22bit, 4194304 levels. The limited grayscale index can be the maximum grayscale value that can be displayed by a predetermined display driver chip, such as a constant current source driver chip that can display up to 16bit, i.e., 65535 levels.

[0029] It should be noted that usually the maximum grayscale number of LED, that is, the grayscale index limit is determined by the predetermined display driver chip. For example, if the predetermined display driver chip LED driver has a maximum output of 16 bits, then the output of the image after gamma change is also limited to 16 bits. However, after the introduction of the dithering algorithm, it is not limited by the predetermined display driver chip, for example, a higher bit number can be output for better image display, but at this time, the problem of low gray spots is prone to occur, which needs to be dealt with.

[0030] Step S104, when the limited grayscale index is less than the predetermined grayscale index, determining the grayscale index to be adjusted according to the predetermined grayscale index and the limited grayscale index;

[0031] In step S104 provided in the present application, when the grayscale index is limited to less than the predetermined grayscale index, it means that the capacity of the predetermined display driver chip is insufficient to carry the grayscale value for the best display of the image. In this case, the current grayscale value of the image can be adjusted by a dithering algorithm so that the image can be displayed better. The grayscale index can be adjusted by calculating the bit values ​​corresponding to the grayscale indices of the two. For example, after optimization, it is 22 bits. The capacity of the predetermined display driver chip is 16 bits at most. At this time, 22-16=6 bits can be used, so that the grayscale index is adjusted to the grayscale index corresponding to 6 bits, that is, 64 levels.

[0032] Step S106, determining target rows and target columns for dividing the initial frame image according to the adjusted grayscale index;

[0033] In step S106 provided in the present application, the target rows and target columns for dividing the initial frame image are determined based on the adjusted grayscale index. During the determination process, it can be determined through the image. For example, assuming that the adjusted grayscale index is 6 bits, that is, 64 levels, when the image is a square, it can be determined that the target rows and target columns are the same, that is, 8*8=64. It can be seen that the target rows are 8 rows and the target columns are 8 columns.

[0034] Step S108, dividing the initial frame image according to the target row and the target column to obtain a plurality of sub-image areas;

[0035] In step S108 provided in the present application, the initial frame image is divided according to the target row and the target column to obtain a plurality of sub-image regions. For example, in the above example, 64 sub-image regions can be divided.

[0036] Step S110, determining initial grayscale values ​​and template grayscale values ​​respectively corresponding to the plurality of sub-image regions, wherein the template grayscale values ​​respectively corresponding to the plurality of sub-image regions are updated at a predetermined frequency;

[0037] In step S110 provided in the present application, as in the above example, the initial grayscale value is the displayed grayscale value corresponding to the above 64 sub-image areas, and the template grayscale value is the template grayscale value corresponding to the above 64 sub-image areas, that is, there are 64 initial grayscale values ​​and 64 template grayscale values, which can be defined as 0-63. Optionally, the template grayscale values ​​corresponding to the 64 sub-image areas are different to ensure more randomness. It should be noted that since the template grayscale values ​​corresponding to the multiple sub-image areas are updated at a predetermined frequency, assuming that the template grayscale value corresponding to the first sub-image area is 0, the next template grayscale value may become any value in 0-63, and the specific value is not limited here, which can ensure the randomness of the template grayscale value and the uniformity of the processing in time.

[0038] In step S112 , target grayscale values ​​corresponding to the plurality of sub-image regions are determined according to the initial grayscale values ​​corresponding to the plurality of sub-image regions and the template grayscale values.

[0039] In step S112 provided in the present application, target grayscale values ​​corresponding to the multiple sub-image areas can be determined by using initial grayscale values ​​corresponding to the multiple sub-image areas and template grayscale values ​​corresponding to the multiple sub-image areas, so that the image can be displayed optimally.

[0040] Through the above steps, the predetermined grayscale index of the initial frame image and the limited grayscale index of the predetermined display driver chip are determined. When the limited grayscale index is less than the predetermined grayscale index, the adjusted grayscale index is determined based on the predetermined grayscale index and the limited grayscale index. The target row and target column for dividing the initial frame image are determined based on the adjusted grayscale index. The initial frame image is divided based on the target row and target column to obtain multiple sub-image areas, and the template grayscale values ​​corresponding to the multiple sub-image areas are determined. The target grayscale values ​​corresponding to the multiple sub-image areas are determined based on the initial grayscale values ​​and template grayscale values ​​corresponding to the multiple sub-image areas, thereby achieving the effect of adjusting the grayscale values ​​corresponding to the multiple sub-image areas. Since the limited grayscale index is less than the predetermined grayscale index, it means that the capacity of the predetermined display driver chip is insufficient to carry the grayscale value for the best display of the image. In this case, the current grayscale value of the image can be adjusted so that the image can be displayed better. Moreover, since the grayscale values ​​of multiple sub-image areas are determined based on the initial grayscale values ​​and the template grayscale values ​​updated at a predetermined frequency, the grayscale values ​​corresponding to different sub-image areas will continue to change with the update of the template grayscale values. Therefore, the problem of low-gray spots can be visually eliminated, thereby solving the technical problem of low-gray spots that are prone to occur when displaying images in related technologies.

[0041] As an optional embodiment, after the initial frame image is divided according to target rows and target columns to obtain multiple sub-image areas, it also includes: determining a template image including multiple sub-template areas according to the target rows and target columns, wherein the multiple sub-template areas respectively correspond to different template grayscale values, the target frame image and the template image have the same size, and the number of sub-template areas is the same as the number of sub-image areas; determining the target grayscale values ​​corresponding to the multiple sub-image areas respectively according to the initial grayscale values ​​corresponding to the multiple sub-image areas and the template grayscale values ​​corresponding to the multiple sub-template areas.

[0042] In this optional embodiment, multiple sub-template areas in the template image are disclosed, that is, the obtained multiple sub-template areas are still in one image, and a template image including multiple sub-template areas and subsequent operations are obtained. Multiple sub-template areas correspond to different template grayscale values, and the number of sub-template areas is the same as the number of sub-image areas, so that multiple sub-image areas can correspond to multiple sub-template areas one by one, and the initial grayscale value can also correspond to the template grayscale value one by one, so as to achieve a one-to-one comparison and accurately determine the technical effect of the target grayscale values ​​corresponding to the multiple sub-image areas.

[0043] As an optional embodiment, target grayscale values ​​corresponding to multiple sub-image areas are determined based on initial grayscale values ​​and template grayscale values ​​corresponding to multiple sub-image areas, including: sequentially comparing decimal grayscale values ​​with template grayscale values ​​corresponding to sub-image areas at predetermined positions to obtain comparison results, wherein the predetermined position is the position of a sub-image area among multiple sub-image areas, and the decimal grayscale value is determined based on the initial grayscale value; based on the comparison results, the target grayscale value in the sub-image area at the predetermined position is determined until the target grayscale values ​​corresponding to the multiple sub-image areas are determined.

[0044] In this optional embodiment, the decimal grayscale value refers to the grayscale value on the decimal place in the initial grayscale value. For example, when the grayscale index is adjusted to 64 levels, the decimal grayscale value is 0-63 and will not exceed this range. The target grayscale value in the sub-image area is determined by comparing the decimal grayscale value with the template grayscale value corresponding to the sub-image area at the predetermined position. Since multiple sub-image areas are included, it is necessary to compare the decimal grayscale values ​​of the multiple sub-image areas with the corresponding template grayscale values ​​respectively to obtain the corresponding target grayscale value, so as to achieve a better image presentation effect.

[0045] As an optional embodiment, determining the target grayscale value in the sub-image area at the predetermined position according to the comparison result includes: if the comparison result is that the decimal grayscale value is greater than or equal to the template grayscale value corresponding to the sub-image area at the predetermined position, determining the initial grayscale index of the sub-image area at the predetermined position plus a fixed value as the target grayscale value; and / or if the comparison result is that the decimal grayscale value is less than the template grayscale value corresponding to the sub-image area at the predetermined position, determining the initial grayscale index of the sub-image area at the predetermined position as the target grayscale value. .

[0046] In this optional embodiment, a method of determining the target grayscale value by comparison is defined. For example, the decimal grayscale value is 32 and the template grayscale value is 51. When the two are compared, 32<51. Therefore, the grayscale value of the point remains the initial grayscale value. If the template grayscale value is 30, then the target grayscale value can be the initial grayscale value plus a fixed value, such as the initial grayscale value plus 1.

[0047] As an optional embodiment, after determining the template grayscale values ​​corresponding to the plurality of sub-image regions respectively, the method further includes: updating the template grayscale values ​​corresponding to the plurality of sub-image regions respectively at a predetermined frequency according to a predetermined rule.

[0048] In this optional embodiment, a scheme for updating the template grayscale values ​​corresponding to a plurality of sub-image areas respectively according to a predetermined rule and a predetermined frequency is disclosed, wherein the rule may be a column shift rule, such as in the above example, there are 64 sub-image areas of 8*8, each sub-image area corresponds to a template grayscale value, and when the template grayscale value needs to be updated next time, the template grayscale value corresponding to the first column of sub-image areas may be shifted and replaced to the sub-image areas of the next column, and the template grayscale value corresponding to the last column of sub-image areas may be shifted and replaced to the sub-image areas of the first column, according to this rule, the computing power may be reduced to a certain extent, reallocation may be avoided, and computing power may be saved. In this way, the effect of periodic updating is achieved. Moreover, by setting the predetermined rule, the updating method of the template grayscale value may be diverse. Different focuses may be paid attention to during the update, so as to implement it better.

[0049] As an optional embodiment, when the limited grayscale index is less than the predetermined grayscale index, the adjusted grayscale index is determined based on the predetermined grayscale index and the limited grayscale index, including: when the limited grayscale index is less than the predetermined grayscale index, the predetermined grayscale index includes a red predetermined grayscale index, a green predetermined grayscale index, and a blue predetermined grayscale index, and the limited grayscale index includes a red limited grayscale index, a green limited grayscale index, and a blue limited grayscale index, the red adjusted grayscale index, the green adjusted grayscale index, and the blue adjusted grayscale index are determined based on the red predetermined grayscale index, the green predetermined grayscale index, the blue predetermined grayscale index, the red limited grayscale index, the green limited grayscale index, and the blue limited grayscale index.

[0050] In this optional embodiment, a scheme for adjusting grayscale values ​​for different pixel data types is disclosed. For example, in RGB, the predetermined grayscale index of red corresponding to R in the image and the red limit grayscale index corresponding to R of the predetermined display driver chip, the predetermined grayscale index of green corresponding to G in the image and the green limit grayscale index corresponding to G of the predetermined display driver chip, the predetermined grayscale index of blue corresponding to B in the image and the blue limit grayscale index corresponding to B of the predetermined display driver chip can be determined respectively, so as to more accurately determine the display of grayscale values ​​corresponding to different pixels to further enhance the display effect.

[0051] As an optional embodiment, before determining the predetermined grayscale index of the initial frame image and the limited grayscale index of the predetermined display driver chip, it also includes: when the initial frame image is multiple frames, obtaining a predetermined video stream; extracting multiple initial frame images of the predetermined video stream.

[0052] In this optional embodiment, a solution is disclosed for directly processing a video stream, that is, after obtaining a predetermined video stream, multiple initial frame images in the predetermined video stream can be extracted, and the frame images are processed in sequence, thereby achieving a better video display effect and eliminating the problem of low-gray spots that are easily seen in the video.

[0053] Based on the above embodiments and optional embodiments, an optional implementation is provided, which is described in detail below.

[0054] In the related art, after the conventional dithering algorithm is introduced into the LED display system, the phenomenon of low gray spots appears.

[0055] In view of this, an optional implementation of the present invention provides a method for determining the grayscale value of an image. Figure 2 It is a flow chart of an optional implementation mode of the present application. Figure 2 As shown, the original RGB image with a grayscale index of 8 / 10 bits is subjected to gamma processing Gamma LUT, and R / G / B can be processed separately to finally obtain an image with a corresponding predetermined grayscale index of 22 bits. After dithering Dither processing, the LED driver display chip LED Driver chip outputs according to its 16-bit capability. The optional implementation manner of the present invention is described in detail below.

[0056] S1, determining that the predetermined grayscale index of the image after gamma processing is 22 bits, and determining that the limited grayscale index that can be displayed by the LED driver display chip under maximum driving is 16 bits;

[0057] S2, determine the grayscale index 22-16=6bit based on 22bit and 16bit, that is, when the gamma output is 22bit, it can usually be divided into 16+6bit;

[0058] Among them, the value corresponding to 6 bits is the value that needs to be jittered, and the value corresponding to 6 bits can be considered as the decimal after the gamma changes.

[0059] S3, based on 6 bits, determine that the number of rows and columns of the divided image is 8, and divide the image into 64 sub-image areas;

[0060] S4, determining initial grayscale values ​​and template grayscale values ​​corresponding to the 64 sub-image areas respectively;

[0061] Figure 3 is a schematic diagram of template grayscale values ​​provided by an optional embodiment of the present invention, such as Figure 3 As shown, the template grayscale values ​​corresponding to the 64 sub-image areas are non-repeated values ​​between 0 and 63.

[0062] It should be noted that the template grayscale value may be a grayscale value that is continuously updated at a predetermined frequency, such as in frames, and according to a predetermined rule, so that the uniformity in time can be maintained, thereby achieving the result of improving low-gray pitting.

[0063] Figure 4 is a schematic diagram of grayscale values ​​of updated templates provided in an optional embodiment of the present invention, such as Figure 4 As shown, the template grayscale values ​​corresponding to the first column of sub-image areas can be translated and replaced to the sub-image areas in the next column, and the template grayscale values ​​corresponding to the last column of sub-image areas can be translated and replaced to the sub-image areas in the first column.

[0064] S5, determining a decimal grayscale value according to the initial grayscale value;

[0065] S6, sequentially comparing the decimal grayscale value with the template grayscale value corresponding to the sub-image area at the corresponding position;

[0066] S6. When the decimal grayscale value is greater than or equal to the template grayscale value corresponding to the sub-image area at the corresponding position, the target grayscale value of the sub-image area is determined to be the original grayscale value plus one; when the decimal grayscale value is less than the template grayscale value corresponding to the sub-image area at the corresponding position, the target grayscale value of the sub-image area is determined to be the original grayscale value.

[0067] Through the above steps, by comparing with the value of the corresponding position of the template, the rounding of decimals is achieved.

[0068] Through the above optional implementation, at least the following beneficial effects can be achieved: improving the grayscale expression ability of the image, improving the grayscale expression number, improving low-gray spots, and solving the technical problem of low-gray spots that are prone to occur when displaying images in related technologies.

[0069] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0070] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.

[0071] Example 2

[0072] According to an embodiment of the present invention, a device for implementing the above-mentioned method for determining the grayscale value of an image is also provided. Figure 5 is a structural block diagram of a device for determining a grayscale value of an image according to an embodiment of the present invention. Figure 5 As shown, the device includes: a first determination module 502, a second determination module 504, a third determination module 506, a division module 508, a fourth determination module 510 and a fifth determination module 512. The device is described in detail below.

[0073] A first determination module 502 is used to determine a predetermined grayscale index of an initial frame image and a predetermined grayscale index limit of a display driver chip; a second determination module 504 is connected to the first determination module 502 and is used to determine an adjustment grayscale index according to the predetermined grayscale index and the limit grayscale index when the limit grayscale index is less than the predetermined grayscale index; a third determination module 506 is connected to the second determination module 504 and is used to determine a target row and a target column for dividing the initial frame image according to the adjustment grayscale index; a division module 508 is connected to the third determination module 506 and is used to divide the initial frame image according to the target row and the target column to obtain a plurality of sub-image areas; A fourth determination module 510 is connected to the division module 508, and is used to determine the initial grayscale values ​​and the template grayscale values ​​respectively corresponding to the multiple sub-image areas, wherein the template grayscale values ​​respectively corresponding to the multiple sub-image areas are updated at a predetermined frequency; a fifth determination module 512 is connected to the fourth determination module 510, and is used to determine the target grayscale values ​​respectively corresponding to the multiple sub-image areas based on the initial grayscale values ​​and the template grayscale values ​​respectively corresponding to the multiple sub-image areas.

[0074] It should be noted here that the above-mentioned first determination module 502, second determination module 504, third determination module 506, division module 508, fourth determination module 510 and fifth determination module 512 correspond to steps S102 to S112 in the method for determining the grayscale value of an image, and the instances and application scenarios implemented by the multiple modules are the same as the corresponding steps, but are not limited to the contents disclosed in the above-mentioned embodiment 1.

[0075] Example 3

[0076] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement any of the above methods for determining the grayscale value of an image.

[0077] Example 4

[0078] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above-mentioned methods for determining the grayscale value of an image.

[0079] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0080] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0081] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0082] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0083] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0084] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0085] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for determining the grayscale value of an image, characterized in that: include: Determining a predetermined grayscale index of an initial frame image and a predetermined grayscale index limit of a display driver chip; In the case where the limited grayscale index is less than the predetermined grayscale index, determining an adjusted grayscale index according to the predetermined grayscale index and the limited grayscale index; Determining target rows and target columns for dividing the initial frame image according to the adjusted grayscale index; Dividing the initial frame image according to the target row and the target column to obtain a plurality of sub-image areas; Determining initial grayscale values ​​and template grayscale values ​​respectively corresponding to the plurality of sub-image areas, wherein the template grayscale values ​​respectively corresponding to the plurality of sub-image areas are updated at a predetermined frequency; Determining target grayscale values ​​corresponding to the plurality of sub-image areas respectively according to the initial grayscale values ​​and the template grayscale values ​​corresponding to the plurality of sub-image areas respectively; Wherein, determining the target grayscale values ​​respectively corresponding to the multiple sub-image areas based on the initial grayscale values ​​and template grayscale values ​​respectively corresponding to the multiple sub-image areas includes: sequentially comparing the decimal grayscale values ​​with the template grayscale values ​​corresponding to the sub-image areas at predetermined positions to obtain comparison results, wherein the predetermined position is the position of a sub-image area among the multiple sub-image areas, and the decimal grayscale value is determined based on the initial grayscale value; determining the target grayscale value in the sub-image area at the predetermined position based on the comparison result, until the target grayscale values ​​respectively corresponding to the multiple sub-image areas are determined.

2. The method according to claim 1, characterized in that After dividing the initial frame image according to the target row and the target column to obtain a plurality of sub-image areas, the method further includes: Determining a template image including a plurality of sub-template regions according to the target row and the target column, wherein the plurality of sub-template regions respectively correspond to different template grayscale values, and the number of the sub-template regions is the same as the number of the sub-image regions; According to the initial grayscale values ​​corresponding to the plurality of sub-image areas and the template grayscale values ​​corresponding to the plurality of template sub-areas, target grayscale values ​​corresponding to the plurality of sub-image areas are determined.

3. The method according to claim 1, characterized in that Determining a target grayscale value in the sub-image area at the predetermined position according to the comparison result includes: If the comparison result is that the fractional grayscale value is greater than or equal to the template grayscale value corresponding to the sub-image area at the predetermined position, determining that the initial grayscale index of the sub-image area at the predetermined position plus a fixed value is the target grayscale value; and / or, When the comparison result is that the fractional grayscale value is smaller than the template grayscale value corresponding to the sub-image area at the predetermined position, the initial grayscale index of the sub-image area at the predetermined position is determined to be the target grayscale value.

4. The method according to claim 1, characterized in that: After determining the template grayscale values ​​corresponding to the plurality of sub-image areas respectively, the method further includes: According to a predetermined rule, the template grayscale values ​​respectively corresponding to the plurality of sub-image areas are updated at the predetermined frequency.

5. The method according to claim 1, characterized in that When the limited grayscale index is less than the predetermined grayscale index, determining to adjust the grayscale index according to the predetermined grayscale index and the limited grayscale index includes: When the limiting grayscale index is less than the predetermined grayscale index, the predetermined grayscale index includes a red predetermined grayscale index, a green predetermined grayscale index, and a blue predetermined grayscale index, and the limiting grayscale index includes a red limiting grayscale index, a green limiting grayscale index, and a blue limiting grayscale index, the red adjustment grayscale index, the green adjustment grayscale index, and the blue adjustment grayscale index are determined based on the red predetermined grayscale index, the green predetermined grayscale index, the blue predetermined grayscale index, the red limiting grayscale index, the green limiting grayscale index, and the blue limiting grayscale index.

6. The method according to any one of claims 1 to 5, characterized in that Before determining the predetermined grayscale index of the initial frame image and the predetermined grayscale index limit of the display driver chip, the method further includes: In the case where the initial frame image is multiple frames, obtaining a predetermined video stream; Extracting a plurality of initial frame images from the predetermined video stream.

7. A device for determining the grayscale value of an image, characterized in that: include: A first determination module, used to determine a predetermined grayscale index of an initial frame image and a limit grayscale index of a predetermined display driver chip; A second determination module is used to determine the adjustment grayscale index according to the predetermined grayscale index and the limit grayscale index when the limit grayscale index is less than the predetermined grayscale index; A third determination module, configured to determine target rows and target columns for dividing the initial frame image according to the adjusted grayscale index; A division module, used for dividing the initial frame image according to the target row and the target column to obtain a plurality of sub-image areas; A fourth determination module, configured to determine initial grayscale values ​​and template grayscale values ​​respectively corresponding to the plurality of sub-image regions, wherein the template grayscale values ​​respectively corresponding to the plurality of sub-image regions are updated at a predetermined frequency; A fifth determination module, for determining target grayscale values ​​corresponding to the plurality of sub-image regions respectively according to the initial grayscale values ​​and the template grayscale values ​​corresponding to the plurality of sub-image regions respectively; Among them, the fifth determination module is used to compare the decimal grayscale value with the template grayscale value corresponding to the sub-image area at a predetermined position in sequence to obtain a comparison result, wherein the predetermined position is the position of a sub-image area among the multiple sub-image areas, and the decimal grayscale value is determined based on the initial grayscale value; based on the comparison result, determine the target grayscale value in the sub-image area at the predetermined position until the target grayscale values ​​corresponding to the multiple sub-image areas are determined.

8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method for determining the grayscale value of an image as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for determining the grayscale value of an image as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Display driving method, display driving circuit, LED display panel and display device

    CN114333687A

  • Image processing method and device and storage medium

    CN115662332A