Template Matching plugin issues

fiji
#1

Hi everyone,

Here is my issue : I’m trying to count stomata on rosa leaves based on the paper bellow.

https://www.researchgate.net/publication/269991405_Image-based_Plant_Stomata_Phenotyping
So I process images and I’m having a hard time with the Template matching pluging (see bellow)

I followed all the installation process. After putting on all jars files needed in order to operate the plugin. I’m experiencing this error message :

Exception.txt (955 Bytes)

I guess the problem come from Java2DFrameUtils but I have no idea of how I can solve it.

So I’m asking you if you have any ideas to sort this out. Your help could save me weeks of work counting and mesuring all this by hand.

Just for information, I tried runing the plugin on ImageJ first but it says “Plugin or class not found : “cvMatch_Template” (java.lang.ClassNotFoundException : cvMatch_Template)”
I also tried downlaoding an updated Javacv.jar on this website : https://jar-download.com/download-handling.php
But things seems to be even worst as Fiji console seems to indicate :

There was a problem with the class org.bytedeco.javacv.Java2DFrameUtils which can be found here:
/C:/PROGRA~1/Fiji.app/plugins/javacv-1.5.jar
java.lang.NoSuchMethodError: org.bytedeco.javacv.Java2DFrameUtils.toIplImage(Ljava/awt/image/BufferedImage;)Lorg/bytedeco/javacpp/opencv_core$IplImage;
at TemplateMatching.cvMatch_Template.doMatch(cvMatch_Template.java:273)
at TemplateMatching.cvMatch_Template.doMatch(cvMatch_Template.java:219)
at TemplateMatching.cvMatch_Template.run(cvMatch_Template.java:91)
at ij.IJ.runUserPlugIn(IJ.java:229)
at ij.IJ.runPlugIn(IJ.java:193)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)

[ERROR] null
java.lang.NoSuchMethodException: Could not find method org.bytedeco.javacv.Java2DFrameUtils.toIplImage(Ljava/awt/image/BufferedImage;)Lorg/bytedeco/javacpp/opencv_core$IplImage;
There was a problem with the class org.bytedeco.javacv.Java2DFrameUtils which can be found here:
/C:/PROGRA~1/Fiji.app/plugins/javacv-1.5.jar
java.lang.NoSuchMethodError: org.bytedeco.javacv.Java2DFrameUtils.toIplImage(Ljava/awt/image/BufferedImage;)Lorg/bytedeco/javacpp/opencv_core$IplImage;
at TemplateMatching.cvMatch_Template.doMatch(cvMatch_Template.java:273)
at TemplateMatching.cvMatch_Template.doMatch(cvMatch_Template.java:219)
at TemplateMatching.cvMatch_Template.run(cvMatch_Template.java:91)
at ij.IJ.runUserPlugIn(IJ.java:229)
at ij.IJ.runPlugIn(IJ.java:193)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)

at TemplateMatching.cvMatch_Template.doMatch(cvMatch_Template.java:273)
at TemplateMatching.cvMatch_Template.doMatch(cvMatch_Template.java:219)
at TemplateMatching.cvMatch_Template.run(cvMatch_Template.java:91)
at ij.IJ.runUserPlugIn(IJ.java:229)
at ij.IJ.runPlugIn(IJ.java:193)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)

Looking forward to read you,

Thank you

T. AMOROSO

0 Likes

#2

Could you try with a fresh Fiji installation to add the IJ-OpenCV plugins update site (Help>Update>Manage Update sites) and just add the template matching plugin manually (not the javacv dependencies, there are shipped by the update site and should be compatible).

1 Like

#3

Got exactly the same problem on windows 10. No clue how to solve it…

0 Likes

#4

I followed your instructions and it worked just fine. Thank you very much :wink:

0 Likes

#5

For me using the dependency shipped by the IJ-OpenCV update site, and the last version of Template_Matching provided on GitHub it works.

So on a fresh fiji just copy this jar in plugins and activate the IJ opencv update site
Template_Matching.jar (10.4 KB)

0 Likes

#6

Perfect. It worked! Thank you! :smile:

0 Likes