WO2021190606A1 - 图像绘制方法、显示装置及存储介质 - Google Patents
图像绘制方法、显示装置及存储介质 Download PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 238000004590 computer program Methods 0.000 claims description 20
- 238000009877 rendering Methods 0.000 claims description 7
- 238000005070 sampling Methods 0.000 claims description 3
- 230000004927 fusion Effects 0.000 description 15
- 241001270131 Agaricus moelleri Species 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 101100325756 Arabidopsis thaliana BAM5 gene Proteins 0.000 description 3
- 101150046378 RAM1 gene Proteins 0.000 description 3
- 101100476489 Rattus norvegicus Slc20a2 gene Proteins 0.000 description 3
- 230000009471 action Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 239000000969 carrier Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/20—Function-generator circuits, e.g. circle generators line or curve smoothing circuits
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G3/00—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
- G09G3/20—Control 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/2007—Display of intermediate tones
- G09G3/2018—Display of intermediate tones by time modulation using two or more time intervals
- G09G3/2022—Display of intermediate tones by time modulation using two or more time intervals using sub-frames
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/001—Arbitration of resources in a display system, e.g. control of access to frame buffer by video controller and/or main processor
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/02—Control 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
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2320/00—Control of display operating conditions
- G09G2320/02—Improving the quality of display appearance
- G09G2320/0271—Adjustment of the gradation levels within the range of the gradation scale, e.g. by redistribution or clipping
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2340/00—Aspects of display data processing
- G09G2340/04—Changes in size, position or resolution of an image
- G09G2340/0407—Resolution change, inclusive of the use of different resolutions for different screen areas
- G09G2340/0428—Gradation 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
Claims (17)
- 一种图像绘制方法,其中,包括:确定显示图像中的每个目标像素的灰阶值;根据每个所述目标像素的灰阶值,确定每个预设灰阶等级的像素数量;通过第一进制表示多个所述像素数量中的最大数量,得到最大数量第一进制数,并读取所述最大数量第一进制数中预设位数范围的数值;确定所述数值对应的比例系数;根据待绘制直方图高度、待绘制的灰阶和所述比例系数,绘制直方图。
- 根据权利要求1所述的方法,其中,所述确定显示图像中的每个目标像素的灰阶值之前,还包括:根据所述显示图像中任一灰阶所能够达到的最大像素数量和所述待绘制直方图高度,确定多个等分的数值范围;所述多个数值范围不重合且连续;确定每个所述数值范围的中间值的倒数;所述中间值为整数;将每个所述倒数与预设系数相乘,得到第一乘积,所述第一乘积为整数;根据所述数值范围的数量,确定多个第一存储地址;将每个所述第一乘积作为比例系数,按照从小到大的顺序分别一一对应存入所述多个第一存储地址。
- 根据权利要求2所述的方法,其中,所述确定所述数值对应的比例系数,包括:将所述数值作为目的存储地址,确定所述目的存储地址中存储的比例系数。
- 根据权利要求2所述的方法,其中,所述数值范围的数量为预设数量,所述数值范围内的数值个数的倒数与所述预设系数的乘积为预设乘积。
- 根据权利要求4所述的方法,其中,所述根据所述显示图像中任一灰阶所能够达到的最大像素数量和所述待绘制直方图高度,确定多个等分的数值范围的步骤,包括:将所述最大像素数量除以所述待绘制直方图高度,得到第一商值;将所述第一商值除以所述预设数量,得到每个所述数值范围的数值数量;根据每个所述数值范围的数值数量,确定多个等分的所述数值范围。
- 根据权利要求2所述的方法,其中,所述最大数量第一进制数通过第 一数据结构表示,所述第一数据结构从末位开始包括第一位数范围和第二位数范围,所述第一位数范围从所述第一位数范围的首位开始包括所述预设位数范围,所述第一位数范围中的数值表示所述待绘制直方图高度,所述第二位数范围中的数值表示所述最大数量第一进制数所对应的所述数值范围中的任一数值,所述预设位数范围中的数值表示所述最大数量第一进制数所对应的所述数值范围。
- 根据权利要求1所述的方法,其中,所述根据所述待绘制直方图高度、待绘制的灰阶和所述比例系数,绘制直方图,包括:按照所述待绘制直方图高度,绘制所述最大数量对应的第一灰阶;对于所述第一灰阶之外的任一待绘制的第二灰阶,将所述第二灰阶对应的像素数量与所述比例系数相乘,得到第二乘积;确定所述第二乘积与所述预设系数的商,得到所述第二灰阶对应的柱状高度;根据所述第二灰阶对应的柱状高度,绘制直方图。
- 根据权利要求7所述的方法,其中,所述根据所述第二灰阶对应的柱状高度,绘制直方图,包括:将所述待绘制直方图高度与所述第二灰阶对应的柱状高度相减,得到所述第二灰阶的柱状顶部至所述待绘制直方图高度处的留白高度;按照所述留白高度,绘制所述第二灰阶的柱状顶部至所述待绘制直方图高度处的留白区域;当所述留白区域绘制完毕时,按照所述第二灰阶对应的柱状高度,绘制所述第二灰阶的柱状。
- 根据权利要求7所述的方法,其中,所述预设系数为2的N次幂,所述确定所述第二乘积与所述预设系数的商,得到所述第二灰阶对应的柱状高度,包括:通过二进制表示所述第二乘积,得到第二乘积二进制数,并将所述第二乘积二进制数右移N位,得到所述第二灰阶对应的柱状高度。
- 根据权利要求1所述的方法,其中,所述确定显示图像中的每个目标像素的灰阶值,包括:将所述显示图像拆分为多个显示子图像;确定每个所述显示子图像中的每个所述目标像素的灰阶值。
- 根据权利要求10所述的方法,其中,所述目标像素包括所述显示子图像中通过采样所得的像素,或所述显示子图像中的全部像素。
- 根据权利要求10所述的方法,其中,所述根据每个所述目标像素的灰阶值,确定每个预设灰阶等级的像素数量的步骤,包括:将每个所述预设灰阶等级作为第二存储模块中的一个第二存储地址,所述第二存储地址的数量与所述预设灰阶等级的数量相等;确定每个所述目标像素的灰阶值对应的预设灰阶等级,并将每个所述目标像素存储至对应的所述第二存储地址中,其中,所述多个显示子图像中的所述目标像素分别存储至不同的所述第二存储模块中;计算每个所述第二存储模块中属于同一个所述第二存储地址的像素数量的和值,得到每个所述预设灰阶等级的像素数量。
- 根据权利要求1所述的方法,其中,所述预设灰阶等级包括一个灰阶,或所述预设灰阶等级包括多个灰阶。
- 根据权利要求1-13任一项所述的方法,其中,所述第一进制为二进制。
- 一种显示装置,其中,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至14中任一项所述的图像绘制方法的步骤。
- 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如权利要求1至14中任一项所述的图像绘制方法的步骤。
- 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在显示装置上运行时,导致所述显示装置执行根据权利要求1-14中任一项所述的图像绘制方法。
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)
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)
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 | 深圳大学 | 基于条件直方图形状一致性的无参考型图像质量评价方法 |
-
2020
- 2020-03-27 CN CN202010232239.7A patent/CN113450737B/zh active Active
-
2021
- 2021-03-25 US US17/627,498 patent/US20220261971A1/en active Pending
- 2021-03-25 WO PCT/CN2021/083028 patent/WO2021190606A1/zh active Application Filing
Patent Citations (7)
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 |