==== Using openCV in Jython ====
It is even possible to use most of opencv functionalities within Jython:
For that the most simple is to enable the IJopenCV update site that will automatically download the necessary packages.
A manual installation is also possible by putting the jar packages in the jar folder of imageJ. They are avalaible on the [https://github.com/joheras/IJ-OpenCV IJopenCV github], which even provides a maven option.
'''NB : the version on Github and the update sites are not identical and not compatible'''
The 1st things to know about openCV is that most functions works with openCV matrix object. Hopefully, the IJopenCV provides a converter :
#@ ImagePlus ImP
from ijopencv import
Converter = ImageConverter() # create an instance of the converter
# Convert to
a matrice ImCv = Converter.convertTo( ImP) # Do some processing in openCV #... # Convert back to an ImagePlus ImP2 = Converter. convertFrom( ImCv)
That's the one to use ! It takes only <code>org.bytedeco.javacpp.opencv_core.Mat</code> as input, which is the most approriate in Fiji/Jython
== Self written Jython modules for ImageJ ==