Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
75fcfa60
Commit
75fcfa60
authored
Mar 08, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2028 from tomoaki0705:fixCudaImgProcFailure
parents
6f5d9835
a6b3254d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
color_cvt.hpp
...dev/include/opencv2/cudev/functional/detail/color_cvt.hpp
+3
-15
No files found.
modules/cudev/include/opencv2/cudev/functional/detail/color_cvt.hpp
View file @
75fcfa60
...
...
@@ -291,7 +291,7 @@ namespace color_cvt_detail
{
__device__
uchar
operator
()(
ushort
src
)
const
{
return
(
uchar
)
CV_CUDEV_DESCALE
(((
src
<<
3
)
&
0xf8
)
*
B
2Y
+
((
src
>>
2
)
&
0xf8
)
*
G2Y
+
((
src
>>
7
)
&
0xf8
)
*
R2Y
,
yuv
_shift
);
return
(
uchar
)
CV_CUDEV_DESCALE
(((
src
<<
3
)
&
0xf8
)
*
B
Y15
+
((
src
>>
2
)
&
0xf8
)
*
GY15
+
((
src
>>
7
)
&
0xf8
)
*
RY15
,
rgb
_shift
);
}
};
...
...
@@ -300,7 +300,7 @@ namespace color_cvt_detail
{
__device__
uchar
operator
()(
ushort
src
)
const
{
return
(
uchar
)
CV_CUDEV_DESCALE
(((
src
<<
3
)
&
0xf8
)
*
B
2Y
+
((
src
>>
3
)
&
0xfc
)
*
G2Y
+
((
src
>>
8
)
&
0xf8
)
*
R2Y
,
yuv
_shift
);
return
(
uchar
)
CV_CUDEV_DESCALE
(((
src
<<
3
)
&
0xf8
)
*
B
Y15
+
((
src
>>
3
)
&
0xfc
)
*
GY15
+
((
src
>>
8
)
&
0xf8
)
*
RY15
,
rgb
_shift
);
}
};
...
...
@@ -314,19 +314,7 @@ namespace color_cvt_detail
const
int
b
=
bidx
==
0
?
src
.
x
:
src
.
z
;
const
int
g
=
src
.
y
;
const
int
r
=
bidx
==
0
?
src
.
z
:
src
.
x
;
return
(
T
)
CV_CUDEV_DESCALE
(
b
*
B2Y
+
g
*
G2Y
+
r
*
R2Y
,
yuv_shift
);
}
};
template
<
int
scn
,
int
bidx
>
struct
RGB2Gray
<
uchar
,
scn
,
bidx
>
:
unary_function
<
typename
MakeVec
<
uchar
,
scn
>::
type
,
uchar
>
{
__device__
uchar
operator
()(
const
typename
MakeVec
<
uchar
,
scn
>::
type
&
src
)
const
{
const
int
b
=
bidx
==
0
?
src
.
x
:
src
.
z
;
const
int
g
=
src
.
y
;
const
int
r
=
bidx
==
0
?
src
.
z
:
src
.
x
;
return
(
uchar
)
CV_CUDEV_DESCALE
(
b
*
BY15
+
g
*
GY15
+
r
*
RY15
,
rgb_shift
);
return
(
T
)
CV_CUDEV_DESCALE
(
b
*
BY15
+
g
*
GY15
+
r
*
RY15
,
rgb_shift
);
}
};
...
...
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