Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
f17f4bda
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f17f4bda
编写于
8月 20, 2012
作者:
M
marina.kolpakova
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more warning fixes for GCC
上级
15213401
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
49 addition
and
49 deletion
+49
-49
modules/gpu/src/brute_force_matcher.cpp
modules/gpu/src/brute_force_matcher.cpp
+25
-25
modules/gpu/src/hog.cpp
modules/gpu/src/hog.cpp
+3
-3
modules/gpu/src/video_decoder.cpp
modules/gpu/src/video_decoder.cpp
+21
-21
未找到文件。
modules/gpu/src/brute_force_matcher.cpp
浏览文件 @
f17f4bda
...
...
@@ -420,16 +420,16 @@ void cv::gpu::BFMatcher_GPU::matchConvert(const Mat& trainIdx, const Mat& imgIdx
const
float
*
distance_ptr
=
distance
.
ptr
<
float
>
();
for
(
int
queryIdx
=
0
;
queryIdx
<
nQuery
;
++
queryIdx
,
++
trainIdx_ptr
,
++
imgIdx_ptr
,
++
distance_ptr
)
{
int
trainIdx
=
*
trainIdx_ptr
;
int
_
trainIdx
=
*
trainIdx_ptr
;
if
(
trainIdx
==
-
1
)
if
(
_
trainIdx
==
-
1
)
continue
;
int
imgIdx
=
*
imgIdx_ptr
;
int
_
imgIdx
=
*
imgIdx_ptr
;
float
distance
=
*
distance_ptr
;
float
_
distance
=
*
distance_ptr
;
DMatch
m
(
queryIdx
,
trainIdx
,
imgIdx
,
distance
);
DMatch
m
(
queryIdx
,
_trainIdx
,
_imgIdx
,
_
distance
);
matches
.
push_back
(
m
);
}
...
...
@@ -558,13 +558,13 @@ void cv::gpu::BFMatcher_GPU::knnMatchConvert(const Mat& trainIdx, const Mat& dis
for
(
int
i
=
0
;
i
<
k
;
++
i
,
++
trainIdx_ptr
,
++
distance_ptr
)
{
int
trainIdx
=
*
trainIdx_ptr
;
int
_
trainIdx
=
*
trainIdx_ptr
;
if
(
trainIdx
!=
-
1
)
if
(
_
trainIdx
!=
-
1
)
{
float
distance
=
*
distance_ptr
;
float
_
distance
=
*
distance_ptr
;
DMatch
m
(
queryIdx
,
trainIdx
,
0
,
distance
);
DMatch
m
(
queryIdx
,
_trainIdx
,
0
,
_
distance
);
curMatches
.
push_back
(
m
);
}
...
...
@@ -680,15 +680,15 @@ void cv::gpu::BFMatcher_GPU::knnMatch2Convert(const Mat& trainIdx, const Mat& im
for
(
int
i
=
0
;
i
<
2
;
++
i
,
++
trainIdx_ptr
,
++
imgIdx_ptr
,
++
distance_ptr
)
{
int
trainIdx
=
*
trainIdx_ptr
;
int
_
trainIdx
=
*
trainIdx_ptr
;
if
(
trainIdx
!=
-
1
)
if
(
_
trainIdx
!=
-
1
)
{
int
imgIdx
=
*
imgIdx_ptr
;
int
_
imgIdx
=
*
imgIdx_ptr
;
float
distance
=
*
distance_ptr
;
float
_
distance
=
*
distance_ptr
;
DMatch
m
(
queryIdx
,
trainIdx
,
imgIdx
,
distance
);
DMatch
m
(
queryIdx
,
_trainIdx
,
_imgIdx
,
_
distance
);
curMatches
.
push_back
(
m
);
}
...
...
@@ -868,25 +868,25 @@ void cv::gpu::BFMatcher_GPU::radiusMatchConvert(const Mat& trainIdx, const Mat&
const
int
*
trainIdx_ptr
=
trainIdx
.
ptr
<
int
>
(
queryIdx
);
const
float
*
distance_ptr
=
distance
.
ptr
<
float
>
(
queryIdx
);
const
int
nMatche
s
=
std
::
min
(
nMatches_ptr
[
queryIdx
],
trainIdx
.
cols
);
const
int
nMatche
d
=
std
::
min
(
nMatches_ptr
[
queryIdx
],
trainIdx
.
cols
);
if
(
nMatche
s
==
0
)
if
(
nMatche
d
==
0
)
{
if
(
!
compactResult
)
matches
.
push_back
(
vector
<
DMatch
>
());
continue
;
}
matches
.
push_back
(
vector
<
DMatch
>
(
nMatche
s
));
matches
.
push_back
(
vector
<
DMatch
>
(
nMatche
d
));
vector
<
DMatch
>&
curMatches
=
matches
.
back
();
for
(
int
i
=
0
;
i
<
nMatche
s
;
++
i
,
++
trainIdx_ptr
,
++
distance_ptr
)
for
(
int
i
=
0
;
i
<
nMatche
d
;
++
i
,
++
trainIdx_ptr
,
++
distance_ptr
)
{
int
trainIdx
=
*
trainIdx_ptr
;
int
_
trainIdx
=
*
trainIdx_ptr
;
float
distance
=
*
distance_ptr
;
float
_
distance
=
*
distance_ptr
;
DMatch
m
(
queryIdx
,
trainIdx
,
0
,
distance
);
DMatch
m
(
queryIdx
,
_trainIdx
,
0
,
_
distance
);
curMatches
[
i
]
=
m
;
}
...
...
@@ -1009,9 +1009,9 @@ void cv::gpu::BFMatcher_GPU::radiusMatchConvert(const Mat& trainIdx, const Mat&
const
int
*
imgIdx_ptr
=
imgIdx
.
ptr
<
int
>
(
queryIdx
);
const
float
*
distance_ptr
=
distance
.
ptr
<
float
>
(
queryIdx
);
const
int
nMatche
s
=
std
::
min
(
nMatches_ptr
[
queryIdx
],
trainIdx
.
cols
);
const
int
nMatche
d
=
std
::
min
(
nMatches_ptr
[
queryIdx
],
trainIdx
.
cols
);
if
(
nMatche
s
==
0
)
if
(
nMatche
d
==
0
)
{
if
(
!
compactResult
)
matches
.
push_back
(
vector
<
DMatch
>
());
...
...
@@ -1020,9 +1020,9 @@ void cv::gpu::BFMatcher_GPU::radiusMatchConvert(const Mat& trainIdx, const Mat&
matches
.
push_back
(
vector
<
DMatch
>
());
vector
<
DMatch
>&
curMatches
=
matches
.
back
();
curMatches
.
reserve
(
nMatche
s
);
curMatches
.
reserve
(
nMatche
d
);
for
(
int
i
=
0
;
i
<
nMatche
s
;
++
i
,
++
trainIdx_ptr
,
++
imgIdx_ptr
,
++
distance_ptr
)
for
(
int
i
=
0
;
i
<
nMatche
d
;
++
i
,
++
trainIdx_ptr
,
++
imgIdx_ptr
,
++
distance_ptr
)
{
int
_trainIdx
=
*
trainIdx_ptr
;
int
_imgIdx
=
*
imgIdx_ptr
;
...
...
modules/gpu/src/hog.cpp
浏览文件 @
f17f4bda
...
...
@@ -315,7 +315,7 @@ void cv::gpu::HOGDescriptor::computeConfidenceMultiScale(const GpuMat& img, vect
double
scale
=
1.
;
int
levels
=
0
;
for
(
levels
=
0
;
levels
<
conf_out
.
size
();
levels
++
)
for
(
levels
=
0
;
levels
<
(
int
)
conf_out
.
size
();
levels
++
)
{
scale
=
conf_out
[
levels
].
scale
;
level_scale
.
push_back
(
scale
);
...
...
@@ -332,8 +332,8 @@ void cv::gpu::HOGDescriptor::computeConfidenceMultiScale(const GpuMat& img, vect
for
(
size_t
i
=
0
;
i
<
level_scale
.
size
();
i
++
)
{
double
scale
=
level_scale
[
i
];
Size
sz
(
cvRound
(
img
.
cols
/
scale
),
cvRound
(
img
.
rows
/
scale
));
double
_
scale
=
level_scale
[
i
];
Size
sz
(
cvRound
(
img
.
cols
/
_scale
),
cvRound
(
img
.
rows
/
_
scale
));
GpuMat
smaller_img
;
if
(
sz
==
img
.
size
())
...
...
modules/gpu/src/video_decoder.cpp
浏览文件 @
f17f4bda
...
...
@@ -49,36 +49,36 @@ void cv::gpu::detail::VideoDecoder::create(const VideoReader_GPU::FormatInfo& vi
{
release
();
cudaVideoCodec
codec
=
static_cast
<
cudaVideoCodec
>
(
videoFormat
.
codec
);
cudaVideoChromaFormat
chromaFormat
=
static_cast
<
cudaVideoChromaFormat
>
(
videoFormat
.
chromaFormat
);
cudaVideoCodec
_
codec
=
static_cast
<
cudaVideoCodec
>
(
videoFormat
.
codec
);
cudaVideoChromaFormat
_
chromaFormat
=
static_cast
<
cudaVideoChromaFormat
>
(
videoFormat
.
chromaFormat
);
cudaVideoCreateFlags
videoCreateFlags
=
(
codec
==
cudaVideoCodec_JPEG
||
codec
==
cudaVideoCodec_MPEG2
)
?
cudaVideoCreateFlags
videoCreateFlags
=
(
_codec
==
cudaVideoCodec_JPEG
||
_
codec
==
cudaVideoCodec_MPEG2
)
?
cudaVideoCreate_PreferCUDA
:
cudaVideoCreate_PreferCUVID
;
// Validate video format. These are the currently supported formats via NVCUVID
CV_Assert
(
cudaVideoCodec_MPEG1
==
codec
||
cudaVideoCodec_MPEG2
==
codec
||
cudaVideoCodec_MPEG4
==
codec
||
cudaVideoCodec_VC1
==
codec
||
cudaVideoCodec_H264
==
codec
||
cudaVideoCodec_JPEG
==
codec
||
cudaVideoCodec_YUV420
==
codec
||
cudaVideoCodec_YV12
==
codec
||
cudaVideoCodec_NV12
==
codec
||
cudaVideoCodec_YUYV
==
codec
||
cudaVideoCodec_UYVY
==
codec
);
CV_Assert
(
cudaVideoChromaFormat_Monochrome
==
chromaFormat
||
cudaVideoChromaFormat_420
==
chromaFormat
||
cudaVideoChromaFormat_422
==
chromaFormat
||
cudaVideoChromaFormat_444
==
chromaFormat
);
CV_Assert
(
cudaVideoCodec_MPEG1
==
_
codec
||
cudaVideoCodec_MPEG2
==
_
codec
||
cudaVideoCodec_MPEG4
==
_
codec
||
cudaVideoCodec_VC1
==
_
codec
||
cudaVideoCodec_H264
==
_
codec
||
cudaVideoCodec_JPEG
==
_
codec
||
cudaVideoCodec_YUV420
==
_
codec
||
cudaVideoCodec_YV12
==
_
codec
||
cudaVideoCodec_NV12
==
_
codec
||
cudaVideoCodec_YUYV
==
_
codec
||
cudaVideoCodec_UYVY
==
_
codec
);
CV_Assert
(
cudaVideoChromaFormat_Monochrome
==
_
chromaFormat
||
cudaVideoChromaFormat_420
==
_
chromaFormat
||
cudaVideoChromaFormat_422
==
_
chromaFormat
||
cudaVideoChromaFormat_444
==
_
chromaFormat
);
// Fill the decoder-create-info struct from the given video-format struct.
std
::
memset
(
&
createInfo_
,
0
,
sizeof
(
CUVIDDECODECREATEINFO
));
// Create video decoder
createInfo_
.
CodecType
=
codec
;
createInfo_
.
CodecType
=
_
codec
;
createInfo_
.
ulWidth
=
videoFormat
.
width
;
createInfo_
.
ulHeight
=
videoFormat
.
height
;
createInfo_
.
ulNumDecodeSurfaces
=
FrameQueue
::
MaximumSize
;
...
...
@@ -87,7 +87,7 @@ void cv::gpu::detail::VideoDecoder::create(const VideoReader_GPU::FormatInfo& vi
while
(
createInfo_
.
ulNumDecodeSurfaces
*
videoFormat
.
width
*
videoFormat
.
height
>
16
*
1024
*
1024
)
createInfo_
.
ulNumDecodeSurfaces
--
;
createInfo_
.
ChromaFormat
=
chromaFormat
;
createInfo_
.
ChromaFormat
=
_
chromaFormat
;
createInfo_
.
OutputFormat
=
cudaVideoSurfaceFormat_NV12
;
createInfo_
.
DeinterlaceMode
=
cudaVideoDeinterlaceMode_Adaptive
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录