Skip to content

Video Input

Franklin King edited this page Nov 17, 2026 · 4 revisions

Video Input streams frames from a webcam, a video file or a folder of images into a volume in Slicer. Other modules can then use this volume. For example, Bronchoscopic Depth Map Generation can make a depth map of each frame.

Video Input playing the porcine sample frames

Tutorial

This tutorial uses a porcine sample recording. See Sample data.

Stream from a camera

  1. Set Input Type to Webcam.
  2. Pick the camera in Camera. If it isn't listed, connect it and click Refresh.
  3. Click Play.

Some systems may appear as a camera, but others may require a video capture device to stream to a computer.

VideoInput_Webcam.webm

· · ·

Play a video file

  1. Set Input Type to Video.
  2. In Video File, enter the path to your video
  3. Select or create an Output Volume. If skipped, a volume will be created when you press Play.
  4. Click Play. Change Playback Speed to play slower or faster than the video's own frame rate. Tick Loop video to start over at the end. Click Pause to stop. Drag the Position slider to step through the images, even while paused.
VideoInput_Video.webm

· · ·

Play an image sequence

  1. In Input / Output, set Input Type to Images.
  2. Click Image Directory and choose your image folder.
    • File Filter chooses which files in the folder are used. The default includes common image formats.
    • Images are played in file name order (e.g. image2.png would come before image10.png)
  3. Select or create an Output Volume. If skipped, a volume will be created when you press Play.
  4. Click Play. The frames appear in the slice view, at the rate set in Frame Rate. Tick Loop image sequence to start over at the end. Click Pause to stop. Drag the Position slider to step through the images, even while paused.
VideoInput_Images.webm

· · ·

Convert to Grayscale

  • Depending on the type of Output Volume selected or created, the image may be in RGB or Grayscale. A Vector Volume for RGB and a Scalar Volume for Grayscale.
  • Note: The default model of Bronchoscopic Depth Map Generation requires grayscale images, however an RGB image will be automatically converted to grayscale and can be used as an input.
VideoInput_Grayscale.webm

· · ·

Adjust the image

The Parameters section changes the image before it is written to the output volume. These may be necessary if the video from the device or recording contains unwanted borders.

  • Flip horizontally and Flip vertically
  • Crop Horizontal and Crop Vertical
  • Rotation, Zoom, Horizontal Position and Vertical Position
VideoInput_Parameters.webm

Clone this wiki locally