04-23-2009 04:55 AM
I process some images and one of the steps is IMAQ Equalize.vi. Before I put it there was no problems, and after it is on. I have one missing image per 10, 20, 50, I never know. I connected Image Dst and not Image Mask, because I want to process entire image with equalization (I tried with white image mask connecected and the problem was the same, maybe smaller, but was). Maybe I used wrong word, because images are black (not missing). I enclose screen with two probes (befor and after equalization) Any ideas about that ?
Thank you Karol |
04-23-2009 08:11 AM - edited 04-23-2009 08:13 AM
Hi, Karol,
May be you have kind of race condition in your application. As I can see from your partial code, you using destination reference somewhere else.
For example, if you will clear destination image without data flow synchronization, then it may be cleared immediately after equalization.
See attached image below, for example (on your PC you may have another timing for stable reproduction):

Andrey.
04-23-2009 08:19 AM
Of course I agree and thanks for the hint, but I know about that and after many wrong made source code parts I am very carefull about reference. Every reference is different from the other when mI am doing processing. Second thing I do not paint anything on my images. Third thing, if I clear reference I will have no image (I have black one in correct size). I decided to make equalization one more times till I get proper image, but it is not a solutionm for future let say
Karol
04-27-2009 04:06 AM
Hi Karol,
I agree with Andrey that I would bet on reference mismatch.
Even if you write reference to the image indicator terminal and change the image of this reference, the image is updated on the indicator when front panel is updated.
Did you tried to separate and test just a portion of you code, which is doing the histogram?
You can check the name of the image, that was really in use, on the image wire with generic probe.
Regards,
Jiri Keprt
AE NIE Czech Republic
CLA, CTA
04-27-2009 04:30 AM
I can agree with you, I am willing to do that and I can loose a bet :), but show me what's wrong. I have made simple example.
Just run.
KArol Kapala
04-27-2009 08:38 AM
Hi, Karol,
OK, now understand. You have called two equalization parallel. Clear bug in Vision. This function is not thread safe, but VI marked as reenterant, and DLL inside also as thread safe.
Sometimes my test just crashed on my PC (LabVIEW not responding).
As workaround you can place IMAQ Equalize into your SubVI with same connector pane (but do not marl this VI as reenterant), then it should be OK.
Andrey.
04-28-2009 03:09 AM - edited 04-28-2009 03:10 AM
Hi Andrey,
thank you, clear example.
I will document a CAR for developers.
Have a nice day,
Jiri Keprt
AE NIE Czech Republic
CLA, CTA