Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

"bad" image with basler A202k

Hi all,

I am developping a small application to save to disk images from a basler A202k (1004*1004 - 10bit - 48fps) with a PCIe1430.

When working in FreeRun or Triggered mode the images I get are strange... I mean... like sliced Smiley Surprised... please take a look the the images attached and let me know if this is a know issue or if my camera has to be repaired.

PS : I also tested it at a lower rate and in 8bit mode with a PCI -1426 and got the same issue Smiley Sad

Thanks for feedback or ideas or comments

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 1 of 7
(3,920 Views)

Hi TiTou,

Could you please post your application that acquires the image?  What the images look like is that you have on the top of the image data from the current acquisition, and on the bottom data from the previous acquisition.  If your extract code is not quite right, this could occur.  If you post your application, I can look at it and try to find an explanation for you.

-Jeff

Message 2 of 7
(3,845 Views)


kellam a écrit:

What the images look like is that you have on the top of the image data from the current acquisition, and on the bottom data from the previous acquisition.


Hi Jeff,

Indeed, this is what it looks like. I tried many different settings and the problem happens both in triggered and free run mode and even at low frame rate (max is 48 fps and the problem occurs even at 20).
I can't really post the whole code, but basically, there is a state machine with which I :
  1. configure the acquisition (can be triggered or free run mode) with LL IMAQ functions
  2. start the acquisition
  3. enter a while loop that keeps checking the "Last Valid Buffer"
  4. extract only if new
  5. place the image (1000*1000 16bit) in a queue
  6. a VI started dynamically saves the images in the queue
The dynamic VI also check :
  • the time it take to write the image on the hard drive (RAID 0)
  • the continuity of the buffer number extracted
  • the number of images in the queue
I am not at my desk today, I'll send you the dynamic VI later and also a screen shot of the "configure acquisition" part.

Thanks for your help !

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 3 of 7
(3,838 Views)

Hi Titou,

Based on what you've described, I have a probable explanation.  When you extract an image an place in in the queue, are you making a copy of the image?  If not, then when you make the next call to extract, the previously extracted image is released (only one image at a time may be extracted).  As a result, the driver will begin to overwrite the previous image as soon at its turn comes up again in the ring.  If, while you are writing the image to disk, the driver starts to overwrite the image in memory, I would expect to see exactly what you have shown.  I would suggest making a copy of the image before placing it in the queue. 

Let me know if this helps,

Jeff

Message 4 of 7
(3,836 Views)
Very well spotted ! I indeed don't make a copy of the extrated image. I'll do that tomorow and let you know.

thanks a lot !

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 7
(3,831 Views)
Hi again,

Could you check the attached code (LV 8.20) and tell me if this is what you suggest I should do (imaq copy after extracting).

Thanks alot !

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 6 of 7
(3,822 Views)
Great advice Jeff !

It now works perfectly 🙂 🙂 🙂


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 7 of 7
(3,796 Views)