Open
Description
System information (version)
- OpenCV => :4.5:
- Operating System / Platform => :ubuntu 18.04:
- Compiler => :cmake(gcc):
Detailed description
It seems cuda.warpPerspective
only surpport INTER_NEAREST
,INTER_LINEAR
and INTER_CUBIC
, will it surpport INTER_AREA
in the future? Those three interpolation methods have serious aliasing problem, but in CPU version INTER_AREA
works well.
I found that cuda::resize already surpport INTER_AREA. Is there any difficulty for warpPerspective to do so?
Sample code:
cuda.resize already surpported INTER_AREA.
img_g_2=cv2.cuda.resize(img_gpu,None,fx=0.5,fy=0.5,interpolation=cv2.INTER_AREA)
cuda.warpPerspective not surpport INTER_AREA.
dst=cv2.cuda.warpPerspective(img_gpu,warpMat,(440,220),flags=cv2.INTER_AREA )
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
cv2.error: OpenCV(4.5.1) /home/ubuntu/Downloads/opencv_contrib-4.5.1/modules/cudawarping/src/warp.cpp:332: error: (-215:Assertion failed) interpolation == INTER_NEAREST || interpolation == INTER_LINEAR || interpolation == INTER_CUBIC in function 'warpPerspective'
Steps to reproduce
Issue submission checklist
- I report the issue, it's not a question
- [√ ] I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution - [√ ] I updated to latest OpenCV version and the issue is still there
- [√ ] There is reproducer code and related data files: videos, images, onnx, etc