Discussion:
Segmentation/classification of multi channel images
Philipp Rieger
2012-06-07 07:52:00 UTC
Permalink
Hallo,

I am trying to analyse multi-channel (visual and infrared) images with
Fiji and Weka.
In detail I have to do a segmentation of forest crown pictures into
three classes (crown, sky and trunk) and analysing the percentage of
each class for the entire picture.
My approach is to do segmentation with the ‘Advanced Weka
Segmentation’ Plugin. Therefore I import a NEF file from a digital
camera, split the 3 channels and isolate one of the infrared channels.
Then I import another NEF with 3 ‘normal’ visual channels and stitch
them to a 4 channel composite. I save this composite as a TIFF for
further processing.
In a next step I open the ‘Advanced Weka Segmentation’ Plugin and
create the 3 mentioned classes. I set the settings to: Training
features – Mean, Variance, Minimum and Maximum (I use those for
setting up the process. Which feature will be used at the end is
another topic); Classifier option - RandomForest with –I 10 –K 0 –S 1
and set Homogenize classes to TRUE.
Then I mark training areas for each class (subjective to cover as much
as possible colour values) and press ‘train classifier’.
My question now is how to go on?
As I have 4 channel pictures, do I have to train each channel by hand
or is there a method the segmentation plugin uses the same trainings
areas for each of the 4 channels?
After the ‘train classifier’ is done I get a nice 3 colour image with
(depending on the training areas) a more or less perfect matching
segmentation.
How do I go on if I want to use this segmentation for several more
images? Saving as a *.MODEL and going on with the ‘Apply classifier’
function does create results but those are not always as useful. I am
not sure if the segmentation is done with all channels or just the
first one.
I Save the result as a TIFF and create a Histogram on it so that I get
the total amount of pixels for each colour. Is there a better way to
do it? Because it is kind of uncomfortable to save, open, create, show
list, save the list and open it in Excel to perform further
statistics.
That is why I wanted to use Weka but after hours of reading
documentations, books and wikis I still do not understand how to
analyse the results of my segmentation in Weka.
I tried the Explorer and opened the data.arff file I created after I
performed the ‘train classifier’ function. But when I do a
classification with these data and a RandomForest classifier, aren’t I
am doing the same thing again that I have done in the segmentation
plugin before I saved the data.arff?

You see I get more and more confused about the different functions and
how to put them into the right order. Maybe I am doing something
completely wrong and just don’t getting it?
Any help is welcome! And if further information are needed feel free
to contact me.

Tanks
--
Please avoid top-posting, and please make sure to reply-to-all!

Mailing list web interface: http://groups.google.com/group/fiji-users
Ignacio Arganda-Carreras
2012-06-07 15:33:59 UTC
Permalink
Hello Philipp!
My approach is to do segmentation with the ‘Advanced Weka
Segmentation’ Plugin. Therefore I import a NEF file from a digital
camera, split the 3 channels and isolate one of the infrared channels.
Then I import another NEF with 3 ‘normal’ visual channels and stitch
them to a 4 channel composite. I save this composite as a TIFF for
further processing.
So your image is a 4-slices grayscale stack?
In a next step I open the ‘Advanced Weka Segmentation’ Plugin and
create the 3 mentioned classes. I set the settings to: Training
features – Mean, Variance, Minimum and Maximum (I use those for
setting up the process. Which feature will be used at the end is
another topic); Classifier option - RandomForest with –I 10 –K 0 –S 1
and set Homogenize classes to TRUE.
Then I mark training areas for each class (subjective to cover as much
as possible colour values) and press ‘train classifier’.
My question now is how to go on?
As I have 4 channel pictures, do I have to train each channel by hand
or is there a method the segmentation plugin uses the same trainings
areas for each of the 4 channels?
If you have 4 slices and you want to use the same ROIs (areas) for all the
slices, you need to scroll through the slices and add the same areas to all
of them. Since they are different slices, they are considered different
images. AWS is only able to use single grayscale images (or stacks) or RGB
images.
After the ‘train classifier’ is done I get a nice 3 colour image with
(depending on the training areas) a more or less perfect matching
segmentation.
How do I go on if I want to use this segmentation for several more
images? Saving as a *.MODEL and going on with the ‘Apply classifier’
function does create results but those are not always as useful. I am
not sure if the segmentation is done with all channels or just the
first one.
"Apply classifier" is the way to go. If you only added traces (or areas) in
the first slice, it might look weird on the other slices.
I Save the result as a TIFF and create a Histogram on it so that I get
the total amount of pixels for each colour. Is there a better way to
do it? Because it is kind of uncomfortable to save, open, create, show
list, save the list and open it in Excel to perform further
statistics.
As i said, AWS only works on grayscale or RGB images, so I guess if you
have 4 channels, this is the only option you have... Sorry about that.
That is why I wanted to use Weka but after hours of reading
documentations, books and wikis I still do not understand how to
analyse the results of my segmentation in Weka.
I tried the Explorer and opened the data.arff file I created after I
performed the ‘train classifier’ function. But when I do a
classification with these data and a RandomForest classifier, aren’t I
am doing the same thing again that I have done in the segmentation
plugin before I saved the data.arff?
Yes, AWS trains on the same data you save when you click on "Save data".
You see I get more and more confused about the different functions and
how to put them into the right order. Maybe I am doing something
completely wrong and just don’t getting it?
Any help is welcome! And if further information are needed feel free
to contact me.
I hope i helped! Let me know if can solve more doubts and don't hesitate to
send me images or scripts so i can exactly reproduce what you're doing (or
trying to do) :)

best,

ignacio
Tanks
--
Please avoid top-posting, and please make sure to reply-to-all!
Mailing list web interface: http://groups.google.com/group/fiji-users
--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-324-3747
Website: http://biocomp.cnb.csic.es/~iarganda/index_EN.html
--
Please avoid top-posting, and please make sure to reply-to-all!

Mailing list web interface: http://groups.google.com/group/fiji-users
Loading...