Skip to content

Commit

Permalink
fixed camera sample
Browse files Browse the repository at this point in the history
  • Loading branch information
dusty-nv committed Jun 25, 2019
1 parent 588086a commit c94a424
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/examples/camera-viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@

parser.add_argument("--width", type=int, default=1280, help="desired width of camera stream (default is 1280 pixels)")
parser.add_argument("--height", type=int, default=720, help="desired height of camera stream (default is 720 pixels)")
parser.add_argument("--camera", type=string, default=None, help="index of the MIPI CSI camera to use (NULL for CSI camera 0), or for VL42 cameras the /dev/video node to use (e.g. /dev/video0). By default, MIPI CSI camera 0 will be used.")
parser.add_argument("--camera", type=str, default="0", help="index of the MIPI CSI camera to use (NULL for CSI camera 0), or for VL42 cameras the /dev/video node to use (e.g. /dev/video0). By default, MIPI CSI camera 0 will be used.")

opt = parser.parse_args()
print(opt)

# create display window
display = jetson.utils.glDisplay("Camera Viewer")
display = jetson.utils.glDisplay()

# create camera device
camera = jetson.utils.gstCamera(opt.width, opt.height, opt.camera)
Expand All @@ -48,7 +48,7 @@
while display.IsOpen():
image, width, height = camera.CaptureRGBA()
display.RenderOnce(image, width, height)
display.SetTitle("{:s} | {:d}x{:d} | {:.0f} FPS".format(opt.title, width, height, display.GetFPS()))
display.SetTitle("{:s} | {:d}x{:d} | {:.0f} FPS".format("Camera Viewer", width, height, display.GetFPS()))

# close the camera
camera.Close()
Expand Down

0 comments on commit c94a424

Please sign in to comment.