glencoesoftware / bioformats2raw

Bio-Formats image file format to raw format converter
GNU General Public License v2.0
82 stars 36 forks source link

Add documentation for OpenCV to README #222

Closed perlman closed 1 year ago

perlman commented 1 year ago

The current README does a nice job of explaining how to install BLOSC and setting JAVA_OPTS. Similar documentation for OpenCV would be helpful.

On my Mac, I had to follow the homebrew instructions in the OpenCV Java tutorial to get the java bindings and then adding the path (in my case, /opt/homebrew/Cellar/opencv/4.8.1_1/share/java/opencv4) to JAVA_OPTS.

I have a feeling I am missing something obvious on how to properly set up OpenCV for use with Java... Compiling OpenCV isn't much fun, even with a semi-automatic tool like homebrew.

melissalinkert commented 1 year ago

bioformats2raw depends on https://github.com/openpnp/opencv; it's definitely not expected that you would need to compile and install OpenCV Java bindings separately. Was there a particular error message that you saw before doing that?

perlman commented 1 year ago

I was getting an exception that libopencv_javaNNN could not be loaded. These went away when I installed OpenCV by hand.

But, I am now unable to reproduce by truncating the JNA library path. I'm wondering if any of the hundred dependencies or an inadvertent JVM selection were at play.

I'll investigate. I'm certainly glad to see that open-no/opencv includes the native libraries.