Skip to content

Instantly share code, notes, and snippets.

@denguir
denguir / yuv-crop.md
Last active August 18, 2024 10:50
Roi crop from YUV image

Roi crop from YUV image

About YUV

See: https://gist.github.com/Jim-Bar/3cbba684a71d1a9d468a6711a6eddbeb

Here we focus on implementing YUV cropping for I420 images. In term of speed, it appears that YUV cropping is legit when the image resolution is very high, otherwise just cvtColor then crop.

Compile with opencv

g++ -std=c++17 yuv_crop.cpp -o yuv_crop `pkg-config --cflags --libs opencv4`

@denguir
denguir / cuda_install.md
Last active August 28, 2025 08:16
Installation procedure for CUDA / cuDNN / TensorRT

How to install CUDA / cuDNN / TensorRT on Ubuntu

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation