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
9f82ac18
Commit
9f82ac18
authored
Mar 24, 2015
by
Rok Mandeljc
Committed by
Rok Mandeljc
Nov 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cudastereo: reprojectImageTo3D: enabled CV_32S and CV_32F disparity formats
This is to achieve parity with the CPU equivalent.
parent
8b554d3c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
util.cu
modules/cudastereo/src/cuda/util.cu
+4
-0
util.cpp
modules/cudastereo/src/util.cpp
+4
-4
No files found.
modules/cudastereo/src/cuda/util.cu
View file @
9f82ac18
...
...
@@ -98,6 +98,10 @@ namespace cv { namespace cuda { namespace device
template void reprojectImageTo3D_gpu<uchar, float4>(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream);
template void reprojectImageTo3D_gpu<short, float3>(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream);
template void reprojectImageTo3D_gpu<short, float4>(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream);
template void reprojectImageTo3D_gpu<int, float3>(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream);
template void reprojectImageTo3D_gpu<int, float4>(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream);
template void reprojectImageTo3D_gpu<float, float3>(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream);
template void reprojectImageTo3D_gpu<float, float4>(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream);
/////////////////////////////////// drawColorDisp ///////////////////////////////////////////////
...
...
modules/cudastereo/src/util.cpp
View file @
9f82ac18
...
...
@@ -66,16 +66,16 @@ void cv::cuda::reprojectImageTo3D(InputArray _disp, OutputArray _xyz, InputArray
using
namespace
cv
::
cuda
::
device
;
typedef
void
(
*
func_t
)(
const
PtrStepSzb
disp
,
PtrStepSzb
xyz
,
const
float
*
q
,
cudaStream_t
stream
);
static
const
func_t
funcs
[
2
][
4
]
=
static
const
func_t
funcs
[
2
][
6
]
=
{
{
reprojectImageTo3D_gpu
<
uchar
,
float3
>
,
0
,
0
,
reprojectImageTo3D_gpu
<
short
,
float3
>
},
{
reprojectImageTo3D_gpu
<
uchar
,
float4
>
,
0
,
0
,
reprojectImageTo3D_gpu
<
short
,
float4
>
}
{
reprojectImageTo3D_gpu
<
uchar
,
float3
>
,
0
,
0
,
reprojectImageTo3D_gpu
<
short
,
float3
>
,
reprojectImageTo3D_gpu
<
int
,
float3
>
,
reprojectImageTo3D_gpu
<
float
,
float3
>
},
{
reprojectImageTo3D_gpu
<
uchar
,
float4
>
,
0
,
0
,
reprojectImageTo3D_gpu
<
short
,
float4
>
,
reprojectImageTo3D_gpu
<
int
,
float4
>
,
reprojectImageTo3D_gpu
<
float
,
float4
>
}
};
GpuMat
disp
=
_disp
.
getGpuMat
();
Mat
Q
=
_Q
.
getMat
();
CV_Assert
(
disp
.
type
()
==
CV_8U
||
disp
.
type
()
==
CV_16S
);
CV_Assert
(
disp
.
type
()
==
CV_8U
||
disp
.
type
()
==
CV_16S
||
disp
.
type
()
==
CV_32S
||
disp
.
type
()
==
CV_32F
);
CV_Assert
(
Q
.
type
()
==
CV_32F
&&
Q
.
rows
==
4
&&
Q
.
cols
==
4
&&
Q
.
isContinuous
()
);
CV_Assert
(
dst_cn
==
3
||
dst_cn
==
4
);
...
...
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