Generalized Hough Transform on a MAC isn't working

I picked up a plugin for ImageJ here:
http://rsb.info.nih.gov/ij/plugins/ght/index.html

I put two 8 bit grey scale gif files into a directory.
It has two files in it:
refrence_object.gif and search_pic_1.gif

I invoked the GHT plugin from the plugin menu.
It asks for the source directory
I point to it.

I click through all the defaults…

This is what I get

ImageJ 1.48v; Java 1.6.0_65 [32-bit]; Mac OS X 10.11.4; 15MB of 400MB (3%)

java.lang.ArithmeticException: / by zero
   at GHT_.search_for_object(GHT_.java:399)
   at GHT_.run(GHT_.java:173)
   at ij.IJ.runUserPlugIn(IJ.java:199)
   at ij.IJ.runPlugIn(IJ.java:163)
   at ij.Executer.runCommand(Executer.java:131)
   at ij.Executer.run(Executer.java:64)
   at java.lang.Thread.run(Thread.java:695)

I suspect that because this is a mac it finds the .DS_Store file and tries to interpret that…
Not sure… Was I suppose to have done an edge detection on the source images first?

Hey Brian,

I can reproduce the ArithmeticException in a folder that doesn’t contain any .DS_Store files on my system.

After some digging I found a loop over all pixels of the reference_object.gif:

if (pixels [i] == edge_colour) {
...
}

This implies that your reference_object.gif has to contain pixels with 0 value while the others are discarded. This sounds to me like an edge image, where the background is white (255) and the edges are 0.

Hope that helps,
Stefan

Did you figure out how it works? I have the same issue.