主要内容

本页采用了机器翻译。点击此处可查看英文原文。

跟踪目标和估计运动

跟踪多个目标、跟踪特征点、目标重识别 (ReID)、光流和模板匹配

运动估计和跟踪是活动识别、交通监控、汽车安全和监督等许多计算机视觉应用中的关键活动。

Computer Vision Toolbox™ 提供视频跟踪算法,如连续自适应均值漂移 (CAMShift) 和 Kanade-Lucas-Tomasi (KLT)。您可以使用这些算法来跟踪单个目标,也可将其用作更复杂的跟踪系统中的构建块。工具箱还提供了一个多目标跟踪框架,其中包括卡尔曼滤波器,以及将目标检测分配到跟踪的匈牙利算法。

运动估计是确定块在相邻视频帧之间的运动的过程。此工具箱包括运动估计算法,如光流、块匹配和模板匹配。这些算法用于创建运动向量,这些运动向量可与整个图像、块、任意补片或单个像素相关。对于块和模板匹配,寻找最佳匹配项的评估度量包括均方误差 (MSE)、均值绝对偏差 (MAD)、最大绝对差 (MaxAD)、绝对差之和 (SAD) 以及平方差之和 (SSD)。

函数

全部展开

vision.BinaryFileReaderRead video data from binary files
vision.BinaryFileWriterWrite binary video data to files
vision.DeployableVideoPlayerDisplay video
vision.VideoPlayer播放视频或显示图像
vision.VideoFileWriterWrite video frames and audio samples to video file
VideoReader创建对象以读取视频文件
assignDetectionsToTracksAssign detections to tracks for multiobject tracking
bbox2pointsConvert rectangle to corner points list
configureKalmanFilterCreate Kalman filter for object tracking
vision.KalmanFilterCorrection of measurement, state, and state estimation error covariance
vision.HistogramBasedTrackerHistogram-based object tracking
vision.PointTrackerTrack points in video using Kanade-Lucas-Tomasi (KLT) algorithm
vision.BlockMatcherEstimate motion between images or video frames
vision.TemplateMatcherLocate template in image
reidentificationNetworkRe-identification deep learning network for re-identifying and tracking objects (自 R2024a 起)
extractReidentificationFeaturesExtract object re-identification (ReID) features from image (自 R2024a 起)
trainReidentificationNetworkTrain re-identification (ReID) deep learning network (自 R2024a 起)
evaluateReidentificationNetworkEvaluate re-identification network using cumulative matching characteristic (CMC) and mean average precision (mAP) metrics (自 R2024a 起)
reidentificationMetricsRe-identification (ReID) quality metrics (自 R2024a 起)
opticalFlowObject for storing optical flow matrices
opticalFlowRAFTEstimate optical flow using RAFT deep learning algorithm (自 R2024b 起)
opticalFlowFarneback用于基于 Farneback 方法估计光流的对象
opticalFlowHSObject for estimating optical flow using Horn-Schunck method
opticalFlowLK用于基于 Lucas-Kanade 方法估计光流的对象
opticalFlowLKDoGObject for estimating optical flow using Lucas-Kanade derivative of Gaussian method
vision.BlockMatcherEstimate motion between images or video frames
vision.TemplateMatcherLocate template in image
insertMarkerInsert markers in image or video
insertShape在图像或视频中插入图形
insertObjectAnnotationAnnotate truecolor or grayscale image or video
insertText在图像或视频中插入文字
imshow显示图像
imshowpair比较图像之间的差异

主题

精选示例

教学资源