cristosv
Posts: 8
Joined: Mon May 27, 2013 11:52 pm

RaspberryPi Camera for Astrophotography

Mon May 27, 2013 11:54 pm

I used the rPi camera as a wireless image/video capture for our Celestron NexStar 6″ Telescope. After a day of learning how to stream video and hacking an attachment to an eyepiece, I spent a couple of hours waiting for the clouds to clear and was able to catch some great video of the moon and of Saturn.

I used the following guide to get a video stream from the rPi to my laptop: Raspberry Pi camera board – Gstreamer. Gstreamer enabled me to see a live view out from my telescope and once I centered the object, I used raspivid to capture 20 seconds of video. I then used ffmpeg to convert the .h264 video to an uncompressed .avi file in order to process it in a image stacking program (RegiStax 6). The still images produced speak more to my inexperience with the software and my impatience in aligning the telescope.

Complete write up (with pictures) here: http://zeusbox.net/blog/2013/05/raspber ... era-board/

texy
Forum Moderator
Forum Moderator
Posts: 5156
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: RaspberryPi Camera for Astrophotography

Tue May 28, 2013 6:46 am

Fantastic!
Was registax run on the Pi?

Did anyone ever get stellarium to run on the Pi ?

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: RaspberryPi Camera for Astrophotography

Tue May 28, 2013 7:25 am

This is amazing..

Stelarium from searching other posts it seems it can be installed. But X maxes out the cpu from constantly redrawing the screen. Maybe with fingers crossed the new Wayland optimizations could make it possible.
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

cristosv
Posts: 8
Joined: Mon May 27, 2013 11:52 pm

Re: RaspberryPi Camera for Astrophotography

Tue May 28, 2013 10:18 am

Registax and Stellarium are running on a laptop.

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: RaspberryPi Camera for Astrophotography

Wed May 29, 2013 11:02 am

cristosv wrote:The still images produced speak more to my inexperience with the software and my impatience in aligning the telescope.
You're joking aren't you! Those are great pictures. I expect the individual frames are a bit noisy, but that's what registax is there for.

I can just about see Cassini's division on the Saturn pic.

These pics should be on the front page in my opinion, especially the Moon pic!

DaveManDave
Posts: 6
Joined: Sun Jul 08, 2012 8:44 am

Re: RaspberryPi Camera for Astrophotography

Wed May 29, 2013 1:03 pm

Love the images. I was going to try removing the lens but I will give it a go the way that you have done.

You say you got gstreamer running on your laptop. Was that a windows laptop? I can't seem to find gstreamer 1.0 binaries on the web, and compiling it from source looks a bit too complex.

I have got netcat and mplayer working ok using a LAN cable but its very slow over wifi so the gstreamer approach sounds like just what I need.

cristosv
Posts: 8
Joined: Mon May 27, 2013 11:52 pm

Re: RaspberryPi Camera for Astrophotography

Wed May 29, 2013 8:41 pm

I'm using gstreamer on a macbook; dowloaded it via http://mxcl.github.io/homebrew/. The lag was considerably less than using mplayer & netcat even at full resolution and streaming over wifi.

Credit for the gstreamer setup goes to this blog entry: http://pi.gbaman.info/?p=150.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2848
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: RaspberryPi Camera for Astrophotography

Thu May 30, 2013 9:56 am

Very nice :)
Alex Eames RasPi.TV, RasP.iO

DaveManDave
Posts: 6
Joined: Sun Jul 08, 2012 8:44 am

Re: RaspberryPi Camera for Astrophotography

Thu May 30, 2013 10:54 am

Hi again

Could you post the ffmpeg syntax you use to convert the recorded video to an uncompressed avi that regi stacks can use?

Thanks in advance

Dave

cristosv
Posts: 8
Joined: Mon May 27, 2013 11:52 pm

Re: RaspberryPi Camera for Astrophotography

Fri May 31, 2013 12:59 am

