目录
1.opencv读红外图的话,读取方式 unchanged,值为-1,
1.opencv读红外图的话,读取方式 unchanged,值为-1,
import numpy as np
import cv2
img0 = cv2.imread(path,-1) # BGR
img0=(img0/4).astype(np.uint8)
img0=cv2.cvtColor(img0,cv2.COLOR_GRAY2BGR)
img=(img/4).astype(np.uint8)
python读深度图:
import numpy as np
import cv2
image_name=r'.\1648091906172_depth.raw.png'
tmp_img = cv2.imread(image_name, cv2.IMREAD_UNCHANGED)
img0 = cv2.imread(image_name,-1) # BGR
img0=(img0/40).astype(np.uint8)
img0=cv2.cvtColor(img0,cv2.COLOR_GRAY2BGR)
cv2.imshow("asdf",img0)
cv2.waitKey()
<