<br>Hi Motes,<br><br><br> Thanks for the clarification.<br><br><br>This explains the confusion.<br><br>The ITK Optimizer are commonly used for Image Registration.<br><br>When used in that context they are not looking for extrema<br>
in the values of intensities of the images. Instead, they<br>are looking for extrema in the values of "ImageMetric" <br>classes that evaluate the similarity between two given images<br><br>Every time that the Optimizer calls "GetValue()" in the<br>
Cost Function (the ImageMetric) this triggers an evaluation<br>in the entire image. (e.g. as you pointed out, for example,<br>in the mean square metric, this triggers a computation<br>of differences of intensities between all the pixels in the<br>
fixed image and the corresponding pixels in the moving<br>image.).<br><br>This is evaluated for a given set of values of the Transform.<br><br>So, the point at which the Gradient is computed is in the <br>parametric space of the transform, not in the space of <br>
the image. And the Function whose gradient is computed<br>is the CostFunction (the ImageMetric), not the intensities<br>of the image.<br><br>If you want to learn more about Image Registration you<br>could look at:<br><br>
a) The "Image Registration" chapter of the ITK Software Guide<br> <a href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</a><br> <a href="http://www.amazon.com/ITK-Software-Guide-2-4/dp/1930934157/ref=pd_bxgy_b_img_c">http://www.amazon.com/ITK-Software-Guide-2-4/dp/1930934157/ref=pd_bxgy_b_img_c</a><br>
<br><br>b) The "Image Registration" chapter of the book<br> "Insight into Images"<br><a href="http://www.amazon.com/Insight-into-Images-Segmentation-Registration/dp/1568812175/ref=pd_bxgy_b_img_b">http://www.amazon.com/Insight-into-Images-Segmentation-Registration/dp/1568812175/ref=pd_bxgy_b_img_b</a><br>
<br><br>c) The book "Medical Image Registration"<br><a href="http://www.amazon.com/Medical-Image-Registration-Biomedical-Engineering/dp/0849300649/ref=sr_1_5?ie=UTF8&s=books&qid=1246398949&sr=8-5">http://www.amazon.com/Medical-Image-Registration-Biomedical-Engineering/dp/0849300649/ref=sr_1_5?ie=UTF8&s=books&qid=1246398949&sr=8-5</a><br>
<br><br><br>Note that, "Image Registration" is not the only use<br>of Gradient Descent methods... so.... we probably<br>should go back to the original motivation of your <br>question:<br><br><br><br> What kind of image analysis problem <br>
are you trying to solve ?<br><br><br><br> Regards,<br><br><br> Luis<br><br><br>--------------------------------------------------------------------------<br><div class="gmail_quote">On Tue, Jun 30, 2009 at 5:45 PM, motes motes <span dir="ltr"><<a href="mailto:mort.motes@gmail.com">mort.motes@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Forgot to press reply to all :-)<div><div></div><div class="h5"><br><br><div class="gmail_quote">
On Tue, Jun 30, 2009 at 11:43 PM, motes motes <span dir="ltr"><<a href="mailto:mort.motes@gmail.com" target="_blank">mort.motes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div class="gmail_quote"><div>On Tue, Jun 30, 2009 at 11:34 PM, Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi Motes,<br>
<br>
<br>
<br>
This is going to be a long conversation... :-)<br>
<br>
<br>
It seems that you are thinking of the image as the parametric<br>
space itself.<br>
<br>
If you are considering the image intensities to be the values<br>
of a cost function, and you are assuming that the space of<br>
image indexes is the parametric space, then,... yes... you<br>
could perform a walk over this space using a gradient descent<br>
approach.<br>
<br>
<br>
This is done, for example, as part of the computation of<br>
Watersheds...<br>
<br>
<br>
Is that what you have in mind ?<br>
<br>
<br>
Are you looking for a method for walking toward extrema<br>
of intensities in an image ?<br>
<br>
</blockquote></div><div><br><br>Well that was actually what I thought the optimization part of ITK was doing - finding extrema in the image.<br><br>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.<br>
<br>But is the cost function evaluated for the whole image or just for a local region?<br><br>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.<br>
<br><br><br><br><br><br> </div><div><div></div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
Luis<br>
<br>
<br>
<br>
---------------------<br>
motes motes wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
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?<br>
<br>
<br>
<br></div><div><div></div><div>
On Tue, Jun 30, 2009 at 10:26 PM, Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a> <mailto:<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>>> wrote:<br>
<br>
<br>
Hi Motes,<br>
<br>
<br>
The fact that this optimizer is applied to registration<br>
of digital images is irrelevant.<br>
<br>
<br>
All ITK optimizers are general purpose optimizers.<br>
<br>
<br>
These Optimizers explore a parametric space looking<br>
for good values of a cost function.<br>
<br>
When applied to image registration the Cost function<br>
happens to be an ImageMetric, and the parametric<br>
space happens to be the set of parameters of a<br>
Transform.<br>
<br>
<br>
The Image Registration chapter of the ITK Software Guide<br>
<a href="http://www.itk.org/ItkSoftwareGuide.pdf" target="_blank">http://www.itk.org/ItkSoftwareGuide.pdf</a> shows many plots<br>
of the Metric with respect to the optimizer iterations, as<br>
well as many plots of the Transform parameters for multiple<br>
iterations of the optimizer.<br>
<br>
Have you seen these figures ?<br>
<br>
<br>
<br>
Could you please clarify what kind of step-by-step<br>
example are you looking for ?<br>
<br>
<br>
<br>
Simply "applying an optimizer to a digital image"<br>
doesn't quite makes sense...<br>
<br>
<br>
<br>
Are you looking for image enhancement filters ?<br>
maybe ?<br>
<br>
<br>
Please elaborate on the context of your question,<br>
<br>
<br>
Thanks<br>
<br>
<br>
Luis<br>
<br>
<br>
<br>
----------------------------------------------------------------<br>
On Tue, Jun 30, 2009 at 4:13 PM, motes motes <<a href="mailto:mort.motes@gmail.com" target="_blank">mort.motes@gmail.com</a><br></div></div><div>
<mailto:<a href="mailto:mort.motes@gmail.com" target="_blank">mort.motes@gmail.com</a>>> wrote:<br>
<br>
A lot of the examples in the itkSoftwareGuide uses the optimizer<br>
defined in itkRegularStepGradientDescentOptimizer.h.<br>
<br>
As I understand this i a gradient descent optimzer. There is not<br>
much details about this method in the guide (I assume its rather<br>
basic) but it could be very nice to read some examples showing<br>
how this optimizer works for a few iterations.<br>
<br>
I have tried googling articles and websites that show how<br>
gradient descent is applied in the context of digital image<br>
processing but cannot seem to find anything. Does anyone on this<br>
mailing list know of any good resources to a step-by-step<br>
example using the gradient descent method on a digital image?<br>
<br>
_____________________________________<br></div>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><div><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
<br>
<br>
</div></blockquote>
</blockquote></div></div></div><br>
</blockquote></div><br>
</div></div></blockquote></div><br>