Hi,
in some cases we found out that the image of a webcam looks stretched when using a webcam on a mac. In my case I used a Logitech C910 (which definitely supports 16:9 resolutions) on a Mac running Mac OS X 10.6.8.
In my project I want to show a webcam video in 16:9 but want to switch between different 16:9 camera resolutions (320 x 180, 480 x 270, 640 x 360). Under Windows every resolution of the camera looks fine - nothing is stretched. You can check whether the image is stretched or not best by holding a round cup in front of the webcam and check whether it is still round in the video. But when using a Mac, the webcam video looks sometimes stretched. The cup is not round anymore.
I have built a small test application running at http://interactive-pioneers.com/camTest/. It shows three different webcam displays: on the left hand side the video will always resize to the resolution, width and height set in the dropdown (4:3 and 16:9). The video in the middle will always stay 16:9 with a fixed size of 320 x 180. The video on the right hand side will always stay 4:3 with a fixed size of 320 x 240. Whenever you change the dropdown, the webcam size will be updated via camera.setMode.
Under Windows everything works as expected:
- left video: cup is always round, no stretching
- video in center: cup is always round whenever a 16:9 resolution is chosen. cup is stretched vertically whenever a 4:3 resolutions is chosen
- right video: cup is always round whenever a 4:3 resolution is chosen. cup is stretched horizontally whenever a 16:9 resolutions is chosen
This is what I totally expected. It makes sense.
But not on a Mac:
- left video: cup is round for 320x240 (4:3), 320x180 (16:9) and 640x480 (4:3). It is stretched vertically for 480x360 (4:3) and 480x270 (16:9). It is stretched horizontally for 640x360 (16:9). This doesn't make any sense for me. It should be round in all cases as it does under Windows.
- video in center: cup is round for 320x180 (16:9) and 480x360 (4:3). It is stretched vertically for 480x270 (16:9). It is stretched horizontally for all other resolutions. It would make sense if the cup is round for all 16:9 resolutions as under Windows.
- right video: cup is round for 320x240 (4:3),640x480 (4:3) and 640x360 (16:9). It is stretched vertically for all other resolutions. It would make sense if the cup is round for all 4:3 resolutions as under Windows.
Due to this test result I am not able to show a 16:9 webcam video on a Mac which is not stretched in some 16:9 resolutions.
Is there any chance to get around this issue?
Please find screenshots with the cup here: http://interactive-pioneers.com/camTest/cam_squeeze_images.zip
Thanks for your help.
Malte