lmmx / page-dewarp

Document image dewarping library using a cubic sheet model
MIT License
109 stars 18 forks source link

Page dewarping script taking image file #10

Closed prasum closed 1 year ago

prasum commented 2 years ago

Hi,

In my scenario, I have the image as a numpy array. Could you please let me know how to apply the page dewarping script on the same?

Thanks and Regards Sumeet Lalla

lmmx commented 1 year ago

The library takes input files and writes intermediate files. If you look in the WarpedImage class you can see the logic, but it's all tied to an assumption of using files

https://github.com/lmmx/page-dewarp/blob/5708fad352b528ef8652b8ae942a4bdcb5e550ef/src/page_dewarp/image.py#L40-L86

prasum commented 1 year ago

Thank you @lmmx