Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision assistant - image source with Separation Overlay (Watershed Segmentation)

Hi Folks -

 

In Vision Assistant, there is an option on the Watershed  Segmentation Setup tab to display 'Image Source with Separation Overlay,' yet the code behind this particualr step is not extracted to the script.  I have tried some masking procedures in combination with edge detection and custom color tabling that have been successful in allowing me to overlay the watershed lines on top of the original image.     But I would like to know what code is used by NI here (and why it is not exposed to the script).

 

 

watershed.png

Thanks,

 

Don

Message 1 of 6
(5,324 Views)

Hi Don,

 

I'm not sure exactly what you're asking here. Do you want to see the code underneath? If you go to Tools»Create LabVIEW VI you can see your Vision Assistant script in all its LabVIEW glory. Alternatively, there's C and .NET.

 

We do have a watershedding VI in LabVIEW as well.

Jeff | LabVIEW Software Engineer
0 Kudos
Message 2 of 6
(5,305 Views)

Hi Jeff -

 

Run Vision Assistant (I am working still with 8.5, soon to upgrade to 9.0 64-bit).

 

Open the pills.jp2 image in the Vision\examples\images directory.

 

Perform Threshold step followed by Danielson Distance Transform step.  Then select to do the Watershed Transform.  Now refer to my image in my prior post.  Look at the middle left of the page and you will see an option to select 'Image Source with Separation Overlay'.  You can also toggle with the other option which is just to display the transform.  Now with the 'Image Source with Separation Overlay' option, and say OK.  Does the watershed transform step now provide for this overlay option in the generated script?  Select to create the code.

 

Now open the new VI up that you created.  Again, does the watershed transform step now provide for this overlay option?

 

So what I am asking is this:  Since there is this option available in Vision Assistant, is there a way to create code in which the watershed transform step is executed WITH THE 'Image Source with Separation Overlay'?

 

I was able to create my own code using Roberts edge detection ANDED with original image to get where I needed but I wanted to see how Vision was doing this to see if there is a more expedient solution.

 

See:   http://forums.ni.com/ni/board/message?board.id=200&message.id=23303&query.id=108671#M23303

 

for my solution.

 

Thanks for your help.

 

Don

0 Kudos
Message 3 of 6
(5,301 Views)
Interesting catch, Don. Let me look into this and see if this is a design choice or simply an unavailable feature. If it is the latter, I will file a corrective action request with R&D.
Jeff | LabVIEW Software Engineer
0 Kudos
Message 4 of 6
(5,287 Views)
I've spoken with R&D and have filed CAR (corrective action request) 191932.
Jeff | LabVIEW Software Engineer
0 Kudos
Message 5 of 6
(5,286 Views)
I tried on 8.0 and found the same issue existing. Hmmm nice catch.
0 Kudos
Message 6 of 6
(5,271 Views)