LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an after update event available on the Image control?

I have found a behaviour I don't understand. I have an Image control on the front panel, and am using the MouseDown event in an event loop.

I have returned the ROI coordinates from a property node wired to ctl reference provided by the event structure.

Basically, I have found that when I single click on the image, the ROI coordinates (as shown in an array indicator) do not always update (they do sometimes).

When I double click, they always do.

The image control is being updated at about 17 frames per second.

I assume that I am sometimes "missing" the image update when I am single click, and never miss it when I double click as this takes longer giving the image control time to return the ROI coordinates. In this sense, I assume that an image is deleted from the control, and any ROI becomes undefined, before the new image is updated into the control and the ROI becomes redefined.

Can anyone help out on this rather bizarre issue?
0 Kudos
Message 1 of 7
(3,039 Views)
Hi Probably,

Cetainly sounds like a strange one you have here.
Is it possible to post some example code so I can verify and examine the problem here?

Best regards,

Message Edited by Wasntme on 04-08-2005 02:59 PM

Matt Poole | Applications Engineer | National Instruments
0 Kudos
Message 2 of 7
(3,023 Views)
I have posted some sample (non-executable) code. Basically, I am grabbing images in a while loop using IMAQ-1394. These are then sent to the Camera Output Image Display indicator.

I am monitoring for mouse down events on this indicator. When this happens, a property node is used to return the ROI coordinates into an array indicator called ROI Coords. Also note that every time an image is grabbed, the ROI coordinates are returned into a cluster indicator called ROI.

Here's the issue:
ROI updates every time the buffer is copied into the Image Display
However, I would expect ROI Coords to update every time I click on the image. It doesn't, it only happens sporadically.

Does anyone understand that?
0 Kudos
Message 3 of 7
(3,006 Views)
Hi Probably,

Thanks for posting some code.
Ive verified this behavior. The ROI returned from the event stucture is an iteration behind the ROI in the image while loop, unless the user double clicks the image.
I am currently sctratching my head hard for you and as soon as I have an explanation I'll post it for you.

Best regards,
Matt Poole | Applications Engineer | National Instruments
0 Kudos
Message 4 of 7
(2,985 Views)
Matt,

I found an even more strange thing for you to enjoy. If you place a probe on the ctl ref provided by the event structure (i.e. returning a reference to the Camera Output indicator), the ROI coordinates in the event loop are now updated on every mouse click.
Bizarre!

PS Some documentation with the ROI cluster would have been useful!
0 Kudos
Message 5 of 7
(2,982 Views)
Hi Probably,

Easy fix for you. Dont use the Mouse Down event. Use Mouse Up. Works 100%. It's worth unchecking the 'Lock front panel' in the Event setup also.
To be honest I don't know exactly why this is is a problem.
I've highlighted this for further investigation.

But hopefully this can help fix your problem.
Let me know how you get on.

Best regards,
Matt Poole | Applications Engineer | National Instruments
0 Kudos
Message 6 of 7
(2,970 Views)
Thanks for your help Matt, it seems to work fine using the MouseUp event. This has resolved the issue.
0 Kudos
Message 7 of 7
(2,957 Views)