For example I found below sample image from this article:
this question asked Nov 2 '15 at 4:26 b24 877 6 20 36
canvasmay have the tools required to manipulate an image - but wait, you flagged it node.js, so there is no browser goodness available - you'll need something pretty intelligent, it has to detect issues and fix them with no user interaction – Jaromanda X Nov 2 '15 at 4:44 This is either wa-a-a-ay too broad for Stack Overflow, or you're asking for something already made that can do this which is off-topic for Stack Overflow. – Tiny Giant Nov 2 '15 at 22:16 @JaromandaX , Yes I need a way that work without user interaction. – b24 Nov 3 '15 at 12:13 1 Realize my algorithm on java . Calculate quaternion then rotate image. Any question - ask – Ivan.s Jan 18 '16 at 21:17 I desperately need that too!!! Did you figure out how to do it? – Diego Pamio Apr 19 '16 at 3:20
JSFeat can do that for you. There even is an example for perspective distortion. You'll have to add/compute the source and destination points yourself.
this answer answered Mar 24 '16 at 12:04 arminrosu 82 11
Look like https://www.npmjs.com/package/perspective-transform is wat you are looking for.
Create functions to map points from one arbitrary quadrilateral to another and vice versa with the inverse
this answer answered Oct 16 '16 at 15:46 Adrien Gibrat 737 8 10