OpenCV Transform Shape with Arbitrary Contour into Rectangle [closed]

asked 2019-05-04 12:41:25 -0600

ahmetozlu gravatar image

I want to perform book dewarping, the source image is like that:

image description

When I perform the 4 points OpenCV getperspective transform, the result looks like that:

image description

But I have to get rid of the v shape it appears on top part of the book page is given above...

As a summary, I need to perform transform shape with arbitrary contour into rectangle. Are there any algorithms for this in OpenCV?

I need something like this:

image description

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-11-29 05:24:23.022868

Comments

1
sturkmen gravatar imagesturkmen ( 2019-05-04 12:50:12 -0600 )edit

thanks for your reply but I already tried it however it did not work for my case, you can see the result for the input image I gave at the top of this page: https://user-images.githubusercontent...

ahmetozlu gravatar imageahmetozlu ( 2019-05-04 13:01:58 -0600 )edit

could you share the code you used so far and the original image

sturkmen gravatar imagesturkmen ( 2019-05-04 14:38:12 -0600 )edit
LiorA gravatar imageLiorA ( 2019-05-04 15:14:22 -0600 )edit

Hello. Did you acomplished the transformation? I hava a similar problem.

Cadu Sa Motta gravatar imageCadu Sa Motta ( 2020-04-21 20:29:36 -0600 )edit