Live "leaf peeping" / digital repeat photography

The Photosphere project combines a Rico Theta S and a raspberry pi with a custom outdoor housing into a rugged 360 (outdoor) time-lapse camera. In my application I track changes in leaf development in a North-Eastern US forest.

You can visit the practical application of the project at http://virtualforest.io. Here I track leaf colours throughout the North Eastern fall (famous for the beautiful deep reds of the maple trees). However, other applications are possible (hints on how to do nighttime images through the USB API are welcome).

3 Likes

This is so awesome that the Unofficial Guide Team made you the featured developer. Congratulations!

1 Like

Thanks Craig,

I hope it inspires the community to keep hacking this nice little camera.

K

1 Like

This is a very cool project since you can now use the GPIO pins of the Raspberry Pi and have it triggered with motion and light sensors. For example, @Naaberle (Nik Aberle) was working on a project to take a 360 view of a 1,000 buffalo roundup. He was trying to activate the THETA from a distance of 1/4 mile with WiFi, but it might have been better to use a self-contained unit with motion triggers, perhaps using PIR motion sensor. @Svendus did test activation at 1/4 mile, so Nik’s project may have worked out. I don’t know if he was able to take the video of the buffalo successfully.

Also, @someotherbob was asking about battery packs. You seem to have a sophisticated setup with Power Over Ethernet. I am very curious as to your power supply as you’re using 200’ of CaT5e cable. Where is it going to?

You built a good platform for people to experiment with other outdoor nature and event projects.

BTW, I am not a good photographer, but the USB API can control the exposure and shutter speed. I wonder if you can adjust the exposure and shutter speed based on time of day or even have a light sensor connected to the Raspberry Pi to trigger the change in settings?

https://developers.theta360.com/en/docs/v2/usb_reference/property/exposure_program_mode.html

This looks like a really great project! Have you had any problems with the camera locking up or unexpectedly shutting down? I’ve had some issues with mine when left out in the elements. Thanks to @codetricity great write up I’m working to convert my scripts to use the USB API instead of wifi.

As for exposure control I’ve had some luck using a lux meter attached to the GPIO of the pi although I’ve been considering other options as it had some issues in low light.

2 Likes

The location of the camera is at a research forest so I have a power and ethernet nearby. The 50m run should be good enough to get into someone’s back yard of so desired. I use a 24V passive poe injector (as listed). You lose some power due to the length of the line, so you up the voltage to compensate (using 24 instead of 12).

For now the USB connection has been stable. One sometimes has to reset the USB connection (using software, but this hasn’t been the case yet). Fingers crossed that I don’t have to reset and it just keeps running (although I have ssh access so it would just be annoying not difficult).

1 Like

Hi, just to be clear in giving @khufkens the credit. The article on the parts is his README.md on GitHub. I don’t contribute anything to documenting his project other than promoting it. I did write some starter documentation for using the RICOH THETA USB API with libptp on the Raspberry Pi. @orikoon also contributed to the USB API documention.

@khufkens really put everything together and generously made the code for his project available. It’s really exciting that the platform can be used for all types of projects.

If @khufkens reads this, can you document how to reset the USB port on the Raspberry Pi with ssh? Are you rebooting the Pi to reset the USB, or are you giving a command to the /dev/

I was planning to get that working, but I have not actually tried it yet. Thank you.

Various usb solutions are listed here, but haven’t been able to try it as I don’t want to jinx things while stuff runs neatly.

@squizard360 I have not had any problems yet. Running for almost two weeks now.

1 Like

This is great information, both about the USB reset solutions, and about the real world report that you have it working for two weeks.

I’ve been hoping that someone would build something like this to capture nature. One of the many interesting uses for something like observing an animal like a wolverine is that you can see what the animal sees. By this, I mean that you can observe the entire sphere of the environment of the animal and have more information on what is in the vincinity.

You could also modify the system to make it portable with an autonomous 4 wheel drive small land drone. If you moved the application to a Raspberry Pi Zero, it’s likely you can put it into an aerial drone and then trigger the pictures by GPS coordinates.

The Photosphere project has an elegant solution to the power and monitoring of the Raspberry Pi. I never thought about Power Over Ethernet. Cool.

Previously, I had only thought about leaving the Pi out there with a battery. This PoE idea solves a lot of problems.

You can also append the GpsInfo to the image metadata.

