π after nearly 2 years, it's finally here :).
I've heard your requests. My apologies for the delay - now that I've found some time, I've made some improvements:
- improved recognition through glare suppression
- detection support for multicolor pages (e.g., dollar bills)
The API will remain unchanged. In other words, same API, better results.
Special thanks to @andrewdcampbell for providing more test images to improve the recognition algorithm on.
Here's a side by side comparison of the improvement. For problematic images only ;).
![](https://private-user-images.githubusercontent.com/65585002/407139483-1faf0322-631e-4aae-b880-addc5f69ee6a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NjgwODIsIm5iZiI6MTczOTY2Nzc4MiwicGF0aCI6Ii82NTU4NTAwMi80MDcxMzk0ODMtMWZhZjAzMjItNjMxZS00YWFlLWI4ODAtYWRkYzVmNjllZTZhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDAxMDMwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdlNzk1YmEwZTU0ZDRjYTljNzg5YzIwMWQzOWIzZDdjMTk3ZDI1YTY5Yjk0OTZmODU4NGY0YjIwMjYzYjZhNDUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.WMLub-5dhVTlwA1ew9oZ1c5t2Nor5Hs1YBnlGs7BKVU)
It even works for slightly trickier cases with minimal background contrast like these:
That was a screenshot of the jscanify debugging tool which you can use to test how well it detects your document.
You can see for yourself by running npm test
.
As always, if you have any concerns or questions, feel free to raise an issue or start a discussion post. I'm always happy to help.