i try to convert image into polar coordinates
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
ElizabethR
am 17 Mär. 2016
Kommentiert: Walter Roberson
am 19 Mär. 2016
here a code :
a=imread('1e.png');
r=imresize(a,[64 64]);
bw=im2bw(r);
[m,n]=size(bw)
m =
64
n =
64
[x,y]=meshgrid(1:n,1:m);
c = ((m+1)/2,(n+1)/2); %make center of the image to be the origin
|
Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.
[theta,rho] = cart2pol(x-c,y-c);
how to fix this ? thanks
1 Kommentar
Akzeptierte Antwort
Chad Greene
am 17 Mär. 2016
Sophia is correct. The problem is on this line:
c = ((m+1)/2,(n+1)/2); %make center of the image to be the origin
Do you want c to be a two-element array? If yes, change the line to
c = [(m+1)/2,(n+1)/2]; %make center of the image to be the origin
10 Kommentare
Walter Roberson
am 19 Mär. 2016
Please show your code attempt complete with the texture mapping step, and please post the complete error message.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Performance finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!