fixed gpu module compilation
This commit is contained in:
parent
913e6833d5
commit
ba1a1aecaa
@ -1334,19 +1334,19 @@ Ptr<GeneralizedHough_GPU> cv::gpu::GeneralizedHough_GPU::create(int method)
|
|||||||
{
|
{
|
||||||
switch (method)
|
switch (method)
|
||||||
{
|
{
|
||||||
case GHT_POSITION:
|
case cv::GeneralizedHough::GHT_POSITION:
|
||||||
CV_Assert( !GHT_Ballard_Pos_info_auto.name().empty() );
|
CV_Assert( !GHT_Ballard_Pos_info_auto.name().empty() );
|
||||||
return new GHT_Ballard_Pos();
|
return new GHT_Ballard_Pos();
|
||||||
|
|
||||||
case (GHT_POSITION | GHT_SCALE):
|
case (cv::GeneralizedHough::GHT_POSITION | cv::GeneralizedHough::GHT_SCALE):
|
||||||
CV_Assert( !GHT_Ballard_PosScale_info_auto.name().empty() );
|
CV_Assert( !GHT_Ballard_PosScale_info_auto.name().empty() );
|
||||||
return new GHT_Ballard_PosScale();
|
return new GHT_Ballard_PosScale();
|
||||||
|
|
||||||
case (GHT_POSITION | GHT_ROTATION):
|
case (cv::GeneralizedHough::GHT_POSITION | cv::GeneralizedHough::GHT_ROTATION):
|
||||||
CV_Assert( !GHT_Ballard_PosRotation_info_auto.name().empty() );
|
CV_Assert( !GHT_Ballard_PosRotation_info_auto.name().empty() );
|
||||||
return new GHT_Ballard_PosRotation();
|
return new GHT_Ballard_PosRotation();
|
||||||
|
|
||||||
case (GHT_POSITION | GHT_SCALE | GHT_ROTATION):
|
case (cv::GeneralizedHough::GHT_POSITION | cv::GeneralizedHough::GHT_SCALE | cv::GeneralizedHough::GHT_ROTATION):
|
||||||
CV_Assert( !GHT_Guil_Full_info_auto.name().empty() );
|
CV_Assert( !GHT_Guil_Full_info_auto.name().empty() );
|
||||||
return new GHT_Guil_Full();
|
return new GHT_Guil_Full();
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,7 @@ GPU_TEST_P(GeneralizedHough, POSITION)
|
|||||||
templ.copyTo(imageROI);
|
templ.copyTo(imageROI);
|
||||||
}
|
}
|
||||||
|
|
||||||
cv::Ptr<cv::gpu::GeneralizedHough_GPU> hough = cv::gpu::GeneralizedHough_GPU::create(cv::GHT_POSITION);
|
cv::Ptr<cv::gpu::GeneralizedHough_GPU> hough = cv::gpu::GeneralizedHough_GPU::create(cv::GeneralizedHough::GHT_POSITION);
|
||||||
hough->set("votesThreshold", 200);
|
hough->set("votesThreshold", 200);
|
||||||
|
|
||||||
hough->setTemplate(loadMat(templ, useRoi));
|
hough->setTemplate(loadMat(templ, useRoi));
|
||||||
|
@ -27,7 +27,7 @@ int main( int, const char** )
|
|||||||
|
|
||||||
|
|
||||||
const Size2i preferredVideoFrameSize(640, 480);
|
const Size2i preferredVideoFrameSize(640, 480);
|
||||||
const string wndTitle = "NVIDIA Computer Vision :: Haar Classifiers Cascade";
|
const cv::String wndTitle = "NVIDIA Computer Vision :: Haar Classifiers Cascade";
|
||||||
|
|
||||||
|
|
||||||
static void matPrint(Mat &img, int lineOffsY, Scalar fontColor, const string &ss)
|
static void matPrint(Mat &img, int lineOffsY, Scalar fontColor, const string &ss)
|
||||||
@ -286,7 +286,7 @@ int main(int argc, const char** argv)
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
Mat gray;
|
Mat gray;
|
||||||
cvtColor((image.empty() ? frame : image), gray, CV_BGR2GRAY);
|
cvtColor((image.empty() ? frame : image), gray, cv::COLOR_BGR2GRAY);
|
||||||
|
|
||||||
//
|
//
|
||||||
// process
|
// process
|
||||||
@ -334,12 +334,12 @@ int main(int argc, const char** argv)
|
|||||||
|
|
||||||
avgTime = (Ncv32f)ncvEndQueryTimerMs(timer);
|
avgTime = (Ncv32f)ncvEndQueryTimerMs(timer);
|
||||||
|
|
||||||
cvtColor(gray, frameDisp, CV_GRAY2BGR);
|
cvtColor(gray, frameDisp, cv::COLOR_GRAY2BGR);
|
||||||
displayState(frameDisp, bHelpScreen, bUseGPU, bLargestObject, bFilterRects, 1000.0f / avgTime);
|
displayState(frameDisp, bHelpScreen, bUseGPU, bLargestObject, bFilterRects, 1000.0f / avgTime);
|
||||||
imshow(wndTitle, frameDisp);
|
imshow(wndTitle, frameDisp);
|
||||||
|
|
||||||
//handle input
|
//handle input
|
||||||
switch (cvWaitKey(3))
|
switch (cv::waitKey(3))
|
||||||
{
|
{
|
||||||
case ' ':
|
case ' ':
|
||||||
bUseGPU = !bUseGPU;
|
bUseGPU = !bUseGPU;
|
||||||
@ -372,7 +372,7 @@ int main(int argc, const char** argv)
|
|||||||
}
|
}
|
||||||
} while (!bQuit);
|
} while (!bQuit);
|
||||||
|
|
||||||
cvDestroyWindow(wndTitle.c_str());
|
cv::destroyWindow(wndTitle);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -124,12 +124,12 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
if (string(argv[i]) == "--left")
|
if (string(argv[i]) == "--left")
|
||||||
{
|
{
|
||||||
left = imread(argv[++i], CV_LOAD_IMAGE_GRAYSCALE);
|
left = imread(argv[++i], cv::IMREAD_GRAYSCALE);
|
||||||
CV_Assert(!left.empty());
|
CV_Assert(!left.empty());
|
||||||
}
|
}
|
||||||
else if (string(argv[i]) == "--right")
|
else if (string(argv[i]) == "--right")
|
||||||
{
|
{
|
||||||
right = imread(argv[++i], CV_LOAD_IMAGE_GRAYSCALE);
|
right = imread(argv[++i], cv::IMREAD_GRAYSCALE);
|
||||||
CV_Assert(!right.empty());
|
CV_Assert(!right.empty());
|
||||||
}
|
}
|
||||||
else if (string(argv[i]) == "--help")
|
else if (string(argv[i]) == "--help")
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include "opencv2/gpu/gpu.hpp"
|
#include "opencv2/gpu/gpu.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui/highgui.hpp"
|
||||||
|
#include "opencv2/highgui/highgui_c.h"
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#ifdef HAVE_CUDA
|
||||||
#include "NPP_staging/NPP_staging.hpp"
|
#include "NPP_staging/NPP_staging.hpp"
|
||||||
|
@ -93,12 +93,12 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
if (string(argv[i]) == "--left")
|
if (string(argv[i]) == "--left")
|
||||||
{
|
{
|
||||||
left = imread(argv[++i], CV_LOAD_IMAGE_GRAYSCALE);
|
left = imread(argv[++i], cv::IMREAD_GRAYSCALE);
|
||||||
CV_Assert(!left.empty());
|
CV_Assert(!left.empty());
|
||||||
}
|
}
|
||||||
else if (string(argv[i]) == "--right")
|
else if (string(argv[i]) == "--right")
|
||||||
{
|
{
|
||||||
right = imread(argv[++i], CV_LOAD_IMAGE_GRAYSCALE);
|
right = imread(argv[++i], cv::IMREAD_GRAYSCALE);
|
||||||
CV_Assert(!right.empty());
|
CV_Assert(!right.empty());
|
||||||
}
|
}
|
||||||
else if (string(argv[i]) == "--help")
|
else if (string(argv[i]) == "--help")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user