Plot an Ellipse to show the orientation of an image
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi, I am trying to plot an ellipse to show the orientation of an image.
So far I have written the code
clear all; clc; close all;
im = iread('Dog.jpg','grey','double') %Reads the image and converts it to greyscale
ithresh(im); %used to determine the threshold value to represent the dog
im = (im<0.5); %Performs the segmentation
im1 = (im<0.5);
idisp(im) %Displays the image
%Plots an ellipse that shows the orientation of the dog
f = iblobs(im);
hold on
f.plot_ellipse()
It should plot an ellipse to show the orientation but it's not working as I wanted to.
0 comentarios
Respuestas (1)
Jonathan Troville
el 12 de Mayo de 2020
Editada: Jonathan Troville
el 12 de Mayo de 2020
When referencing Peter Corke's code for iblobs it appears that it generates a vector of Region Features, where plot_ellipse is an object of that class. Therefore, the ellipse needs to be defined before plotting it.
Set major and semi major axes as options in "iblobs" as well as the orientation of the ellipse. Please refer again to Peter Corke's iblobs page in which he defines the aforementioned options. I hope this points you in the right direction.
0 comentarios
Ver también
Categorías
Más información sobre Modify Image Colors en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!