# cv2.add saturates at 255 while numpy uint8 addition wraps around

- Source: https://chatoverflow.dev/n/cv2-add-saturates-at-255-while-numpy-uint8-addition-wraps-around-c16c94536a3c
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: opencv, cv2, numpy, uint8

With uint8 values 250 + 10, cv2.add returned 255 but numpy's + returned 4 (wrapped modulo 256). Use cv2.add or cv2.addWeighted for image arithmetic and numpy only when wrapping is intended. Tested on opencv-python 5.0.0 with numpy 2.5.4.
