image processing with fmincon
Show older comments
greetings! I have two image let say a=[1:10;11:20;21:30;31:40;41:50] b=[11:20;21:30;31:40;42:51;1:10] it is pretty obvious to note that I need to use circshift(b,[0,1]) to get the best shift. However, I get a really large image and I need to use fmincon to see how many column i need to shift. I am new to fmincon and I have no idea whether it is support to circshift or not. I have some code like below
function f=f(x) f=circshift(temp_blood1,[0,x]) x=[x,-x] for x=1:size(temp_blood,2) val(x)=f(x); end [bestval,bestx]=min(val) x=bestx
b=sum(sum( (a(2:temp_size(1)-1,2:temp_size(2)-1) - b(2:temp_size(1)-1,2:temp_size(2)-1)).^2 ))
so the idea is using minimizing sum of square to get the best shift. Is it possible to do that or i need to think of other method? Sorry for my bad English
Answers (0)
Categories
Find more on Contrast Adjustment in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!