Back to menu command

Crop images from a video

This function allows you to crop images from a video file if the positions of the images are given. This can be useful when you work on an object tracking project: Given the video and the tracking trajectory of each object, you can get the images containing the tracked objects. Note that only videos with the Video for Windows (VFW) format are supported. The extension of a VFW video usually is "avi".
  1. In the following dialog, specify the source video file, the trajectory file and the output folder.

  2. The trajectory file is a text file containing the positions of the images that need to be cropped. Each line of the trajectory file has the following information: the object id, the frame number and bounding box (left, top, right, bottom) of the object. One example of such trajectory files is shown here.

  3. You can filter out unwanted (e.g. too small) images by specifying a lower limit on the size of the cropped images.
  4. By checking the "Discard those out of boundary" option, you can eliminate those bounding boxes that are beyond the boundary of a video frame.
  5. If you check the "Crop images in two successive frames" option, for each bounding box, VIPBase will crop a pair of images in the current frame and in the previous frame.
  6. Click the "Crop" button to start the process. Each cropped image is saved as a single file with name "xxx_yyyyyy.bmp". "xxx" is the object id and "yyyyy" is the frame number. Examples of cropped images are shown as follows.


VIPBase © 2006 Fengjun Lv
Last update: 08/01/2006 (check html)