Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to extract overlay information for transfer over tcp?

Hey,

 

I'm working on a vision inspection system where the image processing is done on a remote PC, and then the images and overlays are sent over TCP to a remote HMI. There are roughly 90 inspections being performed in parallel. We want to send the image to the HMI right when the image is captured, then overlay results on to the image as the various inspections are completed.

 

The images are roughly 10MP, so ideally we just want to transfer the overlay information as the inspections are finished rather than the entire image each time. 

 

The current solution I've come up with is:

  • At the end of an inspection, use Copy Overlay to copy the overlay of the working image to an empty image with no size
  • Use IMAQ Flatten Image to String, including the Image and Vision Info, to convert the Overlay Image to a string
  • Send flattened string over TCP, unflatten on the remote HMI
  • Copy overlay from the Overlay Image on to the main image on the Remote HMI

 

This drastically cuts down on the size of the data we're transferring (down from 10MB+ to ~30kB), but I was wondering if there's a better way to do this. I see there are VIs like "IMAQ Is Vision Info Present" which can tell if there's overlay information there, and "IMAQ Remove Vision Info" to clear it. There are functions to see if there is an overlay and functions to clear it, so is there anything to extract Vision Info so it can be easily transferred over TCP?

0 Kudos
Message 1 of 2
(2,369 Views)

Hi ng1902,

 

While I couldn't find much information about exactly what you're hoping to do, I was able to find a few forum threads that discuss moving the overlay around separately from the image. This may be the key to what you're hoping to do, but have a look and let us know what questions you still have at that point.

 

Link 1: How to pull only the section of an image within an ROI, while maintaining its overlay. This one seems to be solving a different problem, but the way they manage their overlay may be useful in your situation, as their requirements include needing to maintain the overlay as separate data.

 

Link 2: Working with a PNG file, how are non-destructive overlays handled on the back end? Goes into the differences between destructive and non-destructive overlays. From your description, it sounds like yours are non-destructive overlays. Information from this one is a few years out of date, so I wouldn't put too much stock in the descriptions of how the images are handled behind the scenes.

 

Link 3: Community example designed to extract information about an overlay. Depending on the specifics of your situation (what filetype you're using, what kind of overlay you have, etc) this may give you a few tips on working with previously-created overlays to get you started.

 

 

Kathryn K.
Technical Support Engineer
National Instruments
http://ni.com/support
0 Kudos
Message 2 of 2
(2,333 Views)