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
ca474de6
Commit
ca474de6
authored
Apr 09, 2013
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made objdetect dependecy for gpunvidia optional
parent
e6547149
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
3 deletions
+31
-3
CMakeLists.txt
modules/gpunvidia/CMakeLists.txt
+1
-1
NCV.cpp
modules/gpunvidia/src/NCV.cpp
+8
-0
NCVHaarObjectDetection.cu
modules/gpunvidia/src/cuda/NCVHaarObjectDetection.cu
+16
-1
precomp.hpp
modules/gpunvidia/src/precomp.hpp
+6
-1
No files found.
modules/gpunvidia/CMakeLists.txt
View file @
ca474de6
...
...
@@ -6,4 +6,4 @@ set(the_description "GPU-accelerated Computer Vision (HAL module)")
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations
)
ocv_define_module
(
gpunvidia opencv_core opencv_objdetect
)
ocv_define_module
(
gpunvidia opencv_core
OPTIONAL
opencv_objdetect
)
modules/gpunvidia/src/NCV.cpp
View file @
ca474de6
...
...
@@ -737,6 +737,13 @@ struct RectConvert
static
void
groupRectangles
(
std
::
vector
<
NcvRect32u
>
&
hypotheses
,
int
groupThreshold
,
double
eps
,
std
::
vector
<
Ncv32u
>
*
weights
)
{
#ifndef HAVE_OPENCV_OBJDETECT
(
void
)
hypotheses
;
(
void
)
groupThreshold
;
(
void
)
eps
;
(
void
)
weights
;
CV_Error
(
cv
::
Error
::
StsNotImplemented
,
"This functionality requires objdetect module"
);
#else
std
::
vector
<
cv
::
Rect
>
rects
(
hypotheses
.
size
());
std
::
transform
(
hypotheses
.
begin
(),
hypotheses
.
end
(),
rects
.
begin
(),
RectConvert
());
...
...
@@ -752,6 +759,7 @@ static void groupRectangles(std::vector<NcvRect32u> &hypotheses, int groupThresh
}
std
::
transform
(
rects
.
begin
(),
rects
.
end
(),
hypotheses
.
begin
(),
RectConvert
());
hypotheses
.
resize
(
rects
.
size
());
#endif
}
...
...
modules/gpunvidia/src/cuda/NCVHaarObjectDetection.cu
View file @
ca474de6
...
...
@@ -61,7 +61,12 @@
#include "opencv2/core/cuda/warp.hpp"
#include "opencv2/core/cuda/warp_shuffle.hpp"
#include "opencv2/objdetect.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_OBJDETECT
# include "opencv2/objdetect.hpp"
#endif
#include "opencv2/gpunvidia/NCV.hpp"
#include "opencv2/gpunvidia/NPP_staging.hpp"
...
...
@@ -2106,6 +2111,15 @@ static NCVStatus loadFromXML(const cv::String &filename,
std::vector<HaarClassifierNode128> &haarClassifierNodes,
std::vector<HaarFeature64> &haarFeatures)
{
#ifndef HAVE_OPENCV_OBJDETECT
(void) filename;
(void) haar;
(void) haarStages;
(void) haarClassifierNodes;
(void) haarFeatures;
CV_Error(cv::Error::StsNotImplemented, "This functionality requires objdetect module");
return NCV_HAAR_XML_LOADING_EXCEPTION;
#else
NCVStatus ncvStat;
haar.NumStages = 0;
...
...
@@ -2294,6 +2308,7 @@ static NCVStatus loadFromXML(const cv::String &filename,
}
return NCV_SUCCESS;
#endif
}
...
...
modules/gpunvidia/src/precomp.hpp
View file @
ca474de6
...
...
@@ -49,7 +49,12 @@
#include "opencv2/gpunvidia.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/objdetect.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_OBJDETECT
# include "opencv2/objdetect.hpp"
#endif
#include "opencv2/core/gpu_private.hpp"
#include "opencv2/gpunvidia/private.hpp"
...
...
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