isl-org / MiDaS

Code for robust monocular depth estimation described in "Ranftl et. al., Towards Robust Monocular Depth Estimation: Mixing Datasets for Zero-shot Cross-dataset Transfer, TPAMI 2022"
MIT License
4.25k stars 597 forks source link

module 'cv2.cv2' has no attribute 'COLORMAP_INFERNO' #249

Open zhu-228 opened 8 months ago

zhu-228 commented 8 months ago

Hi, I ran the code today and found that it reported the following error, the following error was reported, in utils.py line 195 in the code out = cv2.applyColorMap(np.uint8(out), cv2.COLORMAP_INFERNO) the error was reported as module 'cv2.cv2' has no attribute 'COLORMAP_INFERNO' I changed it to out = cv2.applyColorMap(np.uint8(out), cv2.COLORMAP_JET) and it doesn't report error. But the output image color changed. How to solve it?