WO2021190606A1 - 图像绘制方法、显示装置及存储介质 - Google Patents

图像绘制方法、显示装置及存储介质 Download PDF

Info

Publication number
WO2021190606A1
WO2021190606A1 PCT/CN2021/083028 CN2021083028W WO2021190606A1 WO 2021190606 A1 WO2021190606 A1 WO 2021190606A1 CN 2021083028 W CN2021083028 W CN 2021083028W WO 2021190606 A1 WO2021190606 A1 WO 2021190606A1
Authority
WO
WIPO (PCT)
Prior art keywords
histogram
drawn
gray scale
height
value
Prior art date
Application number
PCT/CN2021/083028
Other languages
English (en)
French (fr)
Inventor
王显
马希通
吴聪睿
李彦孚
Original Assignee
京东方科技集团股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Priority to US17/627,498 priority Critical patent/US20220261971A1/en
Publication of WO2021190606A1 publication Critical patent/WO2021190606A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/20Function-generator circuits, e.g. circle generators line or curve smoothing circuits
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/2007Display of intermediate tones
    • G09G3/2018Display of intermediate tones by time modulation using two or more time intervals
    • G09G3/2022Display of intermediate tones by time modulation using two or more time intervals using sub-frames
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/001Arbitration of resources in a display system, e.g. control of access to frame buffer by video controller and/or main processor
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/02Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the way in which colour is displayed
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/02Improving the quality of display appearance
    • G09G2320/0271Adjustment of the gradation levels within the range of the gradation scale, e.g. by redistribution or clipping
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/04Changes in size, position or resolution of an image
    • G09G2340/0407Resolution change, inclusive of the use of different resolutions for different screen areas
    • G09G2340/0428Gradation resolution change

