Posts

Showing posts with the label irregular crop

Image Perspective correction using Javascript and OpenCV

Image
Hello everyone, in this article I am going to explain how we can crop an image with irregular rectangular window and correct perspective to get a regular rectangular image frame. Find the final result below : How this cropping and perspective correction is done in this project, the below animation shows Well now lets discuss about the steps I followed to implement this.  I hope you have gone through my crop window making over an image post, if you have't please visit  https://reactcodes.blogspot.com/2019/11/creating-irregular-crop-window-on-image.html   It is important because, that is the first step. A quick summery of that post, I am taking an image in background, I am using d3 to create an svg element which is acting like an crop box, I have added some dragging function to adjust the corner, so that any image portion of any shape can be cropped. After this step, I have setup basic UI git show the output side by side. I have added canvas and us...