Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Alternative to cv2.warpPerspective

オープン
#549 コメント 8 件 リアクション 0 件 担当者 1 名 GitHub で見る

@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分
マージ済み PR(30日)
3

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

opencv/opencv-python のほかの issue

opencv/opencv-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。