vacancy/PyPatchMatch

replacing openCV with something smaller/lighter?

Opened this issue · 2 comments

on macOS it's a headache to install OpenCV dev tools, which makes compiling pypatchmatch an ordeal. i'd like to try replacing the opencv backend with something that's less troublesome, but i'm not sure if this is feasible.

afaict from looking at the output of nm, OpenCV is only really providing a matrix backend, is that correct? are there any obvious performance considerations to using some other matrix lib? something like eg the header-only linalg (assuming it supports the required dimensionality).

This would be very nice!

Yes, that will be cool!

The core part of the project does not have additional dependencies other than the basic matrix storage. (Note that, a lot of the code does rely on the "shallow copy" feature of cv::Mat. That is, when we do cv::Mat a = b; it does not copy the content).
However, some of the debug functionalities (e.g., printing the intermediate results) and IO codes (the C++ demo) do depend on image io / imshow / and resizing.

So it is possible to port the core part (including the python bindings).