Definitions

  • the present disclosure relates to the field of display technology, and in particular to an image drawing method, display device and storage medium.
  • RGB histogram For brightness histograms, etc., the abscissa is the gray scale, and the ordinate is the number of pixels.
  • the RGB histogram can show the distribution of the number of pixels corresponding to different gray scales for each color component
  • the brightness histogram can show the distribution of the number of pixels with different brightness and gray scales.
  • the present disclosure provides an image drawing method, display device and storage medium.
  • the present disclosure provides an image drawing method, including:
  • the histogram is drawn according to the height of the histogram to be drawn, the gray scale to be drawn, and the scale factor.
  • the method before the determining the grayscale value of each target pixel in the display image, the method further includes:
  • the maximum number of pixels that can be reached by any gray level in the display image and the height of the histogram to be drawn determine multiple equally divided numerical ranges; the multiple numerical ranges do not overlap and are continuous;
  • Each of the first products is used as a proportional coefficient, and stored in the plurality of first storage addresses in a one-to-one correspondence order from small to large.
  • the determining the proportional coefficient corresponding to the numerical value includes:
  • the value is used as the destination storage address, and the scale factor stored in the destination storage address is determined.
  • the number of the numerical range is a preset number
  • the product of the reciprocal of the number of numerical values in the numerical range and the preset coefficient is a preset product.
  • the step of determining the numerical range of multiple equal divisions according to the maximum number of pixels that can be reached in any gray scale in the display image and the height of the histogram to be drawn includes:
  • the maximum number of first digits is represented by a first data structure, and the first data structure includes a first digit range and a second digit range starting from the last digit, and the first digit range Starting from the first digit of the first digit range, the preset digit range is included, the value in the first digit range represents the height of the histogram to be drawn, and the value in the second digit range represents Any value in the numerical range corresponding to the maximum number of first digits, and the value in the preset digit range represents the numerical range corresponding to the maximum number of first digits.
  • the drawing a histogram according to the height of the histogram to be drawn, the gray scale to be drawn, and the scale factor includes:
  • the drawing a histogram according to the column height corresponding to the second gray scale includes:
  • the column shape of the second gray scale is drawn according to the column height corresponding to the second gray scale.
  • the preset coefficient is the N-th power of 2
  • the determining the quotient of the second product and the preset coefficient to obtain the column height corresponding to the second gray scale includes:
  • the second product is expressed in binary to obtain a second product binary number, and the second product binary number is shifted to the right by N bits to obtain the column height corresponding to the second gray scale.
  • the determining the grayscale value of each target pixel in the display image includes:
  • the target pixels include pixels obtained through sampling in the display sub-image, or all pixels in the display sub-image.
  • the step of determining the number of pixels of each preset grayscale level according to the grayscale value of each target pixel includes:
  • the sum of the number of pixels belonging to the same second storage address in each of the second storage modules is calculated to obtain the number of pixels of each of the preset grayscale levels.
  • the preset gray level includes one gray level, or the preset gray level includes multiple gray levels.
  • the first base is binary.
  • the present disclosure also discloses a display device, including a processor, a memory, and a computer program stored on the memory and capable of running on the processor.
  • a display device including a processor, a memory, and a computer program stored on the memory and capable of running on the processor.
  • the present disclosure also discloses a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned image drawing method are realized.
  • the present disclosure also provides a computer program, including computer-readable code, which when the computer-readable code runs on a display device, causes the display device to execute the above-mentioned image drawing method.
  • Fig. 1 shows a flowchart of an image rendering method according to an embodiment of the present disclosure
  • FIG. 2 shows a schematic diagram of an effective drawing area of an RGB fusion histogram and a brightness histogram according to an embodiment of the present disclosure
  • FIG. 3 shows a schematic diagram of an effective drawing area of an RGB separated histogram according to an embodiment of the present disclosure
  • FIG. 4 shows a first data structure used to represent the largest number of the number of pixels in an embodiment of the present disclosure
  • FIG. 5 shows another first data structure used to represent the maximum number of the number of pixels in an embodiment of the present disclosure
  • Fig. 6 shows a partial schematic diagram of a histogram according to an embodiment of the present disclosure
  • FIG. 7 schematically shows a block diagram of a display device for performing the method according to the present disclosure.
  • Fig. 8 schematically shows a storage unit for holding or carrying program codes for implementing the method according to the present disclosure.
  • Step 101 Determine the grayscale value of each target pixel in the display image.
  • the method may be implemented by an image drawing device, which may be, for example, a Field-Programmable Gate Array (FPGA).
  • FPGA Field-Programmable Gate Array
  • the method may be applied to electronic devices including FPGAs.
  • the device such as a high-definition or ultra-high-definition monitor, or a high-definition computer, etc., is not specifically limited in the embodiment of the present disclosure.
  • step 101 may be implemented in the following manner, including: splitting the display image into a plurality of display sub-images; determining the grayscale value of each target pixel in each of the display sub-images.
  • the display image may be split into multiple display sub-images.
  • the resolution of the image that can be input is 7680 ⁇ 4320.
  • the display image can be split into 16 areas along the longitudinal direction to obtain There are 16 display sub-images, and the resolution of each display sub-image is 480 ⁇ 4320.
  • the image drawing device can determine the grayscale value of each target pixel in each display sub-image, where the target pixel can be a pixel sampled in the display sub-image, or it can of course also be a display sub-image. All the pixels in, the embodiment of the present disclosure does not specifically limit this.
  • sampling the pixels can save the time for subsequent counting of the number of pixels while the overall gray level of the image can be more accurately reflected, thereby saving the time for drawing the histogram.
  • a display sub-image with a resolution of 480 ⁇ 4320 1 pixel for every 4 pixels in the horizontal direction can be sampled, and all rows can be traversed in the vertical direction.
  • the grayscale value data of the 16 display sub-images can be stored in 16 different second storage modules, respectively.
  • the second storage module may specifically be a volatile random access memory (Ramdom Access Memory, RAM).
  • this step can perform parallel processing on multiple display sub-images, that is, the grayscale value of each target pixel in each display sub-image can be determined at the same time. In this way, it can save Time to count the grayscale values, which can save the time of drawing histograms.
  • the gray scale value of the target pixel may include R (red) gray scale, G (green) gray scale, and B (blue) gray scale. Or Y (brightness) gray scale, U (chromaticity) gray scale and V (chromaticity) gray scale, etc.
  • the grayscale value of the target pixel may include the brightness grayscale.
  • the method may further include the following steps (1) to (5):
  • Figure 2 shows a schematic diagram of the effective drawing area of an RGB (red, green and blue) fusion histogram and brightness histogram
  • Figure 3 shows a schematic diagram of the effective drawing area of an RGB separated histogram, and the size of the drawn histogram
  • Both are 1920 ⁇ 1080.
  • P1 there is only one effective drawing area P1, and other areas are left blank and can be displayed transparently.
  • the size of P1 is 1536 ⁇ 896. Therefore, for the RGB fusion histogram and brightness histogram, the highest value of the column is 896.
  • P2 P3 and P4 there are three effective drawing areas P2, P3 and P4.
  • P2, P3 and P4 can be used to draw R histogram, G histogram and B histogram respectively.
  • the other areas are left blank and can be displayed transparently.
  • P2 The sizes of, P3 and P4 are 1536 ⁇ 256. Therefore, for the RGB separated histogram, the highest value of the histogram is 256.
  • the column height corresponding to the gray scale with the largest number of pixels can be set as the highest value allowed to be drawn in the effective drawing area. If the column height corresponding to the gray scale with the largest number of pixels is set as k, that is, the pixel The column heights corresponding to the most gray scales are drawn according to a certain ratio, and the column heights corresponding to other gray scales are allocated according to this ratio. For example, in the display image, the maximum number of grayscale pixels is max, then the column height corresponding to the maximum number max is set to k, and there are m pixels of a certain grayscale Q, then the column height corresponding to this grayscale Q should be m/(max/k).
  • the column height corresponding to the maximum number max can be set as 256, and pixels of a certain gray-scale Q There are m, then the column height corresponding to this gray scale Q should be m/(max/256).
  • the height of the histogram to be drawn is the highest value allowed to be drawn in the effective drawing area of the histogram to be drawn.
  • the height of the histogram to be drawn is 256.
  • the height of the histogram to be drawn is 896, but 896 is not an integer power of 2, which is not conducive to obtaining integers in subsequent calculations. Therefore, in practical applications, when waiting When the height of the histogram is 896, 1024 (2 10 ) can be used for subsequent calculations. In the subsequent drawing, the last 7 bits of the binary data of the column heights other than the highest column height can be set to 0.
  • histogram size and the effective drawing area size shown in FIG. 2 and FIG. 3 are only examples, and do not constitute a limitation to the present disclosure.
  • step (1) 0 to (maximum number of pixels MA/to-be-drawn histogram height k) can be segmented into multiple equal numerical ranges, and equal division means that the number of numerical values contained in each numerical range is the same.
  • the step (1) may specifically include: according to the maximum number of pixels that can be reached in any gray scale in the display image, the number of pixels to be Draw the height of the histogram and the preset number, and determine the numerical range of multiple equal divisions.
  • the maximum number of pixels can be divided by the height of the histogram to be drawn and then divided by the preset number to obtain the division interval, and the division interval indicates how many values each value range includes.
  • the height of the histogram to be drawn is 256
  • the preset number can be 2025, that is, the number of numerical ranges is 2025
  • Numerical ranges these numerical ranges do not overlap and are continuous, and each numerical range includes 64 numerical values.
  • step (2) the reciprocal of the median value of each numerical range can be taken, wherein, since each numerical value includes an even number (64) of numerical values, the median value can be any of the two middle numerical values, For example, the middle value of the numerical range of [0,63] can be 32, and the middle value of the numerical range of [0,15] can be 8.
  • the first product of each reciprocal number and the preset coefficient may be determined to expand each reciprocal number into an integer.
  • the preset coefficient is used to expand each reciprocal to an integer representation for easy calculation and storage.
  • step (4) if the number of numerical ranges is M, then M first storage addresses can be determined.
  • the first storage addresses can start from 0.
  • each first storage address is 0 ⁇ (M-1).
  • the number of numerical ranges can be 2025, then 2025 first storage addresses can be determined, and each first storage address is 0, 1, 2, ..., 2023, 2024, respectively.
  • the first storage address may be a storage address included in the first storage module.
  • the first storage module may specifically be a read only memory (ROM).
  • each first product can be used as a scale factor, and stored in a number of first storage addresses one-to-one in order from small to large, where the smallest first product is stored in the smallest first storage address.
  • the storage address is 0, and the largest first product is stored in the largest first storage address.
  • the smallest first product is stored in the smallest first storage address
  • the largest first product is stored in the largest first storage address 2024.
  • the number of the numerical range may be a preset number
  • the product of the reciprocal of the number of numerical values in the numerical range and the preset coefficient may be a preset product
  • the number of numerical ranges is a preset number
  • the maximum number of pixels ⁇ the height of the histogram to be drawn remains unchanged, it can be ensured that the first storage address remains unchanged in step (5), and the first storage address is all 0-2024.
  • the proportional coefficient remains unchanged in step (5), and the proportional coefficient is the first product.
  • the preset product can be 1/64 ⁇ 2 18.
  • the product of the reciprocal of the number of values in the value range 1/64 ⁇ the preset coefficient 2 18 is 1/64 ⁇ 2 18.
  • the product of the reciprocal of the number of values in the range of 1/16 ⁇ preset coefficient 2 16 is also 1/64 ⁇ 2 18 , so it can ensure that the scale factor in step (5) is not Change, the scale factor is the first product.
  • Step 102 Determine the number of pixels of each preset grayscale level according to the grayscale value of each target pixel.
  • one preset gray level may include multiple gray levels, that is, the multiple gray levels belong to the same preset gray level.
  • a preset gray level may also include a gray level, that is, a gray level is a preset gray level, which is not specifically limited in the embodiment of the present disclosure.
  • each second storage module can use each preset grayscale level as a second storage address. For example, if there are 512 preset grayscale levels, each second storage module has 512 second storage addresses. 2. Storage address.
  • the second storage module corresponding to the display sub-image A is a.
  • the image drawing device can determine that the grayscale value of the target pixel belongs to the preset grayscale level X, and the target pixel The pixels are counted in the address X of the second storage module a for storage.
  • the RGB and YUV gray levels of all pixels are between 0 and 1023, a total of 1024 gray levels.
  • every 2 gray levels can be counted as The same gray scale is used as a preset gray scale level. Therefore, the preset gray scale levels are 512 in total from 0 to 511. These 512 preset gray levels can be used as 512 addresses. Therefore, each of the 16 RAMs has 512 addresses, and the data corresponding to each address represents the number of pixels. For any display sub-image, corresponding to RAM1, the number of target pixels of the display sub-image in the 512 preset gray levels of RAM1 is recorded.
  • the data of these 16 RAMs can be taken out for summation, that is, pixels belonging to the same address (the same preset grayscale level) in each RAM
  • the numbers are added together, so that the number of pixels for each preset grayscale level can be obtained.
  • the maximum preset grayscale In the embodiment of the present disclosure, it is necessary to count the number of pixels with the most preset grayscale levels in the displayed image, and use this as the highest bar to draw the histogram, then in the process of accumulating the number of pixels, it is necessary to record the maximum preset grayscale.
  • the number of pixels in the order level is to set up a comparison mechanism. In the statistical process, the initial value of the maximum number can be set to 0. Every time a higher number of pixels appears, the maximum number is updated. This maximum number can be recorded as the above Mentioned max.
  • Step 103 Express the maximum number of each of the pixel numbers by the first number to obtain the maximum number first number, and read the value of the preset number of digits in the maximum number first number.
  • the maximum number of first digits is represented by a first data structure, and the first data structure includes a first digit range and a second digit range starting from the last digit, and the first digit range Starting from the first digit of the first digit range, the preset digit range is included, the value in the first digit range represents the height of the histogram to be drawn, and the value in the second digit range represents Any value in the numerical range corresponding to the maximum number of first digits, and the value in the preset digit range represents the numerical range corresponding to the maximum number of first digits.
  • the first base is binary.
  • the maximum number of first binary numbers is also the maximum number of binary numbers.
  • the maximum number of the respective pixel numbers can be represented by binary.
  • a first data structure for representing the maximum number of the number of individual pixels is shown, which can be applied to the rendering of RGB separated histograms.
  • another first data structure for representing the maximum number of the number of individual pixels is shown, which can be applied to the rendering of RGB fusion histograms and brightness histograms.
  • the maximum number of pixels max can be represented by 32bit. Since the maximum possible value of max is 33177600 (7680 ⁇ 4320), it is a 25bit data, but due to device operation limitations, it can only be calculated Data that is an integer power of 2. Therefore, in order to ensure effective data of 25 bits, the smallest integer power of 2, which is greater than 25, can be taken, that is, 32 (2 5 ). Referring to Figure 4 and Figure 5, since only 25bit is valid, the upper 7 bits of 32bit are all 0 by default, which plays a role of placeholder.
  • the lower 8 bits (that is, the first digit range, the 8th to 1st digits) can represent 256 (2 8 ), which is the 8th to 1st digit of the maximum number of binary numbers
  • the value can represent the height of the histogram to be drawn 256.
  • the direct division operation of max/256 will consume a lot of money.
  • the lower 10 bits (that is, the range of the first digit, the 10th to 1st) can represent 1024 (2 10 ), which is the 10th to the 10th in the maximum number of binary numbers.
  • a 1-digit value can represent the height of the histogram to be drawn 1024.
  • the middle 6 bits (that is, the range of digits in the second digit range other than the preset digit range) can represent 0 to 63 (2 6 -1), no matter what the middle 11 bits are, the range of the middle 6 bits is always these 64 values, which happens to be the division interval 64 of the value range corresponding to the RGB separated histogram, because the previous change from 0 to (33177600/256 ) Every 64 values are divided into 2025 value ranges.
  • the preset number of bits can be set to the 25th to 15th bits in the 32bit.
  • the middle 4 bits (that is, the range of digits in the second digit range other than the preset digit range) can represent 0 to 15 (2 4 -1), no matter what the middle 11 bits are, the change range of the middle 4 bits is always these 16 values, which happens to be the division interval of the numerical range corresponding to the RGB fusion histogram and the brightness histogram. Because of the previous Divide every 16 values from 0 to (33177600/1024) into 2025 value ranges.
  • the preset number of bits can be set to the 25th to 15th bits in the 32bit.
  • the value of the preset digit range in the maximum number of first digits read may represent the value range of max/height of the histogram to be drawn. Since in the previous step, the ordinal number (0-2024) corresponding to the value range is set to 2025 first storage addresses, the value read is a certain first storage address.
  • max[24:14] can be read from the maximum number of binary numbers, that is, the maximum number of binary numbers 25th to 15th in
  • the first base number can also be a quaternary number, etc., and those skilled in the art can set an applicable base number counting method according to actual conditions, which is not limited in the embodiment of the present disclosure.
  • the maximum number of pixels is represented by a quaternary number.
  • the lower 4 bits of the maximum number of quaternary numbers (equivalent to dividing by 256) can be ignored, and max/256 can be obtained part.
  • the lower 5 bits of the maximum number of quaternary numbers (equivalent to dividing by 1024) can be ignored, and the part of max/1024 can be obtained. In this way, the division operation of large values can be avoided, and the system resources of the device can be saved.
  • Step 104 Determine the proportional coefficient corresponding to the numerical value.
  • this step can be specifically implemented in the following manner, including: storing the value as a destination Address to determine the scale factor stored in the destination storage address.
  • the value of the preset digit range in the maximum number of first digits that can be read can be used as the destination storage address that needs to be queried, and then the scale factor stored in the destination storage address can be searched from the first storage module .
  • the 25th to 15th digits of the maximum number of binary numbers can be read through max[24:14] as the destination storage address that needs to be queried, and then the first storage module can be addressed to The destination storage address is searched in the first storage module, and then the scale factor stored in the destination storage address can be obtained.
  • Step 105 Draw a histogram according to the height of the histogram to be drawn, the gray scale to be drawn, and the scale factor.
  • this step can be specifically implemented in the following manners, including:
  • the first gray scale corresponding to the maximum number max it will be drawn as the highest height allowed by the effective drawing area, that is, the height of the histogram to be drawn.
  • the column height of the first gray scale corresponding to the maximum number max can be drawn as the to-be-drawn histogram height 256.
  • the column height of the first gray level corresponding to the maximum number max can be drawn as the to-be-drawn histogram height 896 instead of 1024 as the replacement value of the to-be-drawn histogram height used in the calculation.
  • any second gray scale to be drawn other than the first gray scale that is, the gray scale with the number of pixels less than the maximum number max
  • determine the second product of the number of pixels corresponding to the second gray scale and the scale factor and then The quotient of the second product and the preset coefficient can be determined, and the column height corresponding to the second gray scale can be obtained.
  • each reciprocal was expanded to an integer by a preset coefficient, so that the scale factor was expanded by a multiple of the preset coefficient. Therefore, here, the quotient of the second product and the preset coefficient can be determined. , Thereby reducing the second product by a multiple of the preset coefficient.
  • the reciprocal of the middle value of the numerical range is expanded by 2 n times to make it an integer, and finally multiplied by the number of pixels m of a certain gray scale, and finally reduced by 2 n times to make the column height of the gray scale Back to the correct range of processing.
  • the column corresponding to the second gray level in the histogram can be drawn according to the column height corresponding to the second gray level reduced to the correct range.
  • the last 7 bits should be set to 0 so that the column height does not exceed 896.
  • the number of pixels corresponding to each gray scale can be read from the second storage module, such as RAM.
  • the column corresponding to the maximum number is drawn as the maximum allowable height, and the heights of other columns can be allocated according to the scaling ratio of the column height corresponding to the maximum number, so no matter what display image is received,
  • the drawn histogram can be maintained at a suitable height, and dynamic adjustment of the height is realized, so that the effective drawing height is basically concentrated at the waist of the histogram, so that the grayscale concentration of the displayed image can be clearly displayed, which is convenient for analysis and processing.
  • the step of drawing a histogram according to the column height corresponding to the second gray scale may specifically include:
  • the column shape of the second gray scale is drawn according to the column height corresponding to the second gray scale.
  • Figure 6 shows a partial schematic diagram of a histogram.
  • the number of pixels represented by the column is counted from bottom to top, but the drawing timing is similar to the display timing, which is from top to top. Therefore, for the second gray scale whose column height is less than the height of the histogram to be drawn, you need to first draw the blank area above the column, and then draw the column. Correspondingly, it is necessary to first determine the height of the blank area above the column, and after the blank area is drawn, draw the column below the blank area according to the height of the column.
  • the difference between the column height corresponding to the second gray scale of the histogram height to be drawn that is, to determine the height from the top of the effective drawing area to the column top of the second gray scale.
  • This part of the height is the first gray scale.
  • the blank height of the blank area above the column of two gray scales can be drawn according to the blank height, and when the blank area is drawn, the column of the second gray scale is drawn according to the column height corresponding to the second gray scale.
  • the blank height should be drawn with a height of 96 pixels.
  • the count is less than 96, the blank area should be drawn, and when the count is greater than or equal to 96, a column should be drawn.
  • the step of determining the quotient of the second product and the preset coefficient to obtain the column height corresponding to the second gray scale may specifically include: expressing the second product in binary to obtain a second product binary number, and shifting the second product binary number to the right by N bits to obtain the column height corresponding to the second gray scale.
  • the preset coefficient is the N-th power of 2
  • the right shift of the binary number is equivalent to the rule of division operation
  • the second product is expressed as the second product binary number by binary
  • the second product binary number Shifting to the right by N bits is equivalent to dividing the second product by a preset coefficient, so that the value obtained after shifting to the right can be determined as the column height corresponding to the second gray scale.
  • the main process of drawing a histogram can be summarized as follows: First, count the maximum number of pixels max in the displayed image, and express max in binary, after obtaining the maximum number of binary numbers, you can read the 25th from the maximum number of binary numbers. Up to 15 people. Then you can use the read value as the destination storage address, search the ROM for the scale factor stored in the destination storage address (which has been expanded by 2 n times), and then draw the histogram, specifically, for the first corresponding to max
  • the column shape of the gray scale can be directly drawn as the highest height allowed by the effective drawing area.
  • the number of pixels corresponding to the second gray scale can be multiplied by the scale factor, and then reduced by 2 n times,
  • the column height corresponding to the second gray scale can be obtained, and then the column shape of the second gray scale is drawn according to the column height, so that the histogram can be drawn.
  • the grayscale value of each target pixel in the display image can be determined first, and then the number of pixels of each preset grayscale level can be determined according to the grayscale value of each target pixel, and then the number of pixels of each preset grayscale level can be determined by The first number represents the maximum number of the number of pixels, the first number of the maximum number is obtained, and the value of the preset digit range in the maximum number of first number is read, and then the scale factor corresponding to the value can be found , And finally draw the histogram according to the height of the histogram to be drawn, the gray scale to be drawn and the scale factor found.
  • the scale factor required for drawing can be determined according to the maximum number of pixels in the gray scale, and the column height corresponding to the gray scale to be drawn can be drawn according to the scale factor, so that the height of each column can be Distribute proportionally, so that in the drawn histogram, both the higher and lower columns can keep the display height appropriate, and the effective drawing height is basically concentrated at the waist of the histogram, so that the grayscale concentration of the displayed image can be clearly displayed , To facilitate analysis and processing.
  • the embodiment of the present disclosure also discloses a display device, including a processor, a memory, and a computer program stored on the memory and capable of running on the processor.
  • a display device including a processor, a memory, and a computer program stored on the memory and capable of running on the processor.
  • the embodiment of the present disclosure also discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the image drawing method as described above are realized.
  • the device embodiments described above are merely illustrative.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units.
  • Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement it without creative work.
  • the various component embodiments of the present disclosure may be implemented by hardware, or by software modules running on one or more processors, or by a combination of them.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the display device according to the embodiments of the present disclosure.
  • DSP digital signal processor
  • the present disclosure can also be implemented as a device or device program (for example, a computer program and a computer program product) for executing part or all of the methods described herein.
  • Such a program for realizing the present disclosure may be stored on a computer-readable medium, or may have the form of one or more signals.
  • Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
  • FIG. 7 shows a display device that can implement the method according to the present disclosure.
  • the display device traditionally includes a processor 1010 and a computer program product in the form of a memory 1020 or a computer readable medium.
  • the memory 1020 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the memory 1020 has a storage space 1030 for executing program codes 1031 of any method steps in the above methods.
  • the storage space 1030 for program codes may include various program codes 1031 respectively used to implement various steps in the above method. These program codes can be read from or written into one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks. Such computer program products are usually portable or fixed storage units as described with reference to FIG. 8.
  • the storage unit may have storage segments, storage spaces, etc. arranged similarly to the memory 1020 in the display device of FIG. 7.
  • the program code can be compressed in an appropriate form, for example.
  • the storage unit includes computer-readable codes 1031', that is, codes that can be read by, for example, a processor such as 1010. These codes, when run by a display device, cause the display device to perform each of the methods described above. step.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

