Skip to content
Discussion options

You must be logged in to vote

This was caused by the mounting of the camera not being totally perpendicular to the surface being scanned. I thought the camera estimation steps would correct for it but it seems they don't. The solution was to perspective warp the images before trying to stitch them.

img_size = (frame.shape[1], frame.shape[0])
src = np.float32([[0, 0], [640, 0], [640, 480], [0, 480]])
dst = np.float32([[0, 0], [640, -50], [640, 510], [0, 480]])
transform_matrix = cv.getPerspectiveTransform(src, dst)
frame = cv.warpPerspective(frame, transform_matrix, img_size)

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
6 replies
@lukasalexanderweber
Comment options

@chrisgrill
Comment options

@chrisgrill
Comment options

@lukasalexanderweber
Comment options

@lukasalexanderweber
Comment options

Comment options

You must be logged in to vote
2 replies
@lukasalexanderweber
Comment options

@chrisgrill
Comment options

Answer selected by chrisgrill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants