Cartesian to polar image transform

版本 1.0.0.1 (16.9 KB) 作者: William Warriner
Workflow for modifying Cartesian images in the polar coordinate system.
404.0 次下载
更新时间 2021/8/23

imcart2pol

Converts 2D Cartesian images to polar coordinate images, i.e. "unwraps" them about an origin. The result is a rectangular image whose vertical axis is radial, and horizontal axis is circumferential. The index 1 of the radial axis is the origin of the Cartesian coordinates image.

The intent of the code is to be used to make polar coordinate modifications to a Cartesian coordinate image more simply. The intended workflow goes as follows

im_c = <from source>
im_p = im_cart2pol(im_c, ...)
<modify im_p>
im_c = im_pol2cart(im_p, size(im_c), ...)
<use im_c>

The top-level functions are im_cart2pol.m and im_pol2cart.m. The file test.m contains an example of usage. Other files are helper functions. Note that im_pol2cart.m is not intended to be used in isolation, and no guarantees are made about output.

Overall the workflow works well, even on logical images, but has artifacts with thin features. The user may select which interp2 method is used for coordinates conversion as a string argument to the top-level functions.

Usage

Please see test.m for an example of how to use the functions. The output should look like the following image.

Output of test.m showing workflow of modification of Cartesian image by adding a constant theta line in polar coordinates.

Acknowledgements

The code was inspired by

  1. ImToPolar by Prakash Manandhar
  2. polartrans.m by Peter Kovesi
  3. This answer by User swjm at Stackoverflow

引用格式

William Warriner (2024). Cartesian to polar image transform (https://github.com/wwarriner/matlab_imcart2pol), GitHub. 检索时间: .

MATLAB 版本兼容性
创建方式 R2021a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.0.0.1

Update title

1.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库