CN106383685A - RGB value-based method and apparatus of positioning color in palette, and terminal - Google Patents

RGB value-based method and apparatus of positioning color in palette, and terminal Download PDF

Info

Publication number
CN106383685A
CN106383685A CN201610873600.8A CN201610873600A CN106383685A CN 106383685 A CN106383685 A CN 106383685A CN 201610873600 A CN201610873600 A CN 201610873600A CN 106383685 A CN106383685 A CN 106383685A
Authority
CN
China
Prior art keywords
value
color
rgb
false
true
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201610873600.8A
Other languages
Chinese (zh)
Other versions
CN106383685B (en
Inventor
赵晓伟
肖凯祥
何海亮
王雄辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Oribo Technology Co Ltd
Original Assignee
Shenzhen Ouruibo Electronic Co Ltd
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 Shenzhen Ouruibo Electronic Co Ltd filed Critical Shenzhen Ouruibo Electronic Co Ltd
Priority to CN201610873600.8A priority Critical patent/CN106383685B/en
Publication of CN106383685A publication Critical patent/CN106383685A/en
Application granted granted Critical
Publication of CN106383685B publication Critical patent/CN106383685B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

The present invention discloses an RGB value-based method and apparatus of positioning a color in a palette, and a terminal, belonging to the technical field of image processing. The method comprises the steps of equally dividing the palette into three sector regions according to R, G and B (red, green and blue); equally dividing each of the three sector regions into two sub-regions; and calculating coordinates of the color according to the R, G and B values and the sub-regions of the R, G and B values. According to the method, according to a certain distribution rule of the R, G and B in the RGB palette, the coordinates are calculated by using the RGB values so as to position the color in the RGB palette, and the color can be accurately positioned without any error.

Description

Based on rgb value position color in colour disk the method for position, device and terminal
Technical field
The present invention relates to color treatments field, more particularly, to a kind of side based on rgb value position color position in colour disk Method and device.
Background technology
Position position in colour disk for this color for based on rgb value, be currently by sampling to colour disk, then finding out and take Sampling point and the immediate color of current color, and then position position in colour disk for this color.Due to sampling uneven or taking When sampling point is not enough, with current color can there is larger error in immediate sampling point and current color, leads to work as Front color is inaccurate in colour disk positioning, and error is larger.
Accordingly, it would be desirable to a kind of new technical scheme is accurately positioned position in standard RGB color disk for the rgb value.
Content of the invention
In view of this, the technical problem to be solved in the present invention is to provide a kind of rgb value position color that is based in colour disk middle position The method and apparatus put, to be accurately positioned position in standard colour disk for this color according to rgb value.
The technical scheme that present invention solution above-mentioned technical problem is adopted is as follows:
According to an aspect of the present invention, a kind of method based on rgb value position color position in colour disk, the party are provided Method includes:
Colour disk is divided into three sector regions by R, G and B three primary colors;
Described three sector regions are divided into two sub-regions more respectively;
Calculate the coordinate value of this color according to R, G and B value and its affiliated subregion.
Preferably, also include before the method:
Obtain brightness H, colourity S and saturation degree L value;
Described H, S and L value is converted into R, G and B value.
Preferably, described acquisition brightness H, colourity S and saturation degree L value further include:
Obtain brightness H, colourity S and the saturation degree L value of RGB lamp.
Preferably, described H, S and L value is converted into R, G and B value to include:
If s=0, r, g and b are equal to l;
If s ≠ 0,
q = l &times; ( 1 + s ) , i f l < 1 2 l + s - ( l &times; s ) , i f l &GreaterEqual; 1 2
P=2 × l-q
h k = h 360
And
And
And
For each color vector Color=(ColorR, ColorG, ColorB)=(r, g, b),
Wherein, h represents hue angle, and h ∈ [0,360];S represents saturation degree, and l represents brightness, and s ∈ [0,1], l ∈ [0, 1], r, g, b represent the normalization codomain of color R, G and B value, r ∈ [0,1], g ∈ [0,1], b ∈ [0,1] respectively;To return One change codomain is multiplied by 255 values for corresponding RGB.
Preferably, further included according to the coordinate value that R, G and B value and its affiliated subregion calculate this color:
Judge whether R, G, B value is particular value, if it is, pressing particular point coordinates computed;If it is not, then pressing following public affairs Formula calculates:
If xORy is true,
y = t e m p 1 1 + 1 ( t e m p 2 ) 2
And,
When xySign is fictitious time, y=-y, x=y/temp2
When xySign is true time, y is constant, x=y/temp2
If xORy is false,
x = t e m p 1 1 + 1 ( t e m p 2 ) 2
And,
When xySign is fictitious time, x=-x;Y=x*temp2
When xySign is true time, x is constant, y=x*temp2
Wherein, angleSign represents the positive and negative of angle coefficient;XySign indicates whether whether by x or y be original phase Counter count, xORy represents and obtains the positive and negative of coordinate according to x or y, true value represent according to x positive and negative obtaining, falsity represents according to y Positive and negative obtaining, and:
If G=255 and R<B, then K=60, xySign are true, and xORy is true, and angleSign is false, M=R, N= B;
If G=255 and R>=B, then K=60, xySign are true, and angleSign is true, M=B, N=R;
If R=255 and B<G, then K=180, xySign are false, and xORy is false, and angleSign is false, M=B, N= G;
If R=255 and B>=G, then K=180, xySign are false, and xORy is false, and angleSign is true, M=G, N =B;
If B=255 and G<R, then K=300, xySign are false, and xORy is true, and angleSign is false, M=G, N= R;
If B=255 and G>=R, then K=300, xySign are false, and xORy is true, and angleSign is false, M=G, N =R;
t a m p 1 = ( r - M * r 255 ) 2
If angleSign be on the occasion of,
t a m p 2 = t a n ( 60 &pi; 180 * ( N - M ) 255 - M + K &pi; 180 )
If angleSign is negative value,
t a m p 2 = tan ( K &pi; 180 - 60 &pi; 180 * ( N - M ) 255 - M ) .
Preferably, described include by particular point coordinates computed:
If G=255 and B=255,Y=0
If G=255, R=255 and B=0, then
If B=255, R=255 and G=0, then
If R=255, G=255 and B=255, then x=0, y=0.
According to a further aspect in the invention, a kind of device based on rgb value position color position in colour disk, this device bag Include with lower module:
Colour disk division module, for colour disk is divided into three sector regions by R, G and B three primary colors, described three is fanned Shape zone subdivision is not divided into two sub-regions;
Coordinate calculation module, for calculating the coordinate value of this color according to R, G and B value and its affiliated subregion.
Preferably, described device also includes:
HSL acquisition module, for obtaining brightness H, colourity S and saturation degree L value;
RGB computing module, for being converted into R, G and B value by described H, S and L value.
Preferential, described HSL acquisition module specifically for:
Obtain brightness H, colourity S and the saturation degree L value of RGB lamp.
According to a further aspect of the invention, the present invention also provides a kind of intelligent terminal, and intelligent terminal includes above-mentioned being based on The device of rgb value position color position in colour disk.
The method of the embodiment of the present invention, device and terminal, according to R, G, B three primary colors in RGB color disk according to certain rule The characteristic of distribution, by rgb value coordinates computed come position color the position in RGB color disk, can not be accurately positioned, not by mistake Difference.
Brief description
A kind of stream based on rgb value position color method of position in colour disk that Fig. 1 provides for the embodiment of the present invention one Cheng Tu;
Fig. 2 divides schematic diagram for the RGB color disk that the embodiment of the present invention one provides;
Color coordinates schematic diagram in the RGB color disk that Fig. 3 provides for the embodiment of the present invention one;
The flow chart of positioning RGB lamp color method of position in colour disk that Fig. 4 provides for the embodiment of the present invention two;
The module knot based on rgb value position color device of position in colour disk that Fig. 5 provides for the embodiment of the present invention three Composition;
The function structure chart of positioning RGB lamp color device of position in colour disk that Fig. 6 provides for the embodiment of the present invention four.
Specific embodiment
In order that the technical problem to be solved, technical scheme and beneficial effect are clearer, clear, below tie Close drawings and Examples, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only In order to explain the present invention, it is not intended to limit the present invention.
Embodiment one
As shown in figure 1, the present invention provide a kind of method based on rgb value position color position in colour disk, including with Lower step:
S102, colour disk is divided into three sector regions by R, G and B three primary colors, three sector regions is distinguished decile again For two sub-regions.
Specifically, as Fig. 2 and Fig. 3, colour disk is divided into three sector regions by RGB three primary colors, by these three fan sections Domain is divided into two sub-regions more respectively;Calculate the rgb value of this color point according to the affiliated subregion of color point and its coordinate.Its In, six sub-regions G-B subregions, G-R subregion, R-G subregion, R-B subregion, B-R subregion, B-G subregion are respectively For primary colors subregion.I.e. in 255 colour disks of standard, three sector regions of red, green, blue can be divided into, then disk can To be divided into three 120 ° of region.In each area, it is divided into two 60 ° again, so a circle is divided into six regions to divide Do not calculate.In each color region, the component value of current region must be equal to 255.As the R-G sub-district in red sector region The R value of domain and R-B subregion is constant for 255, and the G value of G-B subregion and G-R subregion is constant for 255, B-R subregion and B-G The G value of subregion is constant for 255.
S104, calculate the coordinate value of this color according to R, G and B value and its affiliated subregion.
As shown in figure 3, setting the coordinate of centre point as (0,0), radius of circle is r, and the coordinate of color point A is A (x, y), and x, y are Natural numerical value, and number range is (0~r), R represents red color component value, and G represents green component values, and B represents blue component Value.In conjunction with coordinate quadrant it is possible to obtain x, y value by these three values of R, G, B, thus orienting this color point on colour disk Position.
1) first determine whether whether R, G, B value is particular value, if it is, pressing particular point coordinates computed.
If G=255 and B=255,Y=0
If G=255, R=255 and B=0, then
If B=255, R=255 and G=0, then
If R=255, G=255 and B=255, then x=0, y=0
2) if R, G, B value is not particular value, coordinates computed in the following manner.
2.1) define following parameter:AngleSign represents the positive and negative of angle coefficient, and flase is negative, and true is just; XySign indicates whether whether by x or y be original opposite number, and flase is negative, and true is just;XORy represents according to x still Y obtaining the positive and negative of coordinate, false represent according to x positive and negative obtaining, true represent according to y positive and negative obtaining;M and N only table Show it is the meaning of parameter.
If G=255 and R<B then xy coordinate points in G-B subregion, now
K=60
XySign is true
XORy is true
AngleSign is false
M=R
N=B
If G=255 and R>Then xy coordinate points exist=B, G-R subregion, now
K=60
XySign is true
AngleSign is true
M=B
N=R
If R=255 and B<G then xy coordinate points in R-G subregion, now
K=180
XySign is false
XORy is false
AngleSign is false
M=B
N=G
If R=255 and B>=G then xy coordinate points in R-B subregion, now
K=180
XySign is false
XORy is false
AngleSign is true
M=G
N=B
If B=255 and G<R then xy coordinate points in B-R subregion, now
K=300
XySign is false
XORy is true
AngleSign is false
M=G
N=R
If B=255 and G>=R then xy coordinate points in B-G subregion, now
K=300
XySign is false
XORy is true
AngleSign is false
M=G
N=R
2.2) above-mentioned parameter substitution below equation is calculated
t a m p 1 = ( r - M * r 255 ) 2
If angleSign is true,
t a m p 2 = t a n ( 60 &pi; 180 * ( N - M ) 255 - M + K &pi; 180 )
If angleSign is false,
t a m p 2 = t a n ( K &pi; 180 - 60 &pi; 180 * ( N - M ) 255 - M )
If xORy is true,
y = t e m p 1 1 + 1 ( t e m p 2 ) 2
If xySign is false, then y=-y;X=y/temp2;
If xySign is true, then y is constant;X=y/temp2;
If xORy is false,
x = t e m p 1 1 + 1 ( t e m p 2 ) 2
If xySign is false, then x=-x;Y=x*temp2.
If xySign is true, then x is constant;Y=x*temp2.
The coordinate value of arbitrfary point A (x, y) can be drawn by above-mentioned calculating.
The method of the embodiment of the present invention, according to R, G, B three primary colors in colour disk according to the characteristic of certain rule distribution, passes through Rgb value coordinates computed comes position in RGB color disk for the position color, can be accurately positioned, not have error.
Embodiment two
As shown in figure 4, the embodiment of the present invention is taking RGB lamp as a example, provide a kind of position in colour disk for positioning RGB lamp color Method, the method comprises the following steps:
S402, the brightness H obtaining RGB lamp, colourity S and saturation degree L value.
It should be noted that the present embodiment only illustrates taking RGB lamp as a example, can be from arbitrarily aobvious in practical embodiments Show that the equipment of color change obtains H, S, L value.The such as equipment such as RGB electronic display.
S404, H, S and L value is converted into R, G and B value.S406, colour disk is divided into three sectors by R, G and B three primary colors Region, three sector regions are divided into two sub-regions more respectively.
S408, calculate the coordinate value of this color according to R, G and B value and its affiliated subregion.
Wherein, step S406 is identical with the S102 of above-described embodiment one, step S104 respectively with step S406, this enforcement No longer repeat in example.
The method of the embodiment of the present invention, by obtaining the HSL value of RGB lamp, and then is converted into rgb value, R in foundation colour disk, G, B three primary colors according to the characteristic of certain rule distribution, by rgb value coordinates computed come position color the position in RGB color disk Put, can be accurately positioned, there is no error.
Embodiment three
As shown in figure 5, the present invention provide a kind of method based on rgb value position color position in colour disk, including with Lower module:
Colour disk division module 530, for colour disk is divided into three sector regions by R, G and B three primary colors, by three sectors Zone subdivision is not divided into two sub-regions.
Specifically, as Fig. 2 and Fig. 3, colour disk is divided into three sector regions by RGB three primary colors, by these three fan sections Domain is divided into two sub-regions more respectively;Calculate the rgb value of this color point according to the affiliated subregion of color point and its coordinate.Its In, six sub-regions G-B subregions, G-R subregion, R-G subregion, R-B subregion, B-R subregion, B-G subregion are respectively For primary colors subregion.I.e. in 255 colour disks of standard, three sector regions of red, green, blue can be divided into, then disk can To be divided into three 120 ° of region.In each area, it is divided into two 60 ° again, so a circle is divided into six regions to divide Do not calculate.In each color region, the component value of current region must be equal to 255.As the R-G sub-district in red sector region The R value of domain and R-B subregion is constant for 255, and the G value of G-B subregion and G-R subregion is constant for 255, B-R subregion and B-G The G value of subregion is constant for 255.
Coordinate calculation module 540, for calculating the coordinate value of this color according to R, G and B value and its affiliated subregion.
As shown in figure 3, setting the coordinate of centre point as (0,0), radius of circle is r, and the coordinate of color point A is A (x, y), and x, y are Natural numerical value, and number range is (0~r), R represents red color component value, and G represents green component values, and B represents blue component Value.In conjunction with coordinate quadrant, computing module 20 just can obtain x, y value by these three values of R, G, B, thus orienting this color Position on colour disk for the point, specifically for:
1) first determine whether whether R, G, B value is particular value, if it is, pressing particular point coordinates computed.
If G=255 and B=255,Y=0
If G=255, R=255 and B=0, then
If B=255, R=255 and G=0, then
If R=255, G=255 and B=255, then x=0, y=0
2) if R, G, B value is not particular value, coordinates computed in the following manner.
2.1) define following parameter:AngleSign represents the positive and negative of angle coefficient, and flase is negative, and true is just; XySign indicates whether whether by x or y be original opposite number, and flase is negative, and true is just;XORy represents according to x still Y obtaining the positive and negative of coordinate, false represent according to x positive and negative obtaining, true represent according to y positive and negative obtaining.
If G=255 and R<B then xy coordinate points in G-B subregion, now
K=60
XySign is true
XORy is true
AngleSign is false
M=R
N=B
If G=255 and R>Then xy coordinate points exist=B, G-R subregion, now
K=60
XySign is true
AngleSign is true
M=B
N=R
If R=255 and B<G then xy coordinate points in R-G subregion, now
K=180
XySign is false
XORy is false
AngleSign is false
M=B
N=G
If R=255 and B>=G then xy coordinate points in R-B subregion, now
K=180
XySign is false
XORy is false
AngleSign is true
M=G
N=B
If B=255 and G<R then xy coordinate points in B-R subregion, now
K=300
XySign is false
XORy is true
AngleSign is false
M=G
N=R
If B=255 and G>=R then xy coordinate points in B-G subregion, now
K=300
XySign is false
XORy is true
AngleSign is false
M=G
N=R
2.2) above-mentioned parameter substitution below equation is calculated
t a m p 1 = ( r - M * r 255 ) 2
If angleSign is true,
t a m p 2 = t a n ( 60 &pi; 180 * ( N - M ) 255 - M + K &pi; 180 )
If angleSign is false,
t a m p 2 = t a n ( K &pi; 180 - 60 &pi; 180 * ( N - M ) 255 - M )
If xORy is true,
y = t e m p 1 1 + 1 ( t e m p 2 ) 2
If xySign is false, then y=-y;X=y/temp2;
If xySign is true, then y is constant;X=y/temp2;
If xORy is false,
x = t e m p 1 1 + 1 ( t e m p 2 ) 2
If xySign is false, then x=-x;Y=x*temp2.
If xySign is true, then x is constant;Y=x*temp2.
The coordinate value of arbitrfary point A (x, y) can be drawn by above-mentioned calculating.
The device of the embodiment of the present invention, according to R, G, B three primary colors in colour disk according to the characteristic of certain rule distribution, passes through Rgb value coordinates computed comes position in RGB color disk for the position color, can be accurately positioned, not have error.
Example IV
As shown in fig. 6, the embodiment of the present invention is taking RGB lamp as a example, provide a kind of position in colour disk for positioning RGB lamp color Device, the method comprises the following steps:
HSL acquisition module 610, for obtaining brightness H, colourity S and the saturation degree L value of RGB lamp.
It should be noted that the present embodiment only illustrates taking RGB lamp as a example, can be from arbitrarily aobvious in practical embodiments Show that the equipment of color change obtains H, S, L value.The such as equipment such as RGB electronic display.
Rgb value computing module 620, for being converted into R, G and B value by H, S and L value.
If s=0, r, g and b are equal to l;
If s ≠ 0,
q = l &times; ( 1 + s ) , i f l < 1 2 l + s - ( l &times; s ) , i f l &GreaterEqual; 1 2
P=2 × l-q
h k = h 360
And
And
And
For each color vector Color=(ColorR, ColorG, ColorB)=(r, g, b),
Wherein, h represents hue angle, and h ∈ [0,360];S represents saturation degree, and l represents brightness, and s ∈ [0,1], l ∈ [0, 1], r, g, b represent the normalization codomain of color R, G and B value, r ∈ [0,1], g ∈ [0,1], b ∈ [0,1] respectively;To return One change codomain is multiplied by 255 values for corresponding RGB.
Colour disk division module 630, for colour disk is divided into three sector regions by R, G and B three primary colors, by three sectors Zone subdivision is not divided into two sub-regions.
Coordinate calculation module 640, for calculating the coordinate value of this color according to R, G and B value and its affiliated subregion.
Wherein, division module 630 and coordinate calculation module 640 division module 530 and the seat with above-described embodiment three respectively Mark computing module 540 is identical, no longer repeats in the present embodiment.
The device of the embodiment of the present invention, by obtaining the HSL value of RGB lamp, and then is converted into rgb value, R in foundation colour disk, G, B three primary colors according to the characteristic of certain rule distribution, by rgb value coordinates computed come position color the position in RGB color disk Put, can be accurately positioned, there is no error.
Additionally, present invention also offers a kind of terminal, this terminal include above-mentioned any one technical scheme based on rgb value The device of position in colour disk for the position color.
One of ordinary skill in the art will appreciate that it is permissible for realizing all or part of step in above-described embodiment method The hardware being controlled correlation by program is completed, described program can in being stored in a computer read/write memory medium, Described storage medium, such as ROM/RAM, disk, CD etc..
The preferred embodiments of the present invention above by reference to brief description, not thereby limit to the interest field of the present invention.This Skilled person, all should be at this without departing from any modification, equivalent and the improvement made in the scope of the present invention and essence Within the interest field of invention.

