I'm starting with OpenCV in Python and I have a problem.
I have a depth image taken from a kinect camera. This image has a border whose pixel values are zero. I want to change those values to the maximum of the image (that is 2880) without using for loops.
The code until here is:
import cv2
depthImage = cv2.imread('depthImageName',cv2.IMREAD_UNCHANGED)
if depthImage.any() == 0:
depthImage = 2880
But it doesn't work and the values equal to zero remain.
Anyone who can help me?
If I've forgotten useful information, let me know.
Thanks in advance guys! :)