CPC G06T 5/40 (2013.01) | 16 Claims |
1. An image drawing method, wherein the method comprises:
determining a gray-scale value of each of a plurality of target-pixels in a displayed image;
determining a pixel quantity in each preset gray-scale level according to the gray-scale value of each of the plurality of target-pixels;
representing a maximum quantity of a plurality of pixel quantities by a first numeral system, to obtain a digit of the first numeral system corresponding to the maximum quantity, and to read values in a preset digit range of the digit of the first numeral system corresponding to the maximum quantity;
determining a proportional coefficient corresponding to the values; and
according to a height of a histogram to be drawn, a gray-scale to be drawn and the proportion coefficient, drawing the histogram, and
wherein before determining the gray-scale value of each of the plurality of target-pixels in the displayed image, the method further comprises:
determining a plurality of value ranges which are equally divided according to a maximum pixel quantity capable to be reached by any of the gray-scales of the displayed image and the height of the histogram to be drawn; wherein the plurality of value ranges are non-coincidence and continuous;
determining a reciprocal of an intermediate value of each of the value ranges; wherein the intermediate value is an integer;
multiplying each of the reciprocals by a preset coefficient to obtain first products, wherein the first products are integers;
determining a plurality of first storage addresses according to a quantity of the value ranges; and
regarding each of the first products as the proportional coefficients, and storing the proportional coefficients from small to large in a plurality of first storage addresses in a one-to-one correspondence.
|