If I set --preprocess-alignment =True, I must ensure that the background is consistent with the original frame of the video stream, and will report an error if the alignment is too big.Since this difference cannot guarantee consistency, I am considering the necessity of setting this parameter, and whether setting this parameter will have a great impact on the result of image matting。
1.For background:
Because sometimes you can't take the background before you shoot the video.It's more about capturing a background after the shoot is over
For dynamic video
How to get better image matting effect for dynamic video, background selection, alignment pretreatment selection or not,Give some advice
3.about error(if set --preprocess-alignment True ,Background image selection is limited )
File "F:\project\2021.03\BackgroundMattingV2-master\inference_utils.py", line 37, in call
bgr = cv2.warpPerspective(bgr, H, (w, h))
cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-wwma2wne\opencv\modules\imgproc\src\imgwarp.cpp:3167: error: (-215:Assertion failed) (M0.type() == CV_32F || M0.type() == CV_64F) && M0.rows == 3 && M0.cols == 3 in function 'cv::warpPerspective'
If I set --preprocess-alignment =True, I must ensure that the background is consistent with the original frame of the video stream, and will report an error if the alignment is too big.Since this difference cannot guarantee consistency, I am considering the necessity of setting this parameter, and whether setting this parameter will have a great impact on the result of image matting。 1.For background: Because sometimes you can't take the background before you shoot the video.It's more about capturing a background after the shoot is over
3.about error(if set --preprocess-alignment True ,Background image selection is limited ) File "F:\project\2021.03\BackgroundMattingV2-master\inference_utils.py", line 37, in call bgr = cv2.warpPerspective(bgr, H, (w, h))
cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-wwma2wne\opencv\modules\imgproc\src\imgwarp.cpp:3167: error: (-215:Assertion failed) (M0.type() == CV_32F || M0.type() == CV_64F) && M0.rows == 3 && M0.cols == 3 in function 'cv::warpPerspective'