From: us on
"M Ladderman" <mirresimons(a)gmail.com> wrote in message <hpv8i4$19c$1(a)fred.mathworks.com>...
> http://picasaweb.google.com/mirresimons/Matlab#5459247749775648946
>
> This is the picture from ASHAPE I get, so I want the coordinates of the red small rectangles. :), So I can draw a convex as in the picture, because this is perfectly fitting my fish.. woohoo :D

according to ASHAPE's various help section, this is how you would do it...

% see also:
ashape -f; % <- show content of P

p=ashape(x,y,r,'-g'); % <- do NOT plot...
ns=p.nshape; % <- # alpha shapes...
as=p.ashape; % <- CELL of indices ax/ay into p.x/p.y for alpha shapes ]1-ns[...
xc=p.x(as{1}).'; % <- ax of alpha shape #1 NOTE: transpose(!)...
yc=p.y(as{1}).';
line(xc,yc,'marker','s','color',[0,0,0]);

us
From: M Ladderman on
thanks us!! I know the help is very good I am sorry I just could not make sense of the output and the help on my own, again sorry and thanks for the help, I am close to getting my fish measurements automised finally!

"us " <us(a)neurol.unizh.ch> wrote in message <hpvar8$ckm$1(a)fred.mathworks.com>...
> "M Ladderman" <mirresimons(a)gmail.com> wrote in message <hpv8i4$19c$1(a)fred.mathworks.com>...
> > http://picasaweb.google.com/mirresimons/Matlab#5459247749775648946
> >
> > This is the picture from ASHAPE I get, so I want the coordinates of the red small rectangles. :), So I can draw a convex as in the picture, because this is perfectly fitting my fish.. woohoo :D
>
> according to ASHAPE's various help section, this is how you would do it...
>
> % see also:
> ashape -f; % <- show content of P
>
> p=ashape(x,y,r,'-g'); % <- do NOT plot...
> ns=p.nshape; % <- # alpha shapes...
> as=p.ashape; % <- CELL of indices ax/ay into p.x/p.y for alpha shapes ]1-ns[...
> xc=p.x(as{1}).'; % <- ax of alpha shape #1 NOTE: transpose(!)...
> yc=p.y(as{1}).';
> line(xc,yc,'marker','s','color',[0,0,0]);
>
> us
From: us on
"M Ladderman" <mirresimons(a)gmail.com> wrote in message <hpvc0o$28g$1(a)fred.mathworks.com>...
> thanks us!! I know the help is very good I am sorry I just could not make sense of the output and the help on my own, again sorry and thanks for the help, I am close to getting my fish measurements automised finally!

please note: ASHAPE has been updated with several new macros and output fields, and the published m-file now contains several examples for programmers on how to extract alpha shape and patch vertices from the output...

us
From: EBS on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <f2d1b2ac-4e40-4f6c-83ed-3ff92fb98eb4(a)b30g2000yqd.googlegroups.com>...
> us
> I thought this fish image wold be a good one for me to practice on
> with your ashaper. I got this far but something's not right. I
> thought I'd try something quick and dirty but I guess I need to really
> dig into the options to figure it out. I need to get going now -
> maybe I can pick it up later in the day.
>
> clc; % Clear the command window.
> close all; % Close all figures (except those of imtool.)
> clear all; % Erase all existing variables.

IA, you give great advice but you should know better than to use 'clear all'! :)

Using 'clear all' removes the compiled M-files from the cache, making MATLAB have to JIT compile them and slowing things down - and no one wants that! It also blows away any breakpoints that the user has set.

Just plain old 'clear' is the command that you're looking for...

Cheers
From: ImageAnalyst on
On Apr 13, 8:12 pm, "EBS " <ericDOTsamp...(a)gmail.com> wrote:
> IA, you give great advice but you should know better than to use 'clear all'! :)
>
> Using 'clear all' removes the compiled M-files from the cache, making MATLAB have to JIT compile them and slowing things down - and no one wants that! It also blows away any breakpoints that the user has set.
>
> Just plain old 'clear' is the command that you're looking for...
>
> Cheers
------------------------------------------------------------------------
clear would work too, or "clear variables". The other stuff that gets
blown away by adding "all" I'm probably not using anyway, but I just
do it for simple demos to make sure I'm starting from as clean a slate
as possible. That's what the Mathworks instructor taught me years ago
in my training class so I just stuck with it. It's never been a
problem for me. But you're right that if you wanted to keep functions
that you ran previously stored in memory and wanted to be superfast
when/if you call them again you wouldn't use all.

I know the help says that it blows away break points, but it does
not. I do it all the time. I just tried it again just now on both a
simple script and a function. My breakpoint remained and it stopped
there. I tried running it both from the green "Run" triangle, and by
typing the script name and function name into the command prompt. No
difference - it always stops. Clear all does not disable breakpoints,
regardless of (and contrary to) what the help says.

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6
Prev: Problem with refreshing figure
Next: problem