07-27-2011 09:23 AM
07-27-2011 09:26 AM
Have you tried using IMAQ Copy?
07-27-2011 09:38 AM
Thank you for your reply.
For IMAQ Copy I need a second Image Reference plus extra memory space and a loop that continuously copies images as the camera is running. It has to be possible to acces the same image in memory with both applications.
07-27-2011 09:51 AM
Hi,
try just passing the Image Reference to the other Appplication. You can create the Connections on the Frontpanel with Vision -> IMAQ Image.ctl
If this is about some sort of live-evaluation of pictures, have a look at the consumer-producer-loop architecture.
Or did I understand your question incorrectly?
Greetings
07-27-2011 09:51 AM
hmm so you acquire an image then you pass it through an application that does some calculations on it, right? so do you want all the images to be accessible in memory or just the previous/current image? You could try creating a memory buffer and just extract the relevant IMAQ reference when you need it.
07-28-2011 03:57 AM - edited 07-28-2011 03:59 AM
Thank you for your replies.
@kper
It are 2 seperate applications, 2 seperate executables. Therefore it is not possible to use Frontpanel elements to connect 2 applications or use the Producer/Consumer design pattern.
@Nik1
I only want the current image to be accessible in memory. "You could try creating a memory buffer and just extract the relevant IMAQ reference when you need it." How can I do this, please explain.
Please let me try to explain myself in other words. One application already made an Image Reference using the "IMAQ Create" function. A second seperate application (on the same machine) would ideally get access to the same Image Refence in memory, but I have no idea how to program this. Using "IMAQ Create" a second time with the same parameters at the inputs works, but deletes the current image in memory. Which is highly unwanted.
07-28-2011 04:45 AM
07-28-2011 05:46 AM
If they are in 2 different VIs, then you can't do what I suggested and roflk is correct (as far as I know). Would it work if you embedded 1 of the applications into the other? So you had 1 application as a sub-vi in the main vi?
01-14-2020 05:57 AM
I know I'm very late, but I hope it will help other people.
Not sure if it will work between apps (not sure if they share an environment, but they should share a run-time engine at least), but you can indeed store images in memory and pass them between sub-VIs using this trick, you just need to implement it a bit differently.
If you place a probe on an image wire and inspect it, you can notice that its value is represented as a string which you have passed to IMAQ Create VI. So you can simply coerce image name to IMAQImage type or use it directly as a reference with automatic coercion.
To check if image with such name already exists you can use Not A Number/Path/Refnum? function.