03-27-2014 05:20 AM
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
Solved! Go to Solution.
03-27-2014 05:55 AM
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
03-27-2014 06:48 AM - edited 03-27-2014 06:54 AM
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
03-27-2014 07:22 AM
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'
03-27-2014 07:46 AM
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
03-27-2014 08:08 AM
I tried but something went wrong(?) It gave me for the original a 'white' image.
You can see it here:
Am I doing it wrong?
03-27-2014 08:16 AM
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
03-27-2014 08:21 AM - last edited on 06-11-2014 10:03 AM by Matt_McLaughlin
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]
03-27-2014 08:31 AM
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
03-27-2014 08:39 AM
Ahh, you mean like this?
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!