Alternative to cv2.warpPerspective
@AleksandrPanov 已经在做这个了。
开始于 2021年10月8日。
评估
这个 Issue 还没有评估数据。
描述
Expected behaviour
I use OpenCV to register bio-medical images, but these images are really big.
I'm able to extract features and compute the homography H, and then I use cv2.warpPerspective to compute the final image.
warped_img = cv2.warpPerspective(image, H, (width, height), borderMode=cv2.BORDER_CONSTANT, borderValue=0)
Actual behaviour
But when width or height is bigger than 32767, then I get the following error.
cv2.error: OpenCV(4.5.1) /tmp/pip-req-build-s8zh4qlk/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 'remap'
I took a look online, and I found out that is a hard limitation because of the short encoding used to improve warpPerspective .
Is there a workaround to lift such limitation?
If no, is there a solution using another library to replace cv2.warpPerspective?
- 主要语言
- Python
- 星标
- 5.4k
- 派生
- 1k
- 平均合并
- 22 小时 17 分钟
- 30 天内合并 PR
- 3
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
opencv/opencv-python 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
opencv/opencv-python#1217 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
opencv/opencv-python#1165 · 2 条评论 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 25/100
opencv/opencv-python#1273 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 45/100
opencv/opencv-python#1272 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 70/100
opencv/opencv-python#1268 · 1 条评论 ·
查看 opencv/opencv-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/skills#1811 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
speaches-ai/speaches#678 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
datalayer/mcp-compose#42 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
conda-forge/spacy-feedstock#177 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
UKGovernmentBEIS/inspect_evals#2523 ·