图像绘制方法、显示装置及存储介质,涉及显示技术领域。图像绘制方法包括:确定显示图像中的每个目标像素的灰阶值;根据目标像素的灰阶值,确定每个预设灰阶等级的像素数量;通过第一进制表示多个像素数量中的最大数量,并读取最大数量第一进制数中预设位数范围的数值;确定数值对应的比例系数;根据待绘制直方图高度、待绘制灰阶和比例系数,绘制直方图。

Description

图像绘制方法、显示装置及存储介质
相关申请的交叉引用
本公开要求在2020年03月27日提交中国专利局、申请号为202010232239.7、名称为“一种图像绘制方法、显示装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及显示技术领域,特别是涉及一种图像绘制方法、显示装置及存储介质。
背景技术
随着显示技术的不断发展,显示装置被广泛地应用到各个领域,为了更好地分析显示装置中显示图像的画面色彩分布等情况,通常需要绘制显示图像对应的直方图,例如RGB直方图、亮度直方图等,横坐标为灰阶,纵坐标为像素数量。其中,RGB直方图可以展示每个颜色分量对应不同灰阶的像素数量分布,亮度直方图可以展示不同亮度灰阶的像素数量分布。
概述
本公开提供一种图像绘制方法、显示装置及存储介质。
本公开提供了一种图像绘制方法,包括:
确定显示图像中的每个目标像素的灰阶值;
根据每个所述目标像素的灰阶值,确定每个预设灰阶等级的像素数量;
通过第一进制表示多个所述像素数量中的最大数量,得到最大数量第一进制数,并读取所述最大数量第一进制数中预设位数范围的数值;
确定所述数值对应的比例系数;
根据待绘制直方图高度、待绘制的灰阶和所述比例系数,绘制直方图。
可选地,所述确定显示图像中的每个目标像素的灰阶值之前,还包括:
根据所述显示图像中任一灰阶所能够达到的最大像素数量和所述待绘制直方图高度,确定多个等分的数值范围;所述多个数值范围不重合且连续;
确定每个所述数值范围的中间值的倒数;所述中间值为整数;
将每个所述倒数与预设系数相乘,得到第一乘积,所述第一乘积为整数;
根据所述数值范围的数量,确定多个第一存储地址;
将每个所述第一乘积作为比例系数,按照从小到大的顺序分别一一对应存入所述多个第一存储地址。
可选地,所述确定所述数值对应的比例系数,包括:
将所述数值作为目的存储地址,确定所述目的存储地址中存储的比例系数。
可选地,所述数值范围的数量为预设数量,所述数值范围内的数值个数的倒数与所述预设系数的乘积为预设乘积。
可选地,所述根据所述显示图像中任一灰阶所能够达到的最大像素数量和所述待绘制直方图高度,确定多个等分的数值范围的步骤,包括:
将所述最大像素数量除以所述待绘制直方图高度,得到第一商值;
将所述第一商值除以所述预设数量,得到每个所述数值范围的数值数量;
根据每个所述数值范围的数值数量,确定多个等分的所述数值范围。
可选地,所述最大数量第一进制数通过第一数据结构表示,所述第一数据结构从末位开始包括第一位数范围和第二位数范围,所述第一位数范围从所述第一位数范围的首位开始包括所述预设位数范围,所述第一位数范围中的数值表示所述待绘制直方图高度,所述第二位数范围中的数值表示所述最大数量第一进制数所对应的所述数值范围中的任一数值,所述预设位数范围中的数值表示所述最大数量第一进制数所对应的所述数值范围。
可选地,所述根据所述待绘制直方图高度、待绘制的灰阶和所述比例系数,绘制直方图,包括:
按照所述待绘制直方图高度,绘制所述最大数量对应的第一灰阶;
对于所述第一灰阶之外的任一待绘制的第二灰阶,将所述第二灰阶对应的像素数量与所述比例系数相乘,得到第二乘积;
确定所述第二乘积与所述预设系数的商,得到所述第二灰阶对应的柱状高度;
根据所述第二灰阶对应的柱状高度,绘制直方图。
可选地,所述根据所述第二灰阶对应的柱状高度,绘制直方图,包括:
将所述待绘制直方图高度与所述第二灰阶对应的柱状高度相减,得到所述第二灰阶的柱状顶部至所述待绘制直方图高度处的留白高度;
按照所述留白高度,绘制所述第二灰阶的柱状顶部至所述待绘制直方图高度处的留白区域;
当所述留白区域绘制完毕时,按照所述第二灰阶对应的柱状高度,绘制所述第二灰阶的柱状。
可选地,所述预设系数为2的N次幂,所述确定所述第二乘积与所述预设系数的商,得到所述第二灰阶对应的柱状高度,包括:
通过二进制表示所述第二乘积,得到第二乘积二进制数,并将所述第二乘积二进制数右移N位,得到所述第二灰阶对应的柱状高度。
可选地,所述确定显示图像中的每个目标像素的灰阶值,包括:
将所述显示图像拆分为多个显示子图像;
确定每个所述显示子图像中的每个所述目标像素的灰阶值。
可选地,所述目标像素包括所述显示子图像中通过采样所得的像素,或所述显示子图像中的全部像素。
可选地,所述根据每个所述目标像素的灰阶值,确定每个预设灰阶等级的像素数量的步骤,包括:
将每个所述预设灰阶等级作为第二存储模块中的一个第二存储地址,所述第二存储地址的数量与所述预设灰阶等级的数量相等;
确定每个所述目标像素的灰阶值对应的预设灰阶等级,并将每个所述目标像素存储至对应的所述第二存储地址中,其中,所述多个显示子图像中的所述目标像素分别存储至不同的所述第二存储模块中;
计算每个所述第二存储模块中属于同一个所述第二存储地址的像素数量的和值,得到每个所述预设灰阶等级的像素数量。
可选地,所述预设灰阶等级包括一个灰阶,或所述预设灰阶等级包括多个灰阶。
可选地,所述第一进制为二进制。
本公开还公开了一种显示装置,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上所述的图像绘制方法的步骤。
本公开还公开一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如上所述的图像绘制方法的步骤。
本公开还提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在显示装置上运行时,导致所述显示装置执行上述的图像绘制方法。
上述说明仅是本公开技术方案的概述,为了能够更清楚了解本公开的技 术手段,而可依照说明书的内容予以实施,并且为了让本公开的上述和其它目的、特征和优点能够更明显易懂,以下特举本公开的具体实施方式。
附图简述
为了更清楚地说明本公开实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了本公开实施例的一种图像绘制方法的流程图;
图2示出了本公开实施例的RGB融合式直方图和亮度直方图的有效绘制区域示意图;
图3示出了本公开实施例的一种RGB分离式直方图的有效绘制区域示意图;
图4示出了本公开实施例的一种用于表示各个像素数量中的最大数量的第一数据结构;
图5示出了本公开实施例的另一种用于表示各个像素数量中的最大数量的第一数据结构;
图6示出了本公开实施例的一种直方图的局部示意图;
图7示意性地示出了用于执行根据本公开的方法的显示装置的框图;并且
图8示意性地示出了用于保持或者携带实现根据本公开的方法的程序代码的存储单元。
详细描述
为使本公开的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本公开作进一步详细的说明。显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
参照图1,示出了本公开实施例的一种图像绘制方法的步骤流程图,该方法包括以下步骤:
步骤101:确定显示图像中的每个目标像素的灰阶值。
在本公开实施例中,该方法可以通过图像绘制装置实现,该图像绘制装置例如可以是现场可编程门阵列(Field-Programmable Gate Array,FPGA),相应的,该方法可以应用于包括FPGA的电子设备,例如高清或超高清的监视器,或者高清电脑等,本公开实施例对此不作具体限定。
可选地,步骤101可以通过下述方式实现,包括:将所述显示图像拆分为多个显示子图像;确定每个所述显示子图像中的每个所述目标像素的灰阶值。
具体地,当图像绘制装置接收到需要显示的显示图像时,可以将显示图像拆分为多个显示子图像。例如,在8K视频系统中,可以输入的图像的分辨率为7680×4320,可选地,对于分辨率为7680×4320的显示图像,可以将该显示图像沿纵向拆分为16个区域,得到16个显示子图像,其中,每个显示子图像的分辨率为480×4320。
对于任一显示子图像,图像绘制装置可以确定每个显示子图像中的每个目标像素的灰阶值,其中,目标像素可以是显示子图像中采样得到的像素,当然也可以是显示子图像中的全部像素,本公开实施例对此不作具体限定。
其中,对像素进行采样,可以在图像整体灰阶情况能够得到较为准确的反映的同时,节约后续统计像素数量的时间,从而能够节省绘制直方图的时间。
例如,对于分辨率为480×4320的显示子图像,可以沿水平方向每4个像素采样1个像素,沿垂直方向遍历所有行。在具体应用中,可以配合时钟信号进行像素的采样,首先计数每个时钟高电平到来的像素数据,每当第4个像素数据到来时,记录下它的灰阶值。这样,1个显示子图像可以采集得到480×4320×(1/4)=518400个目标像素的灰阶值,对于显示图像,也即16个这样的显示子图像,共可以采集到518400×16=8294400个目标像素的灰阶值。
在实际应用中,可以将16个显示子图像的灰阶值数据分别存储在16个不同的第二存储模块中。可选地,第二存储模块具体可以为易挥发性随机存取存储器(Ramdom Access Memory,RAM)。
此外,在具体应用中,可选地,本步骤可以对多个显示子图像进行并行处理,也即是可以同时确定每个显示子图像中的每个目标像素的灰阶值,如此,可以节省统计灰阶值的时间,从而能够节省绘制直方图的时间。
另外,在本公开实施例中,当需要分析不同颜色分量的直方图时,目标像素的灰阶值可以包括R(红色)灰阶、G(绿色)灰阶和B(蓝色)灰阶, 或者Y(亮度)灰阶、U(色度)灰阶和V(色度)灰阶等。当需要分析亮度直方图时,目标像素的灰阶值可以包括亮度灰阶。
可选地,在本步骤之前,该方法还可以包括以下步骤(1)至(5):
(1)根据所述显示图像中任一灰阶所能够达到的最大像素数量和所述待绘制直方图高度,确定多个等分的数值范围;所述多个数值范围不重合且连续。
在步骤(1)中,显示图像中任一灰阶所能够达到的最大像素数量,也即是完整的显示图像中的像素数量总和,例如对于分辨率为7680×4320的显示图像,该显示图像中任一灰阶所能够达到的最大像素数量即为7680×4320=33177600,也即是该显示图像中的全部像素的灰阶都相同,例如纯白或纯黑画面的显示图像。
图2示出了一种RGB(红绿蓝)融合式直方图和亮度直方图的有效绘制区域示意图,图3示出了一种RGB分离式直方图的有效绘制区域示意图,绘制的直方图大小都是1920×1080。参照图2,只有1个有效绘制区域P1,其他区域留白,可以透明显示,其中,P1的大小为1536×896,因此,对于RGB融合式直方图和亮度直方图,柱状的最高值即为896。参照图3,有3个有效绘制区域P2、P3和P4,P2、P3和P4可以分别用于绘制R直方图、G直方图和B直方图,其他区域留白,可以透明显示,其中,P2、P3和P4的大小均为1536×256,因此,对于RGB分离式直方图,柱状的最高值即为256。
在本公开实施例中,可以将像素数量最多的灰阶对应的柱状高度定为有效绘制区域允许绘制的最高值,若将像素数量最多的灰阶对应的柱状高度定为k,也即是像素数量最多的灰阶对应的柱状高度按照一定的比例进行绘制,那么其他灰阶对应的柱状高度就按照这个比例进行分配。例如在显示图像中,灰阶的像素的最大数量是max,那么最大数量max的对应的柱状高度定为k,某灰阶Q的像素有m个,那么这个灰阶Q对应的柱状高度应为m/(max/k)。
例如,对于图3所示的RGB分离式直方图,若在显示图像中,灰阶的像素的最大数量是max,那么最大数量max的对应的柱状高度可定为256,某灰阶Q的像素有m个,那么这个灰阶Q对应的柱状高度应为m/(max/256)。
在本公开实施例中,待绘制直方图高度也即待绘制直方图的有效绘制区域允许绘制的最高值。例如,对于图3所示的有效绘制区域,待绘制直方图高度为256。再例如,对于图2所示的有效绘制区域,待绘制直方图高度为896,但是,896并不是2的整数次幂,不利于在后续计算中得到整数,因此, 在实际应用中,当待绘制直方图高度为896时,可以在后续计算时使用1024(2 10)进行替代,在后续绘制时,将最高柱状高度之外的其他柱状高度的二进制数据后7位全部置0即可。由于二进制数据的后7位可表示的最大数为127,按照允许绘制的最高值为1024来说,理论上,1023是最高柱状之外的其他柱状所能达到的最大绘制高度,因此,将最高柱状高度之外的其他柱状高度的二进制数据后7位全部置0(最多可减去127),可使绘制的最终柱状高度不会超过896(1023-127=896)。而最高柱状最终将直接绘制为896的高度,而不会按照1024进行绘制,因此,所有柱状的高度都不会超过896。
需要说明的是,图2和图3所示的直方图大小和有效绘制区域大小仅为示例,并不对本公开构成限定。
在步骤(1)中,可以将0至(最大像素数量MA/待绘制直方图高度k)分段为多个等分的数值范围,等分表示每个数值范围中包含的数值个数相同。
可选地,在所述数值范围的数量为预设数量的情况下,所述步骤(1)具体可以包括:根据所述显示图像中任一灰阶所能够达到的最大像素数量、所述待绘制直方图高度和所述预设数量,确定多个等分的数值范围。
具体地,可以将最大像素数量除以待绘制直方图高度再除以预设数量,得到划分间隔,该划分间隔表示每个数值范围包括多少个数值。
例如,对于RGB分离式直方图,待绘制直方图高度为256,预设数量可以为2025,也即是数值范围的数量为2025,则划分间隔=33177600/256/2025=64,也即是可以每隔64个数值,将0至129600(MA/k=33177600/256=129600)进行分段,得到[0,63]、[64,127]……共2025(129600/64=2025)个等分的数值范围,这些数值范围不重合且连续,每个数值范围包括64个数值。
再例如,对于RGB融合式直方图和亮度直方图,待绘制直方图高度为1024,预设数量可以为2025,也即是数值范围的数量为2025,则划分间隔=33177600/1024/2025=16,也即是可以每隔16个数值,将0至32400(MA/k=33177600/1024=32400)进行分段,得到[0,15]、[16,31]……共2025(32400/16=2025)个等分的数值范围,这些数值范围不重合且连续,每个数值范围包括16个数值。
(2)确定每个所述数值范围的中间值的倒数;所述中间值为整数。
在步骤(2)中,可以取每个数值范围的中间值的倒数,其中,由于每个数值包括偶数个(64个)数值,因此,中间值可以取中间2个数值中的任一 者,例如[0,63]的数值范围的中间值可以取32,[0,15]的数值范围的中间值可以取8。
分段取中间值以后,计算中间值的倒数,可以发现,对于RGB融合式直方图和亮度直方图,这些倒数其实就是RGB分离式直方图对应的各个倒数的4倍。
(3)将每个所述倒数与预设系数相乘,得到第一乘积,所述第一乘积为整数。
在步骤(3)中,可以确定每个倒数分别与预设系数的第一乘积,以将每个所述倒数扩展为整数。其中,预设系数用于将每个倒数扩展为整数表示,以便于计算和存储。可选地,对于RGB分离式直方图,预设系数可以为2 18;对于RGB融合式直方图和亮度直方图,预设系数可以为2 16(2 18/2 16=4倍)。
(4)根据所述数值范围的数量,确定多个第一存储地址。
在步骤(4)中,数值范围的数量有M个,就可以确定出M个第一存储地址,可选地,第一存储地址可以从0开始,相应的,每个第一存储地址分别为0~(M-1)。
例如,数值范围的数量可以为2025个,那么,就可以确定出2025个第一存储地址,每个第一存储地址分别是0、1、2、……、2023、2024。
在实际应用中,该第一存储地址可以是第一存储模块所包括的存储地址,可选地,第一存储模块具体可以为只读存储器(Read Only Memory,ROM)。
(5)将每个所述第一乘积作为比例系数,按照从小到大的顺序分别一一对应存入所述多个第一存储地址。
在步骤(5)中,可以将每个第一乘积作为比例系数,按照从小到大的顺序分别一一对应存入多个第一存储地址,其中,最小的第一乘积存入最小的第一存储地址0,最大的第一乘积存入最大的第一存储地址。例如,最小的第一乘积存入最小的第一存储地址0,最大的第一乘积存入最大的第一存储地址2024。这些比例系数也即是ROM参数。
另外,可选地,所述数值范围的数量可以为预设数量,所述数值范围内的数值个数的倒数与所述预设系数的乘积可以为预设乘积。
在本公开实施例中,在数值范围的数量为预设数量的情况下,不论最大像素数量、待绘制直方图高度是多少,只要把数值范围的数量确定(等于预设数量),例如2025,从而保证最大像素数量×待绘制直方图高度不变,则能够保证步骤(5)中第一存储地址不变,第一存储地址都是0~2024。
在数值范围内的数值个数(也即划分间隔)的倒数与预设系数的乘积为预设乘积的情况下,能够保证步骤(5)中比例系数不变,比例系数都是第一乘积。例如预设乘积可以为1/64×2 18,对于RGB分离式直方图,数值范围内的数值个数的倒数1/64×预设系数2 18的乘积为1/64×2 18,对于RGB融合式直方图和亮度直方图,数值范围内的数值个数的倒数1/16×预设系数2 16的乘积也为1/64×2 18,如此,能够保证步骤(5)中比例系数不变,比例系数都是第一乘积。
如此,在数值范围的数量为预设数量,且数值范围内的数值个数的倒数与预设系数的乘积为预设乘积的情况下,可以保证步骤(5)中第一存储地址与比例系数的对应关系(ROM参数)不变,第一存储地址都是0~2024,比例系数都是第一乘积,这样,绘制RGB分离式、RGB融合式和亮度直方图,都只需要一套ROM参数即可,无需存储多套ROM参数,从而能够节约存储资源。
当然,在实际应用中,每个数值范围内的数值个数和数值范围的数量也都是可变的,相应的,ROM参数可以有多套,本公开实施例对此不作具体限定。
步骤102:根据每个所述目标像素的灰阶值,确定每个预设灰阶等级的像素数量。
在本公开实施例中,可以是一个预设灰阶等级包括多个灰阶,也即该多个灰阶属于同一预设灰阶等级。当然,也可以是一个预设灰阶等级可以包括一个灰阶,也即一个灰阶就是一个预设灰阶等级,本公开实施例对此不作具体限定。在具体应用时,每个第二存储模块都可以将每个预设灰阶等级作为一个第二存储地址,例如预设灰阶等级有512个,则每个第二存储模块就有512个第二存储地址。
显示子图像A对应的第二存储模块为a,对于显示子图像A中的任一目标像素,图像绘制装置可以确定该目标像素的灰阶值属于预设灰阶等级X,并可以将该目标像素计入第二存储模块a的地址X中,进行存储。
例如,在10bit(比特)系统中,所有像素的RGB、YUV灰阶取值都在0~1023之间,共1024个灰阶,在本公开实施例中,可以将每2个灰阶算做一样的灰阶,作为一个预设灰阶等级,因此,预设灰阶等级是0~511共512个。可以将这512个预设灰阶等级作为512个地址,因此,16个RAM中的每一个RAM都有512个地址,每个地址对应的数据表示像素数量。对于任一显示 子图像,对应RAM1,记录该显示子图像分别在RAM1的512个预设灰阶等级中的目标像素的数量。例如某目标像素的R灰阶值=612,就在RAM1的第306(612/2=306,地址若以0为开头计数,则第306个地址对应的地址表示为305)个地址中存储的数据加1,每个地址中存储的初始数据为0。
这样,16个显示子图像对应的数据全部统计结束以后,可以将这16个RAM的数据取出来做加和,也即是将每个RAM中属于同一地址(同一预设灰阶等级)的像素数量进行加和,从而可以得到每个预设灰阶等级的像素数量。
在本公开实施例中,需要统计显示图像中最多预设灰阶等级的像素个数,并以此为最高柱状进行直方图绘制,那么在像素数量累加的过程中,需要记录下最多预设灰阶等级的像素数量,就是设置一个比较机制,在统计过程中,最大数量的初始值可以设为0,每出现更高的像素数量,就更新这个最大数量,可以将这个最大数量记作上文提及的max。
需要注意的是,对于RGB融合式直方图,其R、G、B的柱状都是从同一有效绘制区域的底部开始出现的,因此,取最大数量max的时候,应取R、G、B所有灰阶对应的最大数量。而对于RGB分离式直方图,其R、G、B的柱状是从不同有效绘制区域的底部开始出现的,因此,取最大数量max的时候,应分别取R、G、B灰阶对应的最大数量,分别计算R、G、B对应不同灰阶的柱状高度。对于亮度直方图,只有亮度Y,取Y灰阶对应的最大数量max即可。
步骤103:通过第一进制表示各个所述像素数量中的最大数量,得到最大数量第一进制数,并读取所述最大数量第一进制数中预设位数范围的数值。
可选地,所述最大数量第一进制数通过第一数据结构表示,所述第一数据结构从末位开始包括第一位数范围和第二位数范围,所述第一位数范围从所述第一位数范围的首位开始包括所述预设位数范围,所述第一位数范围中的数值表示所述待绘制直方图高度,所述第二位数范围中的数值表示所述最大数量第一进制数所对应的所述数值范围中的任一数值,所述预设位数范围中的数值表示所述最大数量第一进制数所对应的所述数值范围。
可选地,所述第一进制为二进制。相应的,最大数量第一进制数也即最大数量二进制数。
在本公开实施例中,可以通过二进制表示各个像素数量中的最大数量。参照图4,示出了一种用于表示各个像素数量中的最大数量的第一数据结构, 可应用于RGB分离式直方图的绘制。参照图5,示出了另一种用于表示各个像素数量中的最大数量的第一数据结构,可应用于RGB融合式直方图和亮度直方图的绘制。
如图4和图5所示,可以通过32bit表示各个像素数量中的最大数量max,由于max可能的最大值为33177600(7680×4320),是一个25bit数据,但由于设备运算限制,只能计算2的整数次幂的数据,因此,为了保证25bit的有效数据,可以取大于25的最小的2的整数次幂,即32(2 5)。参照图4和图5,由于只有25bit有效,因此,32bit的高7位默认都为0,起占位作用。
在图4所示的数据结构中,低8位(即第一位数范围,第8至1位)可表示256(2 8),也即是最大数量二进制数中的第8至1位的数值可以表示待绘制直方图高度256。对于RGB分离式直方图,由于最终想要计算出任一灰阶Q对应的柱状高度m/(max/256),而max可能的最大值为33177600,因此,max/256直接做除法运算会消耗很大的资源,因此,可以通过二进制表示max,然后忽略低8位(相当于除以256),即可得到max/256的部分,也即是图4中间的11+6共17位可以表示max/256的大小,max/256也即最大数量二进制数所属的数值范围中的任一数值。如此,可以避免进行大数值的除法运算,节约了设备的系统资源。
同理,在图5所示的数据结构中,低10位(即第一位数范围,第10至1位)可表示1024(2 10),也即是最大数量二进制数中的第10至1位的数值可以表示待绘制直方图高度1024。对于RGB融合式直方图和亮度直方图,由于最终想要计算出任一灰阶Q对应的柱状高度m/(max/1024),而max可能的最大值为33177600,因此,max/1024直接做除法运算会消耗很大的资源,因此,可以通过二进制表示max,然后忽略低10位(相当于除以1024),即可得到max/1024的部分,也即是图5中间的11+4共15位可以表示max/1024的大小,max/1024也即最大数量二进制数所属的数值范围中的任一数值。如此,可以避免进行大数值的除法运算,节约了设备的系统资源。
在图4所示的数据结构中,在忽略低8位的情况下,中间6位(即第二位数范围中除预设位数范围之外的位数范围)可表示0~63(2 6-1),不论中间11位是多少,中间6位的变动范围始终是这64个数值,正好就是RGB分离式直方图对应的数值范围的划分间隔64,由于之前将0至(33177600/256)每隔64个数值划分为2025个数值范围,因此,可以通过读取中间的11位(2 11=2048>2025),也即32bit中的第25至15位,便可以获得max/256属 于哪一个数值范围,也就是说,32bit中的第25至15位,可以表示最大数量二进制数所对应的数值范围。因此,对于RGB分离式直方图,预设位数范围可以设定为32bit中的第25至15位。
同理,在图5所示的数据结构中,在忽略低10位的情况下,中间4位(即第二位数范围中除预设位数范围之外的位数范围)可表示0~15(2 4-1),不论中间11位是多少,中间4位的变动范围始终是这16个数值,正好就是RGB融合式直方图和亮度直方图对应的数值范围的划分间隔16,由于之前将0至(33177600/1024)每隔16个数值划分为2025个数值范围,因此,可以通过读取中间的11位(2 11=2048>2025),也即32bit中的第25至15位,便可以获得max/1024属于哪一个数值范围,也就是说,32bit中的第25至15位,可以表示最大数量二进制数所对应的数值范围。因此,对于RGB分离式直方图,预设位数范围可以设定为32bit中的第25至15位。
在本公开实施例中,读取到的最大数量第一进制数中预设位数范围的数值,可以表示max/待绘制直方图高度所属的数值范围。由于在之前的步骤中,数值范围对应的序数(0~2024)设定为了2025个第一存储地址,因此,读取到的该数值即为某个第一存储地址。
具体地,在统计出显示图像的max,并通过第一进制表示出max,得到最大数量二进制数之后,可以从最大数量二进制数中读取max[24:14],也即最大数量二进制数中的第25至15位。
可以理解的是,第一进制数也可以为四进制数等,本领域技术人员可根据实际情况设定适用的进制计数方式,本公开实施例对此不做限定。例如,通过四进制数表示像素数量中的最大数量,对于RGB分离式直方图而言,可以忽略最大数量四进制数的低4位(相当于除以256),即可得到max/256的部分。对于RGB融合式直方图和亮度直方图而言,可以忽略最大数量四进制数的低5位(相当于除以1024),即可得到max/1024的部分。这样,可以避免进行大数值的除法运算,节约了设备的系统资源。
步骤104:确定所述数值对应的比例系数。
在本公开实施例中,由于比例系数可以存储在第一存储模块(ROM)所包括的第一存储地址中,因此,本步骤具体可以通过下述方式实现,包括:将所述数值作为目的存储地址,确定所述目的存储地址中存储的比例系数。
其中,可以将读取到的最大数量第一进制数中预设位数范围的数值,作为需要查询的目的存储地址,然后可以从第一存储模块中查找该目的存储地 址中存储的比例系数。
具体地,可以将通过max[24:14]读取出最大数量二进制数中的第25至15位的数值,作为需要查询的目的存储地址,然后可以从第一存储模块中进行寻址,以在第一存储模块中查找该目的存储地址,进而可以获取该目的存储地址中存储的比例系数。
步骤105:根据待绘制直方图高度、待绘制的灰阶和所述比例系数,绘制直方图。
在本公开实施例中,可选地,本步骤具体可以通过下述方式实现,包括:
按照所述待绘制直方图高度,绘制所述最大数量对应的第一灰阶;
对于所述第一灰阶之外的任一待绘制的第二灰阶,将所述第二灰阶对应的像素数量与所述比例系数相乘,得到第二乘积;
确定所述第二乘积与所述预设系数的商,得到所述第二灰阶对应的柱状高度;
根据所述第二灰阶对应的柱状高度,绘制直方图。
其中,对于最大数量max对应的第一灰阶,将绘制为有效绘制区域允许的最高高度,也即待绘制直方图高度。对于RGB分离式直方图,可以将最大数量max对应的第一灰阶的柱状高度绘制为待绘制直方图高度256。对于RGB融合式直方图和亮度直方图,可以将最大数量max对应的第一灰阶的柱状高度绘制为待绘制直方图高度896,而不是计算时用到的待绘制直方图高度替代值1024。
另外,对于第一灰阶之外的任一待绘制的第二灰阶,也即像素数量小于最大数量max的灰阶,确定第二灰阶对应的像素数量与比例系数的第二乘积,然后可以确定第二乘积与预设系数的商,得到第二灰阶对应的柱状高度。由于之前为了便于计算和存储,将每个倒数通过预设系数扩展为整数,从而使比例系数扩大了预设系数的倍数,因此,在此处,可以再确定第二乘积与预设系数的商,从而将第二乘积再缩小预设系数的倍数。简单来说,就是采用了将数值范围中间值的倒数扩展2 n倍,使之成为整数,最后再与某灰阶的像素数量m相乘,最后缩小2 n倍,使该灰阶的柱状高度回到正确范围的处理方式。之后,便可以根据缩小回正确范围的第二灰阶对应的柱状高度,绘制直方图中第二灰阶对应的柱状。
需要说明的是,对于RGB融合式直方图和亮度直方图,第二灰阶对应的柱状高度表示为二进制时,应将后7位全部置0,以使柱状高度不超过896。
另外,可选地,各个灰阶对应的像素数量可以从第二存储模块中读取,例如RAM。
在本公开实施例中,由于最大数量对应的柱状绘制为允许的最大高度,且其他柱状的高度可以按照最大数量对应的柱状高度的缩放比例进行分配,如此,无论接收到什么样的显示图像,绘制出的直方图都能够保持高度适宜,实现了动态调节高度,使得有效绘制高度基本集中在直方图腰部,从而可以清楚地展示显示图像的灰阶集中情况,便于进行分析处理。
可选地,所述根据所述第二灰阶对应的柱状高度,绘制直方图的步骤,具体可以包括:
将所述待绘制直方图高度与所述第二灰阶对应的柱状高度相减,得到所述第二灰阶的柱状顶部至所述待绘制直方图高度处的留白高度;
按照所述留白高度,绘制所述第二灰阶的柱状顶部至所述待绘制直方图高度处的留白区域;
当所述留白区域绘制完毕时,按照所述第二灰阶对应的柱状高度,绘制所述第二灰阶的柱状。
其中,图6示出了一种直方图的局部示意图,参照图6,由于在绘制直方图时,柱状表示的像素数量是从下至上计数的,但是绘制时序与显示时序类似,是从上至下绘制的,因此,对于柱状高度小于待绘制直方图高度的第二灰阶,需要首先绘制柱状上方的留白区域,然后再绘制柱状。相应的,需要首先确定柱状上方留白区域的高度,留白区域绘制完毕后,再按照柱状的高度,绘制留白区域下方的柱状。
具体地,首先可以确定待绘制直方图高度第二灰阶对应的柱状高度的差值,也即是确定出有效绘制区域顶部到第二灰阶的柱状顶部有多少高度,这部分高度便是第二灰阶的柱状上方的留白区域的留白高度。然后,可以按照该留白高度,绘制第二灰阶的柱状上方的留白区域,当留白区域绘制完毕时,再按照第二灰阶对应的柱状高度,绘制第二灰阶的柱状。
在绘制时,会从上至下进行计数,例如留白高度应绘制96个像素的高度,则当计数小于96时,应绘制留白区域,当计数大于或等于96时,应绘制柱状。
可选地,在所述预设系数为2的N次幂的情况下,所述确定所述第二乘积与所述预设系数的商,得到所述第二灰阶对应的柱状高度的步骤,具体可以包括:通过二进制表示所述第二乘积,得到第二乘积二进制数,并将所述 第二乘积二进制数右移N位,得到所述第二灰阶对应的柱状高度。
其中,在预设系数为2的N次幂的情况下,可以利用二进制数右移相当于除法运算的规则,通过二进制将第二乘积表示为第二乘积二进制数,再将第二乘积二进制数右移N位,即相当于将第二乘积除以预设系数,从而可以将右移后得到数值确定为第二灰阶对应的柱状高度。如此,可以避免进行大数值的除法运算,节约了设备的系统资源。
参照图2和图3,最终绘制出的是一个1920×1080的直方图图像,绘制的时候,512个灰阶每个灰阶用3个像素表示,横向正好是512×3=1536。
综上,绘制直方图的主要流程可以概括为:首先统计出显示图像的像素的最大数量max,并通过二进制表示出max,得到最大数量二进制数之后,可以从最大数量二进制数中读取第25至15位。然后可以将读取出的数值作为目的存储地址,从ROM中查找该目的存储地址中存储的比例系数(已扩大2 n倍),之后可以进行直方图绘制,具体地,对于max对应的第一灰阶的柱状,可以直接绘制为有效绘制区域允许的最高高度,对于像素数量小于max的其他第二灰阶,可以将第二灰阶对应的像素数量乘以比例系数,再缩小2 n倍,可以得到第二灰阶对应的柱状高度,然后按照该柱状高度绘制第二灰阶的柱状,从而可以绘制出直方图。
在本公开实施例中,首先可以确定显示图像中的每个目标像素的灰阶值,之后根据每个目标像素的灰阶值,确定每个预设灰阶等级的像素数量,然后,可以通过第一进制表示各个像素数量中的最大数量,得到最大数量第一进制数,并读取最大数量第一进制数中预设位数范围的数值,之后可以查找该数值对应的比例系数,最后可以根据待绘制直方图高度、待绘制的灰阶和查找到的比例系数,绘制直方图。在本公开实施例中,可以根据灰阶中最大的像素数量,确定绘制所需的比例系数,并将待绘制的灰阶对应的柱状高度,按照该比例系数进行绘制,以使各个柱状高度可以按比例进行分配,从而在绘制出的直方图中,较高柱状和较低柱状都能够保持显示高度适宜,有效绘制高度基本集中在直方图腰部,从而可以清楚地展示显示图像的灰阶集中情况,便于进行分析处理。
本公开实施例还公开了一种显示装置,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上所述的图像绘制方法的步骤。
本公开实施例还公开了一种计算机可读存储介质,所述计算机可读存储 介质上存储计算机程序,所述计算机程序被处理器执行时实现如上所述的图像绘制方法的步骤。
对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本公开并不受所描述的动作顺序的限制,因为依据本公开,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本公开所必须的。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
本公开的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本公开实施例的显示装置中的一些或者全部部件的一些或者全部功能。本公开还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本公开的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图7示出了可以实现根据本公开的方法的显示装置。该显示装置传统上包括处理器1010和以存储器1020形式的计算机程序产品或者计算机可读介质。存储器1020可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器1020具有用于执行上述方法中的任何方法步骤的程序代码1031的存储空间1030。例如,用于程序代码的存储空间1030可以包括分别用于实现上面的方法中的各种步骤的各个程序代码1031。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图8所述的便携式或者固定存储单元。该存储 单元可以具有与图7的显示装置中的存储器1020类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码1031’,即可以由例如诸如1010之类的处理器读取的代码,这些代码当由显示装置运行时,导致该显示装置执行上面所描述的方法中的各个步骤。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
以上对本公开所提供的一种图像绘制方法、显示装置及存储介质,进行了详细介绍,本文中应用了具体个例对本公开的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本公开的方法及其核心思想;同时,对于本领域的一般技术人员,依据本公开的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本公开的限制。