It would be nice to get something like this Adafruit Ultimate GPS Hat.

@khufkens For night time manual exposure control I’ve experimented with this LUX meter. It works great in daylight but not as well after the sun goes down. Because of that I tried a combination of the meter with sunset/sunrise timings to manually ramp the camera exposure to 15 or 20 seconds for star photos.

Here is the script I wrote. After a several month hiatus I started adding USB support last week but haven’t gotten to test it yet because I accidentally dropped my pi in the lake :frowning:

@codetricity Check out my script for gps metadata injection via gpsd and a cheap usb gps device.

2 Likes

Wow, there’s a lot of good information today. That’s a cool example. I think that LUX meter would be perfect for @khufkens. It’s near a research station, so I think there’s probably a little bit of ambient light.

tlapser360 looks like an awesome project. Do you have a link or the name of the GPS device that you used?

Sorry to hear about dropping the Raspberry Pi in the lake.

1 Like

@codetricity I use a Holux m-241 but here is a list of gpsd compatible devices.

1 Like

I’m ok with auto exposure during the day. But I would like to add a nighttime snapshot of the stars / moon lighting up the forest during the night. It should be possible as I did trials with the camera + phone combo. However, I couldn’t get the longer exposures (manual) exposures to work over USB. I set the values correctly but they don’t stick for some reason.

I can’t play with stuff anymore because my camera is operational :disappointed: and I don’t have a spare to develop on. If you have success using USB let me know!!

Are you changing the exposure with the API or with the official RICOH mobile app? I think you used the WiFi API for the last version.

Looking at the API, the shutterSpeed can only be set when exposureProgram is set to 1 (manual).

@codetricity You’re correct, in my previous version I set shutter speeds using the wifi api, I think both api’s require the camera being set to manual mode prior to changing the shutter speed.

@khufkens It looks like shutter speeds need to be set with ptpcam using raw mode and rational numbers. After setting the camera to manual mode…

$ ptpcam --set-property=0x500E --val=1
Camera: RICOH THETA S
'Exposure Program Mode' is set to: [Automatic (P)]
Changing property value to 1 [Manual] succeeded.

And using this documentation and this post I was able to set the shutter speed via usb like this.

$ echo -e -n '\x20\x00\x00\x00\x0a\x00\x00\x00' > shutter.bin
$ ptpcam -R 0x1016,0xd00f,0,0,0,0,shutter.bin
data to send : 'shutter.bin'
--- data to send ---
20 00 00 00 0a 00 00 00                         -  .......        
--------------------
Camera: RICOH THETA S
Sending generic request: reqCode=0x1016, params=      [0x0000d00f,0x00000000,0x00000000,0x00000000,0x00000000]
PTP: response OK

I’m still having problems with my camera locking up. Its especially a problem with ptpcam taking “5376x2688” photos, gphoto2 seems to be more stable for me.

1 Like

I had similar problems with ptpcam. I think that one of the people that got it to work was using Ubuntu 14.04. I did my tests with Ubuntu 16.04 (worked, but not all commands) and Raspian Jesse (worked, but not all commands).

It may be stable if we replicate the same OS version that @khufkens is using. He’s had it working for 2 weeks.

It’s up for a month now. No issues. I’m running the previous version of Raspbian, Wheezy, on the pi which is controlling the camera.

I’ll try some more with Jesse and a new camera I got for development.

2 Likes

Koen Hufkens fame now extends to engadget public access.

Thanks, and thank god (or your favourite deity) that I went out today to fix my outage. The power went out and the network as well. The pi rebooted but I had to drive out to push the switch on the camera. Most expensive push of a button ever.

Sadly I could have asked people at the research forest but I thought it was more dire (branch fall etc) given that the network was out (which of course I should have inquired for, as it was not only my pi but the whole network, before driving out). Anyway, it’s up and running again.

Do you have an idea on how the switch is connected. I’m considering wiring it to the pi to be able to boot it from afar? I guess I will have to buy another camera to rip apart aside from my software development one. Got to find some sponsors as this is becoming rather expensive.

I have not heard of anyone doing this. I’ll ask @jcasman to add this question to the agenda for the meeting we have with THETA product manager. I don’t think RICOH will be able to provide information on how to do this, but it might be possible to add as a feature in the future. If we can’t restart the camera remotely, it makes it difficult to use both in remote archival/analysis scenarios like you have as well as surveillance scenarios.