mirror of
https://github.com/opencv/opencv.git
synced 2025-06-10 02:53:07 +08:00
Merge pull request #19419 from Liangda-w:patch-1
* Fix error in documentation for RGB->HSV convertion * Update colors.markdown
This commit is contained in:
parent
5ab4623c2a
commit
b08d67c4e1
@ -56,7 +56,10 @@ scaled to fit the 0 to 1 range.
|
|||||||
|
|
||||||
\f[V \leftarrow max(R,G,B)\f]
|
\f[V \leftarrow max(R,G,B)\f]
|
||||||
\f[S \leftarrow \fork{\frac{V-min(R,G,B)}{V}}{if \(V \neq 0\)}{0}{otherwise}\f]
|
\f[S \leftarrow \fork{\frac{V-min(R,G,B)}{V}}{if \(V \neq 0\)}{0}{otherwise}\f]
|
||||||
\f[H \leftarrow \forkthree{{60(G - B)}/{(V-min(R,G,B))}}{if \(V=R\)}{{120+60(B - R)}/{(V-min(R,G,B))}}{if \(V=G\)}{{240+60(R - G)}/{(V-min(R,G,B))}}{if \(V=B\)}\f]
|
\f[H \leftarrow \forkfour{{60(G - B)}/{(V-min(R,G,B))}}{if \(V=R\)}
|
||||||
|
{{120+60(B - R)}/{(V-min(R,G,B))}}{if \(V=G\)}
|
||||||
|
{{240+60(R - G)}/{(V-min(R,G,B))}}{if \(V=B\)}
|
||||||
|
{0}{if \(R=G=B\)}\f]
|
||||||
If \f$H<0\f$ then \f$H \leftarrow H+360\f$ . On output \f$0 \leq V \leq 1\f$, \f$0 \leq S \leq 1\f$,
|
If \f$H<0\f$ then \f$H \leftarrow H+360\f$ . On output \f$0 \leq V \leq 1\f$, \f$0 \leq S \leq 1\f$,
|
||||||
\f$0 \leq H \leq 360\f$ .
|
\f$0 \leq H \leq 360\f$ .
|
||||||
|
|
||||||
@ -78,9 +81,10 @@ scaled to fit the 0 to 1 range.
|
|||||||
\f[L \leftarrow \frac{V_{max} + V_{min}}{2}\f]
|
\f[L \leftarrow \frac{V_{max} + V_{min}}{2}\f]
|
||||||
\f[S \leftarrow \fork { \frac{V_{max} - V_{min}}{V_{max} + V_{min}} }{if \(L < 0.5\) }
|
\f[S \leftarrow \fork { \frac{V_{max} - V_{min}}{V_{max} + V_{min}} }{if \(L < 0.5\) }
|
||||||
{ \frac{V_{max} - V_{min}}{2 - (V_{max} + V_{min})} }{if \(L \ge 0.5\) }\f]
|
{ \frac{V_{max} - V_{min}}{2 - (V_{max} + V_{min})} }{if \(L \ge 0.5\) }\f]
|
||||||
\f[H \leftarrow \forkthree {{60(G - B)}/{(V_{max}-V_{min})}}{if \(V_{max}=R\) }
|
\f[H \leftarrow \forkfour {{60(G - B)}/{(V_{max}-V_{min})}}{if \(V_{max}=R\) }
|
||||||
{{120+60(B - R)}/{(V_{max}-V_{min})}}{if \(V_{max}=G\) }
|
{{120+60(B - R)}/{(V_{max}-V_{min})}}{if \(V_{max}=G\) }
|
||||||
{{240+60(R - G)}/{(V_{max}-V_{min})}}{if \(V_{max}=B\) }\f]
|
{{240+60(R - G)}/{(V_{max}-V_{min})}}{if \(V_{max}=B\) }
|
||||||
|
{0}{if \(R=G=B\) }\f]
|
||||||
If \f$H<0\f$ then \f$H \leftarrow H+360\f$ . On output \f$0 \leq L \leq 1\f$, \f$0 \leq S \leq
|
If \f$H<0\f$ then \f$H \leftarrow H+360\f$ . On output \f$0 \leq L \leq 1\f$, \f$0 \leq S \leq
|
||||||
1\f$, \f$0 \leq H \leq 360\f$ .
|
1\f$, \f$0 \leq H \leq 360\f$ .
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user