Зарегистрировано: 331

Помощь  Карта сайта

О чем пишут?

Аркадий Аверченко. Рассказы. ч.I

Аркадий Аверченко. Рассказы. ч.I Содержание Автобиография День человеческий Дело Ольги Дыбович Юмор для дураков Мужчины Кривые Углы Виктор Поликарпович О шпаргалке (трактат) Искусство и публика Современный роман Былое Корибу Муха Хлопотливая нация Молния Отец Весёлый вечер Страшный человек Чад ..

Я так вижу!



Тексты. Прозариум

Тексты на сайте могут публиковаться как в составе книг, по которым они "разложены", так и по отдельности. Тексты можно публиковать на странице их владельца, в блогах, клубах или рубриках сайта, а так же в виде статей и объявлений. Вы можете публиковать на сайте не только собственные тексты, но и те, которыми хотите поделиться с читателями, соблюдая авторские права их владельцев.
Prozarium CMS | Реклама, сотрудничество | Разработка, продажа сайтов

Для добавления вашего собственного контента, а также для загрузки текстов целиком, загрузки текстов без разбиения на страницы, загрузки книг без разбиения на тексты, для работы с закладками необходима авторизация. Если вы зарегистрированы на сайте, введите свой логин и пароль. Если нет, пожалуйста, пройдите на регистрацию

Опубликовано в: Клуб: Астрофото
<--Астрономия (ЛА)


Black and White Webcam in RAW Mode for Astronomical Imaging


Using a Black and White Webcam in RAW Mode for Astronomical Imaging

By Philippe Bernascolle
translated from French by Eamonn O’Fearchain and David Moore (www.astronomy.ie)


Webcams are used widely by amateur astronomers, especially for high resolution imaging of the planets, but also for deep sky objects.
More recently, there has been a veritable flowering of ideas and developments in the world of webcam usage. I speak of the RAW mode, i.e., the use of the camera with no (or almost no) compression.

ToUcam Pro

The Philips ToUcam Pro (PCVC740k) is a webcam which communicates with a computer via the USB port. It uses a Sony ¼” colour sensor (CCD chip), the Sony ICX098BQ. The signal is digitized on 10 bits (1024 levels) and is then processed by an onboard microprocessor to give RGB images on 3x8 bits (16 million colours). The microprocessor (SAA8116HL and its EEPROM 24C04) performs the following operations on the video stream :

Subtraction of the dark signal
Calculation of the RGB values
Contrast enhancement
Compression of video stream

The microprocessor is governed by instructions stored in the EEPROM (24C04) mentioned above. The details of these instructions are now known.

The ToUcam can be (and has been) modified by do-it-yourself experts in a variety of ingenious ways, for example, there are various modifications to enable long exposure of deep sky objects. However, what I want to tell you about is the modification developed by Etienne Bonduelle (www.astrosurf.com/astrobond/ebrawe.htm), which replaces the original sensor with a black and white (B&W) sensor.

It is not generally known that when Sony and others manufacture a CCD matrix it is black and white. The colour filters are only added to the pixels at the end of the process. Accordingly, each CCD manufacturer has two varieties of chip in its catalogue : colour and B&W. The colour chips are found in the popular webcams, but the B&W versions are mounted on, for example, professional colour “tri-CCD” cameras.
The B&W version of the ToUcam chip is the SONY ICX098BL.Why change the chip ?

Because the B&W version is three times as light-sensitive as the colour version. This is because the colour filters of the colour chip absorb some 66% of the incident light stream.

There are, therefore, two varieties of ToUcam which can be used for planetary imaging : The original with its colour chip
The modified version with the B&W chip (referred to as the TUC B&W ¼”).

RGB versus B&W

A colour camera like the ToUcam uses a CCD matrix with Bayer filters, each pixel being covered by a red, green or blue mask as follows :
To produce a colour image (RGB 640x480) with this matrix the internal software of the camera performs a certain number of calculations.

