Table of Contents

OpenCV

Install

pip install opencv-python
python
import cv2

Troubleshooting - Missing libGL

## Traceback (most recent call last):
## ImportError: libGL.so.1: cannot open shared object file: No such file or directory
sudo apt install libgl1

Sample

Reading 8-bit/16-bit TIFF

https://stackoverflow.com/questions/10969585/opencv-reading-a-16-bit-grayscale-image

## 8-bit
img = cv2.imread(img_file)

## 16-bit
img = cv2.imread(img_file, -1)

Look-Up Table (LUT)

https://pystyle.info/opencv-tone-transform/

References

https://opencv.org/
https://docs.opencv.org/