Posted by
Burger Wilhelm on
Mar 22, 2017; 9:14am
URL: http://imagej.273.s1.nabble.com/IJ-OpenCV-a-plugin-connecting-ImageJ-and-OpenCV-tp5017854p5018344.html
Hi Jonathan,
I found my earlier implementation of the OpenCV/ImageJ bridge (which I had originally built to work with the opencv.org wrapper) and adapted it to the ‘bytedeco.javacv’ API that IJ-OpenCV uses. It operates on the image processor level and an initial version can be seen here:
https://github.com/imagingbook/IJ-OpenCV-WB/blob/master/src/main/java/imagingbook/opencv/Convert.javaA modified example IJ plugin can be found here:
https://github.com/imagingbook/IJ-OpenCV-WB/blob/master/src/main/java/opencv_examples/Adaptive_ThresholdJ.javaI know that there are more ‘modern’ ways to design such things but I like to keep the code simple, readable by non-experts, and with minimal dependencies (much in the spirit of IJ1).
--Wilhelm
From: Jónathan Heras [mailto:
[hidden email]]
Sent: Mittwoch, 15. März 2017 19:03
To: Burger Wilhelm <
[hidden email]>
Cc:
[hidden email]; Curtis Rueden <
[hidden email]>
Subject: Re: IJ-OpenCV: a plugin connecting ImageJ and OpenCV
Thanks, implementing the bridge at the ImageProcessor level will be a good enhancement for the library. Meanwhile, I have modified the plugins to proactively check for the correct type and give a normal ImageJ error message when the type is incorrect.
As Curtis suggested, I have created some content on the ImageJ wiki, see
https://imagej.net/IJ-OpenCV, and
https://imagej.net/OpenCV.<
https://imagej.net/OpenCV>
Best,
Jónathan
2017-03-15 14:57 GMT+01:00 Burger Wilhelm <
[hidden email]<mailto:
[hidden email]>>:
Regarding the ImageJ/OpenCV bridge I guess I would prefer a solution on the 'ImageProcessor' level (instead of 'ImagePlus'). I just recalled that I implemented a complete bridge (for all IJ processor types) a couple of months ago, which I'd be happy to contribute (once I have the time to search for it)...
--Wilhelm
-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]<mailto:
[hidden email]>] On Behalf Of Curtis Rueden
Sent: Dienstag, 14. März 2017 16:27
To:
[hidden email]<mailto:
[hidden email]>
Subject: Re: IJ-OpenCV: a plugin connecting ImageJ and OpenCV
Hi Jónathan,
Thanks for your work on this bridge! And sorry for the delay in reply.
It is looking really nice! I especially like the YouTube videos linked from the project page, which demonstrate white hat, black hat, canny edge detection, convex hull computation, etc. Those are very illustrative and well executed.
I did file a couple of minor issues in the issue tracker, some of which may just be me doing things wrong. The main thing I noticed is that it seems the bridge only works for RGB data right now? It would be nice if either:
A) the bridge could be extended also to support 8-bit, 16-bit, etc.; or B) the plugins could proactively check for the correct type, and give a normal ImageJ 1.x style error message when the type is incorrect.
You could also consider creating some content on the ImageJ wiki, maybe at
https://imagej.net/IJ-OpenCV, and
https://imagej.net/OpenCV, with the former briefly introducing the project and linking to your project page on GitHub, and the latter enumerating the currently available options for connecting ImageJ to OpenCV.
Regards,
Curtis
--
Curtis Rueden
LOCI software architect -
https://loci.wisc.edu/softwareImageJ2 lead, Fiji maintainer -
https://imagej.net/User:Rueden Did you know ImageJ has a forum?
http://forum.imagej.net/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html