Claims (17)

  1. 一种图像绘制方法,其中,包括:
    确定显示图像中的每个目标像素的灰阶值;
    根据每个所述目标像素的灰阶值,确定每个预设灰阶等级的像素数量;
    通过第一进制表示多个所述像素数量中的最大数量,得到最大数量第一进制数,并读取所述最大数量第一进制数中预设位数范围的数值;
    确定所述数值对应的比例系数;
    根据待绘制直方图高度、待绘制的灰阶和所述比例系数,绘制直方图。
  2. 根据权利要求1所述的方法,其中,所述确定显示图像中的每个目标像素的灰阶值之前,还包括:
    根据所述显示图像中任一灰阶所能够达到的最大像素数量和所述待绘制直方图高度,确定多个等分的数值范围;所述多个数值范围不重合且连续;
    确定每个所述数值范围的中间值的倒数;所述中间值为整数;
    将每个所述倒数与预设系数相乘,得到第一乘积,所述第一乘积为整数;
    根据所述数值范围的数量,确定多个第一存储地址;
    将每个所述第一乘积作为比例系数,按照从小到大的顺序分别一一对应存入所述多个第一存储地址。
  3. 根据权利要求2所述的方法,其中,所述确定所述数值对应的比例系数,包括:
    将所述数值作为目的存储地址,确定所述目的存储地址中存储的比例系数。
  4. 根据权利要求2所述的方法,其中,所述数值范围的数量为预设数量,所述数值范围内的数值个数的倒数与所述预设系数的乘积为预设乘积。
  5. 根据权利要求4所述的方法,其中,所述根据所述显示图像中任一灰阶所能够达到的最大像素数量和所述待绘制直方图高度,确定多个等分的数值范围的步骤,包括:
    将所述最大像素数量除以所述待绘制直方图高度,得到第一商值;
    将所述第一商值除以所述预设数量,得到每个所述数值范围的数值数量;
    根据每个所述数值范围的数值数量,确定多个等分的所述数值范围。
  6. 根据权利要求2所述的方法,其中,所述最大数量第一进制数通过第 一数据结构表示,所述第一数据结构从末位开始包括第一位数范围和第二位数范围,所述第一位数范围从所述第一位数范围的首位开始包括所述预设位数范围,所述第一位数范围中的数值表示所述待绘制直方图高度,所述第二位数范围中的数值表示所述最大数量第一进制数所对应的所述数值范围中的任一数值,所述预设位数范围中的数值表示所述最大数量第一进制数所对应的所述数值范围。
  7. 根据权利要求1所述的方法,其中,所述根据所述待绘制直方图高度、待绘制的灰阶和所述比例系数,绘制直方图,包括:
    按照所述待绘制直方图高度,绘制所述最大数量对应的第一灰阶;
    对于所述第一灰阶之外的任一待绘制的第二灰阶,将所述第二灰阶对应的像素数量与所述比例系数相乘,得到第二乘积;
    确定所述第二乘积与所述预设系数的商,得到所述第二灰阶对应的柱状高度;
    根据所述第二灰阶对应的柱状高度,绘制直方图。
  8. 根据权利要求7所述的方法,其中,所述根据所述第二灰阶对应的柱状高度,绘制直方图,包括:
    将所述待绘制直方图高度与所述第二灰阶对应的柱状高度相减,得到所述第二灰阶的柱状顶部至所述待绘制直方图高度处的留白高度;
    按照所述留白高度,绘制所述第二灰阶的柱状顶部至所述待绘制直方图高度处的留白区域;
    当所述留白区域绘制完毕时,按照所述第二灰阶对应的柱状高度,绘制所述第二灰阶的柱状。
  9. 根据权利要求7所述的方法,其中,所述预设系数为2的N次幂,所述确定所述第二乘积与所述预设系数的商,得到所述第二灰阶对应的柱状高度,包括:
    通过二进制表示所述第二乘积,得到第二乘积二进制数,并将所述第二乘积二进制数右移N位,得到所述第二灰阶对应的柱状高度。
  10. 根据权利要求1所述的方法,其中,所述确定显示图像中的每个目标像素的灰阶值,包括:
    将所述显示图像拆分为多个显示子图像;
    确定每个所述显示子图像中的每个所述目标像素的灰阶值。
  11. 根据权利要求10所述的方法,其中,所述目标像素包括所述显示子图像中通过采样所得的像素,或所述显示子图像中的全部像素。
  12. 根据权利要求10所述的方法,其中,所述根据每个所述目标像素的灰阶值,确定每个预设灰阶等级的像素数量的步骤,包括:
    将每个所述预设灰阶等级作为第二存储模块中的一个第二存储地址,所述第二存储地址的数量与所述预设灰阶等级的数量相等;
    确定每个所述目标像素的灰阶值对应的预设灰阶等级,并将每个所述目标像素存储至对应的所述第二存储地址中,其中,所述多个显示子图像中的所述目标像素分别存储至不同的所述第二存储模块中;
    计算每个所述第二存储模块中属于同一个所述第二存储地址的像素数量的和值,得到每个所述预设灰阶等级的像素数量。
  13. 根据权利要求1所述的方法,其中,所述预设灰阶等级包括一个灰阶,或所述预设灰阶等级包括多个灰阶。
  14. 根据权利要求1-13任一项所述的方法,其中,所述第一进制为二进制。
  15. 一种显示装置,其中,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至14中任一项所述的图像绘制方法的步骤。
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如权利要求1至14中任一项所述的图像绘制方法的步骤。
  17. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在显示装置上运行时,导致所述显示装置执行根据权利要求1-14中任一项所述的图像绘制方法。
