# Convert an image to polar coordinates/log polar transform

Discussion in 'MATLAB' started by Antony, Nov 1, 2005.

1. ### AntonyGuest

Hi,
I want to convert an image to polar coordinates. I am able to convert
the 512 *512 image using imread ('image.jpg') into a variable.How do
determine r and theta for polar coordinates in converting the
rectangular coordinate image to polar.

I know matlab has an inbuilt function polartrans. Can some one kindly
explain in steps how to convert the image to polar ?

Kindly mention some website or books that could help me do the coding
?

Antony, Nov 1, 2005

2. ### Roger StaffordGuest

Roger Stafford, Nov 1, 2005

3. ### AntonyGuest

Hi,
I had found that code earlier.

i dont think that code actually works. first of all, program tried to
capture the size of image by mentioning the command size(im) which is
not the correct command.

Also, nargin is a function in matlab .programmer has defined nargin
set to 3 which is not right.I m new to matlab and may be wrong.but i
cudnt understand how that code actually works.

if i m wrong , pls tell me how he has actually implemented this code?

Matlab has an m file function polartrans but i cannot even run this
file since the matlab doesnt accept and gives me an error like
"String eval cannot declare function declarations"

Hence, i started writing my own code and i have converted an 512 *512
image into a variable I using imread('image.jpg') command.but i m
stuck here and i dont know how to proceed with the matrix values of
that image.

Pls tell me some guidelines how can i convert this or if u feel the
code u gave me works, pls tell me what i m doing wrong with the code
?

thanks

Antony, Nov 1, 2005
4. ### AntonyGuest

Hi,
I had found that code earlier.

i dont think that code actually works. first of all, program tried to
capture the size of image by mentioning the command size(im) which is
not the correct command.

Also, nargin is a function in matlab .programmer has defined nargin
set to 3 which is not right.I m new to matlab and may be wrong.but i
cudnt understand how that code actually works.

if i m wrong , pls tell me how he has actually implemented this code?

Matlab has an m file function polartrans but i cannot even run this
file since the matlab doesnt accept and gives me an error like
"String eval cannot declare function declarations"

Hence, i started writing my own code and i have converted an 512 *512
image into a variable I using imread('image.jpg') command.but i m
stuck here and i dont know how to proceed with the matrix values of
that image.

Pls tell me some guidelines how can i convert this or if u feel the
code u gave me works, pls tell me what i m doing wrong with the code
?