Skip to content

Instantly share code, notes, and snippets.

View Alexey-Kamenev's full-sized avatar

Alexey Kamenev Alexey-Kamenev

  • NVIDIA
  • San Diego, CA
View GitHub Profile
@Alexey-Kamenev
Alexey-Kamenev / jetson_usb_cam.cpp
Created October 20, 2016 17:51
Jetson inference - external USB camera
// -------------
// in gstCamera.cpp, gstCamera::buildLaunchStr():
ss << "v4l2src device=\"/dev/video1\" ! video/x-raw, width=(int)" << mWidth << ", height=(int)" << mHeight << ", format=(string)YUY2 ! appsink name=mysink";
// -------------
// in gstCamera.cpp, gstCamera::ConvertRGBA:
if(CUDA_FAILED(cudaYUYVToRGBAf((uchar2*)input, (float4*)mRGBA, mWidth, mHeight)))
return false;