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
12b7090a
Commit
12b7090a
authored
Aug 08, 2011
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed some warnings under win64
parent
dc14b456
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
28 deletions
+28
-28
NCVTest.hpp
modules/gpu/test/nvidia/NCVTest.hpp
+4
-4
NCVTestSourceProvider.hpp
modules/gpu/test/nvidia/NCVTestSourceProvider.hpp
+2
-2
TestHypothesesFilter.cpp
modules/gpu/test/nvidia/TestHypothesesFilter.cpp
+1
-1
test_arithm.cpp
modules/gpu/test/test_arithm.cpp
+7
-7
test_features2d.cpp
modules/gpu/test/test_features2d.cpp
+1
-1
matchers.cpp
modules/stitching/matchers.cpp
+4
-4
motion_estimators.cpp
modules/stitching/motion_estimators.cpp
+3
-3
cascadeclassifier_nvidia_api.cpp
samples/gpu/cascadeclassifier_nvidia_api.cpp
+6
-6
No files found.
modules/gpu/test/nvidia/NCVTest.hpp
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
);
...
...
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