PCT/CN2021/083028 2020-03-27 2021-03-25 图像绘制方法、显示装置及存储介质 WO2021190606A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/627,498 US20220261971A1 (en) 2020-03-27 2021-03-25 Image drawing method, display apparatus, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010232239.7 2020-03-27
CN202010232239.7A CN113450737B (zh) 2020-03-27 2020-03-27 一种图像绘制方法、显示装置及存储介质

Publications (1)

Publication Number Publication Date
WO2021190606A1 true WO2021190606A1 (zh) 2021-09-30

Family

ID=77808144

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083028 WO2021190606A1 (zh) 2020-03-27 2021-03-25 图像绘制方法、显示装置及存储介质

Country Status (3)

Country Link
US (1) US20220261971A1 (zh)
CN (1) CN113450737B (zh)
WO (1) WO2021190606A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000003451A (ja) * 1999-05-24 2000-01-07 Honda Motor Co Ltd カラ―画像における対象領域の境界識別方法
JP2010015588A (ja) * 2009-08-27 2010-01-21 Kddi R & D Laboratories Inc 動画像データの分類装置
CN107948554A (zh) * 2017-11-30 2018-04-20 深圳Tcl新技术有限公司 显示画面的对比度调节方法、显示器和可读存储介质
CN108984601A (zh) * 2018-06-05 2018-12-11 北京工业职业技术学院 一种基于概率直方图面积相似度的图像检索方法及系统
CN109165058A (zh) * 2018-07-06 2019-01-08 北京三快在线科技有限公司 一种图片处理方法及装置
CN110533117A (zh) * 2019-09-04 2019-12-03 浙江齐聚科技有限公司 图像比对方法、装置、设备和存储介质
CN111261088A (zh) * 2020-02-25 2020-06-09 京东方科技集团股份有限公司 一种图像绘制方法、装置及显示装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03166666A (ja) * 1989-11-27 1991-07-18 Nippon Telegr & Teleph Corp <Ntt> 画像処理方法およびその画像処理装置
US6704445B1 (en) * 2000-09-08 2004-03-09 Avid Technology, Inc. Spike tolerant histograms
JP4229325B2 (ja) * 2004-02-03 2009-02-25 独立行政法人 日本原子力研究開発機構 ピーク検出画像処理方法、プログラム及び装置
JP4457787B2 (ja) * 2004-07-14 2010-04-28 ソニー株式会社 映像信号処理装置および方法、ならびにプログラム
JP4311395B2 (ja) * 2005-10-31 2009-08-12 三菱電機株式会社 画像表示装置および画像表示方法
CN100594537C (zh) * 2008-04-03 2010-03-17 上海广电光电子有限公司 液晶显示装置的色深改善方法
CN102651201B (zh) * 2011-05-04 2014-07-23 京东方科技集团股份有限公司 侧光式led背光源的动态控制方法
KR20160030871A (ko) * 2013-07-17 2016-03-21 에이2젯로직스, 인코포레이티드 그래픽 프로세싱 유닛을 사용하여 히스토그램 계산을 위한 시스템 및 방법
CN103366378B (zh) * 2013-07-26 2016-01-20 深圳大学 基于条件直方图形状一致性的无参考型图像质量评价方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000003451A (ja) * 1999-05-24 2000-01-07 Honda Motor Co Ltd カラ―画像における対象領域の境界識別方法
JP2010015588A (ja) * 2009-08-27 2010-01-21 Kddi R & D Laboratories Inc 動画像データの分類装置
CN107948554A (zh) * 2017-11-30 2018-04-20 深圳Tcl新技术有限公司 显示画面的对比度调节方法、显示器和可读存储介质
CN108984601A (zh) * 2018-06-05 2018-12-11 北京工业职业技术学院 一种基于概率直方图面积相似度的图像检索方法及系统
CN109165058A (zh) * 2018-07-06 2019-01-08 北京三快在线科技有限公司 一种图片处理方法及装置
CN110533117A (zh) * 2019-09-04 2019-12-03 浙江齐聚科技有限公司 图像比对方法、装置、设备和存储介质
CN111261088A (zh) * 2020-02-25 2020-06-09 京东方科技集团股份有限公司 一种图像绘制方法、装置及显示装置

