After spending some effort searching online, I found one solution:
r = 5;
x1 = linspace(pos.cx – r, pos.cx + r);
y1 = linspace(pos.cy, pos.cy);
x2 = linspace(pos.cx, pos.cx);
y2 = linspace(pos.cy – r, pos.cy + r);
index1 = sub2ind(size(im), round(y1), round(x1));
index2 = sub2ind(size(im), round(y2), round(x2));
im(index1) = 127; % set the valudes to 127 for display
im(index2) = 127; % set the valudes to 127 for display
The above code snippet is used to draw a cross on an image or matrix. Because of over sampling, the line drawn is without aliasing artifacts. For drawing lines on figures, there exists an easier solution, just use function ‘line’. For example:
line(rect(1,:), rect(2,:),’Color’,’r’,’LineWidth’,2);
I do not even know how I ended up here, but I thought this post
was great. I do not know who you are but certainly you are going
to a famous blogger if you aren’t already 😉 Cheers!
I am really impressed with your writing talents and also
with the structure to your weblog. Is this a paid theme
or did you customize it yourself? Anyway stay up the nice high quality writing,
it is rare to peer a nice blog like this one nowadays.
.
I’ve written extensively about the menstrual cycle and problems during cycles
in other publications and an in-depth discussion is beyond the scope of this article.
You do, however, have control over just about everything else.
I explained that for many years I read all I could
on what different ailments require different vitamins and minerals to help relieve symptoms.