Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to segment the line from this image?

Seeing from the image attached, a target line is inside a circle, with many noises around it. I want to segment the line from the circle. I used autothresholding to threshold the image, but failed. The target line was mixed in noises.
Is there any other method in IMAQ to deal with it?
Thanks a lot
0 Kudos
Message 1 of 6
(3,610 Views)
shenhao,
I see that you are still stuck with your fiber optic problem 😉

First thing to do is always to improve the original image. Start from the previous file (bh1.bmp) and increase the dynamic of the image. This will facilitate later operations. One way of doing that is to create a mask then to equalize the image, before applying a series of basic operations (gaussian smothing, edge extraction, thresholding, and so on...
Attached is a script that can be used with Vision assistant, the corresponding vi and the resulting image. It's far from optimum, and probably will not work on all your images. But that could be a starting point.

CC
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 6
(3,598 Views)
Dear CC
I'm very glad to receive your advice everytime. You are very warmhearted. Thank you!
The scratch trouble is puzzling me for a long time. Now my condition for grabbing images is hard to improve, so the focus of my work is on the software.:(

My labview is 6.1, and can't open your attached vi. Would you please attach a picture of source code. Thank you.

shenhao

帖子被shenhao在05-07-2005 10:26 PM时编辑过了

帖子被shenhao在05-07-2005 10:27 PM时编辑过了

0 Kudos
Message 3 of 6
(3,596 Views)
Here is the 6.1 version. PLease try to upgrade because it's really a pain to convert vision vis from 7 to 6.
Hope this will help you to solve your pb !

CC
Chilly Charly    (aka CC)
0 Kudos
Message 4 of 6
(3,589 Views)
CC
Thank you!
From you i have learned many new methods for image processing.
0 Kudos
Message 5 of 6
(3,586 Views)
(Sorry, I'm new to LabVIEW, so my reply is based on general vision experience rather than N.I.-specific experience.)

A few things you might want to try:

1. Use morphology to reduce the noise.

2. Use a edge-finding algorithm that fits lines using a Hough algorithm. In some vision systems this edge could be found with a single vision tool using default settings; I assume that N.I.'s vision software can do the same, but I couldn't say what the specific tool would be.

3. If you aren't already doing so, locate the circle (a wafer?) first, then dynamically locate a mask that excludes the perimeter of the circle. Whenever possible, use lighting, dynamic location (reference frames), and masks to ignore irrelevant details in the image.

illuminate - acquire image - locate - simplify - identify - report
0 Kudos
Message 6 of 6
(3,517 Views)