资源简介

动作识别 势估计c++和matlab经过测试能够运行

资源截图

代码片段和文件信息

function DetectAndEstimDir(img_dirpffubfmodel_pathfacemodel_pathdet_parsclassnamefghigh_parsparse_parsaddinf_parssegm_parsverbose)
    Files = dir(img_dir);
    invalid = false(length(Files)1);
    Regularexpression = ‘(\w+\.(jpg)|(jpeg)|(gif)|(bmp)|(png)|(ppm))$‘;
    for i=1:numel(Files)
      invalid(i) = isempty(regexpi(Files(i).name Regularexpression));
    end
    Files(invalid) = [];
    
    %parse_pars.use_fg_high = false % uncomment this line if you want to skip the foreground highlighting stage
 
    for idx=1:numel(Files);
      
      stick_coor = cell(0);
      T = struct(‘D‘{} ‘FGH‘{} ‘PM‘{}‘CM‘{});

      
      [trashimgnameimgext] = fileparts(Files(idx).name);
      outname_mat = fullfile(img_dir[imgname imgext ‘_‘ classname ‘_pms.mat‘]);
      if exist(outname_mat‘file‘)
        continue;
      end
      
      detections = DetectStillImage(fullfile(img_dirFiles(idx).name)pffubfmodel_pathfacemodel_pathdet_parsverbose);
      
      if ~isempty(detections)
        %convert coordinates from [x y width height] to [x1 y1 x2 y2]
        detections(:3:4) = detections(:3:4) - detections(:1:2) +1;

        img_name_format = [imgname ‘_%d‘ imgext];
        temp_dir = ‘temp‘;
        if ~exist(fullfile(img_dirtemp_dir)‘dir‘)
          mkdir(fullfile(img_dirtemp_dir));
        end
        dets_dir = ‘dets‘;
        if ~exist(fullfile(img_dirdets_dir)‘dir‘)
          mkdir(fullfile(img_dirdets_dir));
        end

        img = imread(fullfile(img_dirFiles(idx).name));

        for dix=1:size(detections1) % run pose estimation for every detection
          imwrite(imgfullfile(img_dirtemp_dirsprintf(img_name_formatdix)));
          [T(dix) stick_coor{dix}] = PoseEstimStillImage(img_dirtemp_dirimg_name_formatdix classname round(detections(dix1:4)‘) fghigh_pars parse_pars addinf_pars segm_pars verbose);
          delete(fullfile(img_dirtemp_dirsprintf(img_name_formatdix)));
        end
        
        if ~isempty(detections)
          for d=1:size(detections1)
            img = PaintBB(imground(detections(d1:4))[1 0 0][1 2 3]);
          end
        end
        detfile = fullfile(img_dirdets_dir[imgname ‘_d‘ imgext]);
        imwrite(imgdetfile);
      end
      save(outname_mat‘T‘‘stick_coor‘‘detections‘);

    end
end

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

     文件       2330  2011-01-07 23:01  pose_estimation_code_release_v1.21\code\DetectAndEstimDir.m

     文件     573516  2011-01-07 22:17  pose_estimation_code_release_v1.21\code\env.mat

     文件      25678  2014-06-23 11:08  pose_estimation_code_release_v1.21\code\fghigh_full\000001.jpg

     文件      40324  2014-06-23 11:07  pose_estimation_code_release_v1.21\code\fghigh_ubf\000000.jpg

     文件      39465  2014-06-27 16:56  pose_estimation_code_release_v1.21\code\fghigh_ubf\000005.jpg

     文件      35904  2010-04-15 20:12  pose_estimation_code_release_v1.21\code\images\000000.jpg

     文件      19768  2011-01-07 21:55  pose_estimation_code_release_v1.21\code\images\000001.jpg

     文件     365169  2010-10-02 02:26  pose_estimation_code_release_v1.21\code\images\000002.jpg

     文件     102980  2014-06-27 16:49  pose_estimation_code_release_v1.21\code\images\000005.JPG

     文件        856  2010-04-15 20:12  pose_estimation_code_release_v1.21\code\installmex.m

     文件      21277  2011-01-07 20:00  pose_estimation_code_release_v1.21\code\peopleFullBodyPostCVPR09frontTorsoW14Tighter.mat

     文件      14872  2010-04-15 20:12  pose_estimation_code_release_v1.21\code\peopleUpperBodyPostCVPR09frontTorsoW14Tighter.mat

     文件       2444  2011-01-07 23:29  pose_estimation_code_release_v1.21\code\PoseEstimStillImage.m

     文件      26365  2014-06-23 11:08  pose_estimation_code_release_v1.21\code\poses_full\000001.jpg

     文件      40991  2014-06-23 11:07  pose_estimation_code_release_v1.21\code\poses_ubf\000000.jpg

     文件      39018  2014-06-27 16:56  pose_estimation_code_release_v1.21\code\poses_ubf\000005.jpg

     文件      23756  2014-06-23 11:08  pose_estimation_code_release_v1.21\code\segms_full\000001.jpg

     文件      38829  2014-06-23 11:07  pose_estimation_code_release_v1.21\code\segms_ubf\000000.jpg

     文件      39948  2014-06-27 16:56  pose_estimation_code_release_v1.21\code\segms_ubf\000005.jpg

     文件       1754  2014-05-20 10:20  pose_estimation_code_release_v1.21\code\ShowParseResult.m

     文件        296  2014-05-18 19:56  pose_estimation_code_release_v1.21\code\ShowRespIm.m

     文件         78  2010-04-15 20:12  pose_estimation_code_release_v1.21\code\startup.m

     文件        471  2010-11-19 19:59  pose_estimation_code_release_v1.21\code\utils\align_respIm.m

     文件        168  2010-11-19 19:59  pose_estimation_code_release_v1.21\code\utils\applyCMTransfer.m

     文件        414  2010-11-19 19:59  pose_estimation_code_release_v1.21\code\utils\bbs2mask.m

     文件       9274  2010-11-19 21:15  pose_estimation_code_release_v1.21\code\utils\block.h

     文件       3286  2010-11-19 19:59  pose_estimation_code_release_v1.21\code\utils\buildHistExps.m

     文件        714  2010-11-19 19:59  pose_estimation_code_release_v1.21\code\utils\buildLimbMap.m

     文件        114  2010-11-19 19:59  pose_estimation_code_release_v1.21\code\utils\bwoutlines.m

     文件       1886  2010-11-23 17:27  pose_estimation_code_release_v1.21\code\utils\calcCM.m

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

评论

共有 条评论