Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
pangea_survey::Orthorectifier::Impl Struct Reference
Collaboration diagram for pangea_survey::Orthorectifier::Impl:

Data Structures

struct  CachedBlock
struct  SourcePhoto
struct  MosaicView
struct  CachedPhoto

Public Member Functions

std::shared_ptr< Photo > sourcePhoto (std::size_t index)
 Get a pinned decoded photo for the simple renderer.
Photo & mosaicPhoto (std::size_t index)
 Get the mosaic's cached projection and image source.
void prepareDiskSources (const std::function< bool()> &stopped)
 Prepare disk-backed rasters for low-memory rendering.
cv::Rect mosaicRectangle (const OrthoSource &source, int scale, bool seamPlan=false) const
 Bound the projected source footprint on a mosaic grid.
cv::Matx33d mosaicWarp (const Photo &photo, const cv::Rect &rectangle, int scale, cv::Mat &image, cv::Mat &mask) const
 Resample one source over a mosaic rectangle.
void prepareMosaic (const std::function< bool()> &stopped)
 Build the shared seam and exposure plan on first use.
void prepareMosaicCompletion (const std::vector< cv::UMat > &images, const std::vector< cv::UMat > &originalMasks, const std::vector< std::size_t > &seamViews, const std::function< bool()> &stopped)
 Build a shared fill overview while retaining observed support.
OrthoImage renderMosaicRegion (const MapTile &map, int width, int height, const std::function< bool()> &stopped)
 Render a mosaic window using the session-wide seam plan.
OrthoImage renderRegion (const MapTile &map, int width, int height, const std::function< bool()> &stopped)
 Render a window with the selected orthorectification engine.
 Impl (const MapConfig &c, const std::filesystem::path &csv)
 Admit a source set and establish the shared projection and grid.

Data Fields

MapConfig config
MapProjection projection
std::vector< OrthoSource > sources
double west = 0
double north = 0
std::size_t cols = 0
std::size_t rows = 0
std::map< std::pair< std::size_t, std::size_t >, CachedBlock > blocks
std::size_t blockClock = 0
std::map< std::size_t, SourcePhoto > sourcePhotos
std::size_t sourcePhotoBytes = 0
std::size_t sourcePhotoClock = 0
std::vector< MosaicView > mosaicViews
std::map< std::size_t, CachedPhoto > mosaicPhotos
std::size_t photoClock = 0
std::size_t photoBytes = 0
int seamScale = 0
cv::Mat completedMosaic
cv::Mat mosaicSourceDistance
std::vector< std::filesystem::path > sourceRasters
bool mosaicPrepared = false
bool diskSourcesPrepared = false

Detailed Description

Definition at line 402 of file ortho_map.cpp.

Constructor & Destructor Documentation

◆ Impl()

pangea_survey::Orthorectifier::Impl::Impl ( const MapConfig & c,
const std::filesystem::path & csv )
inline

Admit a source set and establish the shared projection and grid.

Parameters
cRequested configuration.
csvSource manifest used by the selected input path.

Reconcile the manifest count and choose a reference plane before rendering; camera heights must leave clearance above that plane.

Exceptions
std::runtime_errorOn invalid input, engine, or layout.

Definition at line 445 of file ortho_map.cpp.

Member Function Documentation

◆ mosaicPhoto()

Photo & pangea_survey::Orthorectifier::Impl::mosaicPhoto ( std::size_t index)

Get the mosaic's cached projection and image source.

Parameters
indexIndex in the admitted source list.
Returns
Borrowed entry that can be invalidated by cache eviction.

Low-memory mode retains a raster path instead of decoded pixels; otherwise evict by recency before allocating the next image.

Definition at line 649 of file ortho_map.cpp.

◆ mosaicRectangle()

cv::Rect pangea_survey::Orthorectifier::Impl::mosaicRectangle ( const OrthoSource & source,
int scale,
bool seamPlan = false ) const

Bound the projected source footprint on a mosaic grid.

