Longitude = photo_width_deg * (x - photo_width_px/2) / photo_width_px + ha If we don't care about a slight distortion, then the formula to calculate the (longitude,latitude) from any pixel (x,y) from the photo would be easy: photo_width_deg = 70 Then this is pretty straightforward, because if we know that the photo is 70 degrees wide and 40 degrees high, then we also know that the longitude range will be approximately 70 degrees and latitude range 40 degrees. Here we look at roughly the horizon of our world. For a simple panorama photo of the horizon there is not much of a problem: If you are looking at the horizon (equator), then vertical pixels account for latitude, and horizontal pixels account for longitude. The photo will be a rectangular shape on this sphere (from perspective of the camera). Then we can consider a sphere of any radius (for the math, it is highly recommended to use a radius of 1). If photos are taken from a fixed point, and the camera can only rotate its yaw and pitch around that point. Blue shows the difference in transformation, but this depends on the horizontal/vertical angle. So, I have Red, and I need to transform it into Green. The figure below illustrates the problem. The problem is that a given photo Red cannot be placed into the equirectangular projection without a transformation. These results did not help me with answering my question.ĮDIT: I figured that maybe a figure will help explaining it better :) Either I do not fully understand it, or search engines are not helping me, because most results are about converting between already given projections or use advanced applications to stitch photos intelligently together. The transformation that is applied to the image to correct this is straightforward. And this can be done using imagemagick's Barrel Distortion, in which you only need to fill in three parameters: a, b, and c. I have this data, and I guess the first step is to do lens correction so that all lines that should be straight are in fact straight. Lens correction a, b, c parameters (see below).Vertical angle of physical camera (e.g.Horizontal angle of physical camera (e.g. The data that I think is required to do this, is probably something like this: It is safe to assume that the camera will stay at a fixed location, and can rotate in any direction from there. I just don't know how to do the step from an actual photo to such a projection. Whichever projection is easiest to do is good enough, because there are plenty of resources on how to convert between different projections. ContextĮdit: The original question title was: How to transform a photo at a given angle to become a part of a panorama photo?Ĭan anybody help me with which steps I should take if I want to transform a photo taken at any given angle in such a way that I can place the resulting (distorted/transformed) image at the corresponding specific location on an equirectangular projection, cube map, or any panorama photo projection? φ is phi, the vertical angle in degrees, a vector from (0,0,0) to a point on the surface of a sphere.īelow you find the original question, back when I did not understand the problem well, but I think that it is still good for showing what is a practical application of this solution.θ is theta, the horizontal angle in degrees, a vector from (0,0,0) to a point on the surface of a sphere.y is latitude, the vertical position, from -90 to 90 degrees.x is longitude, the horizontal position, from -180 to 180 degrees.has two tiers of membership: a free Basic account and a Pro account which can embed the panomoments, among other features.How do you convert a spherical coordinate (θ, φ) into a position (x, y) on an equirectangular projection (also called 'geographic projection')? It takes a few minutes of processing (you’ll get an email when it’s ready). After uploading the file to, their software will create a panomoment out of it. In this case, the sample I used was a 4-sec. Panomoment will take at most 300 frames (10 secs. To create a panomoment from a 360 video, you’ll need to use a video that was shot on a tripod. Here is a sample, originally shot on a Garmin Virb 360: Sushi bar Instead of requiring a special camera, you could simply upload a short 360 video clip and their software can convert it into a panomoment. In February 2018, Panomoments creator Dustin Kerstein decided to simplify the process of capturing a Panomoment by using 360 videos. At that time, the creators envisioned capturing panomoments with a special type of rotating camera and tripod. What if your 360 photo shows motion as you rotate it? That’s the concept of Panomoments, which actually began back in 2016 as a Kickstarter project. You can now convert a 360 video into a panomoment - a living 360 photo.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |