Does anyone have any code examples of how to use Video for Linux with quickcams?
I've now installed the redhat 7.3 distro, and based on some of the control centre info I *think* it has detected the cameras, although its hard to tell.
Also, is it possible to run two quickcams simultaneously under VFL ?
- Bob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would guess that it is easier to have multiple devices with the same function under Linux than it would be under windows. As long as you re-direct each output to different files for analysis. Under windows I feel it would be difficult as it (windows) is not intended to deal with multiple video input sources. NOT impossible, just not by design. Once you get it to work for one device, the next should be easyer.
kh
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would guess that it might be easier under linux, but I've got no idea how to use Video 4 Linux.
Under Windows you can use DirectShow to get the two cameras running simultaneously. The older Video for Windows system only supports a single camera.
I've now installed Kylix 3 on my linux system and it works very well, in an identical fashion to the C++ Builder system that I'm running on windows. This means that porting the code between OSs should be very easy, with the only changes being in the way that video and serial comms are handled.
- Bob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ok I've now managed to install the driver. I copied all the *.o files into /lib/modules/linux/kernel/drivers/video and that seemed to do the job.
I'm running redhat 8.0 at the moment which does have V4L support. The next step is to actually display the bytes returned from the camera on the screen. The testquickcam application works ok, and returns what looks like a hex dump of the image. I'm not sure what format the returned bytes are in, but I would assume that it's an RGB bitmap (is that correct?).
I've used Kdevelop and the QT objects Qlabel and QPixmap to put together something capable of displaying the bytes. Using the loadFromData method I've dumped the buffer returned from the camera into a QPixmap object, but at the moment all I'm getting looks like a badly tuned TV set. The format looks obviously wrong.
Does anyone know if the driver does return bytes in RGB format, and if not then what format is it in?
- Bob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Email a picture of the output... the picture is REALLY bad under Linux because the driver just scans the scene pixel by pixel bypassing the built in processor on the camera... that is why the support is not as great as under windows. You might be getting the correct output. I am pretty sure the output is RGB bitmap but I will check.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
However, as I think someone mentioned before it really is exceptionally slow (about one frame every 1 or 2 seconds). This appears to be because the images coming from the cameras aren't compressed. Lack of compression does give a better quality image, but the slow speed means that this would be useless for a robotics application. Does anyone know how to:
1. Switch on the compression
2. Change the resolution of the image (I don't necessarily need the cameras running at full resolution).
3. Alter the contrast/saturation.
Of course a good deal of the sluggish performance comes from the way that the images are displayed on the screen. I've used a relatively inefficient method (the only QT method I could find which worked), and on a working robot there would be no need to display the images on screen. However, I really need to display images for debugging purposes so that I can check what's going on.
Any advice gratefully received,
- Bob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does anyone have any code examples of how to use Video for Linux with quickcams?
I've now installed the redhat 7.3 distro, and based on some of the control centre info I *think* it has detected the cameras, although its hard to tell.
Also, is it possible to run two quickcams simultaneously under VFL ?
- Bob
Bob,
I would guess that it is easier to have multiple devices with the same function under Linux than it would be under windows. As long as you re-direct each output to different files for analysis. Under windows I feel it would be difficult as it (windows) is not intended to deal with multiple video input sources. NOT impossible, just not by design. Once you get it to work for one device, the next should be easyer.
kh
I would guess that it might be easier under linux, but I've got no idea how to use Video 4 Linux.
Under Windows you can use DirectShow to get the two cameras running simultaneously. The older Video for Windows system only supports a single camera.
I've now installed Kylix 3 on my linux system and it works very well, in an identical fashion to the C++ Builder system that I'm running on windows. This means that porting the code between OSs should be very easy, with the only changes being in the way that video and serial comms are handled.
- Bob
I've now managed to compile the version 0.40c quickcam drivers, but when I try to install the mod_quickcam.o file I get the following:
[root@DARWIN qce-ga-0.40c]# insmod mod_quickcam.o
mod_quickcam.o: unresolved symbol video_unregister_device_R13dcb4bc
mod_quickcam.o: unresolved symbol video_proc_entry_R034fcbf9
mod_quickcam.o: unresolved symbol video_register_device_Rb2927b1b
any ideas?
Do you have video4linux compiled into your kernel?
Are you still using RH 7.3, becuase your prompt is the standard Darwin prompt and Darwin is not Linux compatible...
If you are using RH 7.3 then the V4L module is compiled into the kernel so what you want to try is "/sbin/modprobe mod_quickcam.o"
ok I've now managed to install the driver. I copied all the *.o files into /lib/modules/linux/kernel/drivers/video and that seemed to do the job.
I'm running redhat 8.0 at the moment which does have V4L support. The next step is to actually display the bytes returned from the camera on the screen. The testquickcam application works ok, and returns what looks like a hex dump of the image. I'm not sure what format the returned bytes are in, but I would assume that it's an RGB bitmap (is that correct?).
I've used Kdevelop and the QT objects Qlabel and QPixmap to put together something capable of displaying the bytes. Using the loadFromData method I've dumped the buffer returned from the camera into a QPixmap object, but at the moment all I'm getting looks like a badly tuned TV set. The format looks obviously wrong.
Does anyone know if the driver does return bytes in RGB format, and if not then what format is it in?
- Bob
Email a picture of the output... the picture is REALLY bad under Linux because the driver just scans the scene pixel by pixel bypassing the built in processor on the camera... that is why the support is not as great as under windows. You might be getting the correct output. I am pretty sure the output is RGB bitmap but I will check.
After a certain amount of faffing about I've got my first stereo quickcam program working. You can download it at http://www.fuzzgun.btinternet.co.uk/rodney/vision.htm
However, as I think someone mentioned before it really is exceptionally slow (about one frame every 1 or 2 seconds). This appears to be because the images coming from the cameras aren't compressed. Lack of compression does give a better quality image, but the slow speed means that this would be useless for a robotics application. Does anyone know how to:
1. Switch on the compression
2. Change the resolution of the image (I don't necessarily need the cameras running at full resolution).
3. Alter the contrast/saturation.
Of course a good deal of the sluggish performance comes from the way that the images are displayed on the screen. I've used a relatively inefficient method (the only QT method I could find which worked), and on a working robot there would be no need to display the images on screen. However, I really need to display images for debugging purposes so that I can check what's going on.
Any advice gratefully received,
- Bob