Ellipse rotation and storage of image issues

I am currently working on creating mock images for a scatter pattern. The scatter pattern similar to what is seen with a laser on a surface operates in a manner similar to that of a distance transform function. This being that the highest intensity is seen at the center of a white object and tapering off to a minimum at the edge between white and black.
The problem i am currently having is that the image obtained once i create the ellipse is not able to be saved or called anything. I need to give this a name to call it into the function of the distance transform. The second problem i am having is that i don't know how to rotate this ellipse. I have looked at other ellipse solutions but was unable to figure how to rotate the ellipse.
My Code currently is as follows:
%Created a black background surface to create the ellipse on.
F1 = zeros([300, 300]);
figure, imshow(F1);
% an Ellipse can be created using the rectangle curvature as shown below.
rectangle('Position',[60 100 200 80], 'Curvature', [1,1], 'FaceColor', 'w');
%Using a tool box from my university for distance transforms , i need to call an image for ???? as seen below.
[C3]=vsg('5x5Distance',????);
h=figure;imagesc(C3(:,:,1));colormap(gray);set(h,'Name','5x5Distance Transform');
I have attempted to call F1 from above but i get a full grey screen as the matrix of F1 only has zero values it has no one values from the ellipse stored.
i would greatly appreciate your help,
Thanks
Thomas

Answers (1)

Image Analyst
Image Analyst on 31 Jul 2013
Edited: Image Analyst on 31 Jul 2013
Or read the FAQ on how to create an ellipse: http://matlab.wikia.com/wiki/FAQ?&cb=6521#How_do_I_create_an_ellipse.3F and then use poly2mask() and bwdist() to create the Euclidean Distance Transform.

Asked:

on 30 Jul 2013

Community Treasure Hunt

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

Start Hunting!