Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Straight edge detection in binary image

Solved!
Go to solution

Hi,

 

I've got an image I'm playing with in Vision Assistant. I've used the threshold function to binarise it, and I've now got two distinct straightish blobs in the lower righthand corner. I want to be able to detect the outer edges of this pair of bloba, but can't seem to do it using the Edge Detector or the Straight Edge tools.

 

StraightEdge.jpg

 

Can you help please?

 

Thanks!

Dave

 

Message Edited by dave_burbridge on 05-19-2010 10:08 AM
0 Kudos
Message 1 of 4
(4,257 Views)
Solution
Accepted by topic author dave_burbridge

Most of the edge detection routines default to a difference of 20 or more at the edge.  Since this is a binary image, the difference at the edge is 1.  You can either set the min contrast on the edge detection routines to 1, or multiply your binary image by 255 to get higher contrast edges.  I like the multiplication because it is fast and easy.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 4
(4,246 Views)

ed.JPG

 

 

The edge strength needs to be kept at 1 for binary images and also use "Remove small particles". As you can see there are stray particles you have got after threshold.

0 Kudos
Message 3 of 4
(4,234 Views)

Thanks, Bruce & muks, that's exactly what I was after. I knew it must be something pretty simple!

 

For anyone else reading this, in VA2009, "Contrast" is now called "Edge Strength", but setting it to 1 for a binary image does the same thing.

 

Cheers,

Dave

 

0 Kudos
Message 4 of 4
(4,221 Views)