Page 1 of 1

DePolar Best Practice and Parameter list.

Posted: 2015-07-15T08:35:19-07:00
by immps
I am trying to use the DePolar command and have multiple problems and could not find any discussion related to the command in the forum.
I have an image of a cross section of a coated sphere and want to straighten the arc shaped interface into a straight line.
The parameters needed are:
Radius_Max Radius_Min Center_X,Center_Y Start_Angle,End_Angle

What are the units on the parameters? Are they pixels, inches, meters?
Are they all coma separated?
Are they comma separated in pairs with space or TAB in-between or formatted exactly as given?
I know Y axis is pointing down, In the Arc examples the parameters are give in single quote with a regular single space in-between. I tried about any combination I could think of and have read most of the web site.
It is not clear to me what is the significance of Maximum and Minimum radius?
For example:
E:\IM>convert S4.tif +distort DePolar '-3000,-2500 1450,-2750 170,190' S4_3000
_2500_1450_-2750_170_190.tif
convert.exe: invalid argument for option DePolar : Invalid Radius @ error/distor
t.c/GenerateCoefficients/1243.
convert.exe: unable to open image `1450,-2750': No such file or directory @ erro
r/blob.c/OpenBlob/2695.
convert.exe: no decode delegate for this image format `' @ error/constitute.c/Re
adImage/501.
convert.exe: unable to open image `170,190'': No such file or directory @ error/
blob.c/OpenBlob/2695.
convert.exe: no decode delegate for this image format `' @ error/constitute.c/Re
adImage/501.
My current test image has 2984 x 1037 Pixels and the interface is going through (26,677) and (1476,411) and (2932,700).
Ideally it should be possible calculating the needed DePolar parmeters from a few points on the circle or later use Canny edge detection to find the points on the interface and suggest a set of parameters for the DePolar distortion.
Could someone give an example of correct syntax using all the parameters and showing how an off screen circle center should be handled.

Re: DePolar Best Practice and Parameter list.

Posted: 2015-07-15T09:56:53-07:00
by fmw42
Radius_Max Radius_Min Center_X,Center_Y Start_Angle,End_Angle

are space delimited except where commas are use. The radius and centers are in pixels, the angles are in degrees. Use quotes before and after the whole list, such as

"Radius_Max Radius_Min Center_X,Center_Y Start_Angle,End_Angle"

You can stop listing them if all the subsequent ones are defaulted, but you cannot skip any if the latter ones are needed.

Re: DePolar Best Practice and Parameter list.

Posted: 2015-07-15T16:28:00-07:00
by snibgo
The units are pixels.

You are using Windows, so use double-quotes instead of single-quotes.

Code: Select all

E:\IM>convert S4.tif +distort DePolar "-3000,-2500 1450,-2750 170,190" S4_3000_2500_1450_-2750_170_190.tif