Equirectangular projection
Wiki2Reveal
editThis learning resource can be used as Wiki2Reveal slides in mathematics courses as introduction to projective geometry.
- Start Wiki2Reveal
Introduction
editIn this learning resource the generation of an equirectangular projection is the objective. The learning resource is use-case driven, AFrame Example Durlach is the first use-case of equirectangular projection. Look around by dragging the direction of view with the mouse with left mouse button pressed.
Preview of the equirectangular projection in AFrame - Drag the preview of the equirectangular image with your mouse button pressed.
Example of the equirectangular image
editPreview the equirectangular JPG-image and explore the distortion of the image at the top and the bottom of the rectangular JPEG image.
Navigation with multiple equirectangular images
editThe AFrame Navigation example from the river Rhine in Germany allows to jump from one location at the river rhine to another location at to the equirectangular preview.
Subtopics
editUse-Case
editFrom a set of standard images of the camera covering a full the from center point of view. In general you cover 360 degree circle with rectangular standard images and you take image with camera for the sky and the floor (preferred without seeing the tripod that might be used for the other images). These set of images are aggregate in one equirectangular image representing a full spheric panorama image, that be be viewed e.g. in Aframe or other panoramic OpenSource viewes, that support equirectangular images.
EQUI2SPH Projection
editThe underlying type of projection is an equirectangular projection EQUI2SPH, that is used e.g in geographical context, where a sphere is projected to rectangular plane on the map. First of all we explore the use-case in 3D Modelling about the spherical use of an spherical panorama image.
Origin of Terminology and History
editThe equirectangular projection (also called the equidistant cylindrical projection), and which includes the special case of the plate carrée projection (also called the geographic projection, lat/lon projection, or plane chart), is a simple map projection attributed to Marinus of Tyre, who Ptolemy claims invented the projection about AD 100.[1] The projection maps meridians to vertical straight lines of constant spacing (for meridional intervals of constant spacing), and circles of latitude to horizontal straight lines of constant spacing (for constant intervals of parallels). The projection is neither equal area nor conformal.
Implications of Distortion for Navigation
editBecause of the distortions introduced by this projection, it has little use in navigation or cadastral mapping and finds its main use in thematic mapping.
Application in global Raster Datasets
editIn particular, the plate carrée has become a standard for global raster datasets, such as Celestia, NASA World Wind, the USGS Astrogeology Research Program, and Natural Earth, because of the particularly simple relationship between the position of an image pixel on the map and its corresponding geographic location on Earth or other spherical solar system bodies.
Application in panoramic photography
editIn addition it is frequently used in panoramic photography to represent a spherical panoramic image.[2]
Definition - Equirectangular Projection
edit- (SPH2EQUI) The forward projection transforms spherical coordinates into planar coordinates of the equirectangular projection.
- (EQUI2SPH) The reverse projection transforms equirectangular coordinates from the plane back onto the sphere. The formulae presume a spherical model
Spherical - Longitude and Latitude - SPH
edit- Longitude
- Latitude
Visualization
editA perspective view of the Earth showing how latitude ( ) and longitude ( ) are defined on a spherical model. The graticule spacing is 10 degrees.
Longitude - SPH
editLongitude is given as an angular measurement referring to the 0° Greenich Meridian as the Prime Meridian and is ranging to eastward and westward. The Greek letter (lambda)[3][4] is used to denote the location of a place on Earth east or west of the Prime Meridian
Latitude - SPH
editLatitude is given as an angular measurement referring to the 0° Equator and is ranging to towards the North Pole and towards the South Pole. The Greek letter or (phi) denotes that angle.
Mnemonic - Greek Letter - Phi
editThere are two different notations of the greek letter and . In this learning resource the notation is used to indicate that it denotes the angle at circle that intersects with the North Pole and the South Pole.
Definition of Spherical Variables
editThe projections are mathematical function/mappings. For definition of these projections the following variables are defined:
- is the longitude of the location to project;
- is the latitude of the location to project;
- are the standard parallels (north and south of the equator) where the scale of the projection is true;
- is the central parallel of the map (e.g. equator);
- is the central meridian of the map;
- is the radius of the globe.
Longitude and latitude variables are defined here in terms of radians.
Definition of Equirectangular Planar Variables - EQUI
edit- is the horizontal coordinate of the projected location on the map;
- is the vertical coordinate of the projected location on the map;
Forward Projection - Spherical to Planar - SPH2EQUI
edit
Special Case - Forward Projection
editThe plate carrée (French, for flat square),[5] is the special case where is zero. This projection maps x to be the value of the longitude and y to be the value of the latitude,[6] and therefore is sometimes called the latitude/longitude or lat/lon(g) projection.
When the is not zero, such as Marinus's ,[7] or Ronald Miller's ,[8] the projection can portray particular latitudes of interest at true scale.
Remarks - Ellipsoidal Model
editWhile a projection with equally spaced parallels is possible for an ellipsoidal model, it would no longer be equidistant because the distance between parallels on an ellipsoid is not constant. More complex formulae can be used to create an equidistant map whose parallels reflect the true spacing.
Reverse - Planar to Spherical - EQUI2SPH
edit
Alternative names
editIn spherical panorama viewers, usually:
where both are defined in degrees.
Learning Activities
editThe following learning activities address Projective Geometry from a standard snapshot taken with your camera onto an area on the sphere according to the equirectangular projection. Keep in mind to distinguish between the following projective converters:
- (SPH2EQUI / EQUI2SPH): (Latitude,Longitude) coordinates sphere coordinates of an equirectangular image
- (SPH2IMG / IMG2SPH): equirectangular coordinates coordinates standard image of your smartphone or camera.
- (EQUI2IMG / IMG2EQUI): (Latitude,Longitude) coordinates sphere coordinates standard image of your smartphone or camera.
Angle of View
editFor the learning activities it is important to understand the
- (HAV) Horizontal Angle of View in landscape format and
- (VAV) Vertical Angle of View in landscape format.
Learning Task - Angle of View
editThe HAV and VAV differ from camera to camera. Explain why the HAV and VAV are relevant for the calculation of IMG2EQUI projection. Use the following figure to explain the requirements for projection.
Visualization of Angle of View
editThe following figure depicts besides the Horizontal (HAV) and Vertical Angle of View (VAV) also the Diagonal Angle of View (DAV).
Remark - IMG2EQUI Projection
editThe current projection type of the learning activities is the (IMG2EQUI) projection between the coordinates of a standard image and the distorted coordinates of an equirectangular image and vice verca.
HAV and VAV as camera specifc properties
editDue to the fact that different cameras have different angles of view (HAV and VAV) the visible area of the standard image (taken with your smartphone) might vary. The following animation shows different horizontal angles of view (HAV) e.g. for taking a snapshot vertically upwards towards the sky or blue ceiling.
Polar Region - Distortion
editThe projection creates especially at the "North Pole" and the "South Pole" the heaviest distortion in comparison to distances measured on the surface of the sphere. For panoramic views the distortion is just a matter of storage of the spheric pixel information in a rectangular format. On the image of a market place you will see that the panoramic viewes transfer the rectangular images into a natural view where you can look around and explore the location from different angles and with multiple equirectangular images from many locations (see river Rhine example Cologne).
IMG2EQUI Projection - Polar Regions
editIn this learning step we take pictures with a standard camera or smartphone and want to calculate the (Latitude,Longitude) coordinates of the sphere from (x,y) coordinates of standard image created with your smartphone or camera. In the first learning step we consider the sphere at the polar regions. These regions are the most distorted areas in the equirectangular projections.
IMG2SPH Projection - Take Snapshots for Learning Task
edit- Take your mobile phone and take two snapshots vertical down and vertical up from your floor and from the ceiling. Select an position in your room where the top and the floor has some visible elements (e.g. a lamp, wooden decorative elements, ...). Alternatively you can create the two images outside with a cloudy sky and objects lying on the ground.
- select a center of a circle and a radius that fits into both images (maximize the radius of the circle,
- in this module we will project these two images to the polar regions of the sphere within the rectangular coordinate system of the image.
Initial State - Image Sky
editThe following image shows the initial state taking a picture from the sky. The camera is located in the center of the red sphere and takes an image of the blue sky or the ceiling in a room. The ceiling is visualized as a blue plane. The learning task is to calculate the angles for the corresponding point on the sphere.
Side view with polar image
editThe side view can be used to derive the calculation of the green angle with . The relevant angle for the equirectangular projection of the polar region is marked red.
Used Part of Snapshot with a Camera
editThe first image is snapshot with a camera taking a picture vertically upwards to the ceiling (into the sky). The red circle is the projected area from the image (sky/ceiling) onto a part of the equirectangular image visualized in the next section of the learning resource.
Equirectangular Projection of Circle - Rectangle
editExplain, why the circle in the source image of the polar region (North Pole) is a rectangle after projection in the equirectangular image.
Learning Task - Function for Coordinate Transformation IMG2EQUI
editWe denote by the color information of a pixel in the source image (IMG) and with the color information of the pixel in the image in the destination format (EQUI). Define the function by calculating the corresponding coordinates in the IMG source image. This calculation is used to set pixels in the destination format EQUI by setting
Remark: You need basic knowledge in trigonometry to perform this learning task.
Coordinate System of Graphics
editThe coordinate system of an image has a different orientation in y-axis. This is shown in the diagram.
- is the maximal value of the on the x-axis of the image
- is the maximal value of the on the y-axis the of the image
- The origin of the coordinate system is on the top left.
Keep this in mind, when you use the coordinate system for your experiments with projections (see also equirectangular projection.
Rectangular to Sphere - Projection
editNow we use a the standard rectangular image on the right as in input for the equirectangular projection on the sphere and we view the image in panoramic preview on the sphere. What can be observed, if you analyze the projected area of red ceiling and a marked green rectangle on the floor.
- Drag the image upwards to the ceiling
- and downwards to floor.
Screenshots - Projection on Sphere of the standard Image
editCeiling/Sky | Floor |
---|---|
Learning Task - Projection of Sky in Graphics Coordinate System
editGraphics have an own coordinate system to display points in pixel graphics or geometric objects like lines, polygons and circles in the coordinate system. The diagram shows the coordinate system of the image. Keep in mind that the coordinate of the y-axis has a different orientation than the y-axis in the standard 2D Cartesian coordinate system. This information is relevant if you experiment with equirectangular projections in Projective Geometry Playground.
Calculate the for a specific angle of view of your camera.
Learning Task - Calculation
editCalculate the equirectangular projection for any point in the red circle of the source image IMG into the destination format EQUI with:
- LibreOffice - HAV/VAV: Take image of a door and calculate the horizontal and vertical angle of view (HAV and VAV)
- LibreOffice - Coordinates: Create a Spreadsheet document for the calculation of coordinates from a given coordinate in the equirectangular image the corresponding coordinates in the source image of your camera.
- Javascript and HTML canvas - (see Projective Geometry Playground),
- Octave with image-package[11], or
- Python with Image Processing Library pillow by Jeffrey A. Clark
Select an implementation of your choice. LibreOffice has the minimal requirements on programming skill but only coordinate transformation can be performed without a visual output.
Learning Task - Sky - North Pole
editA sky image can be used to project a circular area in the source image to the rectangular part at the top of the generated equirectangular image.
Import the equirectangular projection in Aframe to preview the result.
Learning Task - Floor - South Pole
editTransfer the lesson learned from north pole to the south pole and project the beach image as floor to the south pole.
- What are differences and similarities between both projections?
Final Result
edit(view as a 360° interactive panorama)
- Final Results would can be previewed in Aframe (see HuginSample Files on Github) or with the Wiki,
- Aldara Parks 360 Degree Image in Aframe with an already uploaded equirectangular image in WikiMedia Commons by U.Bardins
- PanoViewer 360 degree view of Aldara Parks image]
See also
edit- Projective Geometry Playground
- Perspective Drawing on Mirror
- 3D Modelling
- Cartography
- Cassini projection
- Gall–Peters projection with resolution regarding the use of rectangular world maps
- List of map projections
- Mercator projection
- 360 video projection
- 3D Modelling - 360 degree panorama
- Geometry
- Projective Geometry
- Portal:Mathematics
- Octave
- Geogebra
- Wikibook: Javascript
- Portal:Mathematics
References
edit- ↑ Flattening the Earth: Two Thousand Years of Map Projections, John P. Snyder, 1993, pp. 5–8, ISBN 0-226-76747-7.
- ↑ "Equirectangular Projection - PanoTools.org Wiki". wiki.panotools.org. Retrieved 2021-05-04.
- ↑ "Coordinate Conversion". colorado.edu. Archived from the original on 29 September 2009. Retrieved 14 March 2018.
- ↑ " = Longitude east of Greenwich (for longitude west of Greenwich, use a minus sign)."
John P. Snyder, Map Projections, A Working Manual Archived 2010-07-01 at the Wayback Machine, USGS Professional Paper 1395, page ix - ↑ Farkas, Gábor. "Plate Carrée - a simple example". O’Reilly Online Learning. Retrieved 31 December 2022.
- ↑ Paul A. Longley; Michael F. Goodchild; David J. Maguire; David W. Rhind (2005). Geographic Information Systems and Science. John Wiley & Sons. https://books.google.co.uk/books?id=-FbVI-2tSuYC&pg=PA119.
- ↑ Flattening the Earth: Two Thousand Years of Map Projections, John P. Snyder, 1993, pp. 7, ISBN 0-226-76747-7.
- ↑ "Equidistant Cylindrical (Plate Carrée)". PROJ coordinate transformation software library. Retrieved 25 August 2020.
- ↑ "Yaw - PanoTools.org Wiki". wiki.panotools.org. Retrieved 2021-05-04.
- ↑ "Pitch - PanoTools.org Wiki". wiki.panotools.org. Retrieved 2021-05-04.
- ↑ Carnë Draug, Hartmut Gimpel, Avinoam Kalma (2022) Image Package Octave URL: https://gnu-octave.github.io/packages/image/ (March, 28th, 2024)
External links
edit- Global MODIS based satellite map The blue marble: land surface, ocean color, and sea ice.
- Table of examples and properties of all common projections, from radicalcartography.net.
- Panoramic Equirectangular Projection, PanoTools wiki.
- Equidistant Cylindrical (Plate Carrée) in proj4
Page Information
editYou can display this page as Wiki2Reveal slides
Wiki2Reveal
editThe Wiki2Reveal slides were created for the 3D Modelling' and the Link for the Wiki2Reveal Slides was created with the link generator.
- This page is designed as a PanDocElectron-SLIDE document type.
- Source: Wikiversity https://en.wikiversity.org/wiki/Equirectangular%20projection
- see Wiki2Reveal for the functionality of Wiki2Reveal.
Wikipedia2Wikiversiy
editThis page was based on the following wikipedia-source page: