[Insight-users] Gradient Descent?

Luis Ibanez luis.ibanez at kitware.com
Tue Jun 30 17:58:56 EDT 2009


Hi Motes,


                 Thanks for the clarification.


This explains the confusion.

The ITK Optimizer are commonly used for Image Registration.

When used in that context they are not looking for extrema
in the values of intensities of the images.    Instead, they
are looking for extrema in the values of "ImageMetric"
classes that evaluate the similarity between two given images

Every time that the Optimizer calls "GetValue()" in the
Cost Function (the ImageMetric) this triggers an evaluation
in the entire image. (e.g. as you pointed out, for example,
in the mean square metric, this triggers a computation
of differences of intensities between all the pixels in the
fixed image and the corresponding pixels in the moving
image.).

This is evaluated for a given set of values of the Transform.

So, the point at which the Gradient is computed is in the
parametric space of the transform, not in the space of
the image. And the Function whose gradient is computed
is the CostFunction (the ImageMetric), not the intensities
of the image.

If you want to learn more about Image Registration  you
could look at:

a) The "Image Registration" chapter of the ITK Software Guide
    http://www.itk.org/ItkSoftwareGuide.pdf

http://www.amazon.com/ITK-Software-Guide-2-4/dp/1930934157/ref=pd_bxgy_b_img_c


b) The "Image Registration" chapter of the book
    "Insight into Images"
http://www.amazon.com/Insight-into-Images-Segmentation-Registration/dp/1568812175/ref=pd_bxgy_b_img_b


c) The book "Medical Image Registration"
http://www.amazon.com/Medical-Image-Registration-Biomedical-Engineering/dp/0849300649/ref=sr_1_5?ie=UTF8&s=books&qid=1246398949&sr=8-5



Note that, "Image Registration" is not the only use
of Gradient Descent methods... so.... we probably
should go back to the original motivation of your
question:



         What kind of image analysis problem
         are you trying to solve ?



   Regards,


         Luis


--------------------------------------------------------------------------
On Tue, Jun 30, 2009 at 5:45 PM, motes motes <mort.motes at gmail.com> wrote:

> Forgot to press reply to all :-)
>
>
> On Tue, Jun 30, 2009 at 11:43 PM, motes motes <mort.motes at gmail.com>wrote:
>
>>
>>
>> On Tue, Jun 30, 2009 at 11:34 PM, Luis Ibanez <luis.ibanez at kitware.com>wrote:
>>
>>>
>>> Hi Motes,
>>>
>>>
>>>
>>>      This is going to be a long conversation...   :-)
>>>
>>>
>>> It seems that you are thinking of the image as the parametric
>>> space itself.
>>>
>>> If you are considering the image intensities to be the values
>>> of a cost function, and you are assuming that the space of
>>> image indexes is the parametric space, then,... yes... you
>>> could perform a walk over this space using a gradient descent
>>> approach.
>>>
>>>
>>> This is done, for example, as part of the computation of
>>> Watersheds...
>>>
>>>
>>> Is that what you have in mind ?
>>>
>>>
>>> Are you looking for a method for walking toward extrema
>>> of intensities in an image ?
>>>
>>>
>>
>> Well that was actually what I thought the optimization part of ITK was
>> doing - finding extrema in the image.
>>
>> As I understand the cost function could be defined as eg.
>> sum-of-squared-intensities. In each iteration this function is evaluated and
>> we choose that "path" which minimizes this cost function.
>>
>> But is the cost function evaluated for the whole image or just for a local
>> region?
>>
>> Maybe you can recommend some literature that covers this subject so I
>> don't waste to much of your time :-) I have bought Digital Image Processing,
>> Third Edition, Gonzalez et. al, but I could not find anything on gradient
>> descent or cost functions/optimization.
>>
>>
>>
>>
>>
>>
>>
>>
>>>
>>>
>>>    Luis
>>>
>>>
>>>
>>> ---------------------
>>> motes motes wrote:
>>>
>>>> Ok it seems I need to find some resources concerning this kind of
>>>> optimization. But assume that I have a grayscale image when using the
>>>> gradient descent method are the gradient then calculated for a pixel and the
>>>> next pixel choosen is the one where the gradient has a negative growth?
>>>>
>>>>
>>>>
>>>> On Tue, Jun 30, 2009 at 10:26 PM, Luis Ibanez <luis.ibanez at kitware.com<mailto:
>>>> luis.ibanez at kitware.com>> wrote:
>>>>
>>>>
>>>>    Hi Motes,
>>>>
>>>>
>>>>    The fact that this optimizer is applied to registration
>>>>    of digital images is irrelevant.
>>>>
>>>>
>>>>    All ITK optimizers are general purpose optimizers.
>>>>
>>>>
>>>>    These Optimizers explore a parametric space looking
>>>>    for good values of a cost function.
>>>>
>>>>    When applied to image registration the Cost function
>>>>    happens to be an ImageMetric, and the parametric
>>>>    space happens to be the set of parameters of a
>>>>    Transform.
>>>>
>>>>
>>>>    The Image Registration chapter of the ITK Software Guide
>>>>    http://www.itk.org/ItkSoftwareGuide.pdf shows many plots
>>>>    of the Metric with respect to the optimizer iterations, as
>>>>    well as many plots of the Transform parameters for multiple
>>>>    iterations of the optimizer.
>>>>
>>>>    Have you seen these figures ?
>>>>
>>>>
>>>>
>>>>    Could you please clarify what kind of step-by-step
>>>>    example are you looking for ?
>>>>
>>>>
>>>>
>>>>    Simply "applying an optimizer to a digital image"
>>>>    doesn't quite makes sense...
>>>>
>>>>
>>>>
>>>>    Are you looking for image enhancement filters ?
>>>>    maybe ?
>>>>
>>>>
>>>>        Please elaborate on the context of your question,
>>>>
>>>>
>>>>              Thanks
>>>>
>>>>
>>>>                    Luis
>>>>
>>>>
>>>>
>>>>    ----------------------------------------------------------------
>>>>    On Tue, Jun 30, 2009 at 4:13 PM, motes motes <mort.motes at gmail.com
>>>>    <mailto:mort.motes at gmail.com>> wrote:
>>>>
>>>>        A lot of the examples in the itkSoftwareGuide uses the optimizer
>>>>        defined in itkRegularStepGradientDescentOptimizer.h.
>>>>
>>>>        As I understand this i a gradient descent optimzer. There is not
>>>>        much details about this method in the guide (I assume its rather
>>>>        basic)  but it could be very nice to read some examples showing
>>>>        how this optimizer works for a few iterations.
>>>>
>>>>        I have tried googling articles and websites that show how
>>>>        gradient descent is applied in the context of digital image
>>>>        processing but cannot seem to find anything. Does anyone on this
>>>>        mailing list know of any good resources to a step-by-step
>>>>        example using the gradient descent method on a digital image?
>>>>
>>>>        _____________________________________
>>>>        Powered by www.kitware.com <http://www.kitware.com>
>>>>
>>>>        Visit other Kitware open-source projects at
>>>>        http://www.kitware.com/opensource/opensource.html
>>>>
>>>>        Please keep messages on-topic and check the ITK FAQ at:
>>>>        http://www.itk.org/Wiki/ITK_FAQ
>>>>
>>>>        Follow this link to subscribe/unsubscribe:
>>>>        http://www.itk.org/mailman/listinfo/insight-users
>>>>
>>>>
>>>>
>>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090630/94584f7b/attachment.htm>


More information about the Insight-users mailing list