Also Published As

Publication number Publication date
CN113450737A (zh) 2021-09-28
CN113450737B (zh) 2022-11-01
US20220261971A1 (en) 2022-08-18

Similar Documents

Publication Publication Date Title
KR101639852B1 (ko) 그래픽 프로세싱을 위한 픽셀 값 압축
US9489729B2 (en) Method and system for storing statistical data of an image
US11328395B2 (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
US8913080B2 (en) Partitioning high resolution images into sub-images for display
EP1717755A3 (en) System and method for large scale information analysis using data visualization techniques
WO2021190606A1 (zh) 图像绘制方法、显示装置及存储介质
CN108470547B (zh) 显示面板的背光控制方法、计算机可读介质及显示装置
CN111433841B (zh) 显示面板Mura补偿方法、计算机可读存储介质及显示装置
CN116504200A (zh) 图像分块方法、装置、显示设备、及存储介质
US11995890B2 (en) Method and apparatus for tensor processing
CN105354803A (zh) 截断直方图均衡实现装置及方法
CN111626938B (zh) 图像插值方法、图像插值装置、终端设备及存储介质
CN108875733A (zh) 一种红外小目标快速提取系统
CN102129696A (zh) 基于fpga的圆弧边缘图像的参数计算方法
CN108230537B (zh) 一种图像数据处理的方法、装置、设备和存储介质
CN111722823A (zh) 自适应屏幕分辨率的方法、装置、存储介质及电子设备
TW201443869A (zh) 圖層擷取方法、資料擷取裝置與圖層擷取安排方法
CN114119427B (zh) 图片转换方法、装置、设备及可读存储介质
Tsai et al. An efficient dynamic window size selection method for 2-D histogram construction in contextual and variational contrast enhancement
US7468733B2 (en) Method and system for improving color reduction
CN116977154B (zh) 可见光图像与红外图像融合储存方法、装置、设备和介质
CN112825146B (zh) 一种重图识别方法和装置
CN112291548B (zh) 白平衡统计方法、装置、移动终端及存储介质
CN115797180A (zh) 图像拼接方法、装置、计算机设备、存储介质和计算机程序产品
CN106776682A (zh) 一种图片匹配装置、方法及移动终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21774287

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21774287

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 15.05.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21774287

Country of ref document: EP

Kind code of ref document: A1