Parameters
sourceSource pose and camera geometry.
scaleNumber of base pixels per grid pixel.
seamPlanTrue when computing the seam-planning footprint.
Returns
Pixel rectangle in the selected mosaic grid.

Project image corners to the common reference plane so the renderer can avoid processing unrelated regions.

Definition at line 683 of file ortho_map.cpp.

◆ mosaicWarp()

cv::Matx33d pangea_survey::Orthorectifier::Impl::mosaicWarp ( const Photo & photo,
const cv::Rect & rectangle,
int scale,
cv::Mat & image,
cv::Mat & mask ) const

Resample one source over a mosaic rectangle.

Parameters
photoProjection-ready source with decoded or disk-backed pixels.
rectangleOutput window in mosaic-grid pixels.
scaleNumber of base pixels per grid pixel.
[out]imageWarped source colour.
[out]maskSupport for the warped colour.
Returns
Transform mapping local destination coordinates into the source.

Evaluate the mapping at pixel centres; use the calibrated camera when present and process in strips to bound source access.

Definition at line 732 of file ortho_map.cpp.

◆ prepareDiskSources()

void pangea_survey::Orthorectifier::Impl::prepareDiskSources ( const std::function< bool()> & stopped)

Prepare disk-backed rasters for low-memory rendering.

Parameters
stoppedCooperative cancellation predicate.

Identify each raster with its input digest so reusable prepared data cannot quietly stand in for changed source imagery.

Exceptions
std::runtime_errorOn cancellation or invalid source data or storage.

Definition at line 525 of file ortho_map.cpp.

◆ prepareMosaic()

void pangea_survey::Orthorectifier::Impl::prepareMosaic ( const std::function< bool()> & stopped)

Build the shared seam and exposure plan on first use.

Parameters
stoppedCooperative cancellation predicate.

Coarsen the overview until the global planning workspace fits its limits. Reuse that plan across windows so adjacent renders agree.

Definition at line 828 of file ortho_map.cpp.

◆ prepareMosaicCompletion()

void pangea_survey::Orthorectifier::Impl::prepareMosaicCompletion ( const std::vector< cv::UMat > & images,
const std::vector< cv::UMat > & originalMasks,
const std::vector< std::size_t > & seamViews,
const std::function< bool()> & stopped )

Build a shared fill overview while retaining observed support.

Parameters
imagesWarped colour overviews.
originalMasksMatching support masks before seam selection.
seamViewsSource indices corresponding to the overview entries.
stoppedCooperative cancellation predicate.

Keep the observed mask separate from inferred fill so later renders need not report extrapolated colours as measured coverage.

Definition at line 944 of file ortho_map.cpp.

◆ renderMosaicRegion()

OrthoImage pangea_survey::Orthorectifier::Impl::renderMosaicRegion ( const MapTile & map,
int width,
int height,
const std::function< bool()> & stopped )

Render a mosaic window using the session-wide seam plan.

Parameters
mapProjected centre and georeference of the window.
widthOutput columns.
heightOutput rows.
stoppedCooperative cancellation predicate.
Returns
Owned pixels, confidence, and rendering provenance.

Combine planned contributions in the local window while tracking fallback colour and coverage independently of multiband blending.

Definition at line 1003 of file ortho_map.cpp.

◆ renderRegion()

OrthoImage pangea_survey::Orthorectifier::Impl::renderRegion ( const MapTile & map,
int outputWidth,
int outputHeight,
const std::function< bool()> & stopped )

Render a window with the selected orthorectification engine.

Parameters
mapProjected centre and georeference of the window.
outputWidthOutput columns.
outputHeightOutput rows.
stoppedCooperative cancellation predicate.
Returns
Owned pixels and coverage information.

The simple engine ranks sources by distance and bounds the candidate set; the mosaic engine uses the shared seam plan instead.

Definition at line 1222 of file ortho_map.cpp.

◆ sourcePhoto()

std::shared_ptr< Photo > pangea_survey::Orthorectifier::Impl::sourcePhoto ( std::size_t index)