Dave, I used http://winff.org/. Its is a free GUI front end...its is available for all operating systems. It installs ffmpe, it is easy to convert files and also see the proper ffmpeg parameters:

ffmpeg.exe -y -i moon.h264 -vcodec msmpeg4 -vf scale=1080:720 -ar 44100 moon.avi

On a separate note, I was able to remotely control/slew the telescope via the rPi...my write-up is posted here: http://zeusbox.net/blog/

Video streaming and remote control...I can't wait for a clear night to try it out!

markus3141
Posts: 19
Joined: Thu May 31, 2012 2:15 pm
Location: near Hamburg, Germany

Re: RaspberryPi Camera for Astrophotography

Fri May 31, 2013 8:33 pm

Oh thank you for that stellarium telescope server idea! I was thinking about automating my C8 telescope with a raspberry pi and a camera, but I didn't know how to get it well remote controlled without meters of RS232 cable in my garden (and not having to boot windows everytime since stellarium serial doesn't seem to work on mac). Now, once I can get my hands on a Raspberry Pi Camera or a DSLR I'll try prettymuch the same thing you did.
That telescope server is working really well, I'm suprised :)

cristosv
Posts: 8
Joined: Mon May 27, 2013 11:52 pm

Re: RaspberryPi Camera for Astrophotography

Sat Jun 01, 2013 3:52 am

Markus,

I tried using a DSLR (Nikon D50), but the images captured with the rPi camera have been superior and you can get a much closer image using a 'stronger' eyepiece. The DSLR focal length is fixed.

Let me know how it works out. I'm still stuck under an overcast.

cristosv
Posts: 8
Joined: Mon May 27, 2013 11:52 pm

Re: RaspberryPi Camera for Astrophotography

Tue Jun 04, 2013 1:29 pm

The weather finally cooperated. I captured some additional video and experimented with some camera settings.

Image

http://zeusbox.net/blog/2013/06/update- ... otography/

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: RaspberryPi Camera for Astrophotography

Tue Jun 04, 2013 1:35 pm

Absolutely fantastic. This is what I hoped people would start getting out of that little camera.

Can I ask roughly how many images were used for the stacking process?

markus3141
Posts: 19
Joined: Thu May 31, 2012 2:15 pm
Location: near Hamburg, Germany

Re: RaspberryPi Camera for Astrophotography

Tue Jun 04, 2013 1:50 pm

Looking absolutely great!
You're saying you want to also control your telescope with a web-interface. I'm looking forward to pretty much the same thing, maybe I can find some time to extend it's functionality.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5267
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: RaspberryPi Camera for Astrophotography

Tue Jun 04, 2013 2:05 pm

cristosv wrote:The weather finally cooperated. I captured some additional video and experimented with some camera settings.
Wow!

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22683
Joined: Sat Jul 30, 2011 7:41 pm

Re: RaspberryPi Camera for Astrophotography

Tue Jun 04, 2013 2:06 pm

I can see the little planet thingy off to the right, but I pressume you were focussing on the dark matter in the middle of the frame?

James
(Celestron C8)
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: RaspberryPi Camera for Astrophotography

Tue Jun 04, 2013 2:14 pm

Careful jamesh, you might start getting lots of pester posts from people asking you to make the camera detect Dark Energy or Neutrinos...

User avatar
g7ruh
Posts: 67
Joined: Mon Apr 23, 2012 9:49 am
Location: Blackfield UK

Re: RaspberryPi Camera for Astrophotography

Tue Jun 04, 2013 5:19 pm

Ravenous wrote:Careful jamesh, you might start getting lots of pester posts from people asking you to make the camera detect Dark Energy or Neutrinos...

Be awsome if we could make a pi + camera act as a black hole detector 8-) . I know jamesh is snowed under by the day job and would like some of us to take up the coding burden, but sorry, I am not quite that good yet, still re-learning forgotten skills with the fantastic help of a pi or three.

markus3141
Posts: 19
Joined: Thu May 31, 2012 2:15 pm
Location: near Hamburg, Germany

