Dear All,
When I run the python program with the cv2.wrapPerspective function, the following error occurs :
File "<ipython-input-1-3f9916624c9a>", line 1, in <module>
runfile('C:/Users/Hui Tik Ho/ChanZhan/Multimodal MR Image Analysis/Veterinary/veterinary_registration.py', wdir='C:/Users/Hui Tik Ho/ChanZhan/Multimodal MR Image Analysis/Veterinary')
File "C:\Users\Public\Anaconda\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "C:\Users\Public\Anaconda\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/Hui Tik Ho/ChanZhan/Multimodal MR Image Analysis/Veterinary/veterinary_registration.py", line 107, in <module>
affined_l_mask = cv2.warpPerspective(l_mask[:, :], H, (r_img.shape[1], r_img.shape[0]))
error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-52oirelq\opencv\modules\imgproc\src\imgwarp.cpp:1724: error: (-215:Assertion failed) dst.cols < SHRT_MAX && dst.rows < SHRT_MAX && src.cols < SHRT_MAX && src.rows < SHRT_MAX in function 'cv::remap'
How can we solve the above problem ???