no result in batch mode

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

no result in batch mode

Marco Gerard
hi,

i'm using a macro for pattern recognition from command line using the plugin from "https://sites.google.com/site/qingzongtseng/template-matching-ij-plugin":

macro "cvMatchTemplate.txt" :

setBatchMode(true);
PatternPath = getArgument;
if (PatternPath=="") exit ("No argument!");
open("C:\\screenshot.bmp");
run("16-bit");
open(PatternPath);
run("16-bit");
PatternName=getInfo("image.filename");
run("cvMatch_Template...", "image=screenshot.bmp method=[Normalized cross correlation] template=PatternName output tolerence=0.10 threshold=0");
String.resetBuffer;
String.append(getResult("X", 0)+",");
String.append(getResult("Y", 0));
String.copy(String.buffer);
run("Quit");




the pattern image path is send via command line argument:
"C:\ImageJ\imagej.exe -macro cvMatchTemplate C:\\pattern.bmp"
- this works.

but when i try to run the same macro in batch mode:
"C:\ImageJ\imagej.exe -batch cvMatchTemplate C:\\pattern.bmp"
i get a error message: "Result" table empty

is there no result table generated in batch mode?
thx

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html