There is a possibility in RealityCapture to create arbitrary ortho projections. This tutorial walks you through the process of creating such projection from a model, through setting parameters of an orthographic projection up to exporting a projection and a digital surface model in various formats.
As an example, we will use a model of a gravel pit created for purposes of the previous tutorial named Quality assessment.
Ortho Projection tool
Once a model has been created, the Ortho Projection tool becomes active. To create a region for the ortho projection, go to RECONSTRUCTION -> Set Reconstruction Region (the same procedure as for creating a reconstruction region when calculating a 3D model). From the drop-down menu, you can choose from setting the region manually or automatically. If the reconstruction region is not specified, the Ortho Projection tool will automatically create a reasonable region.
There are 2 ways how to activate the tool:
- WORKFLOW -> Process -> Ortho Projection
- RECONSTRUCTION -> Tools -> Ortho Projection
You can then use the BOX WIDGET to modify the position, size, and rotation of the region.
Inside the region, there is a triaxial widget. Left-click and drag a colored arrow in order to move the region in its direction. Right-click and drag the arrow to move the region in a direction perpendicular to the selected arrow.
Left-click and drag colored quarter circles to rotate the region in the respective way.
Outside the reconstruction region, there are little circles filled with different colors. Left-click and drag blue circles to change the width of the region, green circles to change the height of the region, and magenta circles to change the depth of the region.
By selecting a specific grey square in the corner of the region, you can change the plane of a projection. The highlighted orange square then defines the top-left corner of the rendered orthographic projection. The red arrows show the direction of a projection.
You can also use RECONSTRUCTION -> Lasso tool to specify an exact region to create an orthophoto from.
To automatically fit the project region to the selected triangles, go to RECONSTRUCTION -> Set Reconstruction Region -> Set Region Automatically. Once you have a selection of triangles, Ortho Projection tool works just with this selection. This means that only selected triangles will be projected to the chosen side. To activate the Ortho Projection tool, go to RESONSTRUCTION -> Tools -> Ortho Projection.
Setting the parameters of an ortho-projection
Once you activate the tool, the Ortho Projection Tool table shows up in the 1Ds view (see the picture below).
In the Type line, you can specify the type of an ortho projection. The arbitrary type is selected automatically.
NOTE: The Type item is available only for georeferenced projects, otherwise the type of projection is always Arbitrary and the coordinate system is Local Euclidean.
- Arbitrary means there are no restrictions in a position of the region or in a direction of the projection.
- Selecting it to Top makes sure that your projection is aligned with the chosen coordinate system. This type can be used when you need to make a geo-referenced orthophoto or a digital surface model, and you need to export it to a GIS application. When selected, rotation parameters 'Yaw' and 'Pitch' are locked.
- Side type means that the projection plane is orthogonal to the ground plane of the selected coordinate system (often used in CAD project documentation). When selected, rotation parameters 'Yaw' and 'Pitch' are locked.
- Use the Map type when exporting an orthophoto to KML or KMZ format. In this case, the coordinate system will be set to GPS (WGS 84) and all rotations will be locked to 0.
Info group defines parameters (Coordinate system, Centre, Rotation, Size) of the reconstruction region.
- Coordinate system – for georeferenced scenes, you can choose the coordinate system in which an ortho-projection will be rendered.
Width and Height (outside the Info group) defines the resolution of the rendered projection. When changing one of these parameters, the other parameter and the Ortho pixel size will be recomputed accordingly to preserve the aspect ratio defined by the reconstruction region.
Ortho pixel size is a size of a pixel in the units of a chosen coordinate system.
If you are not sure how to define the resolution of an orthographic projection, RealityCapture will calculate the optimal parameters with respect to the properties of a selected model using the Estimate optimal resolution function.
You can also adjust the background of an orthophoto by changing the parameters Backface color type, Backface color, and Backface color transparency.
After adjusting ortho-projection settings, you can save them by clicking on a small icon Save settings in the bottom-left corner of the Ortho Projection Tool panel (the lower icon in the red box in the picture below). Accordingly, you can reload any previously saved settings by clicking the upper icon Load settings in the red box in the picture below.
You can create an orthographic projection by clicking Render, or create an empty ortho projection and render multiple ones at once later by clicking Add to batch. Rendered ortho projection will appear in the 1Ds view (Ortho projection 1 in the picture below), an ortho projection added to the batch appears in the 1Ds view with the note 'unprocessed' (Ortho projection 2 in the picture below). The symbol in the green box in the picture below indicates that the ortho projection is georeferenced.
When selecting a specific region with the Lasso tool, only this region is visible in the rendered orthophoto. You can also see the reconstruction region used when rendering the selected ortho-photo in the 3D view (see the picture below).
Parameters of a rendered ortho projection
You can see all created projections in the 1Ds view and access detailed information on each of them by clicking on it, then the Selected ortho photo(s) menu will show up (see the picture below). The Width and Height define the size of an orthophoto in pixels (the ones previously defined in the Ortho Projection tool), and Units per column/row pixel defines ortho pixel size in coordinate system units (in our project 0.021 m, which is 21 mm).
You can also see the calculated surface and volume here. Cut volume is the volume between the visible surface and the bottom side of the reconstruction region. Fill volume is the volume between the visible surface and the top side of the reconstruction region. Area 2D is the area of the projection of the visible surface to the bottom side of the reconstruction region. Area 3D is the area of the visible surface.
In the Coordinate system part, you can see specifications of the coordinate system and the projection type used to create an ortho projection.
You can render unprocessed ortho projections individually or together. Select the desired unprocessed ortho projection (or more of them) in the 1Ds view. The table Selected ortho photo(s) will show up defining the parameters of the selected ortho projection(s). If there are more orthographic projections selected and their parameters mismatch, the sign '< Different values >' shows up (see the picture below). To render all selected ortho projections, click Render unprocessed ortho projection(s). The processed orthophotos will be added to the project tree in the 1Ds view. To delete all selected unprocessed ortho projections, simply select Delete unprocessed ortho projection(s).
In the 2D view, the selected ortho projection can be visualized. Click the ORTHO context menu to see all the available options for orthographic projections. In the 2D view, you can see a graphic scale and the current coordinates of a mouse cursor in the WGS84 coordinate system and in the coordinate system of rendered ortho projection (red boxes in the picture below).
ORTHO context menu
Now we will take a look at all the options the context menu ORTHO offers.
Source
Each rendered ortho projection consists of three layers – Image, Depth, and Altitude. In the source part of the context menu, you can choose the one you want to visualize. You can also use RealityCapture's built-in color cursors (blue, green, magenta, and coral) to distinguish views and orthophotos for better orientation in your projects.
In the picture below, we have visualized each layer (from left to right – Image, Depth, Altitude) of the same orthophoto. You can also adjust the color scale of the Depth and Altitude layers (we have adjusted the color scale in the middle picture – Depth layer by moving the top and bottom end of the color scale).
Display
In the Display part of the ORTHO context menu, you can enable or disable the display of some selected features on the orthophoto (see the picture below).
In our example, we have enabled the display of the ground control points, the reconstruction region, and the pivot. You can also fit the image to the view by selecting Reset view.
Tools
In all three layers of the selected orthophoto, there is an option to measure distance by activating the tool Distance. You can select 2 end points of the segment and the 2D distance (distance in the image) and the 3D distance will appear in the units of the orthophoto’s coordinate system.
You can also use the Sample tool to create a sampling grid for better orientation in the orthographic projection. You can define the sampling parameters in the Ortho Sampling Tool tab (red box in the picture below). You can define the span of the grid points by defining Distance between samples in the units of the orthophoto coordinate system, by setting Number of points of the generated grid or by limiting the maximum Raw size, which is the estimated size of the exported sampled points in the memory. The other two parameters will be recalculated accordingly.
If the sampling is too dense, RealityCapture changes the grid step for viewing and the red notification in the bottom-right corner shows up (see the picture below).
Display in the Map view
To see whether your component and also your ortho projection are georeferenced correctly, you can display orthophoto(s) in a Map view. You can change a view to the Map view by dragging the white button in the top-right corner of the layout cell area. In the Map view context tab, you can choose from several map providers. We have chosen OpenStreet Topo.
To display one or more ortho projections, just select them in the 1Ds view and drag and drop them into the Map view.
You can use the button Frame control points in the Map view context windows to fit the area of control points into the view or the button Frame Images to fit the selected ortho projections into the view. To reset the zoom and position in the map to its default state press Reset view.
You can display also orthophotos rendered in different coordinate systems in the Map view at the same time.
You can select the specific ortho projection also from Map view, Selected ortho photo(s) table will show up in the 1Ds menu. In the Map View context menu, you can bring the selected object(s) one level forward by the tool Bring to Front or send one level back by the tool Send to back. You can also automatically change the order of the object according to z coordinate by Auto Arrange. To remove the selected object(s) from the Map view click Remove or Remove all, if you wish to remove all objects from Map view.
In the section Display, you can enable or disable to display all aligned cameras by the checkbox Cameras, residuals for each image by the checkbox Residuals and all ground control points by the check box Control Points.
Export
Exporting an Ortho Projection
The Image layer of the rendered orthophoto can be exported through
- WORKFLOW -> Export -> Ortho Photo
- 2D ORTHO context menu -> Export -> Ortho Projection
If multiple ortho projections are selected, then all selected projections are exported. They can be exported in these formats:
After selecting a specific format (apart from KML and KMZ), the Export ortho projection table, the one in the picture below, shows up.
- If you want to export a world file, set Export world file to 'True'. A world file is a plain text file used by many geographic information systems (GIS) to geo-reference raster map images.
- In the World file coordinate system, 3 options are possible: 'Projected' – model is projected on a selected plane of the reconstruction box. 'Global' – use when creating a map or a top view. 'Image' – choose when creating elevations or sections.
- When Export projection parameters file is set to 'True', a text file containing specific parameters of the projection with the extension *.rcortho will be exported.
- In the Compression line, options 'None' and 'LZW' are available. Choose 'LZW' if you want to compress (reduce) the size of the exported file.
- Append name to file name set to 'True' adds the ortho projection’s name to the file name.
- Set Export as BigTIFF to 'True' if you want to save the file as a BigTIFF instead of the regular 32bit TIFF file.
When exporting to KML or KMZ format, a different dialog shows up:
- In the Tile image file format, you can choose the format of the images related to KML/KMZ files, and in the Tile image resolution (pixels) you can specify the resolution of these images.
- All other options have been mentioned previously.
Only projections in the WGS 84 coordinate system with all rotations set to 0 can be exported to KMZ/KML format. Otherwise the following error message shows up:
Example:
Here we will show you an example of exporting a projection to KMZ format, and subsequent loading into Google Earth. Set the reconstruction region to desired size. In the Ortho projection tool, set Type of projection to 'Top', Coordinate system to 'epsg:4326 – GPS (WGS 84)', and all Rotation parameters to 0.
Or you can simply choose the projection type to 'Map' and the application will set the rest for you. Render the orthographic projection. In the 1Ds view, select the rendered ortho projection. Choose one of the export options mentioned above and select the KMZ format. In the Export ortho projection dialog, choose the desired parameters and click OK. In Google Earth, simply open the exported KMZ file.
Digital Surface Model export
The Depth and Altitude layer of the rendered orthophoto can be exported through
- WORKFLOW -> Export -> Digital Surface Model
- RECONSTRUCTION -> Export -> Digital Surface Model
- 2D ORTHO context menu -> Export -> Digital Surface Model
Digital surface model can be exported in the same formats as the Image layer of an ortho projection. After selecting one of the formats, this dialog window shows up:
The only difference from the table when exporting Image layer, is the Pixel type line. Here you can choose from Altitude and Depth, depending on which layer is to be exported.
Example:
In this example, we have exported the Altitude layer of an ortho projection in the 'epsg:3016 – SWEREF99 20 15' coordinate system in the TIFF format.
In order to see whether the DSM has been exported correctly (with correct coordinate system), we have loaded the TIFF file to free open-source GIS software – QGIS.
We can compare the coordinates of a mouse cursor placed approximately in the upper-left corner in the RC an in QGIS, both in the same epsg:3016 coordinate system.
Sampled Projection export
Sampled Projection can be exported through the 2D ORTHO context menu in the export section, and can be exported in these formats:
After selecting a specific format, the Export model dialog shows up.
Depending on the chosen save-as-type of a model, you will get one of the following export model options - except the *.partList, which needs no additional export settings. You can find all dialogs and explanation of the parameters in the application Help -> Export, Import and Re-use Computations -> Model Export.
Example:
In this example, we have exported the Altitude layer of a projection in the 'epsg:3016 – SWEREF99 20 15' coordinate system in the TIFF format, and Sampled projection in XYZ Point Cloud format, and visualized them using QGIS plugin Qgis2threejs.
Comments
0 comments
Article is closed for comments.