Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Zero-Crossings

Subject: Zero-Crossings

From: Manal

Date: 16 Jun, 2010 17:12:05

Message: 1 of 7

Hi,
I hope some can help me
I am struggling on this for 4 days

I am trying to implement the star skeleton algorithm
I extracted the border, smoothed the border by using (DFT + low pass filter + IDFT)
the next step is to find the five extreme points which are detected by finding zero-crossings of the different function

s(i)=d(i)-d(i-1)

could some one explain this to me

I'll really appreciate that

thanks in advance

Subject: Zero-Crossings

From: Manal

Date: 16 Jun, 2010 17:21:04

Message: 2 of 7

to be clear
this is the algorithm that I am trying to implement

http://www.vision.cs.chubu.ac.jp/04/pdf/VSAM08.pdf

Waiting for some one to help me :(

Subject: Zero-Crossings

From: Manal

Date: 16 Jun, 2010 20:36:04

Message: 3 of 7

please guys help me
I just need some one to explain it for me

Subject: Zero-Crossings

From: TideMan

Date: 16 Jun, 2010 21:25:58

Message: 4 of 7

On Jun 17, 8:36 am, "Manal " <be....@live.com> wrote:
> please guys help me
> I just need some one to explain it for me

I know nothing about star skeleton and I'm not interested in reading
the reference you posted.
But I can advise on zero crossing analysis.
Here is how you can locate them:
t1=y(1:n-1);
t2=y(2:n);
tt=t1.*t2;
indx=find(tt<0);

What it does is locate the places where adjacent points have different
signs (i.e., they are either side of the axis).

Subject: Zero-Crossings

From: Manal

Date: 16 Jun, 2010 22:00:22

Message: 5 of 7

TideMan <mulgor@gmail.com> wrote in message <9e9eebf5-6e64-468f-9dd7-b43f8be4d44e@r27g2000yqb.googlegroups.com>...
> On Jun 17, 8:36 am, "Manal " <be....@live.com> wrote:
> > please guys help me
> > I just need some one to explain it for me
>
> I know nothing about star skeleton and I'm not interested in reading
> the reference you posted.
> But I can advise on zero crossing analysis.
> Here is how you can locate them:
> t1=y(1:n-1);
> t2=y(2:n);
> tt=t1.*t2;
> indx=find(tt<0);
>
> What it does is locate the places where adjacent points have different
> signs (i.e., they are either side of the axis).

thanks a lot for your replay
thats what I want
some one to give me the sample code for the zero-crossings

but meaning of the zero-crossings for the difference function??????

I've tried your code and it display all the vector content as "indx" value

Subject: Zero-Crossings

From: TideMan

Date: 16 Jun, 2010 22:24:55

Message: 6 of 7

On Jun 17, 10:00 am, "Manal " <be....@live.com> wrote:
> TideMan <mul...@gmail.com> wrote in message <9e9eebf5-6e64-468f-9dd7-b43f8be4d...@r27g2000yqb.googlegroups.com>...
> > On Jun 17, 8:36 am, "Manal " <be....@live.com> wrote:
> > > please guys help me
> > > I just need some one to explain it for me
>
> > I know nothing about star skeleton and I'm not interested in reading
> > the reference you posted.
> > But I can advise on zero crossing analysis.
> > Here is how you can locate them:
> > t1=y(1:n-1);
> > t2=y(2:n);
> > tt=t1.*t2;
> > indx=find(tt<0);
>
> > What it does is locate the places where adjacent points have different
> > signs (i.e., they are either side of the axis).
>
> thanks a lot for your replay
> thats what I want
> some one to give me the sample code for the zero-crossings
>
> but meaning of the zero-crossings for the difference function??????
>
> I've tried your code and it display all the vector content as "indx" value

You say that you've done this:
"I extracted the border, smoothed the border by using (DFT + low pass
filter + IDFT)"
which involves quite complicated Matlab coding, yet you ask a question
like this that demonstrates a lack of understanding of pretty basic
Matlab concepts?

Sigh..........
indx is a vector showing the locations of the point before each zero
crossing.

Try this:
t=[0:length(y)-1]';
clf
plot(t,y,t(indx),y(indx),'rx')

Subject: Zero-Crossings

From: Manal

Date: 16 Jun, 2010 23:49:04

Message: 7 of 7

thanks a lot for your help
I really appreciate your replay

Honestly, I am a beginner in Matlab and image processing
and this is my first time to work with it
this is my graduating project and I am working on this code for a month

thanks a gain and pleas be patient with me
I'll come back if I have questions

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us