Claims (10)

1. a kind of method based on rgb value position color position in colour disk is it is characterised in that the method includes:
Colour disk is divided into three sector regions by R, G and B three primary colors;
Described three sector regions are divided into two sub-regions more respectively;
Calculate the coordinate value of this color according to R, G and B value and its affiliated subregion.
2. the method based on rgb value position color position in colour disk according to claim 1 is it is characterised in that described Also include before method:
Obtain brightness H, colourity S and saturation degree L value;
Described H, S and L value is converted into R, G and B value.
3. the method based on rgb value position color position in colour disk according to claim 2 is it is characterised in that described Obtain brightness H, colourity S and saturation degree L value to further include:
Obtain brightness H, colourity S and the saturation degree L value of RGB lamp.
4. the method based on rgb value position color position in colour disk according to claim 2 is it is characterised in that by institute State H, S and L value and be converted into the inclusion of R, G and B value:
If s=0, r, g and b are equal to l;
If s ≠ 0,
q = l &times; ( 1 + s ) , i f l < 1 2 l + s - ( l &times; s ) , i f l &GreaterEqual; 1 2
P=2 × l-q
h k = h 360
And
And
And
For each color vector Color=(ColorR, ColorG, ColorB)=(r, g, b),
Wherein, h represents hue angle, and h ∈ [0,360];S represents saturation degree, and l represents brightness, and s ∈ [0,1], l ∈ [0,1], R, g, b represent the normalization codomain of color R, G and B value, r ∈ [0,1], g ∈ [0,1], b ∈ [0,1] respectively;To normalize Codomain is multiplied by 255 values for corresponding RGB.
5. the method based on rgb value position color position in colour disk according to claim 1 it is characterised in that according to The coordinate value that R, G and B value and its affiliated subregion calculate this color further includes:
Judge whether R, G, B value is particular value, if it is, pressing particular point coordinates computed;If it is not, then counting as follows Calculate:
If xORy is true,
y = t e m p 1 1 + 1 ( t e m p 2 ) 2
And,
When xySign is fictitious time, y=-y, x=y/temp2
When xySign is true time, y is constant, x=y/temp2
If xORy is false,
x = t e m p 1 1 + 1 ( t e m p 2 ) 2
And,
When xySign is fictitious time, x=-x;Y=x*temp2
When xySign is true time, x is constant, y=x*temp2
Wherein, angleSign represents the positive and negative of angle coefficient;XySign indicates whether it is whether original contrary by x or y Number, xORy represents and obtains the positive and negative of coordinate according to x or y, true value represent according to x positive and negative obtaining, falsity according to y just represents Bear to obtain, and:
If G=255 and R<B, then K=60, xySign are true, and xORy is true, and angleSign is false, M=R, N=B;
If G=255 and R>=B, then K=60, xySign are true, and angleSign is true, M=B, N=R;
If R=255 and B<G, then K=180, xySign are false, and xORy is false, and angleSign is false, M=B, N=G;
If R=255 and B>=G, then K=180, xySign are false, and xORy is false, and angleSign is true, M=G, N=B;
If B=255 and G<R, then K=300, xySign are false, and xORy is true, and angleSign is false, M=G, N=R;
If B=255 and G>=R, then K=300, xySign are false, and xORy is true, and angleSign is false, M=G, N=R;
t a m p 1 = ( r - M * r 255 ) 2
If angleSign be on the occasion of,
t a m p 2 = t a n ( 60 &pi; 180 * ( N - M ) 255 - M + K &pi; 180 )
If angleSign is negative value,
t a m p 2 = tan ( K &pi; 180 - 60 &pi; 180 * ( N - M ) 255 - M ) .
6. the method based on rgb value position color position in colour disk according to claim 5 is it is characterised in that described Include by particular point coordinates computed:
If G=255 and B=255,
If G=255, R=255 and B=0, then
If B=255, R=255 and G=0, then
If R=255, G=255 and B=255, then x=0, y=0.
7. a kind of device based on rgb value position color position in colour disk is it is characterised in that this device is included with lower module:
Colour disk division module, for colour disk is divided into three sector regions by R, G and B three primary colors, by described three fan sections Domain is divided into two sub-regions more respectively;
Coordinate calculation module, for calculating the coordinate value of this color according to R, G and B value and its affiliated subregion.
8. the device based on rgb value position color position in colour disk according to claim 7 is it is characterised in that described Device also includes:
HSL acquisition module, for obtaining brightness H, colourity S and saturation degree L value;
RGB computing module, for being converted into R, G and B value by described H, S and L value.
9. the device based on rgb value position color position in colour disk according to claim 8 is it is characterised in that described HSL acquisition module specifically for:
Obtain brightness H, colourity S and the saturation degree L value of RGB lamp.
10. a kind of terminal it is characterised in that described terminal include described in claim 7-9 based on rgb value position color in color The device of position in disk.
CN201610873600.8A 2016-09-30 2016-09-30 A kind of method and apparatus based on rgb value position color position in colour disk Active CN106383685B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610873600.8A CN106383685B (en) 2016-09-30 2016-09-30 A kind of method and apparatus based on rgb value position color position in colour disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610873600.8A CN106383685B (en) 2016-09-30 2016-09-30 A kind of method and apparatus based on rgb value position color position in colour disk

