問題タブ [opencv-drawcontour]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - OpenCV 描画輪郭エラー アサーションに失敗しました
だから私はhttps://www.pyimagesearch.com/2014/09/01/build-kick-ass-mobile-document-scanner-just-5-minutes/のドキュメントを 正確にスキャンする方法に関するガイドに従おうとしています輪郭を見つけて画像に描画することになっているステップ2のプロセスで、drawContour関数で「Assertion Failed」エラーが発生しました
ガイドにはありませんでした
screenCnt = なし
最初はscreenCntのようなエラーが発生しましたが存在しませんでした
追加した後、ガイドと同じ画像を使用して別の画像も試したにもかかわらず、代わりにアサーションに失敗しました
これが私が得たものです:
トレースバック (最新の呼び出しが最後): cv2.drawContours(image, [screenCnt], -1, (0, 255, 0)、2)
cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\imgproc\src\drawing.cpp:2606: エラー: (-215:Assertion failed) reader.ptr != NULL in function 'cvDrawContours'
これに対する解決策はありますか?前にありがとう