Re: RaspberryPi Camera for Astrophotography

Tue Jun 04, 2013 6:53 pm

I'd love to see whether you can actually capture stars with the Pi Camera, since they are quite a lot darker than planets like Saturn or the moon. Maybe you can next time the weather allows :) 2nd magnitude stars should be very possible, with a 6 inch or bigger telescope possibly quite some magnitudes more. Maybe we can use the Pi Camera as a cheap autoguider... Damn I want one of those nifty Pi cameras..
Nice to see James has the same telescope I have!

cristosv
Posts: 8
Joined: Mon May 27, 2013 11:52 pm

Re: RaspberryPi Camera for Astrophotography

Tue Jun 04, 2013 8:27 pm

jamesh wrote:I can see the little planet thingy off to the right, but I pressume you were focussing on the dark matter in the middle of the frame?

James
(Celestron C8)
It was an artistic choice...used the rule of thirds :)

cristosv
Posts: 8
Joined: Mon May 27, 2013 11:52 pm

Re: RaspberryPi Camera for Astrophotography

Tue Jun 04, 2013 8:30 pm

Ravenous wrote: Can I ask roughly how many images were used for the stacking process?
10 seconds worth or about 300 frames. I set Registax to discard about 20% of the images.

Bikeman
Posts: 63
Joined: Sun Nov 04, 2012 9:03 pm
Location: near Hannover, Germany

Re: RaspberryPi Camera for Astrophotography

Tue Jun 04, 2013 10:28 pm

Amazing!

I wonder what would happen if one would try focal astro photography of planets, without the lens and eyepiece. Maybe the picture would be too noisy, tho, spreading the light across so many more pixels.

I had originally ordered two cameras, one to take the lens off and one for normal operations, but because of the high demand my order was cut to one camera by element 14. Understandable, but now I'm reluctant to mess around with the lens :-(.

Cheers
HB

Bikeman
Posts: 63
Joined: Sun Nov 04, 2012 9:03 pm
Location: near Hannover, Germany

Re: RaspberryPi Camera for Astrophotography

Wed Sep 04, 2013 6:41 pm

Hi

Meanwhile I got my second Raspi camera, and even managed to remove the lens without destroying the sensor.

So what next? As I wrote before I wanted to try to bring one of the world's cheapest computers (Raspberry Pi model A) together with one of the cheapest, (yet usable) reflector telescopes, the Celestron FirstScope 76.

And it looks like it could work! I made some daylight focusing tests this evening and yes, the Celestron FirstScope has enough back focus so that the sensor w/o the lens gets into the focus plane w/o having to modify the telescope. The field of view must be about half a degree, so the full moon or sun should about fill the view.

My overall setup is the following:
- Raspi model A with camera board,
- WiFI dongle "Edimax"
- Wifi is set up to work as a hotspot (!)
- Lighthttp running as a web server on the Raspi

So "in the field" you can use an iPad etc to connect to the WIFi hotspot run by the Raspi, use SSH to log into a shell on the Raspi, and start taking pictures or videos which can be stored in a directory that is served by the web server on the Raspi. So you can preview and retrieve the images via a web browser on (say) your tablet PC.

So far so good.

The Firstscope doesn't have a clock drive :lol: so with this tiny FOV, celestial objects will move thru the field pretty fast and adjusting manually will be a pain. A bitter application might be bird photography, e.g. long term observing a nest from a huge distance. I doubt you can find comparable optics that will give you this kind of focal length and aperture.

CS
HBE

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: RaspberryPi Camera for Astrophotography

Thu Sep 05, 2013 11:10 am

Bikeman wrote:The Firstscope doesn't have a clock drive :lol: so with this tiny FOV, celestial objects will move thru the field pretty fast and adjusting manually will be a pain.
Have you thought of drift scanning? That is, leaving the scope pointed at a patch of sky, doing a photo every few seconds, then stitching them together to make a panorama.

If you did this just before the Moon sailed past, you would at least get a photo of something... :shock:

Return to “Camera board”