-
Notifications
You must be signed in to change notification settings - Fork 360
Remove dependency on distro specific packages #96
Comments
Some questions: |
Could the matplotlib dependency be made optional? The plotting features here look like not a lot of code, and it's a pretty complicated dependency to pull in. Similarly might pillow be a viable smaller alternative to the use of opencv here? |
Hello @tkelman! I think making matplotlib optional makes sense. Let me look into it as I go on to adding more tests for the plotting code #127. Camelot uses adaptive threshold and morphological transformations from opencv. I haven't worked with pillow in the past but a quick google search got me this morph transform equivalent in pillow. I think removing opencv as a dependency would mean replacing the current image processing code with a combination of pillow + adaptive threshold / morph transform implementations. Let me explore this a bit further. Meanwhile if you have any other alternatives or suggestions on how we could do this, would love if you could share them on this thread! |
matplotlib is now an optional requirement! |
I'm not exaclty sure what you are using Ghostscript for but I switched to pdftoppm for rasterizing pdf to images. I'm using the CLI tool and calling it from python. I'm on windows and are using the latest binaries from here: On a side note it can also fix "broken" PDF' files. As the ones in this ticket: On another side note I tried making Ghostscript run using multiprocessing (to speed things up) but that did not seem to work very good. Not sure Ghostscript is designed to run using several threads. |
Moved to #13. |
Something to think about for the future:
OpenCV: maybe implement morph transform within the library itself/vendorize the code (not sure about dependency on C extensions)?The text was updated successfully, but these errors were encountered: