Extracting HoG Features using OpenCV

前端 未结 4 541
醉话见心
醉话见心 2020-12-12 11:09

I am trying to extract features using OpenCV\'s HoG API, however I can\'t seem to find the API that allow me to do that.

What I am trying to do is to extract feature

4条回答
  •  萌比男神i
    2020-12-12 11:54

    Here is GPU version as well.

    cv::Mat temp;
    gpu::GpuMat gpu_img, descriptors;
    
    cv::gpu::HOGDescriptor gpu_hog(win_size, Size(16, 16), Size(8, 8), Size(8, 8), 9,
                                   cv::gpu::HOGDescriptor::DEFAULT_WIN_SIGMA, 0.2, gamma_corr,
                                   cv::gpu::HOGDescriptor::DEFAULT_NLEVELS);
    gpu_img.upload(img);
    gpu_hog.getDescriptors(gpu_img, win_stride, descriptors, cv::gpu::HOGDescriptor::DESCR_FORMAT_ROW_BY_ROW);
                descriptors.download(temp);
    

提交回复
热议问题