Srinija / SwiftCamScanner

A pod written in swift that lets you scan and crop documents. It uses edge detection and perspective transformation with OpenCV.
MIT License
104 stars 31 forks source link

Resizing the image while cropping reduces the image quality #1

Closed javidnoutash closed 7 years ago

javidnoutash commented 7 years ago

Thanks for the great piece of code.

The CropView passes the new image size to OpenCV based on the screen size, this reduces the quality of the cropped image very much.

My suggestion would be to convert the cropCircle center points from device screen size to match the original image size and then pass them to OpenCV.

Srinija commented 7 years ago

Hi @javidnoutash Thanks for the suggestion! That worked. I changed the final image dimensions and scaled the corresponding coordinates. Seems to have fixed the blurring issue. Pushed it to v0.1.1