LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Webcam 32 bit to lower image scales

Solved!
Go to solution

I want my webcam to capture images at a framerate of 60 Hz and then to manipulate the outgoing images.

So I want to be able to view what my Webcam captures in real time and 32 bit, but also to be able to view it in 8 bit and 1 bit. The resolution at which I want to view these is 1024 x 768.

 

I haven't come to the part of the scaling yet but that's a bridge I'll cross when I come to it.

My current VI can capture images and I can look at these in real-time with my webcam, but when I try to convert these to 8-bit it doesn't work.

Can anyone tell me what I am doing wrong and how it should be? And if possible also tell me how I can convert the images to 1 bit images?

 

Kind regards,

 

Choisai

0 Kudos
Message 1 of 12
(3,974 Views)

Update: I changed the 32 bit RGB to HSL and now it does produce a black and white image, but it stutters and the image is slightly shifted. By that I mean that my webcam captures an entire image and my normal view shows the centre of that. The HSL image shows however everything to the right of that, so they don't display the same thing, but just different parts of the entire view. The HSL image also 'flickers'. By that I mean it shows a frame and then immediately goes back to full white, and then back and forth between these two.

So I want the entire view for both displays and I want to get rid of that 'flickering'.

If somebody out there is like 'no man, you can do it much easier and get a better result' or something like that: I am all ears

0 Kudos
Message 2 of 12
(3,956 Views)

Hello!

 

IMAQ images are not propagated as data, but as a reference.

 

You cannot reuse the same IMAQ image the way you do.

Create a separate image for each display (Outside the loop!).

 

 

 

Best regards

 

Dan

Message 3 of 12
(3,933 Views)

I tried to do this but that makes the images 'still'. They are not in the while loop, so they only get updated when I stop the program. I tried duplicating the source, but that didn't work out either. Could you please be more specific?

Thank you for help by the way, it is really appreciated

See the attached file for the 'duplication method'

0 Kudos
Message 4 of 12
(3,924 Views)

Hello again.

 

Ok, so now your images have the same name. That means its the same image. Rename one of the images and it will work.

 

Best regards

 

Dan

Message 5 of 12
(3,922 Views)

I tried but something went wrong(?) It gave me for the original a 'white' image.

You can see it here:

Failed Labview VI screenshot 1.pngFailed Labview VI screenshot 2.png

 

Am I doing it wrong?

0 Kudos
Message 6 of 12
(3,916 Views)
Solution
Accepted by topic author Choisai

Now, you startede two sessions with the same camera. You cannot do that.

 

If you only have one camera, remove the second initiation of the session (You can only have one session /camera).

Copy the image data from the firs image to the second one in the loop.

 

You are almost there :.)

 

Best regards

 

Dan

Message 7 of 12
(3,909 Views)

Succesfull Labview VI 2.png

It worked! You can see a screenshot of me in both colour and 8 bit. Thank you so much for your help!

 

[Post Edited 06/11/2014: Images removed]

0 Kudos
Message 8 of 12
(3,906 Views)

Ok, good!

 

But one more thing. You are now grabbing the image twice with the "Grab" function. Don't do that.

 

Use the "IMAX Copy" function instead. Im not sure if you get the exact same image in the two IMAQ images if you do it like you do it now, it might be that the images are consecutive.

 

Best Regards

 

Dan

 

 

Message 9 of 12
(3,904 Views)

Ahh, you mean like this?

Succesfull Labview VI 2.png

This also works. It does indeed give me the exact same image, and produces a little bit more flexibility. Thanks so much for your help!

0 Kudos
Message 10 of 12
(3,897 Views)