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:
mid-line algorithm please

Subject: mid-line algorithm please

From: yousef

Date: 29 Jul, 2009 13:58:02

Message: 1 of 3

hi guys,
 I am looking for an algorithm to calculate and detect the mid-line or center of two edge detection lines( output signal from cmu cam2, edge detection),
this algorithm will as an input to my vehicla robot to control the orientation of the robot

thx

Subject: mid-line algorithm please

From: Dave Brackett

Date: 29 Jul, 2009 21:56:03

Message: 2 of 3

"yousef " <fgerfg@yahoo.com> wrote in message <h4pkha$6k2$1@fred.mathworks.com>...
> hi guys,
> I am looking for an algorithm to calculate and detect the mid-line or center of two edge detection lines( output signal from cmu cam2, edge detection),
> this algorithm will as an input to my vehicla robot to control the orientation of the robot
>
> thx

If you could provide more details and a simple example of your data and what you want you may stand a better chance of getting a useful reply.

Subject: mid-line algorithm please

From: ImageAnalyst

Date: 29 Jul, 2009 22:47:20

Message: 3 of 3

On Jul 29, 9:58 am, "yousef " <fge...@yahoo.com> wrote:
> hi guys,
>  I am looking for an algorithm to calculate and detect the mid-line or center of two edge detection lines( output signal from cmu cam2, edge detection),
> this algorithm will as an input to my vehicla robot to control the orientation of the robot
>
> thx

-----------------------------------------------------------------------------------
yousef:
Probably bwmorph() with the 'skel' option (to calculate the skeleton
of the thick line) will work pretty good. A more complicated option
is to calculate the ridgeline of the Euclidean Distance Map, which you
get with bwdist(). For orientation, you'll need to fit a curve to a
small number of points around your current point, then take the
tangent of that.
Regards,
ImageAnalyst

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