39 #include <pcl/pcl_exports.h> 41 #include <pcl/point_cloud.h> 43 #include <boost/shared_ptr.hpp> 47 #include <cuda_runtime_api.h> 49 #include "NCVHaarObjectDetection.hpp" 60 using Ptr = boost::shared_ptr<FaceDetector>;
61 using ConstPtr = boost::shared_ptr<const FaceDetector>;
72 std::vector<HaarStage64> &haar_stages,
73 std::vector<HaarClassifierNode128> &haarClassifierNodes,
74 std::vector<HaarFeature64> &haar_features);
79 std::vector<HaarStage64> &haar_stages,
80 std::vector<HaarClassifierNode128> &haarClassifierNodes,
81 std::vector<HaarFeature64> &haar_features);
92 Ncv32u &numNodes, Ncv32u &numFeatures);
104 cudaDeviceProp &device_properties,
107 NcvBool bFilterRects=
false,
108 NcvBool bLargestFace=
true);
111 configure (std::string cascade_file_name);
120 largest_object_ = largest_object;
125 return largest_object_;
154 return cascade_file_name_;
160 cascade_file_name_ = cascadeFileName;
168 bool largest_object_;
172 cudaDeviceProp cuda_dev_prop_;
174 std::string cascade_file_name_;
NCVStatus loadFromXML2(const std::string &filename, HaarClassifierCascadeDescriptor &haar, std::vector< HaarStage64 > &haar_stages, std::vector< HaarClassifierNode128 > &haarClassifierNodes, std::vector< HaarFeature64 > &haar_features)
void setLargestObject(bool largest_object)
largest object sets return configuration
This file defines compatibility wrappers for low level I/O functions.
bool getLargestObject() const
boost::shared_ptr< const FaceDetector > ConstPtr
void setCascadeFileName(std::string cascadeFileName)
void process(pcl::PointCloud< pcl::RGB > &cloud, pcl::PointCloud< pcl::Intensity32u > &cloud_out)
Process step, this wraps the Nvidia code.
Classifier cascade descriptor.
std::string getCascadeFileName() const
NCVStatus ncvHaarLoadFromFile_host(const std::string &filename, HaarClassifierCascadeDescriptor &haar, NCVVector< HaarStage64 > &h_haar_stages, NCVVector< HaarClassifierNode128 > &h_haar_nodes, NCVVector< HaarFeature64 > &h_haar_features)
Defines all the PCL implemented PointT point type structures.
NCVStatus ncvHaarGetClassifierSize(const std::string &filename, Ncv32u &numStages, Ncv32u &numNodes, Ncv32u &numFeatures)
INCVMemAllocator (Interface)
int getDeviceId()
Get the cuda GPU device id in use.
FaceDetector(int cols, int rows)
This is the constructor.
static NCVStatus loadFromNVBIN(const std::string &filename, HaarClassifierCascadeDescriptor &haar, std::vector< HaarStage64 > &haar_stages, std::vector< HaarClassifierNode128 > &haarClassifierNodes, std::vector< HaarFeature64 > &haar_features)
NCVStatus NCVprocess(pcl::PointCloud< pcl::RGB > &cloud_in, pcl::PointCloud< pcl::Intensity32u > &cloud_out, HaarClassifierCascadeDescriptor &haar, NCVVector< HaarStage64 > &d_haar_stages, NCVVector< HaarClassifierNode128 > &d_haar_nodes, NCVVector< HaarFeature64 > &d_haar_features, NCVVector< HaarStage64 > &h_haar_stages, INCVMemAllocator &gpu_allocator, INCVMemAllocator &cpu_allocator, cudaDeviceProp &device_properties, Ncv32u width=640, Ncv32u height=480, NcvBool bFilterRects=false, NcvBool bLargestFace=true)
int configure(std::string cascade_file_name)
boost::shared_ptr< FaceDetector > Ptr
void setDeviceId(int id)
Set the cuda GPU to use.