How to build/specify optimizer and metric objects for imregister function
1 view (last 30 days)
Show older comments
I'd like to use the imregister function with metric and/or optimizer objects other than those specified in documentation that I have been able to find. Specifically, I'd like to use a correlation ratio as the similarity measure as opposed to Mutual Information or Mean Square Error. How might I be able to set this up using existing matlab functions/objects or making my own in matlab?
0 Comments
Accepted Answer
Matt J
on 6 Nov 2013
See this recent, similar thread
5 Comments
Matt J
on 8 Nov 2013
Edited: Matt J
on 8 Nov 2013
fmincon() should be able to handle pretty much any twice-differentiable similarity measure. Understanding how to use it to do the minimization won't be the hard part. It works pretty much the same as fminsearch in terms of input syntax.
>>doc fmincon
will bring you to examples. The hard part will be the coding of the objective function and its derivatives if you decide to do that.
An important difference between fmincon and fminsearch is that fmincon requires (twice) differentiability. So, you have to apply imtransform/tformarray with the 'bicubic' interpolation option. This is more intensive computationally than the default linear interpolation, so things will be slower. Also, if you do not supply a function that computes your cost function derivatives, fmincon will approximate them by finite differences by default, which will be additionally expensive. Supplying a function of your own that computes the gradient analytically is an option, but requires non-trivial programming effort.
More Answers (0)
See Also
Categories
Find more on Surrogate Optimization in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!