What's new
What's new

Embed data in a Cognex image?

motion guru

Diamond
Joined
Dec 8, 2003
Location
Yacolt, WA
I have an application where I want to take an image with a Cognex camera and conduct an inspection and then record pass/fail along with the location of the artifact that was imaged. The location information can be sent via. ProfiNet to the camera / vision system.

I am a total newb with Cognex vision systems and thought I would see if there are any experts here who can guide me in this effort.

I have to inspect several hundred artifacts on a large part and I want to be able to identify every image by X,Y location embedded into the image if possible.
 
I have an application where I want to take an image with a Cognex camera and conduct an inspection and then record pass/fail along with the location of the artifact that was imaged. The location information can be sent via. ProfiNet to the camera / vision system.

I am a total newb with Cognex vision systems and thought I would see if there are any experts here who can guide me in this effort.

I have to inspect several hundred artifacts on a large part and I want to be able to identify every image by X,Y location embedded into the image if possible.

I'm not aware of being able to "edit" the image to add anything to it, but with the new Vision Pro systems it may be possible. For sure it should be possible on a secondary computer using data from the camera sent to that computer via the ftp command. You can format a string of info to send to a txt file from your vision program. There is a limit on the length of the string you can send. We use this to to record 2d Data Matrix grading information from each part and save the image separately with a time-stamped file name.

If your measurement routine is the same all the time, you could just use a numbering system in the file name to determine from which image stopping point the image was taken this can then be cross-referenced to the XY location. Unless you are doing line-scan, then you could use which pass number. But I would definitely talk to a Cognex AE person.
 
Other than the location, what else is the camera pass/failing?

Their cameras do mostly pattern recognition or barcodes. I installed a couple simple ones at my last job, mostly to check finishes, thread checking, and OCR. The only way I can see the location working the pass/fail is it has to be a gross location error but it won't be able to send location information. To do so, you program the camera to find an "anchor" image and then draw a boundary on what you want to check. If the check image falls outside that boundary, then it fails. I was working in mass production so make sure the part is locatable and fixed because if it's not in the same position for the camera to take an image, it'll throw things out of whack. Lighting is also important for the camera. If it's in an environment where other lights are going to be on/off, it'll start casting shadows and messing up the image. Material is also a problem. Aluminum will cast a different image than steel so you need to make sure you get the correct light ring. Give a call to Cognex to have a sales/tech rep come demo.

The location measurements sounds more like laser profilometry territory. IDK anything about.
 
I think you have misunderstood the purpose . . .

I have several hundred identical features to check on a part and I am driving the camera to exact locations to acquire an image and determine pass/fail . . . this is easily accomplished with the camera and something we have done without difficulty.

The thing I want to do in addition to this is to add the artifact position data that the image was taken from.

Something like this. . .
FC27D834-32B2-4A01-829A-2ABF3CB8E065.jpg
 
I think you have misunderstood the purpose . . .

I have several hundred identical features to check on a part and I am driving the camera to exact locations to acquire an image and determine pass/fail . . . this is easily accomplished with the camera and something we have done without difficulty.

The thing I want to do in addition to this is to add the artifact position data that the image was taken from.

Something like this. . .
View attachment 223447
Are you using a PC for the database?
 
We could if that is required, we use PC’s on a lot of systems for the HMI (Indusoft) and could easily integrate one in this system.

Without first talking to the cognex AE my first thought would be to use VB or c and write something to merge the data and the image.
If you just need to archeive it maybe even use a metadata tag on the image file.
 
So, you want to stamp the X,Y on top of the image? A sort of overlay?
These images must be passed and stored somewhere.
You could encode this in the image but you want human readable text.
Perhaps best done outside the vision system.
Not a cog expert so not sure how this system can do or handle "watermarks" or titles in the image.
Adding this to the image must be doable.

I do get the many holes and one that is reported off.
Bob
 
Yeah, I don't remember that being native in the cognex software.
Seems like a common enough requirement I bet cognex has a solution, or at least a good idea how to start.
 
I think the only way you are going to do this cleanly is to post-process the image on a separate computer and add the data to the image or as Miguels suggested, to the meta data. For sure I know the camera can't edit the image, so it will have to be offline of the camera, whether it be a cognex solution (that image server system they have) or a separate pc.

Another option and this is what we do for 2d matrix, is you generate a serial number and use that for both the image name and an output string to a text file you could send the string directly to the camera for outputting or have the plc append the text file. It's nowhere near as clean as what you want, but you would have the appropriate data you want.

You also probably want a separate storage solution from your HMI computer. Depending on cycle rate, you can fill up a TB drive or 3 in a relatively short amount of time.
 
I submitted this request to our local vision system sales guy . . . I’ll see what he comes back with.

I even thought of a lens with a prism / lensing in a small portion of the field of view that we could use to focus on an LCD that we could display data on right from the motion controller. That would be easiest from an integration standpoint.
 
I submitted this request to our local vision system sales guy . . . I’ll see what he comes back with.

I even thought of a lens with a prism / lensing in a small portion of the field of view that we could use to focus on an LCD that we could display data on right from the motion controller. That would be easiest from an integration standpoint.

The old TelePrompTer trick.

As for ease of integration, you already need a PC to store the images.
It really shouldn't be that hard to post the data into the image.
 
Our engineers typically use an SSD based Windows CE HMI (Indusoft, PanelView, WinCC) and run a Cognex app on that for pulling up and storing images. (I know close to nothing about this part of our machines).

Going through a VisionView manual, it mentions a means of writing a string onto the image as an overlay . . . I’ll investigate that. If indeed we can do that, we can then run this on a WinCC HMI and make the images available over an FTP socket or write them to a USB that can travel with the part router.

Anybody here familiar with VisionView?
 
Guru,
I don't have anything useful to add to this, because you guys are talking way over my head here... but it does interest me.
I was wondering if you read the January 2018 issue of Quality magazine? They had quite a few articles in there in the vision & sensors section that I 'think' touched on some of the state of the art options that may apply(?).
I'm sure you are well read and probably know all of this already. I found it all quite fascinating what can be now done with less hardware.
Let us know how it works out for you if you can!
Old Gus
 
Our engineers typically use an SSD based Windows CE HMI (Indusoft, PanelView, WinCC) and run a Cognex app on that for pulling up and storing images. (I know close to nothing about this part of our machines).

Going through a VisionView manual, it mentions a means of writing a string onto the image as an overlay . . . I’ll investigate that. If indeed we can do that, we can then run this on a WinCC HMI and make the images available over an FTP socket or write them to a USB that can travel with the part router.

Anybody here familiar with VisionView?
Never worked with it, but that route looks promising.
 
Never used visionview, so can't help there. Like you, we typically have a PC near the application and we just run Insight on that PC to manage the cameras. We do have dedicated drives and even a couple of multi-terabyte NAS systems for image storage. But we are imaging up to 20,000 images per day x 5 cameras in a single machine, so 100,000 images/day makes need for large storage solutions.

I believe what the linked article is referring to is calibration data for an image. If you are using the camera for measurement, the camera "sees" in pixels, not mm or inches. You have to calibrate the camera to a known measurement and this can be quite complex depending on lensing, etc due to optical lensing effects.
 








 
Back
Top