Publications (2)

Publication Number Publication Date
CN106383685A true CN106383685A (en) 2017-02-08
CN106383685B CN106383685B (en) 2019-05-24

Family

ID=57937079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610873600.8A Active CN106383685B (en) 2016-09-30 2016-09-30 A kind of method and apparatus based on rgb value position color position in colour disk

Country Status (1)

Country Link
CN (1) CN106383685B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463349A (en) * 2017-07-01 2017-12-12 广州视源电子科技股份有限公司 Color disc establishing method and color positioning method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080193123A1 (en) * 2004-09-10 2008-08-14 Mitsubishi Cable Industries, Ltd Method for Calibration in Transference of Motion Pictures to a Photosensitive Material
CN102137273A (en) * 2011-03-28 2011-07-27 天津师范大学 Test pattern sequence and test method of three-dimensional colour gamut digital television

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080193123A1 (en) * 2004-09-10 2008-08-14 Mitsubishi Cable Industries, Ltd Method for Calibration in Transference of Motion Pictures to a Photosensitive Material
CN102137273A (en) * 2011-03-28 2011-07-27 天津师范大学 Test pattern sequence and test method of three-dimensional colour gamut digital television

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵永华: "基于显著兴趣点的多特征图像检索技术的研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463349A (en) * 2017-07-01 2017-12-12 广州视源电子科技股份有限公司 Color disc establishing method and color positioning method

Also Published As

Publication number Publication date
CN106383685B (en) 2019-05-24

Similar Documents

Publication Publication Date Title
EP3300024B1 (en) Color identification system, color identification method, and display device
CN107103606A (en) A kind of image-recognizing method and device
US10614596B2 (en) Image processing method, electronic device and apparatus having storage function
CN104052979B (en) For device and the technology of image processing
CN103108469B (en) Method and device for controlling output light of illuminating device and illuminating system
CN107888840A (en) High-dynamic-range image acquisition method and device
CN106384117A (en) Vehicle color recognition method and device
CN107483908A (en) White balance calibration method and electronic equipment
CN105791783B (en) Camera imaging color adjusting method and system
CN102004914B (en) Method and device for detecting round seal position
US20140286569A1 (en) Robust automatic determination and location of macbeth color checker charts
CN108537846A (en) Camera calibration method and apparatus
CN106770274A (en) Physiological characterization detection method, portable detection device and detection system for crops
CN106357988A (en) White balance adjustment method, device and terminal equipment
CN106445443A (en) Color capture method and device based on RGB color disk
CN106383685A (en) RGB value-based method and apparatus of positioning color in palette, and terminal
CN107146258A (en) A kind of detection method for image salient region
Sun et al. Exposing splicing forgery based on color temperature estimation
Gevers et al. Image indexing using composite color and shape invariant features
Zhou et al. Computing the color complexity of images
CN115834872A (en) Method for rapidly measuring three-dimensional color gamut of multi-primary color display system
CN111210410A (en) Signal lamp state detection method and device
CN111429536A (en) Method, system and storage medium for toning complexion in image
CN106791741B (en) Multi-screen marching method and device
CN110719382A (en) Color replacement method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Nanshan District Xueyuan Road in Shenzhen city of Guangdong province 518000 No. 1001 Nanshan Chi Park A7 building 7 floor

Patentee after: Shenzhen euribo Technology Co.,Ltd.

Address before: Nanshan District Xueyuan Road in Shenzhen city of Guangdong province 518000 No. 1001 Nanshan Chi Park A7 building 7 floor

Patentee before: SHENZHEN ORVIBO TECHNOLOGY Co.,Ltd.

Address after: Nanshan District Xueyuan Road in Shenzhen city of Guangdong province 518000 No. 1001 Nanshan Chi Park A7 building 7 floor

Patentee after: SHENZHEN ORVIBO TECHNOLOGY Co.,Ltd.

Address before: Nanshan District Xueyuan Road in Shenzhen city of Guangdong province 518000 No. 1001 Nanshan Chi Park A7 building 7 floor

Patentee before: ORVIBO, Inc.