|
On Sep 21, 2:37 am, John Smith <noisybo...@gmail.com> wrote:
> On Sep 21, 12:32 am, "Dave Brackett" <davebrack...@hotmail.com> wrote:
>
> > John Smith <noisybo...@gmail.com> wrote in message <d880568b-df02-410b-95ab-5a6aaa94e...@b18g2000vbl.googlegroups.com>...
> > > hi,
> > > please help with Matlab beginner challenge
> > > i need to create an image with few geometrical objects (circles,
> > > ellipses) and then to apply some projective transforms
> > > my problem is that i cant understand how to actually "drow" on image
>
> > > image is AFAIU generally defined as [X;Y;3] matrix,
> > > functions as SCIRCLE1 can compute/return collection of points
> > > representing circle, but the problem is that points are not discrete ,
> > > coordinates are real numbers and not pixels
>
> > > how can i recompute the scircle output to be valid in image
> > > coordinates system ? i.e. how can i "pixelize" it?
>
> > > thanks for your attention, i really missing some basic concept and
> > > will appreciate your help
>
> > > John
>
> > 'getframe' can be used to merge axes even though it is more commonly used to create movie frames.
>
> Thanks, i try 'getframe'
> but it looks like 'getframe' usage is a trick and not method
>
> how problems of this kind are usually solved, is my method of
> converting matlab functions output to pictures matrix data is wrong ?
> would you target it in another way ?
>
> thanks in advance for your help-
------------------------------------------------------------------------------------------------
MATLAB is really weak in this area. There are some primitive
functions for drawing into the overlay (such as rectangle() if you
want to draw a circle, and line() if you want to draw a line) but no
real way that I know of to draw right into the underlying image. So
you have to use "tricks" such as getframe and then apply logical
operations. And you have to be careful with that since I think when
it gives you the rasterized version of the overlay it might be the
size of the image on the screen, not the true original matrix size of
the underlying image (I'd have to recheck this).
|