circular image plot (MATLAB)


by mikeph
Tags: circular, image, matlab, plot
mikeph
mikeph is online now
#1
Jul27-11, 04:26 AM
P: 1,205
Hi,

Just came across this as an image in a book/monograph and it looks very MATLAB-esque, except I cannot figure out how to possibly create a circular image



Say I have a 500x500 matrix and want to plot it as a colour image in this way. Does anyone know how? I've been re-reading the same help files again and again with no progress.
Phys.Org News Partner Science news on Phys.org
Cougars' diverse diet helped them survive the Pleistocene mass extinction
Cyber risks can cause disruption on scale of 2008 crisis, study says
Mantis shrimp stronger than airplanes
Dr Transport
Dr Transport is offline
#2
Jul27-11, 08:41 PM
Sci Advisor
PF Gold
P: 1,458
transform the x and y coordinates to polar coordinates and plot the new coordinates,
plot3(cos(x), sin(y));
mikeph
mikeph is online now
#3
Jul29-11, 03:39 AM
P: 1,205
Thanks for the reply, I don't fully understand how to apply it to my problem (never been strong on plot tools), my image has no coordinates, it's just a 500x500 matrix. I don't need the axis, just for the plotter to not plot anything outside a circular region. Currently I'm using pcolor with "EdgeAlpha" to zero so it looks very similar to that image I linked, but it's a square.

mikeph
mikeph is online now
#4
Nov15-11, 06:35 AM
P: 1,205

circular image plot (MATLAB)


Hi, just need to bump this, I still don't understand how to do this.
mikeph
mikeph is online now
#5
Apr26-12, 11:09 AM
P: 1,205
One more bump, I still can't find an answer, thanks

I really just need to know how to make the non-circle area white, at the moment I'm fiddling around with colour maps and manually changing the values to force it to look white, but it has side-effects.
mikeph
mikeph is online now
#6
Jun5-12, 05:42 AM
P: 1,205
Bumping to say I solved the problem.

The solution lies in the alpha data of the object.

For example you can use a ROI to make part of the object transparent, using

set(gco,'AlphaDataMapping','scaled','AlphaData',ROI)

Where ROI = 1 the image will stay opaque and where it is 0 the image will be transparent.


Register to reply

Related Discussions
MATLAB - Image Processing - Defining Title of Plot (Pertains to Loops and Animations) Engineering, Comp Sci, & Technology Homework 0
Matlab 3D plot General Engineering 2
Matlab Image Processing Help (Image Segmentation) Math & Science Software 1
3D Plot in Matlab Programming & Computer Science 6
How to capture live video/image using Matlab without Image acq toolbox Math & Science Software 1