Back to menu command

Compute video gradient

This function allows you to compute the gradient of a video. 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 input video, the output video, the first and the last frame of the segment you want to process. If you want to process the whole input sequence and don't know the exact length of the sequence, just set a very large number as the last frame.

  2. Specify the weight of each component. VIPBase computes gradient in horizontal, vertical and temporal direction and the final value at each pixel is the weighted sum of these three components.
  3. You can select which channel the function should apply to. It can be the intensity, R, G, B channel or the max of (R,G,B).
  4. For each pixel in the result video, if its final gradient value is lower than the threshold specified in the output settings, the value is set to 0; otherwise, it is increased by the value specified in the "Brightness gain" box.
  5. Click the "Get gradient" button to start the process.

    The following figure shows some frames with computed gradient. Notice the difference between this function and the edge detection algorithm. This function considers not only the spatial but also the temporal gradient. The edges on the ground plane are largely eliminated because we assign more weight to the temporal gradient.

  6. This function can run in batch mode. Check the "Batch mode" and specify the input folder and the output folder (instead of the input video and the output video).

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