OpenCV-Document-Scanner icon indicating copy to clipboard operation
OpenCV-Document-Scanner copied to clipboard

Document colors

Open joaocps opened this issue 3 years ago • 2 comments

Hi there!

Is there any possibility to preserve the document colors in the final result? @andrewdcampbell

Kind Regards, João

joaocps avatar Nov 02 '21 12:11 joaocps

Some of my notes are containing colors important to their content. My local version has a flag for disabling w/b conversion. You can replicate that by:

  • commenting out this range https://github.com/andrewdcampbell/OpenCV-Document-Scanner/blob/master/scan.py#L291-L298
  • updating the variable thresh to warped in https://github.com/andrewdcampbell/OpenCV-Document-Scanner/blob/master/scan.py#L302

Cheers

bytesnake avatar Feb 07 '22 12:02 bytesnake

Hi! I made adjustments to the code to add the color flag. It's in my repo, i'll try to put in a pull request

gregorylearns avatar Oct 12 '22 09:10 gregorylearns