Title: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer
1Webcams and CCTV Cameras Affordable Imaging
Tools for the Amateur Astronomer
- Giles Hammond
- Institute for Gravitational Research
- University of Glasgow
Rugby Astronomical Society 22nd June 2008
2Outline
- How a CCD works
- Astronomical CCDs vs unmodified cameras
- How to modify a CCTV camera
- Astronomical CCDs vs modified webcams!!!!
- Basic Image Processing
- Dark, Flat and Bias frames
- Stacking
- All Sky Camera at the University of Glasgow
- Some results
- Useful Links
- Conclusions
3How a CCD works
- A CCD comprises an array of light sensitive
silicon sites (pixels) of typical dimensions 6?m
x 6?m - A photon of suitable energy hitting the pixel can
produce an electron that is constrained within
the pixel using electric fields - Typical energy response 0.5eVltElt3eV
(440nmlt?lt1000nm) - Typical well capacity is approximately ?50k-150k
electrons
http//www.microscopyu.com/articles/digitalimaging
/ccdintro.html
4- At the end of the exposure the electric fields
holding the charge are clocked at about 60Mhz
to move the charge - Vertical/Horizontal clocks shift the charge
down/across to the charge amplifier
http//www.microscopyu.com/articles/digitalimaging
/ccdintro.html
5- The resulting voltage output from the charge
amplifier is then digitised into a number of
bits by the analogue-to-digital converter (ADC) - 16 bits means 21665536 levels from black-white
(smoother image) - 8 bits means 28256 levels from black-white
(coarser image)
6Astronomical CCDs vs unmodified webcams
7Astronomical CCDs vs unmodified webcams
8Astronomical CCDs vs unmodified webcams
9How to modify a Camera
- Webcams are limited to a maximum exposure of
about 1/5s (okay for planets but not good for
imaging nebulae/galaxies) - The CCD is continually clocked (5-25 frames/s)
and a shutter operates in bright conditions - In order to take long exposures we need to
disable the shutter/CCD clocks by applying
suitable voltages/adding switches which can be
opened/closed (Steve Chambers/Jon Grove etc.
1996) - We can control the switch with software which
then picks the exposed frame when the switch is
closed (ASTROVIDEO, K3CCD) - Lets look at the 1004X CCTV camera (the
modification principle is similar for the Toucam
840 or SPC900NC)
http//www.qcuiag.co.uk Quick Cam and
Unconventional Imaging Astronomy Group
101004X Board
?32mm
Power supply
Video out
Timing generator
12V
0V
Back view
Front view
11Long Exposure Modification
Vertical clock Point 2
5V
Pin 20 Shutter control
Pin 5 Vertical clock point 1
Track linking clock pulses
12Shutter Disable
13Clock Disable/Enable
14Hot Pixels/Amplifier Glow
- When we take a long exposure (with lens cap on)
we get this - 10s 40s 60s
- Hot pixels are due to an uncooled CCD
- The bright corner is due to an on-chip amplifier
that produces infra-red radiation
(electroluminesence) - The amplifier can be disabled by reducing the
voltage to the CCD chip during integration
15Amp Off Modification
Unsolder pin 9 and attach a wire
16Astronomical CCDs vs modified webcams
17Image Processing
- Typically we need 3-4 types of exposure per
object - The image frame
- Dark frame (hot pixels)D
- Flat frame (non-uniform pixels, vignetting)F
- Bias frame (0s exposure for readout noise)B
- Typically I dont worry about bias frames
- Final image (I-D-B)/(F-D-B) ? (I-D)/(F-D) for
webcams - Noise is random but signal is coherent. Therefore
the image quality improves with increased number
of exposures or exposure time - If we obtain N photons/s during an exposure time,
t, then - Signal-Noise-Ratio (SNR) improves with increased
exposure - With webcams you typically take may short
exposures (tlt60s) and stack them together to
reduce noise
SignalNt Noise?(Nt) SNR Nt /
?(Nt) ?(Nt)
18Image Correction 1
19Image Correction 2
20All Sky Camera at Glasgow
- Developed from a project run for two 3rd year
students studying Physics at the University of
Glasgow - Aim is to develop an all sky camera based on the
1004X modification capable of taking images
throughout the day/night - The camera uses a 1.6mm fisheye lens attached to
the front of the 1004X board to produce a
1800x1400 field of view
21All Sky Camera at Glasgow
22Control Software
- Camera control is based on MATLAB (a powerful
mathematics software which also includes image
acquisition tools) -
- The control program has been turned into a
standalone executable (quite large) which can run
on any Windows PC
- Begin loop
- Take an image of 0.1s
- Sum up the intensity in the image
- Determine whether the sun is out (saturated
pixels) - Adjust exposure length
- Take 10 images
- Remove hot pixels using a pixel map
- Sum up images
- Save as a JPEG
-
- End loop
- Combine images into an AVI after 90 frames (and
start again)
23- The cameras can be used as weather monitors,
satellite trackers, meteor detectors and will
show plenty of interesting astronomical/meteorolog
ical events - The hardware is now at a fairly stable design but
the software needs some work (a windows
executable would be much better than the MATLAB
executable) - The plan is to apply for research council funding
to produce some cameras in kit form and
distribute them to schools etc - The next stage is to install one on the western
coast of Scotland on Islay
?100 miles
24Example AVIs
60s delay between images
900s delay between images
251004X Images (Prime Focus)
26(No Transcript)
27Useful Links
1004X distributor http//www.rfconcepts.co.uk/boa
rd_camera.htm 1004X modifications
http//www.geocities.com/jgroveuk/ExViewMod.html
http//www.leadbeaterhome.fsnet.co.uk/1004xcam.htm
http//www.saao.ac.za/wpk/1004x/index.html Phi
lips SPC900NC distributors http//www.amazon.co.u
k/gp/product/B000BEY4DE?ieUTF8tagkm_10000-21gc
lidCIK-84eZipQCFQ8gQgodGBYgXA http//www.kikatek.
com/product_info.php?products_id19218sourcefroo
gle http//www.pcworld.co.uk/martprd/store/pcw_pag
e.jsp?BV_SessionID_at__at__at__at_1823582525.1214211267_at__at__at__at_B
V_EngineIDccffadeegkihhffcflgceggdhhmdgmh.0page
Productfmnullsmnulltmnullsku638873categor
y_oid Philips SPC900NC modifications http//hom
e.zonnet.nl/m.m.j.meijer/D_I_Y/spc900nc.htm
28Useful Links
Useful source of Electronic Components (can buy
over the counter)) Maplin Electronics
http//www.maplin.co.uk/ Software AstroVideo
http//www.coaa.co.uk/astrovideo.htm K3CCD
Tools http//www.pk3.org/Astro/ Registax
http//www.astronomie.be/registax/ Yahoo Group
for modified cameras QCUIAG http//www.megastron
omy.150m.com/New-QCUIAG/
29Conclusions
- Webcams and surveillance cameras offer a cheap
alternative to astronomical CCDs - The results can be comparable
- The only limitation is bit depth which can be
partially overcome by stacking/mosaicing - The exposures are usually short which makes
guiding/accurate polar alignment less critical - Narrow band imaging can offer a method of imaging
under light polluted skies (H?, SII and OIII) - Faint nebula are still within reach under
suburban skies - Galaxies are harder targets due to their broad
emission