How can i do this?
Mostrar comentarios más antiguos
Here is my code:
[m,n] = size(I);
for c = 1:n
for r = 1:m
x = round(s*r);
y = round(s*c);
if x > 0 && x < row && y > 0 && y < col % inside
S(r,c,:) = I(x,y,:);
end
end
end
Implementation works fine but the timing issues is the problem.
Thanks in advance :)
1 comentario
Randy Souza
el 22 de Oct. de 2012
judy, did you flag your question as inappropriate for a reason? If not, can you please delete the flag? Thanks!
Respuesta aceptada
Más respuestas (1)
Sean de Wolski
el 17 de Oct. de 2012
You'll get an enormous speedup just by preallocating scaled_image so that it does not change size on every iteration.
scaled_image = zeros(size(your_image));
for c
for r
etc;
Also note, don't call your variable image since this is a useful builtin function.
Categorías
Más información sobre Tracking and Motion Estimation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!