40 #include <pcl/pcl_exports.h>
42 #include <pcl/point_cloud.h>
48 #include <cuda_runtime_api.h>
50 #include "NCVHaarObjectDetection.hpp"
61 using Ptr = shared_ptr<FaceDetector>;
62 using ConstPtr = shared_ptr<const FaceDetector>;
73 std::vector<HaarStage64> &haar_stages,
74 std::vector<HaarClassifierNode128> &haarClassifierNodes,
75 std::vector<HaarFeature64> &haar_features);
80 std::vector<HaarStage64> &haar_stages,
81 std::vector<HaarClassifierNode128> &haarClassifierNodes,
82 std::vector<HaarFeature64> &haar_features);
93 Ncv32u &numNodes, Ncv32u &numFeatures);
105 cudaDeviceProp &device_properties,
108 NcvBool bFilterRects=
false,
109 NcvBool bLargestFace=
true);
121 largest_object_ = largest_object;
126 return largest_object_;
155 return cascade_file_name_;
161 cascade_file_name_ = cascadeFileName;
169 bool largest_object_;
173 cudaDeviceProp cuda_dev_prop_;
175 std::string cascade_file_name_;
INCVMemAllocator (Interface)
NCVStatus ncvHaarGetClassifierSize(const std::string &filename, Ncv32u &numStages, Ncv32u &numNodes, Ncv32u &numFeatures)
static NCVStatus loadFromNVBIN(const std::string &filename, HaarClassifierCascadeDescriptor &haar, std::vector< HaarStage64 > &haar_stages, std::vector< HaarClassifierNode128 > &haarClassifierNodes, std::vector< HaarFeature64 > &haar_features)
bool getLargestObject() const
void process(pcl::PointCloud< pcl::RGB > &cloud, pcl::PointCloud< pcl::Intensity32u > &cloud_out)
Process step, this wraps the Nvidia code.
int getDeviceId() const
Get the cuda GPU device id in use.
std::string getCascadeFileName() const
FaceDetector(int cols, int rows)
This is the constructor.
void setLargestObject(bool largest_object)
largest object sets return configuration
void setDeviceId(int id)
Set the cuda GPU to use.
shared_ptr< FaceDetector > Ptr
void setCascadeFileName(std::string cascadeFileName)
int configure(std::string cascade_file_name)
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)
NCVStatus loadFromXML2(const std::string &filename, HaarClassifierCascadeDescriptor &haar, std::vector< HaarStage64 > &haar_stages, std::vector< HaarClassifierNode128 > &haarClassifierNodes, std::vector< HaarFeature64 > &haar_features)
shared_ptr< const FaceDetector > ConstPtr
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.
Defines functions, macros and traits for allocating and using memory.
Classifier cascade descriptor.