Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

missing images after histogram equalization

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

0 Kudos
Message 1 of 7
(4,801 Views)

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.

Message Edited by Andrey Dmitriev on 04-23-2009 03:13 PM
Download All
0 Kudos
Message 2 of 7
(4,790 Views)

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 

0 Kudos
Message 3 of 7
(4,786 Views)

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

0 Kudos
Message 4 of 7
(4,756 Views)

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 

0 Kudos
Message 5 of 7
(4,752 Views)

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.

 

0 Kudos
Message 6 of 7
(4,735 Views)

Hi Andrey,

 

thank you, clear example.

I will document a CAR for developers.

 

Have a nice day, 

 

Jiri Keprt

AE NIE Czech Republic 

Message Edited by FredyCz on 04-28-2009 03:10 AM

CLA, CTA

0 Kudos
Message 7 of 7
(4,715 Views)