Android - Is there any way to re-render a photosphere?

Not a full answer (came here looking for an answer myself), but here are a couple of partial solutions I figured out so far, perhaps someone else can improve upon these.

  1. First of all, temporary files for the last few photosphere sessions can be found under /sdcard/Android/data/com.google.android.gallery3d/files/panorama_sessions/. You can extract these out and use an external program such as hugin to stich them. I tried this on a couple of photospheres and though they didn't come out great, I have at least something instead of nothing. I kept the files around and looking around for a good guide on using Hugin.
  2. I was able to trick photo app to reprocess them, but it didn't produce desirable result. This is what I did:
    • I connected the phone to my laptop and went into the directory where the session files are (via adb shell).
    • I identified the directory for my previous session
    • While the camera is still connected to the laptop, I started taking a new photosphere, took a couple of snaps
    • Identified the directory for the new session
    • Copied all files from old session directory to the new session directory
    • Ended the photosphere to trigger a processing.

The photo app did process the old images, but it doesn't reread the session.meta and orientations.txt and instead uses the data from the new session (must be cached in memory). The result is that you don't get a full photosphere, unless you complete the photosphere in the new session also, which I don't mind doing in the interest of saving the photosphere, except that I realized I had to capture the new photosphere in exactly the same sequence as before or the resultant image will all be out of place as it would be stiched in the wrong order.

Ideally, if there is a hidden task in the photo app to invoke the rendering, we should be able to trigger it on the old sessions folder, but I don't know where to begin.


To recover from a crash during a panorama stitch I did this:

Use a file explorer on Android to copy the folder containing the unstitched files from the cache: /storage/emulated/0/Android/data/com.google.android.GoogleCamera/cache/panorama_sessions/ to the pictures folder and back them up with Google photos. I recieved a notification the next day that photos had stitched my panorama.

Tags:

Camera

Gallery