Hi everyone!
I'm trying to translate an image read through imshow function, but the output is a black image.
Here's the code:
fingers=imread('thumb-index.png');[nrows,ncols] = size(fingers);RI = imref2d(size(fingers));h = imshow(fingers,RI);grid onx_center=ncols/2;y_center=nrows/2;x_orig=ncols-x_center;y_orig=nrows-y_center;[fingers_translate,RF]=imtranslate(fingers,RI,[x_orig,y_orig]);figureh=imshow(fingers_translate,RI);grid on
My target is translating the origin of coordinate system in the center of the image.
Thank you!
Best Answer