LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview IMAQ ImageToArray

Hello everyone, I have a problem using IMAQ ImageToArray function. I am trying to take pictures with two cameras at the same time using a hardware trigger, the cameras take images in RGB, I convert them to Grayscale (u8) and finally I use IMAQ ImageToArray function. It works when I use one camera but when I use two cameras it works for less than 1 second and I get an error in IMAQ ImageToArray function, the error says it could be an invalid image. Which could be the problem?

0 Kudos
Message 1 of 4
(2,301 Views)

Can you show your code please?

Are you sure the error is not related to the image acquisition? If not, it could be an issue with you IMAQ image buffers, dealing with them can be confusing because they are by-ref beasts.


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

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 4
(2,279 Views)

Here is a discussion that might not be related to your problem but I think it's interesting to know about it if you're using IMAQ images : https://lavag.org/topic/21212-imaqimage-references/


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 4
(2,275 Views)

Hello

Did you try taking images from camera1 and camera2 separately?

If it is working fine separately, then it is definitely image reference issue. Please attach the code to know exactly what went wrong. 

Please go through the below thread to handle image references

https://forums.ni.com/t5/LabVIEW/Best-practice-handling-images/td-p/3630991

 

-Rahul

Hit KUDOS for Thanks

Message 4 of 4
(2,213 Views)