资源简介
基于Matlab的行人检测程序,基于Matlab开发的用于行人检测程序代码。
代码片段和文件信息
%% Tracking Pedestrians from a Moving Car
%
% This example shows how to track pedestrians using a camera mounted in a
% moving car.
%
% Copyright 2014 The MathWorks Inc.
%% Overview
% This example shows how to perform automatic detection and tracking of
% people in a video from a moving camera. It demonstrates the flexibility
% of a tracking system adapted to a moving camera which is ideal for
% automotive safety applications. Unlike the stationary camera
% example sed-multiple-object-tracking.html The Motion-based
% Multiple object Tracking> this example contains several additional
% algorithmic steps. These steps include people detection customized
% non-maximum suppression and heuristics to identify and eliminate false
% alarm tracks. For more information please see
% jectTracking‘) Multiple object Tracking>.
%
% This example is a function with the main body at the top and helper
% routines in the form of
%
% below.
function PedestrianTrackingFromMovingCameraExample()
% Create system objects used for reading video loading prerequisite data file detecting pedestrians and displaying the results.
videoFile = ‘vippedtracking.avi‘;
scaleDataFile = ‘pedScaleTable.mat‘; % An auxiliary file that helps to determine the size of a pedestrian at different pixel locations.
obj = setupSystemobjects(videoFile scaleDataFile);
% Create an empty array of tracks.
tracks = initializeTracks();
% ID of the next track.
nextId = 1;
% Set the global parameters.
option.ROI = [12401280480]; % A rectangle [x y w h] that limits the processing area to ground locations.
option.scThresh = 0.3; % A threshold to control the tolerance of error in estimating the scale of a detected pedestrian.
option.gatingThresh = 0.9; % A threshold to reject a candidate match between a detection and a track.
option.gatingCost = 100; % A large value for the assignment cost matrix that enforces the rejection of a candidate match.
option.costOfNonAssignment = 10; % A tuning parameter to control the likelihood of creation of a new track.
option.timeWindowSize = 16; % A tuning parameter to specify the number of frames required to stabilize the confidence score of a track.
option.confidenceThresh = 2; % A threshold to determine if a track is true positive or false alarm.
option.ageThresh = 8; % A threshold to determine the minimum length required for a track being true positive.
option.visThresh = 0.6; % A threshold to determine the minimum visibility value for a track being true positive.
% Detect people and track them across video frames.
cont = ~isDone(obj.read
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 26118 2015-04-24 16:37 PedestrianTrackingFromMovingCameraExample.m
- 上一篇:直流双闭环调速控制系统仿真和实践
- 下一篇:用单片机定时器和数码管实现的电子时钟
评论
共有 条评论