L4T Multimedia API Reference

27.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Camera CAFFE Sample


The camera with CAFFE object identification sample demonstrates how to capture the image from the camera, convert the data through NvVideoConverter without memory copy, feed the memory pointer to OpenCV, and run CAFFE model zoo for the object identication algorithm.

This sample adds zoo object identification into part of the consumer thread. This is achieved via the opencv_img_processing() function invoked by the capture plane callback. The code is located under opencv_consumer_lib to integrate deep learning function as a sample. Frame rate is not part of the key consideration.

Additional Details

CAFFE object identication uses OpenCV Mat as the input and output structure. For more information, see:


Before running the sample, you must have the following:

  • README that provides details on the environment requirements to build and run the sample
  • A working camera module

Key Structure and Classes

The struct context_t global structure manages all of the resources in the application.

The NvVideoConverter class packages all video converting related elements and functions. The sample uses the following key members:

NvVideoConverter Description
output_plane Specifies the output plane.
capture_plane Specifies the capture plane.
waitForIdle -
setOutputPlaneFormat Sets the output plane format.
setCapturePlaneFormat Sets the capture plane format.