Ellipse rotation and storage of image issues
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
0 comentarios
Respuestas (1)
Image Analyst
el 31 de Jul. de 2013
Editada: Image Analyst
el 31 de Jul. de 2013
Of course I don't have your vsg program or your university's toolbox/library so I can't run your program. So please see if reading the FAQ helps: http://matlab.wikia.com/wiki/FAQ?&cb=6521#How_do_I_save_my_figure.2C_axes.2C_or_image.3F_I.27m_having_trouble_with_the_built_in_MATLAB_functions. and also see this: http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer and read this too: http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/
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.
0 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!