From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-18-2017 02:29 AM
HI all,
There is probably a trivial answer to this but as yet I don't have it. Is it possible to clear an image buffer without destroying the reference to it? I can clear the image indicator by wiring an empty image constant to it, but if I do this to the buffer reference it appears to destroy the reference.
Thanks
Simon
05-18-2017 05:04 AM
The Image Buffers created using IMAQ Create are references to the memory location with Image Name as pointer to it.
-To Properly dispose this image and memory you have to use IMAQ Dispose.
05-18-2017 05:12 AM
Hi Uday,
This is not quite what I meant. When you create a buffer reference I guess initially it points to an image location with no data in it. You capture an image and the reference points to some data. I was wondering whether it was possible to revert to the original state by deleting the data but not the reference.
As of this morning I have decided to dispose and recreate the buffers each time, which works, but it would be nice to know if the buffer data can be deleted and the reference maintained.
Thanks
Simon
05-18-2017 06:13 AM
When you are writing empty image constant to image wire it will be overwritten but the reference will not be released unless you use IMAQ Dispose as per my knowledge.
05-18-2017 08:19 AM
I found that writing an empty image constant to the image wire prevents you loading an image into memory, so I assume that the reference has been disposed of.
05-18-2017 10:01 AM
I can think of two simple methods. If you want to keep the existing image size, use IMAQ Fill to set the entire image to a specific color. Another option is to set the image size to either 0x0 or 1x1, which should eliminate all the data in the image.
Bruce
05-18-2017 10:41 AM
Thanks. I'll check this out.
Simon
05-24-2017 05:04 PM
image buffer place in labview are based on name that you select for imaq vi and it is image reference
if you want to not lose reference but make buffer empty any where that you want just wire an zero size image to one Imaq with same name in this case you still have your reference based on imaq name but buffer of this reference is empty