Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
12b7090a
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,发现更多精彩内容 >>
提交
12b7090a
编写于
8月 08, 2011
作者:
V
Vladislav Vinogradov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed some warnings under win64
上级
dc14b456
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
28 addition
and
28 deletion
+28
-28
modules/gpu/test/nvidia/NCVTest.hpp
modules/gpu/test/nvidia/NCVTest.hpp
+4
-4
modules/gpu/test/nvidia/NCVTestSourceProvider.hpp
modules/gpu/test/nvidia/NCVTestSourceProvider.hpp
+2
-2
modules/gpu/test/nvidia/TestHypothesesFilter.cpp
modules/gpu/test/nvidia/TestHypothesesFilter.cpp
+1
-1
modules/gpu/test/test_arithm.cpp
modules/gpu/test/test_arithm.cpp
+7
-7
modules/gpu/test/test_features2d.cpp
modules/gpu/test/test_features2d.cpp
+1
-1
modules/stitching/matchers.cpp
modules/stitching/matchers.cpp
+4
-4
modules/stitching/motion_estimators.cpp
modules/stitching/motion_estimators.cpp
+3
-3
samples/gpu/cascadeclassifier_nvidia_api.cpp
samples/gpu/cascadeclassifier_nvidia_api.cpp
+6
-6
未找到文件。
modules/gpu/test/nvidia/NCVTest.hpp
浏览文件 @
12b7090a
...
...
@@ -124,8 +124,8 @@ private:
bool
initMemory
(
NCVTestReport
&
report
)
{
this
->
allocatorGPU
.
reset
(
new
NCVMemStackAllocator
(
devProp
.
textureAlignment
));
this
->
allocatorCPU
.
reset
(
new
NCVMemStackAllocator
(
devProp
.
textureAlignment
));
this
->
allocatorGPU
.
reset
(
new
NCVMemStackAllocator
(
static_cast
<
Ncv32u
>
(
devProp
.
textureAlignment
)
));
this
->
allocatorCPU
.
reset
(
new
NCVMemStackAllocator
(
static_cast
<
Ncv32u
>
(
devProp
.
textureAlignment
)
));
if
(
!
this
->
allocatorGPU
.
get
()
->
isInitialized
()
||
!
this
->
allocatorCPU
.
get
()
->
isInitialized
())
...
...
@@ -146,9 +146,9 @@ private:
report
.
statsNums
[
"MemGPU"
]
=
maxGPUsize
;
report
.
statsNums
[
"MemCPU"
]
=
maxCPUsize
;
this
->
allocatorGPU
.
reset
(
new
NCVMemStackAllocator
(
NCVMemoryTypeDevice
,
maxGPUsize
,
devProp
.
textureAlignment
));
this
->
allocatorGPU
.
reset
(
new
NCVMemStackAllocator
(
NCVMemoryTypeDevice
,
maxGPUsize
,
static_cast
<
Ncv32u
>
(
devProp
.
textureAlignment
)
));
this
->
allocatorCPU
.
reset
(
new
NCVMemStackAllocator
(
NCVMemoryTypeHostPinned
,
maxCPUsize
,
devProp
.
textureAlignment
));
this
->
allocatorCPU
.
reset
(
new
NCVMemStackAllocator
(
NCVMemoryTypeHostPinned
,
maxCPUsize
,
static_cast
<
Ncv32u
>
(
devProp
.
textureAlignment
)
));
if
(
!
this
->
allocatorGPU
.
get
()
->
isInitialized
()
||
!
this
->
allocatorCPU
.
get
()
->
isInitialized
())
...
...
modules/gpu/test/nvidia/NCVTestSourceProvider.hpp
浏览文件 @
12b7090a
...
...
@@ -35,7 +35,7 @@ public:
//Ncv32u maxWpitch = alignUp(maxWidth * sizeof(T), devProp.textureAlignment);
allocatorCPU
.
reset
(
new
NCVMemNativeAllocator
(
NCVMemoryTypeHostPinned
,
devProp
.
textureAlignment
));
allocatorCPU
.
reset
(
new
NCVMemNativeAllocator
(
NCVMemoryTypeHostPinned
,
static_cast
<
Ncv32u
>
(
devProp
.
textureAlignment
)
));
data
.
reset
(
new
NCVMatrixAlloc
<
T
>
(
*
this
->
allocatorCPU
.
get
(),
maxWidth
,
maxHeight
));
ncvAssertPrintReturn
(
data
.
get
()
->
isMemAllocated
(),
"NCVTestSourceProvider ctor:: Matrix not allocated"
,
);
...
...
@@ -70,7 +70,7 @@ public:
ncvAssertPrintReturn
(
cudaSuccess
==
cudaGetDevice
(
&
devId
),
"Error returned from cudaGetDevice"
,
);
ncvAssertPrintReturn
(
cudaSuccess
==
cudaGetDeviceProperties
(
&
devProp
,
devId
),
"Error returned from cudaGetDeviceProperties"
,
);
allocatorCPU
.
reset
(
new
NCVMemNativeAllocator
(
NCVMemoryTypeHostPinned
,
devProp
.
textureAlignment
));
allocatorCPU
.
reset
(
new
NCVMemNativeAllocator
(
NCVMemoryTypeHostPinned
,
static_cast
<
Ncv32u
>
(
devProp
.
textureAlignment
)
));
data
.
reset
(
new
NCVMatrixAlloc
<
T
>
(
*
this
->
allocatorCPU
.
get
(),
image
.
cols
,
image
.
rows
));
ncvAssertPrintReturn
(
data
.
get
()
->
isMemAllocated
(),
"NCVTestSourceProvider ctor:: Matrix not allocated"
,
);
...
...
modules/gpu/test/nvidia/TestHypothesesFilter.cpp
浏览文件 @
12b7090a
...
...
@@ -132,7 +132,7 @@ bool TestHypothesesFilter::process()
}
NCV_SKIP_COND_END
Ncv32u
numHypothesesSrc
=
h_vecSrc
.
length
(
);
Ncv32u
numHypothesesSrc
=
static_cast
<
Ncv32u
>
(
h_vecSrc
.
length
()
);
NCV_SKIP_COND_BEGIN
ncvStat
=
ncvGroupRectangles_host
(
h_vecSrc
,
numHypothesesSrc
,
this
->
minNeighbors
,
this
->
eps
,
NULL
);
ncvAssertReturn
(
ncvStat
==
NCV_SUCCESS
,
false
);
...
...
modules/gpu/test/test_arithm.cpp
浏览文件 @
12b7090a
...
...
@@ -1486,7 +1486,7 @@ struct BitwiseNot : testing::TestWithParam< std::tr1::tuple<cv::gpu::DeviceInfo,
for
(
int
i
=
0
;
i
<
mat
.
rows
;
++
i
)
{
cv
::
Mat
row
(
1
,
mat
.
cols
*
mat
.
elemSize
(
),
CV_8U
,
(
void
*
)
mat
.
ptr
(
i
));
cv
::
Mat
row
(
1
,
static_cast
<
int
>
(
mat
.
cols
*
mat
.
elemSize
()
),
CV_8U
,
(
void
*
)
mat
.
ptr
(
i
));
rng
.
fill
(
row
,
cv
::
RNG
::
UNIFORM
,
cv
::
Scalar
(
0
),
cv
::
Scalar
(
255
));
}
...
...
@@ -1547,10 +1547,10 @@ struct BitwiseOr : testing::TestWithParam< std::tr1::tuple<cv::gpu::DeviceInfo,
for
(
int
i
=
0
;
i
<
mat1
.
rows
;
++
i
)
{
cv
::
Mat
row1
(
1
,
mat1
.
cols
*
mat1
.
elemSize
(
),
CV_8U
,
(
void
*
)
mat1
.
ptr
(
i
));
cv
::
Mat
row1
(
1
,
static_cast
<
int
>
(
mat1
.
cols
*
mat1
.
elemSize
()
),
CV_8U
,
(
void
*
)
mat1
.
ptr
(
i
));
rng
.
fill
(
row1
,
cv
::
RNG
::
UNIFORM
,
cv
::
Scalar
(
0
),
cv
::
Scalar
(
255
));
cv
::
Mat
row2
(
1
,
mat2
.
cols
*
mat2
.
elemSize
(
),
CV_8U
,
(
void
*
)
mat2
.
ptr
(
i
));
cv
::
Mat
row2
(
1
,
static_cast
<
int
>
(
mat2
.
cols
*
mat2
.
elemSize
()
),
CV_8U
,
(
void
*
)
mat2
.
ptr
(
i
));
rng
.
fill
(
row2
,
cv
::
RNG
::
UNIFORM
,
cv
::
Scalar
(
0
),
cv
::
Scalar
(
255
));
}
...
...
@@ -1611,10 +1611,10 @@ struct BitwiseAnd : testing::TestWithParam< std::tr1::tuple<cv::gpu::DeviceInfo,
for
(
int
i
=
0
;
i
<
mat1
.
rows
;
++
i
)
{
cv
::
Mat
row1
(
1
,
mat1
.
cols
*
mat1
.
elemSize
(
),
CV_8U
,
(
void
*
)
mat1
.
ptr
(
i
));
cv
::
Mat
row1
(
1
,
static_cast
<
int
>
(
mat1
.
cols
*
mat1
.
elemSize
()
),
CV_8U
,
(
void
*
)
mat1
.
ptr
(
i
));
rng
.
fill
(
row1
,
cv
::
RNG
::
UNIFORM
,
cv
::
Scalar
(
0
),
cv
::
Scalar
(
255
));
cv
::
Mat
row2
(
1
,
mat2
.
cols
*
mat2
.
elemSize
(
),
CV_8U
,
(
void
*
)
mat2
.
ptr
(
i
));
cv
::
Mat
row2
(
1
,
static_cast
<
int
>
(
mat2
.
cols
*
mat2
.
elemSize
()
),
CV_8U
,
(
void
*
)
mat2
.
ptr
(
i
));
rng
.
fill
(
row2
,
cv
::
RNG
::
UNIFORM
,
cv
::
Scalar
(
0
),
cv
::
Scalar
(
255
));
}
...
...
@@ -1675,10 +1675,10 @@ struct BitwiseXor : testing::TestWithParam< std::tr1::tuple<cv::gpu::DeviceInfo,
for
(
int
i
=
0
;
i
<
mat1
.
rows
;
++
i
)
{
cv
::
Mat
row1
(
1
,
mat1
.
cols
*
mat1
.
elemSize
(
),
CV_8U
,
(
void
*
)
mat1
.
ptr
(
i
));
cv
::
Mat
row1
(
1
,
static_cast
<
int
>
(
mat1
.
cols
*
mat1
.
elemSize
()
),
CV_8U
,
(
void
*
)
mat1
.
ptr
(
i
));
rng
.
fill
(
row1
,
cv
::
RNG
::
UNIFORM
,
cv
::
Scalar
(
0
),
cv
::
Scalar
(
255
));
cv
::
Mat
row2
(
1
,
mat2
.
cols
*
mat2
.
elemSize
(
),
CV_8U
,
(
void
*
)
mat2
.
ptr
(
i
));
cv
::
Mat
row2
(
1
,
static_cast
<
int
>
(
mat2
.
cols
*
mat2
.
elemSize
()
),
CV_8U
,
(
void
*
)
mat2
.
ptr
(
i
));
rng
.
fill
(
row2
,
cv
::
RNG
::
UNIFORM
,
cv
::
Scalar
(
0
),
cv
::
Scalar
(
255
));
}
...
...
modules/gpu/test/test_features2d.cpp
浏览文件 @
12b7090a
...
...
@@ -143,7 +143,7 @@ TEST_P(SURF, Accuracy)
cv
::
BruteForceMatcher
<
cv
::
L2
<
float
>
>
matcher
;
std
::
vector
<
cv
::
DMatch
>
matches
;
matcher
.
match
(
cv
::
Mat
(
keypoints_gold
.
size
(
),
64
,
CV_32FC1
,
&
descriptors_gold
[
0
]),
descriptors
,
matches
);
matcher
.
match
(
cv
::
Mat
(
static_cast
<
int
>
(
keypoints_gold
.
size
()
),
64
,
CV_32FC1
,
&
descriptors_gold
[
0
]),
descriptors
,
matches
);
int
validCount
=
0
;
...
...
modules/stitching/matchers.cpp
浏览文件 @
12b7090a
...
...
@@ -397,8 +397,8 @@ void BestOf2NearestMatcher::match(const ImageFeatures &features1, const ImageFea
return
;
// Construct point-point correspondences for homography estimation
Mat
src_points
(
1
,
matches_info
.
matches
.
size
(
),
CV_32FC2
);
Mat
dst_points
(
1
,
matches_info
.
matches
.
size
(
),
CV_32FC2
);
Mat
src_points
(
1
,
static_cast
<
int
>
(
matches_info
.
matches
.
size
()
),
CV_32FC2
);
Mat
dst_points
(
1
,
static_cast
<
int
>
(
matches_info
.
matches
.
size
()
),
CV_32FC2
);
for
(
size_t
i
=
0
;
i
<
matches_info
.
matches
.
size
();
++
i
)
{
const
DMatch
&
m
=
matches_info
.
matches
[
i
];
...
...
@@ -406,12 +406,12 @@ void BestOf2NearestMatcher::match(const ImageFeatures &features1, const ImageFea
Point2f
p
=
features1
.
keypoints
[
m
.
queryIdx
].
pt
;
p
.
x
-=
features1
.
img_size
.
width
*
0.5
f
;
p
.
y
-=
features1
.
img_size
.
height
*
0.5
f
;
src_points
.
at
<
Point2f
>
(
0
,
i
)
=
p
;
src_points
.
at
<
Point2f
>
(
0
,
static_cast
<
int
>
(
i
)
)
=
p
;
p
=
features2
.
keypoints
[
m
.
trainIdx
].
pt
;
p
.
x
-=
features2
.
img_size
.
width
*
0.5
f
;
p
.
y
-=
features2
.
img_size
.
height
*
0.5
f
;
dst_points
.
at
<
Point2f
>
(
0
,
i
)
=
p
;
dst_points
.
at
<
Point2f
>
(
0
,
static_cast
<
int
>
(
i
)
)
=
p
;
}
// Find pair-wise motion
...
...
modules/stitching/motion_estimators.cpp
浏览文件 @
12b7090a
...
...
@@ -405,7 +405,7 @@ vector<int> leaveBiggestComponent(vector<ImageFeatures> &features, vector<Match
}
}
int
max_comp
=
max_element
(
comps
.
size
.
begin
(),
comps
.
size
.
end
())
-
comps
.
size
.
begin
(
);
int
max_comp
=
static_cast
<
int
>
(
max_element
(
comps
.
size
.
begin
(),
comps
.
size
.
end
())
-
comps
.
size
.
begin
()
);
vector
<
int
>
indices
;
vector
<
int
>
indices_removed
;
...
...
@@ -423,8 +423,8 @@ vector<int> leaveBiggestComponent(vector<ImageFeatures> &features, vector<Match
for
(
size_t
j
=
0
;
j
<
indices
.
size
();
++
j
)
{
pairwise_matches_subset
.
push_back
(
pairwise_matches
[
indices
[
i
]
*
num_images
+
indices
[
j
]]);
pairwise_matches_subset
.
back
().
src_img_idx
=
i
;
pairwise_matches_subset
.
back
().
dst_img_idx
=
j
;
pairwise_matches_subset
.
back
().
src_img_idx
=
static_cast
<
int
>
(
i
)
;
pairwise_matches_subset
.
back
().
dst_img_idx
=
static_cast
<
int
>
(
j
)
;
}
}
...
...
samples/gpu/cascadeclassifier_nvidia_api.cpp
浏览文件 @
12b7090a
...
...
@@ -212,9 +212,9 @@ int main(int argc, const char** argv)
//
//==============================================================================
NCVMemNativeAllocator
gpuCascadeAllocator
(
NCVMemoryTypeDevice
,
devProp
.
textureAlignment
);
NCVMemNativeAllocator
gpuCascadeAllocator
(
NCVMemoryTypeDevice
,
static_cast
<
Ncv32u
>
(
devProp
.
textureAlignment
)
);
ncvAssertPrintReturn
(
gpuCascadeAllocator
.
isInitialized
(),
"Error creating cascade GPU allocator"
,
-
1
);
NCVMemNativeAllocator
cpuCascadeAllocator
(
NCVMemoryTypeHostPinned
,
devProp
.
textureAlignment
);
NCVMemNativeAllocator
cpuCascadeAllocator
(
NCVMemoryTypeHostPinned
,
static_cast
<
Ncv32u
>
(
devProp
.
textureAlignment
)
);
ncvAssertPrintReturn
(
cpuCascadeAllocator
.
isInitialized
(),
"Error creating cascade CPU allocator"
,
-
1
);
Ncv32u
haarNumStages
,
haarNumNodes
,
haarNumFeatures
;
...
...
@@ -252,9 +252,9 @@ int main(int argc, const char** argv)
//
//==============================================================================
NCVMemStackAllocator
gpuCounter
(
devProp
.
textureAlignment
);
NCVMemStackAllocator
gpuCounter
(
static_cast
<
Ncv32u
>
(
devProp
.
textureAlignment
)
);
ncvAssertPrintReturn
(
gpuCounter
.
isInitialized
(),
"Error creating GPU memory counter"
,
-
1
);
NCVMemStackAllocator
cpuCounter
(
devProp
.
textureAlignment
);
NCVMemStackAllocator
cpuCounter
(
static_cast
<
Ncv32u
>
(
devProp
.
textureAlignment
)
);
ncvAssertPrintReturn
(
cpuCounter
.
isInitialized
(),
"Error creating CPU memory counter"
,
-
1
);
ncvStat
=
process
(
NULL
,
frameSize
.
width
,
frameSize
.
height
,
...
...
@@ -264,9 +264,9 @@ int main(int argc, const char** argv)
gpuCounter
,
cpuCounter
,
devProp
);
ncvAssertPrintReturn
(
ncvStat
==
NCV_SUCCESS
,
"Error in memory counting pass"
,
-
1
);
NCVMemStackAllocator
gpuAllocator
(
NCVMemoryTypeDevice
,
gpuCounter
.
maxSize
(),
devProp
.
textureAlignment
);
NCVMemStackAllocator
gpuAllocator
(
NCVMemoryTypeDevice
,
gpuCounter
.
maxSize
(),
static_cast
<
Ncv32u
>
(
devProp
.
textureAlignment
)
);
ncvAssertPrintReturn
(
gpuAllocator
.
isInitialized
(),
"Error creating GPU memory allocator"
,
-
1
);
NCVMemStackAllocator
cpuAllocator
(
NCVMemoryTypeHostPinned
,
cpuCounter
.
maxSize
(),
devProp
.
textureAlignment
);
NCVMemStackAllocator
cpuAllocator
(
NCVMemoryTypeHostPinned
,
cpuCounter
.
maxSize
(),
static_cast
<
Ncv32u
>
(
devProp
.
textureAlignment
)
);
ncvAssertPrintReturn
(
cpuAllocator
.
isInitialized
(),
"Error creating CPU memory allocator"
,
-
1
);
printf
(
"Initialized for frame size [%dx%d]
\n
"
,
frameSize
.
width
,
frameSize
.
height
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录