Ricoh Theta, Google photospheres and Pannellum

I have a new Gadget a Ricoh Theta it is capable of taking full 360 degree panorama with one shot. It does this by have two lenses pointing in opposite directions, each one with a slightly more than 180 degrees view. The camera then stitches the two pictures together in the camera. The resolution is not great at 3584 x 1792 but they are good enough to publish on web pages as you can see from the example below. The camera have been out for over a year but have they are quite a niche thing and not that easy to get hold of. You can get them new on Amazon and eBay for about £320, they come from Japan, but I spotted a second hand one of eBay I put in a bid for just over half the new price and forgot about it. Next thing I know I have won the auction and a proud owner of a Ricoh Theta. I checked out the images on the camera when I got it and get the impression that the person that had it before had not used it much there were a dozen photos on it starting with some test ones I’m guessing it probably only ever took the 12.

I have been carrying it about for a few weeks now in an attempt to get get a feel for what pictures work and what does not. You need to be a bit careful with which way you point it because you can end up with side dark and one light, so I try to keep the sun to the side so that each camera get the same amount of light. Another issue is that it is impossible to take a picture that does not include your arm, hand and thumb on the camera button, but there are a couple of solutions to these issues, the first is to get a selfie camara holder basically a telescopic stick with a tripod mount on the end, this puts you further away from the camera so taking up less room in the picture, the other method is to use the phone app to take pictures remotely using wifi.

I have an Android phone and there is an app in the Play store for the Theta, which appears to be pretty robust. The Ricoh Theta has built in wifo and acts as an access point, which you pair with your phone then you can access the theta to download and share your photo’s. You can also take pictures remotely, and have a choice of Auto mode, Shutter priority and ISO priority and you can adjust the exposure -2.0 to +2.0EV in 1/3EV Steps. You can also do interval shooting which would be useful for timelapse or hyperlapse sequences. As I said the resolution is not great especially when you view the images full screen but it is really convenient and I and sure to have some fun with it, and the price was good.

I also create panorama pictures by stitching together photo’s using a product called PTGui, my strategy is to take three sets of photos, 6 around at 60 degree intervals and then one up (the zenith shot) and one down (the nadir shot), the sets are at different exposures -2.0EV 0EV and +2.0EV then the software stitches them and uses the exposures to produce an HDR image. The best way is to take the pictures using a tripod and a special bracket which allows the lens to be rotated around the Nodal point of the lens, which avoids parallax issues. However carrying around a tripod is a pain so I also carry a plumb bob and use that to get as close as possible. I have the Pro version of the software so I am able to make corrections for the view point of the camera, which is needed for the plumb bob method as well as the  Nadir shot of the tripod method if you want to avoid having the tripod in shot. The brackets can be expensive circa £250 but I managed to make a reasonable one from an ABS pipe coupling, and a tripod and a quick release adapter.

Finally I needed a way to be able to easily display the panorama in all their glory on my site. You may have noticed that in a previous post http://neilbaldwin.nettarka-trail-bike-ride/ I had embedded some photospheres from Google which had contributed to Google Street view, I did not like the way that they were presented and they don’t always work on iPads etc. I have been looking for a pure HTML 5 solution for a while now. There are quite a few commercial packages with lots of features but I just wanted a simple solution, and the other day I found one it is called Pannellum it is open source and free of charge and does the job nicely. It took me a while to get it sorted working out what should go where and the best size for the images. One thing that threw me was that images on flickr threw an error but it turns out that Flickr is the one at fault because they return a strange thing in the get requests which makes the browser complain about a cross site scripting error. Anyway it turns out that images on Google work fine and I publish  my photospheres there any how.

My next project will be to create a PHP function to use the code so that I can publish my collection of Church photospheres on a dedicated website. I want to store the the details in a searchable database so that people can search for churches and then see the inside of them. you will need to watch this space for news of that project, but in the mean time you can see the waiting images on my Google plus site here https://www.google.com/maps/views/profile/116324611784531709687?gl=gb&pv=1&tab=1 enjoy.

Raspberry PI wifi with static IP address

I have been tinkering with Raspberry Pi’s for some time now, and after finding uses for two I order a couple more. I thought I would have a more methodical approach to setting up the next one. I needed a platform to experiment with to me number one is a static IP for the network interfaces. There is plently of documentation out there to explain how to set a static IP for the Ethernet adapter but I struggled to find instructions to do the same for a wifi adapter. My aim is to have a PI that boots up and always has the same IP addresses on the wired and wireless adapters.

Firstly lets get the static IP on the wired interface. You need to edit the file /etc/network/interfaces find the reference to eth0 then edit it to set the static IP network mask and default gateway.

iface eth0 inet static
address 192.168.0.41
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.254

Once you have made the changes reboot the PI and check that the settings have stuck. Alternatively you can use the commands ifup and ifdown. so to close down the eth0 interface issue the command sudo ifdown etho then use sudo ifup etho will bring it back up again. Clearly if you have ssh’d into the PI you will lose your connection so you will have to reboot the PI anyway. Use ifconfig to check the status of the ports.

Now for the more complicated bits. To get the wifi up and running. First you need to update the files referenced from the interfaces config file /etc/wpa_supplicant/wpa_supplicant.conf this contains the configuration of the wifi interface and how it connects to access points. Find the section like the ones below and add in the details of the access points you want to connect to. I have 2 access points which I have called home1 and home2 (see “id_str=”). The details there tell the system how to connect to the access point i.e. what the name is and what the preshared key is.

network={
ssid="WifiAccessPoint_1"
psk="PresharedKeyForAccessPoint_1"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
auth_alg=OPEN
id_str="home1"
}

network={
ssid="WifiAccessPoint_2"
psk="PresharedKeyForAccessPoint_2"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
auth_alg=OPEN
id_str="home2"
}

Next you need to update /etc/network/interfaces to set the details of the wifi access points and how they should be dealt with. See below I needed to to do the same as I did for the etho inerface but I reference the access points using the names I used in the id_str settings from above.

iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface home1 inet static
address 192.168.0.42
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.254

iface home2 inet static
address 192.168.0.42
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.254

I used a few websites to figure all this here are some of the more useful ones :

http://wiki.debian.org/WiFi
http://wiki.debian.org/WiFi/HowToUse
http://www.debian.org/doc/manuals/debian-reference/ch05.en.html
http://omer.me/2012/04/setting-up-wireless-networks-under-debian-on-raspberry-pi/