Login  Register

some weka segmentation issues

Posted by Aryeh Weiss on Jun 29, 2011; 7:28pm
URL: http://imagej.273.s1.nabble.com/Error-cant-get-around-Expected-tp3684050p3684058.html

I am starting to use the Advanced Weka Segmentation plugins, which are
proving to be very interesting.

Two issues have come up when using them in macros.

1. there is some timing issue. Consider the following code:

run("Advanced Weka Segmentation");

wait(3000);  //Without this wait statement, the following statements
will fail and return segmentation faults.

call("trainableSegmentation.Weka_Segmentation.setFeature", "Variance=true");
call("trainableSegmentation.Weka_Segmentation.setFeature", "Mean=true");
call("trainableSegmentation.Weka_Segmentation.setFeature", "Maximum=true");
call("trainableSegmentation.Weka_Segmentation.setFeature", "Gabor=true");

2. If I do the following:

call("trainableSegmentation.Weka_Segmentation.trainClassifier");

then the segmentation will occur. However, a number buttons will be
grayed out. I will lose "Get Probability", "Apply Classifier", and "Save
Classifier".

On the other hand, if I do the trainClassifier by manually clickingon
"Train Classifier", then it does the segmentation and leaves all the
other things functional. Yet the macro recorder records that very command
call("trainableSegmentation.Weka_Segmentation.trainClassifier");
when I do it by hand.

Since I am trying to automate my procedures as much as possible, any
help with this second issue would be greatly appreciated.

--aryeh
--
Aryeh Weiss
School of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051