[Insight-developers] Classifier woes
Karthik Krishnan
Karthik.Krishnan at kitware.com
Fri Oct 21 12:47:41 EDT 2005
Miller, James V (Research) wrote:
> I was just experimenting with some pixel classifiers in ITK.
>
> I had a program that I had written a few years ago that built up a
> decision rule and set it on an ImageClassifierBase and passed that
> ImageClassifierBase to the MRF filter. This works fine.
>
> Now I just wanted to run a pixel classifier without running the MRF
> filter. So I was looking for a filter that would just run through all
>
> the pixels in an image and apply a decision rule to each pixel.
>
> The first filter I found was BayesianClassifierImageFilter. This
> sounded perfect. However, this filter assumes the membership
> functions are Gaussian and has no means to set a prior. The filter
> takes membership functions as opposed to a decision rule. Most
> troubling, however, is that this filter doesn't actuall do anything.
> The GenerateData() method simply iterates over the input pixels. It
> doesn't evaluate anything or set any output pixels.
>
The BayesianClassifierImageFilter was a premature addition to the
toolkit... The actual class itself is in the NAMIC sandbox. and does
pretty much what you want.
http://www.na-mic.org:8000/websvn/filedetails.php?repname=NAMICSandBox&path=%2FBayesianSegmentationModule%2FitkBayesianClassifierImageFilter.txx&rev=0&sc=0
http://www.na-mic.org:8000/websvn/filedetails.php?repname=NAMICSandBox&path=%2FBayesianSegmentationModule%2FitkBayesianClassifierImageFilter.h&rev=0&sc=0
It allows you to set your own membership functions (they are not
restricted to be Gaussian).
The class assumes a prior image with a uniform distribution, but again
this is not a requirement. I think John's intention is to allow you to
specify a prior image, with the default being a uniform one.
The membership functions using information from the prior generate the
posteriors.
The decision rule is hardcoded to be a maximum decision rule, but it is
not a requirement (although it generally makes sense, given that you
want a MAP decision rule). It could probably be set by the user,
defaulting to MAP.
John's put in a test for it and the filter seems to classify just fine.
The goal might be to have a very generic BayesianClassifierFilter and
subclass it for specific needs... ??
Regards
Karthik
> So I looked at ImageClassifierBase. I was already giving one of these
> to the MRF filter. ImageClassifierBase has a GenerateData() method.
> ImageClassifierBase, however, does not have the standard
> SetInput()/GetOutput() methods. Instead, it uses
> SetInputImage()/GetClassifiedImage(). So it unclear to the user that
> they could use ImageClassifierBase as an ImageToImageFilter. Along
> those line, ImageClassifierBase is not named like an
> ImageToImageFilter (in particular, it does not end in ImageFilter).
>
> Do we have any ImageToImageFilters that you can give a decision rule
> to and it will classify each pixel?
>
> *Jim Miller*
> */_____________________________________/*
> /Visualization & Computer Vision
> GE Research
> Bldg. KW, Room C223
> 1 Research Circle, Schenectady NY 12309-1027
>
> _millerjv at research.ge.com <mailto:millerjv at research.ge.com>_/
> /(518) 387-4005, Dial Comm: 8*833-4005/
> /Cell: (518) 505-7065, Fax: (518) 387-6981/
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers at itk.org
>http://www.itk.org/mailman/listinfo/insight-developers
>
>
More information about the Insight-developers
mailing list