A kind of method reduced device pixel degree of dependence raising color value precision
Technical field
The present invention relates to the technical field improving color value precision and display, more particularly, a kind of particularly method reduced device pixel degree of dependence raising color value precision.
Background technology
Along with computer technology, image processing techniques and various intelligent terminal development and extensively popularize, the application of colorful digital technology holds the balance; Various smart machine, even conventional equipment to the accurate acquisition of color and the requirement of display also more and more higher, as Smart Home color lamp, Photoshop image processing tool etc.
At present, color digital image can have various color space color model to represent, comprise hsv color model, HSI color model, RGB color model, CMYK color model, HSL color model, YUV color model etc., they are widely used in the high-technology fields such as automatic identification technology (Auto Identification System, AIDS), digital photography process (Digital photography processing), computer picture Display Technique.In Computer Image Processing, general employing RGB model and HSV model.Primaries pattern (RGB color model), it is a kind of color space set up based on the three primary colors theory adding color model and human vision, red (Red), green (Green), blue (Blue) trichromatic coloured light are added with different ratios, to produce diversified coloured light.Main purpose detects in electronic system, represents and display image, such as TV and computer.Before electronic age, based on the perception of the mankind to color, RGB color model has had solid theory support.HSV is a kind of by the representation of point in cylindrical-coordinate system in rgb color model.This representation is attempted to accomplish more directly perceived based on the geometry of cartesian coordinate system than RGB, HSV and form and aspect, saturation, lightness (Hue, Saturation, Value), also known as HSB, form and aspect (H) are the base attributes of color, are exactly usual said color designation, as red, yellow etc.Saturation (S) refers to the purity of color, and higher color is purer, low, becomes ash gradually, gets the numerical value of 0-100%.Lightness (V), brightness (L), gets 0-100%.
The color space model of all kinds of maturation is that color treatments provides solid theory support and processing scheme.But, for the rgb color model (color category is for 255*255*255) that computer is the most frequently used, computer, flat board, mobile phone is comprised with regard to current existing conventional equipment, pixel size is limited by its hardware device, and concrete color is this reality of three-dimensional data model in Computer Image Processing, all colours cannot realize, in same two-dimentional interface display, checking and obtain for user substantially; Meanwhile, all kinds of intelligent home device and image processing equipment, software require more and more higher to the precision of color.Generally speaking, the device resolutions such as tradition computer, mobile phone, flat board are uneven, and different to the display capabilities of color, display is smaller with the color gamut that can select, precision is not high simultaneously, often can not meet people to the requirement obtaining certain precise color.
Traditional user that provides carries out in the method for mutual color display and acquisition, more classical is with the palette of Photoshop, ACDSee image processing software that is representative, these methods are mostly based on hsv color spatial model, HSV Color space model is based on the visually-perceptible feature of people, wherein colourity/phase place H represents different colors, as RGB; Saturation S represents the depth of color, as dark red pale red; Brightness V represents the bright-dark degree of color, as brilliant white and dead color.The extensive use of HSV is based on his two important attribute features, one be its luminance component V and image colour information have nothing to do, two is phase place H, the mode that saturation S and people experience color is closely connected, Photoshop, colour table is got by independent for the phase place H of color in the photo handling software such as ACDSee, then on the basis getting colors phase place, a two-dimensional color interval is drawn according to the saturation of color and brightness, concrete color is chosen for user, the display of the method to color is limited by the pixel condition of device therefor, meticulousr display is not carried out to color, a lot of color value (R, G, B) can not obtain in the palette of these image processing tool, in addition, the method the phase place H value of color is independently divided to leave to choose, after determining H value, repaint color region according to saturation and brightness, so, in same two-dimensional color region, HSV tri-has Two Variables at most, and this has very large shortcoming to the display of color and acquisition.
Therefore, design one can be broken away from equipment performance and rely on, and can in two dimensional surface display and to obtain the method for any one color particularly necessary.
Summary of the invention
A kind of reduction is the object of the present invention is to provide to improve the method for color value precision to device pixel degree of dependence, adopt the method for repeatedly amplifying, by changing the unit precision size of Show Color, reduce smart machine pixel to the restriction of Show Color category, adopt the method that HSV and RGB color space model combines, show color as much as possible to user and obtain more accurate color codomain, meet various different application occasion and (comprise intelligent home device, image processing equipment, image recognition etc.) and client to the accurate display of color and the requirement improving color value precision.
In order to achieve the above object, the technical solution used in the present invention is as follows:
Reduce method device pixel degree of dependence being improved to color value precision, comprise the following steps,
The first step, initialization first Color scheme, select color get look and obtain reference color data;
Whether second step, the reference color data judged in the first step are color of object, if then obtain this color of object, otherwise perform the 3rd step;
3rd step, improve the first Color scheme precision, select accurate color color (h, s, v), and obtain reference color data;
Whether the 4th step, the reference color data judged in the 3rd step are color of object, if then obtain this color of object, otherwise perform the 5th step;
5th step, the second Color scheme display, select color and obtain reference color data;
Whether the 6th step, the reference color data judged in the 5th step are color of object, if then obtain this color of object, otherwise perform the 7th step;
7th step, the 3rd Color scheme display, selecting color and obtain reference color data, is color of object by this reference color.
Further, the interface of the first Color scheme in the described first step is two-dimentional H/S/V palette, and in this two dimensional surface palette, ordinate is phase place H coordinate variable, on the horizontal scale, saturation S and brightness V at different coordinate ranges respectively as variable or constant;
The interface of the second Color scheme in described 5th step is two-dimentional V/S palette, and in this two dimensional surface palette, abscissa is saturation S variable, and ordinate is brightness V variable;
The interface of the 3rd Color scheme in described 7th step adopts the form of gradual change to draw RGB palette.
Further, the method adopts hsv color spatial model, and show perceived color in a two dimensional surface region, in this region, color phase place H, saturation S and brightness V all have corresponding change;
First, user selectes above-mentioned a part color, and equipment obtains this color reference data according to user-selected color, and color regime under showing these data; If user need select the more accurate color of object of this color gamut, equipment takes out the region of this color certain limit automatically, shows this field color;
Then, on the basis of above-mentioned action, after user selectes accurate color again, equipment obtains this color reference data according to user-selected color, and color regime under showing these data; If user need select the more accurate color of object of this color gamut, equipment determines color according to user-selected, repaints and changes the color regime of color under different saturation and brightness;
Finally, on the basis of above-mentioned action, equipment obtains this color reference data according to user-selected color, and color regime under showing these data, if user need select the more accurate color of object of this color gamut; The color that equipment is selected according to user, obtain the rgb value that four, certain area border Color pair is answered, again color is shown more accurately by the mode that gradual change is played up, now, user can to see under this color color regime more accurately, carries out more accurate color and obtains action.
Compared with prior art, the invention has the advantages that: the present invention reduces method device pixel degree of dependence being improved to color value precision, adopt the method repeatedly improving precision show palette, realize under same hardware device condition, wider display and more accurate color acquisition (color obtains the rgb value acquisition aspect being mainly reflected in color accurately) are carried out to color, break away from the dependence to device pixel level to a certain extent, meet the needs of user to more precise color acquisition.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart that the present invention reduces method device pixel degree of dependence being improved to color value precision;
Fig. 2 is that the present invention reduces and improves the first Color scheme HSV palette based on HSV model in the method for color value precision to device pixel degree of dependence;
Fig. 3 is that the present invention reduces to improve in the method for color value precision device pixel degree of dependence and selects color scheme under each Color scheme;
Fig. 4 is that the present invention reduces the simulated effect figure of method in the first Color scheme H/S/V palette device pixel degree of dependence being improved to color value precision.
Embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described in detail, can be easier to make advantages and features of the invention be readily appreciated by one skilled in the art, thus more explicit defining is made to protection scope of the present invention.
In order to make the object of the inventive method, scheme and advantage more clear, below in conjunction with accompanying drawing 1 ~ 4 and embodiment, a kind of reduction of the inventive method is described in further detail the method for device pixel degree of dependence raising color value precision.It should be noted that following described instantiation is only for explaining inventive method content, is not intended to limit the present invention method.
Mutually can change between HSV and the RGB Color space model used in the inventive method, adopt at different palette interfaces different color display modes to get look interfacial effect to reach reasonable.RGB pattern is also known as primaries pattern, primaries display is mainly used in the display of TV and computer, there are the methods such as cathode-ray tube display, liquid crystal display and plasma display, three kinds of primitive color lights are combined in each pixel various different color of light between all black to whole white, the method taking each pixel to represent with 24 bits (bit) in computer hardware at present, so three kinds of primitive color lights respectively assign to 8 bits, the intensity of each primary colors is according to the peak 2 of 8 bits
8be divided into 256 values.H can combine 16777216 kinds of colors in this way.HSV model is generally used in computer graphics application, and HSV is mathematically defined as the transformation of coordinates of R, G and B of the color in rgb space.Conversion formula between the two has multiple expression way, and its principle is all the same, only gets it here as next conversion formula to discuss, and conveniently realizes the method on different devices and provides a reference formula.
If (R, G, B) is the red, green and blue coordinate of a color respectively, their value is the real number between 0 to 255, (H, S in corresponding HSV space, V) value, here H ∈ [0 °, 360 °], is hue angle, and S, V ∈ [0,1] is saturation and brightness respectively, and the computing formula that RGB is transformed into HSV is:
max=max(R,G,B) ⑴
min=min(R,G,B) ⑵
V=max; ⑸
Similar, to the color fixing on (H, S, V) value definition in HSV, with H as above, represent S and V of saturation and lightness respectively, (R, G corresponding in rgb space, B) three primary colors may be calculated (R, G, B change between 0 to 1), the computational methods from HSV to RGB are:
v=V ⑻
p=V×(1-S) ⑼
q=V×(1-f×S) ⑽
t=V×(1-(1-f)×S) ⑾
Reduction of the present invention improves the method for color value precision to device pixel degree of dependence, its design is as follows: the first Color scheme interface described in Fig. 1, for two-dimentional H/S/V palette, this two dimensional surface palette ordinate is phase place H coordinate variable, on abscissa, saturation S and brightness V at different coordinate ranges respectively as variable or constant, at dashed middle line partial saturation S=1 and brightness V=1, draw corresponding color, as shown in Figure 2, Fig. 4 is Fig. 2 simulated effect figure.Be limited by the reasons such as device pixel, now, the unit precision of ordinate phase place is h1=360 °/ordinate pixel, and the unit precision of abscissa is sl 1=1/ abscissa pixel.
User selects color at H/S/V palette, and system provides the reference color of user-selected color for user and shows related data.If this reference color is required color of object, user selects end to get look process; If this reference color is color of object value range, the color of user-selected color certain limit is then carried out the higher display of precision by system, now, the variable that abscissa represents, constant are constant, the phase unit precision that ordinate represents is h2=x/ ordinate pixel, x<<360 °, clearly, h2<h1.User can observe distribution of color situation to be selected more clearly.User selects color at H/S/V palette again, and system provides reference color for user and shows related data, and now user obtains more accurate color (h, s, v) value.If this color (h, s, v) is required color of object, user selects end to get look process; If this color (h, s, v) is color of object value range, system adopts the second Color scheme, shows this color (h, s, the v) color regime under different brightness and saturation.
In the second Color scheme, program palette abscissa is saturation S variable, and ordinate is brightness V variable, draw color (h, s, v) carry out different brightness and saturation under V/S palette.User selects color, and system provides reference color for user and shows related data.If this reference color is required color of object, user selects end to get look process; If this reference color is color of object value range, equipment obtains a certain size rectangle of this reference color four critical color values and is respectively Color1, Color2, Color3, Color4, carries out the 3rd Color scheme display.
In the 3rd Color scheme, four, program palette viewing area vertex color is respectively Color1, Color2, Color3, Color4, the form of gradual change is adopted to draw RGB palette, through above step, user can obtain the minimum concrete color of error amount at this interface, and obtain this color by equipment, show this color and RGB and HSV value thereof with the form of numeral and picture to user.
Select color scheme under Figure 3 shows that each Color scheme, large rectangle region, the left side is palette; Dashed rectangle is depicted as after user selects color, the color of object scope of system automatic acquisition; The little rectangle in the upper right corner and corresponding RGB, HSV for after user selects color, the reference color that system provides for user and related data thereof.
Method has carried out altogether to all distribution of color situations the process that three times are improved color display precision, get after colour table interface user gets colors at each, equipment all can provide a reference color, and by the RGB/HSV value of correspondence numeral and the showing to user of color picture.Method achieves the function improving color display range and get look precision, by changing the unit precision size of display, reduce the restriction of device pixel to Show Color scope, adopt the method that HSV and RGB color space model combines, show color as much as possible to user and obtain more accurate color codomain, meeting the requirement of various different application occasion (comprising intelligent home device, image processing equipment, image recognition, various height pixel game stations etc.) client to the display of accurate color and value.
Although describe embodiments of the present invention by reference to the accompanying drawings; but patent owner can make various distortion or amendment within the scope of the appended claims; as long as be no more than the protection range described by claim of the present invention, all should within protection scope of the present invention.