Yes, only with accelerometer. This is horizontal alignment. I find the orientation of a g-vector in IMU coordinate system by three components x, y, z. Of course the camera is motionless at that moment. By orientation I mean rotation matrix. Then I rotate the panorama stretched over the sphere and for that I use rotation matrix obtained before.
... View more