i try to convert image into polar coordinates

조회 수: 2 (최근 30일)
ElizabethR
ElizabethR 2016년 3월 17일
댓글: Walter Roberson 2016년 3월 19일
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
Sophia
Sophia 2016년 3월 17일
편집: Sophia 2016년 3월 17일
change this c = ((m+1)/2,(n+1)/2)); and what is the error message after this

댓글을 달려면 로그인하십시오.

채택된 답변

Chad Greene
Chad Greene 2016년 3월 17일
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
ElizabethR
ElizabethR 2016년 3월 19일
i was make it but i get the error : Error using handle.handle/set Invalid or deleted object. how to fix it ?
Walter Roberson
Walter Roberson 2016년 3월 19일
Please show your code attempt complete with the texture mapping step, and please post the complete error message.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by