Writing Script to Convert THETA V's DualFisheye to Equirectangular with Zenith Correction in Ubuntu

Hi There,
I 'm using THETA V to take omnidirectional videos, and I once input to Official Windows application to convert dualfisheye to equirectangular with zenith correction, then send the output to Ubuntu for detailed analysis.

It is much better if the above process is achieved only on Ubuntu side. However, it seems that there is no such application in Ubuntu, so I thought I would need to write a (python) script from scratch.

I’m planning the following process;

  1. (Crop a video into images)
  2. Project Dualfisheye image onto spherical coordinate
  3. Rotate according to gyroscope and compass data
  4. Convert to Equirectangular image
  5. (Generate a video from images)

In order to implement the above, I have the following questions.

About Configuration of DualFisheye Images

  • Projection method of THETA V’s DualFisheye, Equidistance or Stereoscopic?

    I’ve read some articles about the projection method of THETA S, and some says Equidistance while others says Stereoscopic. So I wonder which is correct in case of THETA V.

  • Center and Radius of DualFisheye
    Assume that the image width W (pixels) and height H (pixels),
    In THETA S, it seems that

    • Center: (W * 1/4, H * 1/2), (W * 3/4, H * 1/2),
    • Radius: 0.884 * (W * 1/4)
      (Source is same as above “some” and “others” links)

    I would like to know these parameters of THETA V. From my perspective, it seems that the center is equal to THETA S, but radius is 1.0 * (W * 1/4).

How to get gyroscope and compass data of each video frame?

I found the following Library to get gyroscope and compass data from EXIF of image and rectify camera pose.

So I would like to know if this is possible in case of each video frame, and if so, how to get them.

Thanks in advance

1 Like

Unfortunately, I do not think that the the gyroscope data is not stored in the video CAMM track for the videos taken with available API. Thus, you can’t match the sensor data to each frame at the moment.

If you just need the GPS for virtual tours, then check out VID2GSV from @Dean_Z

Please provide more information on your application goals, whether you need the frames for virtual tours or if you are doing image analysis.

Thank you for your prompt reply.

My application goal is to analyze video which is equirectangular and zenith-corrected, so all video frames need to be converted.
In order to automate the above process in Ubuntu, I would like to implement it with my script, without using the official application GUI.

@jcasman and I will ask a manager at RICOH on Tuesday.

1 Like

The camera positional data format for the video is not published and I can’t figure out how to extract it out.

It does not appear to be in a standard camm format as I can’t use common scripts to access the gyro data. I can’t find where it’s located.

If you read the file in as bytecodes and then search for a string such as “gyro”, you may be able to locate it.

1 Like