error: (-215:Assertion failed) _src.total() > 0 in function ‘warpPerspective’,
If you use opencv to do perspective changes, if you report this error, you can check whether the height and width of the input image are 0. There is a high probability that the coordinates will appear negative when the large image is sliced into a small image, and whether the input projection transformation matrix is 0.