Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
d68e62c9
Commit
d68e62c9
authored
Aug 21, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3137 from akarsakov:fix_cvtcolor_luv_rgb
parents
2ed24876
b027eac1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
miscellaneous_transformations.rst
modules/imgproc/doc/miscellaneous_transformations.rst
+1
-1
color.cpp
modules/imgproc/src/color.cpp
+2
-2
test_color.cpp
modules/imgproc/test/test_color.cpp
+4
-4
No files found.
modules/imgproc/doc/miscellaneous_transformations.rst
View file @
d68e62c9
...
...
@@ -383,7 +383,7 @@ The function can do the following transformations:
.. math::
L \leftarrow 255/100 L, \; u \leftarrow 255/354 (u + 134), \; v \leftarrow 255/2
56
(v + 140)
L \leftarrow 255/100 L, \; u \leftarrow 255/354 (u + 134), \; v \leftarrow 255/2
62
(v + 140)
* 16-bit images
(currently not supported)
...
...
modules/imgproc/src/color.cpp
View file @
d68e62c9
...
...
@@ -2046,7 +2046,7 @@ struct RGB2Luv_b
{
dst
[
j
]
=
saturate_cast
<
uchar
>
(
buf
[
j
]
*
2.55
f
);
dst
[
j
+
1
]
=
saturate_cast
<
uchar
>
(
buf
[
j
+
1
]
*
0.72033898305084743
f
+
96.525423728813564
f
);
dst
[
j
+
2
]
=
saturate_cast
<
uchar
>
(
buf
[
j
+
2
]
*
0.9
9609375
f
+
139.453125
f
);
dst
[
j
+
2
]
=
saturate_cast
<
uchar
>
(
buf
[
j
+
2
]
*
0.9
732824427480916
f
+
136.259541984732824
f
);
}
}
}
...
...
@@ -2078,7 +2078,7 @@ struct Luv2RGB_b
{
buf
[
j
]
=
src
[
j
]
*
(
100.
f
/
255.
f
);
buf
[
j
+
1
]
=
(
float
)(
src
[
j
+
1
]
*
1.388235294117647
f
-
134.
f
);
buf
[
j
+
2
]
=
(
float
)(
src
[
j
+
2
]
*
1.0
03921568627451
f
-
140.
f
);
buf
[
j
+
2
]
=
(
float
)(
src
[
j
+
2
]
*
1.0
27450980392157
f
-
140.
f
);
}
cvt
(
buf
,
buf
,
dn
);
...
...
modules/imgproc/test/test_color.cpp
View file @
d68e62c9
...
...
@@ -1168,8 +1168,8 @@ void CV_ColorLuvTest::convert_row_bgr2abc_32f_c3( const float* src_row, float* d
{
u_scale
=
0.720338983
f
;
u_bias
=
96.5254237
f
;
v_scale
=
0.9
9609375
f
;
v_bias
=
13
9.453125
f
;
v_scale
=
0.9
73282442
f
;
v_bias
=
13
6.2595419
f
;
}
for
(
j
=
0
;
j
<
n
*
3
;
j
+=
3
)
...
...
@@ -1221,8 +1221,8 @@ void CV_ColorLuvTest::convert_row_abc2bgr_32f_c3( const float* src_row, float* d
{
u_scale
=
1.
f
/
0.720338983
f
;
u_bias
=
96.5254237
f
;
v_scale
=
1.
f
/
0.9
9609375
f
;
v_bias
=
13
9.453125
f
;
v_scale
=
1.
f
/
0.9
73282442
f
;
v_bias
=
13
6.2595419
f
;
}
for
(
j
=
0
;
j
<
n
*
3
;
j
+=
3
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment