I am trying to build my custom Photosphere viewer to run using SDL2 and a custom IMU I purchased. So far, I have managed to read IMU values, open the .jpg and display it using SDL2.
My issue is how to make sense IMU data to read parts of the jpg appropriately. Basically, I do not want to display the whole jpg but just parts of it based on IMU data (I receive Euler angles or Quaternions). Right now, I am just using a single mono photosphere (I am not concerned with stereo yet), which is stored as a equirectangular projection, and I need to use the IMU to get it to a polar projection (I believe?)
I am not sure how to index the jpg based on IMU data to create a working photosphere viewer and I cannot seem to find a good explanation of how to address the jpg. Can anyone point me into the right direction? Thanks!
I was able to find a really great OpenGL based simple Python photosphere viewer here. I just then needed to create a rotation matrix from the sensor IMU. There are good tutorials to convert from Quaternion to Matrix like this one.