K3's AstroPhotography
"When I consider your heavens, the work of your fingers, the moon and the stars which You have set in place, what is Man that You are mindful of him?" -- Psalm 8:3,4

Philips Vesta Pro (PCVC680K) picture quality tests

1. Frame rate and picture quality
2. YUV420 (I420) codec versus RGB


Frame rate and picture quality

During my webcam CCD astrophotography practice I noticed, that picture quality, what you can get from Philips Vesta Pro webcam is depending on selected frame rate. Philips Vesta Pro enables to select from 6 frame rates: 5, 10, 15, 20, 25, 30 fps. Connection between frame rate and picture quality is evident from camera's video source setting dialog. Here is part of dialog window showing frame rate options:

The reason of above facts is limited throughput of USB. Vesta Pro is using YUV420 codec, which requires 12 bits per pixel. That means, that, for example, 640x480 pixels frame has size 460800 bytes. For 5 fps video stream it requires 2304000 bytes/s - it is more than throughput of USB. That's why there must be used some compression of video data, which are sent through USB. As my measurements confirmed, the compression is lossy.

I remind, that it is difference between shutter speed and frame rate. Shutter speed is always equal or higher than frame rate (for Vesta Pro). That means, that for lower frame rate it is possible to setup the same exposure like for higher frame rate. But in reversal it is not valid.

The next table is showing results of my tests. I captured my red lamp (similar to Mars) light. Exposure was set to manual settings (shutter speed 1/100s), so the same conditions were keeped for all captured video files. The only parameter, which was alternated, was frame rate. To ensure the highest quality of the images on this page with the reasonable size, the result bitmap frames were cropped and compressed to JPG (quality 100%, smoothing 0). Complete package with bitmaps can be downloaded here (325kB). It would be interesting to do the similar tests with lamps of another colors.

  5 fps 10 fps 15 fps 20 fps 25 fps 30 fps
320x240
30 frames
stacked
320x240
individual
frames
640x480
30 frames
stacked
5 fps 10 fps 15 fps
20 fps 25 fps 30 fps
640x480
individual
frames
5 fps 10 fps 15 fps
20 fps 25 fps 30 fps

The most visible difference can be seen in 640x480 pixels frames - pictures with frame rate higher than 15 fps are blurred - it seems that image is only a result of 640x480 interpolation of 320x240 image.
Less visible difference is between 640x480 frames with 5, 10 and 15 fps. But for further image processing the quality difference can be much more noticeable. The next table is showing images (stacked 30 frames) in 200% size to show better the differences. The difference between 5 fps and 15 fps is apparent. 20 fps image is blurred and it is shifted down (interesting effect, when 20, 25 or 30 fps frame rate is selected).

5 fps 10 fps
15 fps 20 fps

The next table is showing the stacked 640x480 images processed by unsharp masking. The artifacts in 10 and 15 fps images are visible even though images are not magnified.

5 fps 10 fps 15 fps

The last table compares the 320x240@5fps image with downsampled 640x480 images to the same size. It shows, that better result is achieved with downsampled image of 640x480@15fps than with 320x240 image. But downsampled 640x480@25fps image seems to be of worse quality than 320x240@5fps image. Downsampled images were a little unsharp-masked.

320x240@5fps 640x480@5fps
downsampled
640x480@15fps
downsampled
640x480@25fps
downsampled

Conclusion

  1. The best picture quality and resolution can be achieved in 640x480@5fps.
  2. Downsampled 640x480@15fps image to 320x240 has better quality than 320x240@5fps
  3. 640x480@20fps (or higher frame rate) gives worse results after downsampling than image captured at 320x240 resulution.
  4. As at 5fps frame rate can be set any shutter speed, this is the most suitable mode for astroimaging. The only disadvantage is, when some dynamic effects are captured. For capturing the best moment without atmosphere's turbulences it is the same probability for 5fps and 15fps, if the same number of frames is captured.

YUV420 (I420) codec versus RGB

Each raw frame grabbed from Philips Vesta (Vesta Pro) is coded in I420 codec. It is planar YUV format. It means, that each component - Y, U, V - is stored as separated array (as well another group of YUV exists - packed YUV format, but it is not a case of Philips Vesta). Each component is sampled by 8 bits. Y is a luminance component, U and V define color vector. Y component is digitized for each pixel of image. However, U, V components are subsampled to half resolution - by dividing the image into 2x2 "macropixels". By another words, if the image has width w and height h, then Y 8 bit plane (w x h) is followed by 8 bit 2x2 subsampled U and V planes (w/2 x h/2). The situation is clear from the picture.
It is evident, that color resolution is only a half of luminance resolution. As YUV420->RGB transformation is calculated from Y and UV components, the result RGB resolution is affected by half resolution of UV.
RGB to YUV Conversion
Y = 0.299R + 0.587G + 0.114B
U = (B-Y)*0.565
V = (R-Y)*0.713
YUV to RGB Conversion
R = Y + 1.403V
G = Y - 0.344U - 0.714V
B = Y + 1.770U


Grayscale image decoded by Video for Windows API Image get by direct using Y channel

The image has greater contrast. It is caused by "stretching" luminance channel (according to YUV->RGB formula).

The image is more "flat". The books in bookshelf can be easily distinguish.

Histogram is showing that some luminance values are missing
For better comparison, I created animations...

For better understanding YUV420 format I created 2 AVI frames - 320x240 and 640x480 with the same scene (5 frames per second). YUV frames were extracted from AVI by means of K3CCDTools. U, V planes were resampled (simple double-sizing) to the size of Y channel.
The scene is work of my wife Zuzka (Susan).

Format 320x240 Format 640x480 resized to 320x240 without any processing. Click the pictures to see full 640x480 frames.

RGB image

RGB image

Grayscale image (RGB->Grayscale conversion)

Grayscale image (RGB->Grayscale conversion)

Y channel (luminance)

Y channel (luminance)

U channel. Lower resolution is visible.

U channel. Lower resolution is visible, but still better than in 320x240 format.

V channel. Lower resolution is visible.

V channel. Lower resolution is visible, but still better than in 320x240 format.

Another example of resolution power (320x240 format):


RGB

Y channel

U channel (no lines in circles)

V channel (no lines in circles)

For further reading:

From ADC to JPG or A Long Journey a Pixel Takes from Webcam's ADC to the PC

 

Back to Astro Photography page


Computer generated images, real images, drawings and texts are property of the author and may not be reproduced or used without permission of author.


Home

Last Update: 24.2.2002