The different RGB values of the colour image are given as the average of the neighbouring pixels :

For a point on the image corresponding to a green pixel on the chip :
R = average of the signals from the 2 neighbouring red pixels
G = signal of the green pixel
B = average of the signals from the 2 neighbouring blue pixels.

For a point on the image corresponding to a blue pixel on the chip :
R = average of the signals from the 4 neighbouring red pixels
G = average of the signals from the 4 neighbouring green pixels
B = the signal of the blue pixel.

For a point on the image corresponding to a red pixel on the chip : R = signal of the red pixel
G = average of the signals from the 4 neighbouring green pixels
B = average of the signals from the 4 neighbouring blue pixels.

This arrangement of the colour filters on the CCD matrix works quite well and involves a minimum of artifacts in restoring the colours. Some chip manufacturers use a four-colour mosaic, red, green, blue and green-blue or turquoise. This gives a better rendering of shades of green and of flesh coloured tones.
Using the colour camera in B&W acquisition mode, the value of each point on the B&W image is an average of the three RGB values, i.e., an average of the 5 or 9 neighbouring pixels. The use of this averaging method on the neighbouring pixels reduces the capacity of the matrix to resolve fine details, resulting in a “loss” of resolution. In these circumstances, the camera’s resolution in 640x480 mode will not be twice the value of that in 320x240 mode.

Even if the colour sensor is replaced by a black and white equivalent without telling the camera (i.e., without modifying, within the EEPROM, the registers of the SSA8116 microprocessor) these averaging calculations will continue.

We have seen that the modification of the camera with a B&W sensor will significantly increase its sensitivity by a factor of about 3. But it will have no effect on the capacity of the camera to resolve fine detail unless changes are made to the internal calculations. Today, with the I2C bus, and tomorrow, with software adapted for the USB bus, it is, or will be, possible to modify the data of the EEPROM which set the parameters of the camera’s processor. The sole object being, to suppress the internal calculations that degrade the quality of the images!

The Transfer Function

Students of optics are familiar with the Modulation Transfer Function (MTF). This curve tracks how the optics transmit the contrast of the image as a function of the spatial frequency. The function reveals effects such as diffraction, aberrations, central obstruction, chromatic effects, etc.

In this article, I am more concerned to measure the Transfer Function (TF) of the camera, as distinct from the MTF of the lens. For this it is essential that the optics be better than the camera, that is to say, that the diffraction disk be smaller than the pixels of the CCD matrix.

In this case the image is under-sampled and this enables me to test the effects of the sampling on the resolution of fine detail.Experimental Method

To test the camera I used the “classical” (1*) method which analyses the image of a B&W edge using a very good lens. The TF of the camera is given by the modulus of the Fourier transformation of the derived image of the edge.
With this method one can obtain the TF of the complete imaging system :
• Lens
• Chip
• Processing
• …….

To obtain accurate results, the lens must be extremely good, that is to say, diffraction as well as the various aberrations of the optics must not limit the resolution of the final image. It is the camera alone that must limit the resolution.

Equipment used

A 24x36 reflex lens is attached to the camera – a Canon FD 50 mm with a focal ratio of F/1.8. I used it at F/2.0, which gives me a theoretical diffraction pattern of
• 2.2 µm (diameter of the first black ring) in the blue range (460 nm),
• 2.6 µm in the green range (540 nm),
• 3.0 µm in the red range (620 nm),
these values being smaller than size of the pixels on the matrix (5.6 µm).

This kind of lens is designed to cover a field of view of 43 mm in d iameter. The ToUcam chip is only 4.5mm diagonally. Therefore, I use only the centre of the image where, I suppose, the various aberrations are at a minimum except for chromatic aberration in the near-infrared, but more of that later.

With this lens I put the camera to the test. To be sure of the results, I carried them out in a laboratory where the problems of atmospheric turbulence were eliminated.

A test card with two black bars on a white background was placed flat against a wall about 2 metres in front of the lens. The camera was situated so that the black bar is precisely vertical.

The exposures were performed using PRISM 5.0 at a rate of 5 frames per sec., and one unique BMP image was recorded. The camera settings were: contrast 100%, gamma 0%, saturation 100%, brightness about 40% in order to avoid saturating the whites, and white balance was set to automatic. As well, the enhancement of the vertical contrast and the reduction of “noise” to zero were assured by the Setwc software.

Subsequent processing was effected using IDL 5.0 (image processing software which I use at work) and the presentation of the results was done in Excel.

It only remains to compare the different Transfer Functions so as to find the best. In other words, what is the best mode of operation of the camera (320x240, 640x480 and soon RAW) to resolve the high spatial frequencies?

The Results

ToUcam with B&W Sensor (TUC B&W ¼”) Normal

Unfortunately, with the B&W chip, the aberration in my lens was significant, due to chromatic effects. The optics failed to focus accurately in the near-infrared and the final image was not fine enough. Accordingly the exposures with the TUC B&W ¼” were done in the dark with a monochromatic illumination given by 3 red LEDs with 6.5 candles each at 655nm. At this wavelength the diffraction disk is 3.2µm.

In the following figure, the (bold) curves represent the Transfer Functions of the camera at a resolution of 320x240 (at the left) and 640x480 (at the right) as well as the two (light) curves showing the theoretically perfect results.

In this operational mode the camera resolution never attains the theoretical value, even with the B&W chip. The resolution in 640x480 is only 1.3 times better than the 320x 240 mode. The main advantage, and it is a significant one, of the B&W adaptation is the threefold increase in sensitivity.

ToUcam with B&W Sensor (TUC B&W ¼”) RAW

I then modified the camera to operate in RAW mode. The calculation of the three colour schemes was thereby suppressed, as was the enhancement of contrast. The compression mode was at a minimum. In these circumstances, the resolution of the chip’s matrix is restored.


The measurements of the camera’s TF illustrate that the “resolution” of a ToUcam Pro in its original mode at 640x480 is not twice that of the 320x240 mode but only 1.3 times as good. This is understandable, and results from the interpolation (averaging) of the colours of neighbouring pixels.

The type of compression used (I420 or YUV) has no influence on the TF and, hence, on the resolution of the camera.

However in the RAW conversion the 640x480 resolution will indeed be double that of the 320x240 mode, due to the suppression of the calculations of the three RGB layers, releasing the full pixel power of the CCD matrix. The interpolation of the colours from neighbouring pixels is no longer operative.

Since the instrument’s highest resolution F/D ratio must, as a minimum, be equal to 2 x pixel size/wavelength (Shannon) and with the results of the experiment, we can make the following remarks:

• With the TUC in normal 640x480 mode the “effective” pixel size is only 1.3 times smaller than in the 320x240 mode.

• In the 320x240 mode the minimum high resolution F/D is: 2x(2x5.6 µm)/0.51 µm (the wavelength of maximum sensitivity), i.e., about 44.

• In the 640x480 mode the minimum high resolution F/D is divided by 1.3, thus giving about 34.

• With the ToUcam Pro modified by the B&W sensor ¼” and in RAW mode, the minimum high resolution F/D is therefore 22.

• The foregoing must also be true for the Vesta Pro webcam. Using the TUC B&W in RAW mode to make high resolution images has two advantages which reinforce each other:

• A sensor 3 times more sensitive,

• A smaller minimum F/D ratio.

So, all other things being equal, we can use an exposure time which is given by (3x1.3^2) i.e., 5 to 6 times shorter, which is a distinct advantage in combating our ever-present enemy : atmospheric turbulence.

Philipe Bernascolle,

December 2003



I wish to thank Etienne Bonduelle for putting this article on the internet and Eamonn O’Fearchain and David Moore for the English translation !


(1*). B. Tatian (1965) “Method for Obtaining the Transfer Function from the Edge Response Function” JOSA, Vol. 55, pp. 1014-1019.