How to plot bounding boxes for a person in a video frame?
Mostra commenti meno recenti
I have managed to read in a video file frame by frame. I have also read in the csv file as can be seen above. Each record of the csv file contains values that tag each person in the video, the number of the frame and the box coordinates of the body of the person.
I would like to plot the body bounding boxes for each person in each video frame, overlaid atop the video data. How would i plot this data?
infile = ['baseballField.avi'];
readerobj=VideoReader(infile);
groundtruth = csvread('baseballField-groundtruth.top');
for i=1:2:20
vidframe=read(readerobj,i);
imshow(vidframe);
drawnow
end
Risposte (1)
Chad Greene
il 3 Apr 2016
If you have the bounding box coordinates in terms of rows and columns of pixels, you can simply use plot to plot the bounding box:
plot(cols,rows)
Categorie
Scopri di più su Audio and Video Data in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!