Skip to content

Instantly share code, notes, and snippets.

@iKrishneel
iKrishneel / opencv-3.1-tx1.sh
Created March 17, 2016 04:12
script to install opencv-3.1 on Nvidia-Tx1
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install libopencv-dev build-essential checkinstall cmake pkg-config yasm libtiff4-dev libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils doxygen git
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg
git clone https://github.com/Itseez/opencv
@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;