• 大小: 2.52MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-22
  • 语言: 其他
  • 标签: 行人检测  hog  

资源简介

行人检测程序,利用hog进行行人检测,包含训练及检测

资源截图

代码片段和文件信息

/*
 * =====================================================================================
 *
 *       Filename:  classify_rhog.cpp
 *
 *    Description:  Provides functionality to detect objects which are
 *    described by dense RHOG descriptors and learned via linear SVMs.
 *
 *    Can optionally perform non-maximum suppression 
 *
 *        Version:  1.0
 *        Created:  Monday 11 June 2007 03:41:37  IST IST
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Navneet Dalal
 *        Company:  Lear / INRIA.
 *
 * =====================================================================================
 */
#include “BoostDefines.hpp“
#include “windetectmain.h“
#include 

int classify_rhogmain(int argc char** argv) {
    using namespace std;
    lear::Cmdline cmdline;


    WinDetectClassifyMain windetectmain;
    RHOGDenseMain rhogdensemain;

    WinDetectClassify windetect;
    {  // cmdline
        cmdline.commandName(“classify_rhog“);
        cmdline.version(“0.0.1“ “Author: Navneet Dalal “
                “(mailto: Navneet.Dalal@inrialpes.fr)“);
        cmdline.brief(
“Compute HOG features and classify objects in image(s)“);

        cmdline.description(
“For all windows at all scales in the image compute HOG features and classify each window as positive or negative class“);

        // set command line options. The statement below will fill up usage and code for reading various command line options
        windetectmain.setCommonMainParam(cmdline &windetect) ;
        windetectmain.setClassifyParam(cmdline&windetect);
        rhogdensemain.setRHOGDenseParam(cmdline) ;
    }

    int status = cmdline.parse(argc argv);
    if (status != cmdline.ok)
        return status;

    if (!windetectmain.imageext.empty() && windetectmain.imageext[0] != ‘.‘)
        windetectmain.imageext = ‘.‘ + windetectmain.imageext;

    // now set options read from command line 
    windetectmain.fill(&windetect);

    std::vector desc = rhogdensemain.fill();
    windetect.init(desc); 
    for (unsigned i= 0; i< desc.size(); ++i) 
        delete desc[i];

    try {
        LinearClassify* classifier = NULL;
        if (windetectmain.modelfile == “defaultperson“)
            classifier = new LinearClassify();
        else 
            classifier = new LinearClassify(windetectmain.modelfile windetect.verbose);

        try {
            WinDetectDump::PathVector inlist;
            lear::imagelist(inlist windetectmain.infile windetectmain.imageext);
            windetect.runImageSlider(*classifier inlist windetectmain.outfile
                    windetectmain.outimage windetectmain.outhist
                    windetectmain.falsetxt windetectmain.testlocs
                    );
        }catch (std::exception& e) {
            delete classifier;
            throw e;
        }
        delete classifier;
    } catch(std::exception& e) {
        cerr << “Caught “<< e.what() << endl;
      

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     152410  2010-02-27 16:59  PedestrianDetectionHoG\debug\blitz_d.lib

     文件      49152  2010-03-02 15:19  PedestrianDetectionHoG\debug\boost_date_time-vc80-mt-1_34_1.dll

     文件      77824  2010-03-02 15:14  PedestrianDetectionHoG\debug\boost_date_time-vc80-mt-gd-1_34_1.dll

     文件      65536  2010-03-02 15:19  PedestrianDetectionHoG\debug\boost_filesystem-vc80-mt-1_34_1.dll

     文件      94208  2010-03-02 15:13  PedestrianDetectionHoG\debug\boost_filesystem-vc80-mt-gd-1_34_1.dll

     文件     180224  2010-03-02 15:19  PedestrianDetectionHoG\debug\boost_graph-vc80-mt-1_34_1.dll

     文件     458752  2010-03-02 15:14  PedestrianDetectionHoG\debug\boost_graph-vc80-mt-gd-1_34_1.dll

     文件      25600  2010-03-02 15:19  PedestrianDetectionHoG\debug\boost_iostreams-vc80-mt-1_34_1.dll

     文件      49152  2010-03-02 15:14  PedestrianDetectionHoG\debug\boost_iostreams-vc80-mt-gd-1_34_1.dll

     文件      20992  2010-03-02 15:21  PedestrianDetectionHoG\debug\boost_prg_exec_monitor-vc80-mt-1_34_1.dll

     文件      27648  2010-03-02 15:16  PedestrianDetectionHoG\debug\boost_prg_exec_monitor-vc80-mt-gd-1_34_1.dll

     文件     237568  2010-03-02 15:19  PedestrianDetectionHoG\debug\boost_program_options-vc80-mt-1_34_1.dll

     文件     385024  2010-03-02 15:14  PedestrianDetectionHoG\debug\boost_program_options-vc80-mt-gd-1_34_1.dll

     文件     552960  2010-03-02 15:20  PedestrianDetectionHoG\debug\boost_regex-vc80-mt-1_34_1.dll

     文件    1204224  2010-03-02 15:15  PedestrianDetectionHoG\debug\boost_regex-vc80-mt-gd-1_34_1.dll

     文件     217088  2010-03-02 15:20  PedestrianDetectionHoG\debug\boost_serialization-vc80-mt-1_34_1.dll

     文件     507904  2010-03-02 15:15  PedestrianDetectionHoG\debug\boost_serialization-vc80-mt-gd-1_34_1.dll

     文件      61440  2010-03-02 15:21  PedestrianDetectionHoG\debug\boost_signals-vc80-mt-1_34_1.dll

     文件     106496  2010-03-02 15:16  PedestrianDetectionHoG\debug\boost_signals-vc80-mt-gd-1_34_1.dll

     文件      53248  2010-03-02 15:22  PedestrianDetectionHoG\debug\boost_thread-vc80-mt-1_34_1.dll

     文件     102400  2010-03-02 15:12  PedestrianDetectionHoG\debug\boost_thread-vc80-mt-gd-1_34_1.dll

     文件     208896  2010-03-02 15:21  PedestrianDetectionHoG\debug\boost_unit_test_framework-vc80-mt-1_34_1.dll

     文件     483328  2010-03-02 15:16  PedestrianDetectionHoG\debug\boost_unit_test_framework-vc80-mt-gd-1_34_1.dll

     文件     462848  2010-03-02 15:22  PedestrianDetectionHoG\debug\boost_wave-vc80-mt-1_34_1.dll

     文件     966656  2010-03-02 15:14  PedestrianDetectionHoG\debug\boost_wave-vc80-mt-gd-1_34_1.dll

     文件     159744  2010-03-02 15:21  PedestrianDetectionHoG\debug\boost_wserialization-vc80-mt-1_34_1.dll

     文件     335872  2010-03-02 15:16  PedestrianDetectionHoG\debug\boost_wserialization-vc80-mt-gd-1_34_1.dll

     文件    1241088  2010-03-02 16:04  PedestrianDetectionHoG\debug\PedestrianDetectionHoG_NET2005.exe

     文件     176128  2010-03-02 15:17  PedestrianDetectionHoG\debug\svm_light_dalal.exe

     文件     262971  2008-03-13 22:12  PedestrianDetectionHoG\PedestrianDetectionHoG_NET2005\aclocal.m4

............此处省略248个文件信息

评论

共有 条评论