Get a pinned decoded photo for the simple renderer.

Parameters
indexIndex in the admitted source list.
Returns
Shared ownership of the decoded, projection-ready photo.

Evict least-recently-used entries only when the cache is their sole owner; active renders must retain their pixel storage.

Exceptions
std::runtime_errorIf the decoded-photo budget cannot be met.

Definition at line 486 of file ortho_map.cpp.

Field Documentation

◆ blockClock

std::size_t pangea_survey::Orthorectifier::Impl::blockClock = 0

Definition at line 410 of file ortho_map.cpp.

◆ blocks

std::map<std::pair<std::size_t, std::size_t>, CachedBlock> pangea_survey::Orthorectifier::Impl::blocks

Definition at line 409 of file ortho_map.cpp.

◆ cols

std::size_t pangea_survey::Orthorectifier::Impl::cols = 0

Definition at line 407 of file ortho_map.cpp.

◆ completedMosaic

cv::Mat pangea_survey::Orthorectifier::Impl::completedMosaic

Definition at line 427 of file ortho_map.cpp.

◆ config

MapConfig pangea_survey::Orthorectifier::Impl::config

Definition at line 403 of file ortho_map.cpp.

◆ diskSourcesPrepared

bool pangea_survey::Orthorectifier::Impl::diskSourcesPrepared = false

Definition at line 429 of file ortho_map.cpp.

◆ mosaicPhotos

std::map<std::size_t, CachedPhoto> pangea_survey::Orthorectifier::Impl::mosaicPhotos

Definition at line 424 of file ortho_map.cpp.

◆ mosaicPrepared

bool pangea_survey::Orthorectifier::Impl::mosaicPrepared = false

Definition at line 429 of file ortho_map.cpp.

◆ mosaicSourceDistance

cv::Mat pangea_survey::Orthorectifier::Impl::mosaicSourceDistance

Definition at line 427 of file ortho_map.cpp.

◆ mosaicViews

std::vector<MosaicView> pangea_survey::Orthorectifier::Impl::mosaicViews

Definition at line 423 of file ortho_map.cpp.

◆ north

double pangea_survey::Orthorectifier::Impl::north = 0

Definition at line 406 of file ortho_map.cpp.

◆ photoBytes

std::size_t pangea_survey::Orthorectifier::Impl::photoBytes = 0

Definition at line 425 of file ortho_map.cpp.

◆ photoClock

std::size_t pangea_survey::Orthorectifier::Impl::photoClock = 0

Definition at line 425 of file ortho_map.cpp.

◆ projection

MapProjection pangea_survey::Orthorectifier::Impl::projection

Definition at line 404 of file ortho_map.cpp.

◆ rows

std::size_t pangea_survey::Orthorectifier::Impl::rows = 0

Definition at line 407 of file ortho_map.cpp.

◆ seamScale

int pangea_survey::Orthorectifier::Impl::seamScale = 0

Definition at line 426 of file ortho_map.cpp.

◆ sourcePhotoBytes

std::size_t pangea_survey::Orthorectifier::Impl::sourcePhotoBytes = 0

Definition at line 413 of file ortho_map.cpp.

◆ sourcePhotoClock

std::size_t pangea_survey::Orthorectifier::Impl::sourcePhotoClock = 0

Definition at line 413 of file ortho_map.cpp.

◆ sourcePhotos

std::map<std::size_t, SourcePhoto> pangea_survey::Orthorectifier::Impl::sourcePhotos

Definition at line 412 of file ortho_map.cpp.

◆ sourceRasters

std::vector<std::filesystem::path> pangea_survey::Orthorectifier::Impl::sourceRasters

Definition at line 428 of file ortho_map.cpp.

◆ sources

std::vector<OrthoSource> pangea_survey::Orthorectifier::Impl::sources

Definition at line 405 of file ortho_map.cpp.

◆ west

double pangea_survey::Orthorectifier::Impl::west = 0

Definition at line 406 of file ortho_map.cpp.


The documentation for this struct was generated from the following file: