Transcript
Page 1: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Webcams and CCTV Cameras: Affordable Imaging Tools for the

Amateur Astronomer

Giles Hammond

Institute for Gravitational Research

University of Glasgow

Glasgow Astronomical Society18th September 2008

Page 2: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Outline• How a CCD works

• Astronomical CCD’s vs unmodified cameras

• How to modify a CCTV camera

• Astronomical CCD’s 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

Page 3: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

How a CCD works• A CCD comprises an array of light sensitive silicon sites (pixels) of typical

dimensions 6m x 6m

• 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.5eV<E<3eV (440nm<<1000nm)

• Typical well capacity is approximately 50k-150k electrons

H 656nm

http://www.microscopyu.com/articles/digitalimaging/ccdintro.html

Pixel Structure

Page 4: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

• 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

Page 5: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

•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 216=65536 levels from black-white (smoother image)

•8 bits means 28=256 levels from black-white (coarser image)

256

35

16from CCD (e-)

charge amplifier

voltageADC

bits

Page 6: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Astronomical CCD’s vs unmodified webcams

NoYesYes/NoColour

ICX255 AL

1004X

ICX098 ALICX055 ALCCD type

Toucam 840Starlight Express MX5Camera

Page 7: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Astronomical CCD’s vs unmodified webcams

9.8x6.35.6x5.69.8x6.3Pixel size (m)

NoYesYes/NoColour

6.0x5.0

ICX255 AL

1004X

4.6x4.06.0x5.0CCD size (mm)

ICX098 ALICX055 ALCCD type

Toucam 840Starlight Express MX5Camera

Page 8: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Astronomical CCD’s vs unmodified webcams

9.8x6.35.6x5.69.8x6.3Pixel size (m)

1/25s1/25s>1 hourMax Exposure

£40£40£400-650Price

NoYesYes/NoColour

8 Mono

No

6.0x5.0

ICX255 AL

1004X

24 Colour (8 RGB) 16 MonoBits

NoYes (-30oC ambient)Cooled

4.6x4.06.0x5.0CCD size (mm)

ICX098 ALICX055 ALCCD type

Toucam 840Starlight Express MX5Camera

Page 9: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

How to modify a Camera

• Webcams are limited to a maximum exposure ≈1/25s (okay for planets but not good for imaging nebulae/galaxies)

• The CCD is continually clocked 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.ukQuick Cam and Unconventional

Imaging Astronomy Group

Page 10: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

1004X Board

Front view Back view

32mm

+12V Video out0V Timing generator Power supply

Page 11: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Long Exposure Modification

+5V

Pin 20Shutter control

Pin 5: Vertical clock point 1

Vertical clock Point 2

Track linking clock pulses

Page 12: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

+5V

Switch open: shutter operating

Shutter Disable

+5V

Switch closed: shutter disabled (+5V)

Page 13: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Switch open (clocking disabled)Switch closed (clocking enabled)

1s

2s

4s

10s

Clock Disable/Enable

Page 14: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Hot 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

Page 15: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Amp Off Modification

Unsolder pin 9 and attach a wire

10k

Switch open: CCD voltage 9V and amplifier shuts downCharge containment remains active

10k

Switch closed: CCD voltage = 15V

Pin 9 (CCD voltage) Pin 9 (CCD voltage)

Page 16: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Astronomical CCD’s vs modified webcams

few minutesSeveral hoursMax Exposure

NoYes/NoColour

8 (stacking can give 12)

Can be!!

6.5x4.5

ICX255 AL

1004X

Webcam

16Bits

Yes (-30oC)Cooled

6.5x4.5CCD size (mm)

ICX055 ALCCD type

Starlight ExpressCamera

Astronomical

Page 17: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

• 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 don’t worry about bias frames

• Final image = (I-D-B)/(F-D-B) (I-D)/(F-D) for webcams

Image Processing

Page 18: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

• 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 don’t worry about bias frames

• Final image = (I-D-B)/(F-D-B) (I-D)/(F-D) for webcams

Image Processing

• 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 (t<60s) and stack them together to reduce noise

Signal=N*t Noise=(N*t) SNR= N*t / (N*t)= (N*t)

Page 19: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Image Correction 1

Raw flat Dark corrected flat (F-D)

Raw image Dark corrected image (I-D)

Page 20: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Image Correction 2

Dark corrected image

Sum of 44Single exposure

Flat corrected image (I-D)/(F-D)

Page 21: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

All 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

Page 22: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

All Sky Camera at Glasgow

Page 23: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Control 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.1sSum up the intensity in the image Determine whether the sun is out (saturated pixels)Adjust exposure length Take 10 imagesRemove hot pixels using a pixel mapSum up imagesSave as a JPEG

End loop

Combine images into an AVI after 90 frames (and start again)

Page 24: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

• The cameras can be used as weather monitors, satellite trackers, meteor detectors and will show plenty of interesting astronomical/meteorological 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

Page 25: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Example AVI’s

60s delay between images 900s delay between images

Page 26: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

1004X Images (Prime Focus)

Barnard 3310” f4.8 Newtonian44x16s (H filter)

M110” f4.8 Newtonian32x16s (H filter)

M110” f4.8 Newtonian40x16s (Meade UHC filter)

M8110” f4.8 Newtonian40x16s (Meade UHC filter)

M8210” f4.8 Newtonian50x16s (Meade UHC filter)

M81135mm lens f2.440x8s (Meade UHC filter)

Page 27: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Barnard 33 mosaic10” f4.8 Newtonian58 mins total (H filter)

Barnards loop50mm f2.435x8s (H filter)

B33+flame

M5110” f4.8 Newtonian30 mins total 200 1/30s stacked

NGC 1499 50mm f2.4300s total (H filter)

Page 28: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Useful Links1004X distributor

http://www.rfconcepts.co.uk/board_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

Philips SPC900NC distributors

http://www.amazon.co.uk/gp/product/B000BEY4DE?ie=UTF8&tag=km_10000-21&gclid=CIK-84eZipQCFQ8gQgodGBYgXAhttp://www.kikatek.com/product_info.php?products_id=19218&source=frooglehttp://www.pcworld.co.uk/martprd/store/pcw_page.jsp?BV_SessionID=@@@@1823582525.1214211267@@@@&BV_EngineID=ccffadeegkihhffcflgceggdhhmdgmh.0&page=Product&fm=null&sm=null&tm=null&sku=638873&category_oid=

Philips SPC900NC modifications

http://home.zonnet.nl/m.m.j.meijer/D_I_Y/spc900nc.htm

Page 29: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Useful LinksUseful 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.megastronomy.150m.com/New-QCUIAG/

Webcam adaptor: http://www.telescopehouse.com/cgi-bin/sh000001.pl?REFPAGE=http%3a%2f%2fwww%2etelescopehouse%2ecom%2facatalog%2fOnline_Catalogue_Camera_Adaptors_15%2ehtml&WD=webcam&PN=Webcam_Adaptor_1_25__%2ehtml%23aAC378#aAC378

http://www.moggadapters.com/astro/adapter.asp

Page 30: Webcams and CCTV Cameras: Affordable Imaging Tools for the Amateur Astronomer Giles Hammond Institute for Gravitational Research University of Glasgow

Conclusions• Webcams and surveillance cameras offer a cheap alternative to

astronomical CCD’s

• 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