Ocean
Ocean::Tracking::SphericalEnvironment Class Reference

This class implements a spherical environment based on a panorama frame. More...

Inheritance diagram for Ocean::Tracking::SphericalEnvironment:

Public Types

typedef Callback< bool, const CV::FramePyramid &, const CV::FramePyramid &, const PinholeCamera &, const PinholeCamera &, const SquareMatrix3 &, const SquareMatrix3 &, const uint8_t, Frame &, Worker * > FrameCallback
 Definition of a callback function allowing to determine an update mask for a current camera frame. More...
 
typedef std::vector< IndexPairs32PoseImagePointPairGroups
 Definition of a vector holding groups of pairs between camera pose ids and image point ids. More...
 
- Public Types inherited from Ocean::CV::Advanced::PanoramaFrame
enum  UpdateMode {
  UM_INVALID , UM_SET_NEW , UM_SET_ALL , UM_AVERAGE_LOCAL ,
  UM_AVERAGE_GLOBAL
}
 Definition of individual frame update modes. More...
 

Public Member Functions

 SphericalEnvironment ()=default
 Creates an invalid spherical environment object. More...
 
 SphericalEnvironment (const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const uint8_t maskValue, const UpdateMode frameMode)
 Creates a new spherical environment object. More...
 
bool extendEnvironment (const PinholeCamera &pinholeCamera, const Frame &frame, const unsigned int approximationBinSize=20u, const Geometry::Estimator::EstimatorType fineAdjustmentEstimator=Geometry::Estimator::ET_INVALID, const bool optimizeCamera=false, Worker *worker=nullptr, SquareMatrix3 *orientation=nullptr, PinholeCamera *optimizedCamera=nullptr, const FrameCallback &frameCallback=FrameCallback())
 Adds a new camera frame to the panorama frame for which the orientation is unknown. More...
 
bool optimizeOrientation (const PinholeCamera &pinholeCamera, const SquareMatrix3 &orientation, const Frame &frame, const Frame &mask, const Geometry::Estimator::EstimatorType estimator, SquareMatrix3 &optimizedOrientation, PinholeCamera *optimizedCamera=nullptr, LookupTable *fineAdjustment=nullptr, const unsigned int approximationBinSize=20u, Worker *worker=nullptr)
 Determines the precise orientation of a given camera frame. More...
 
virtual void clear ()
 Clears the panorama frame and allows to set a new first camera frame. More...
 
- Public Member Functions inherited from Ocean::CV::Advanced::PanoramaFrame
 PanoramaFrame ()=default
 Creates an invalid panorama frame instance. More...
 
 PanoramaFrame (const unsigned int width, const unsigned int height, const uint8_t maskValue, const UpdateMode updateMode)
 Creates a new panorama frame instance. More...
 
 PanoramaFrame (const Frame &frame, const Frame &mask, const uint8_t maskValue, const UpdateMode updateMode, Worker *worker=nullptr)
 Creates a new panorama frame instance by an already existing (entire) panorama frame. More...
 
 PanoramaFrame (Frame &&frame, Frame &&mask, const uint8_t maskValue, const UpdateMode updateMode, Worker *worker=nullptr)
 Creates a new panorama frame instance by an already existing (entire) panorama frame. More...
 
virtual ~PanoramaFrame ()=default
 Default destructor. More...
 
uint8_t maskValue () const
 Returns the mask value defining the 8 bit pixel value of valid pixels. More...
 
UpdateMode updateMode () const
 Returns the update mode of this panorama frame. More...
 
const Frameframe () const
 Returns the current panorama sub-frame (not the maximal possible panorama frame). More...
 
const Framemask () const
 Returns the mask of the current panorama frame. More...
 
const PixelPositionframeTopLeft () const
 Returns the top left position of the current panorama sub-frame. More...
 
unsigned int dimensionWidth () const
 Returns the maximal possible width of the entire panorama frame representing horizontal 360 degrees, in pixel. More...
 
unsigned int dimensionHeight () const
 Returns the maximal possible height of the entire panorama frame representing vertical 180 degrees, in pixel. More...
 
bool setFrame (const PixelPosition &topLeft, const Frame &frame, const Frame &mask=Frame(), Worker *worker=nullptr)
 Sets or resets the panorama sub-frame (not the maximal possible panorama frame). More...
 
bool addFrame (const PinholeCamera &pinholeCamera, const SquareMatrix3 &orientation, const Frame &frame, const Frame &mask, const unsigned int approximationBinSize=20u, Worker *worker=nullptr)
 Adds a new camera frame to the panorama frame for which the orientation is known. More...
 
bool extractFrame (const PinholeCamera &pinholeCamera, const SquareMatrix3 &orientation, Frame &frame, Frame &mask, const unsigned int approximationBinSize=20u, Worker *worker=nullptr, const LookupTable *fineAdjustment=nullptr) const
 Extracts a camera frame from the panorama frame. More...
 
Vector2 cameraPixel2panoramaPixel (const PinholeCamera &pinholeCamera, const SquareMatrix3 &orientation, const Vector2 &cameraPixel, const Vector2 &referenceAngle) const
 Converts a given pixel position defined in the current camera frame into the pixel position defined in the entire (maximal possible) panorama frame. More...
 
Vector2 cameraPixel2panoramaPixelStrict (const PinholeCamera &pinholeCamera, const SquareMatrix3 &orientation, const Vector2 &cameraPixel) const
 Converts a given pixel position defined in the current camera frame into the pixel position defined in the entire (maximal possible) panorama frame. More...
 
Vector2 panoramaPixel2cameraPixel (const PinholeCamera &pinholeCamera, const SquareMatrix3 &iOrientation, const Vector2 &panoramaPixel) const
 Converts a given pixel position defined in the entire (maximal possible) panorama frame into the pixel position defined in a camera frame. More...
 
Vector2 angle2pixel (const Vector2 &angle) const
 Converts an angle in the entire (maximal possible) panorama frame to the corresponding pixel position in the entire panorama frame. More...
 
Vector2 pixel2angle (const Vector2 &position) const
 Converts the pixel position in the entire (maximal possible) panorama frame to the corresponding angle in the entire panorama frame. More...
 
bool cameraFrame2panoramaSubFrame (const PinholeCamera &pinholeCamera, const Frame &frame, const Frame &mask, const SquareMatrix3 &orientation, Frame &panoramaSubFrame, Frame &panoramaSubMask, PixelPositionI &subFrameTopLeft, const unsigned int approximationBinSize=20u, Worker *worker=nullptr, const LookupTable *fineAdjustment=nullptr)
 Copies (interpolates) the entire area of a camera frame with specified camera orientation to a sub-frame of an entire panorama frame. More...
 
bool isValid () const
 Returns whether this panorama frame holds valid configuration parameters and thus can be used. More...
 
 operator bool () const
 Returns whether this panorama frame holds valid configuration parameters and thus can be used. More...
 
template<unsigned int tChannels>
void mergeAverageGlobal8BitPerChannel (const uint8_t *panoramaSubFrame, const uint8_t *panoramaSubMask, const unsigned int subFrameWidth, const unsigned int subFrameHeight, const unsigned int panoramaSubFramePaddingElements, const unsigned int panoramaSubMaskPaddingElements, const PixelPosition &subTopLeft, uint32_t *panoramaNominatorFrame, uint32_t *panoramaDenominatorFrame, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaWidth, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const PixelPosition &panoramaTopLeft, const uint8_t maskValue, Worker *worker)
 

Static Public Member Functions

static bool determinePointCorrespondencesHomography (const Frame &sourceFrame, const Frame &targetFrame, const SquareMatrix3 &homography, Vectors2 &sourcePoints, Vectors2 &targetPoints, const unsigned int patchSize, const unsigned int maximalDistance=32u, const unsigned int coarsestLayerRadius=8u, const CV::FramePyramid::DownsamplingMode downsamplingMode=CV::FramePyramid::DM_FILTER_14641, Worker *worker=nullptr)
 Determines point correspondences between two camera frames captured with individual locations (describable by a homography) by application of a pyramid-based patch tracking approach. More...
 
static bool determinePointCorrespondencesHomography (const CV::FramePyramid &sourceFramePyramid, const Frame &targetFrame, const SquareMatrix3 &homography, const Vectors2 &sourcePointCandidates, Vectors2 &validSourcePoints, Vectors2 &validTargetPoints, Indices32 &validSourcePointIndices, const unsigned int patchSize, const unsigned int maximalDistance=32u, const unsigned int coarsestLayerRadius=8u, const CV::FramePyramid::DownsamplingMode downsamplingMode=CV::FramePyramid::DM_FILTER_14641, Worker *worker=nullptr, size_t *usedPointCandidates=nullptr)
 Determines point correspondences between two camera frames captured with individual locations (describable by a homography) by application of a pyramid-based patch tracking approach. More...
 
static bool nonHomographyMask (const CV::FramePyramid &previousFramePyramid, const CV::FramePyramid &currentFramePyramid, const PinholeCamera &previousCamera, const PinholeCamera &currentCamera, const SquareMatrix3 &previousOrientation, const SquareMatrix3 &currentOrientation, const uint8_t maskValue, Frame &currentMask, Worker *worker=nullptr)
 This function determines a mask for image areas not matching with the common homography between two successive camera frames. More...
 
static bool optimizeCamera (const PinholeCamera &pinholeCamera, const Frames &frames, const SquareMatrices3 &orientations, PinholeCamera &optimizedCamera, Worker *worker=nullptr)
 Optimizes the camera profile for a given set of camera frames with known orientations so that the offset between corresponding points in the individual camera frames becomes as small as possible. More...
 
static bool optimizeCamera (const PinholeCamera &pinholeCamera, const SquareMatrices3 &orientations, const ImagePoints &imagePoints, const PoseImagePointPairGroups &orientationImagePointPairGroups, PinholeCamera &optimizedCamera, SquareMatrices3 &optimizedOrientations, const unsigned int iterations=20u, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr)
 Optimizes the camera profile for a given set of image points from individual camera frames so that the offset between the corresponding points becomes as small as possible. More...
 
static bool findInitialFieldOfView (const unsigned int width, const unsigned int height, const SquareMatrices3 &orientations, const ImagePoints &imagePoints, const PoseImagePointPairGroups &orientationImagePointPairGroups, PinholeCamera &optimizedCamera, SquareMatrices3 &optimizedOrientations, const Scalar lowerFovX=Numeric::deg2rad(40), const Scalar upperFovX=Numeric::deg2rad(90), const unsigned int steps=10u)
 Determines the initial field of view for a set of camera frames with known orientation and a corresponding set of unique features observed in several individual frames. More...
 
static bool determineTransformationTable2x2 (const unsigned int width, const unsigned int height, const Vectors2 &points0, const Vectors2 &points1, LookupCorner2< Vector2 > &transformation0to1, const unsigned int iterations=20u, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), Scalar *initialError=nullptr, Scalar *finalError=nullptr)
 Determines a 2x2 transformation table (a lookup table) transforming a set of points (defined in the domain of the transformation table) to another set of points. More...
 
- Static Public Member Functions inherited from Ocean::CV::Advanced::PanoramaFrame
static bool haveIntersectionByInnerFov (const PinholeCamera &pinholeCamera0, const SquareMatrix3 &orientation0, const PinholeCamera &pinholeCamera1, const SquareMatrix3 &orientation1, Scalar *overlappingPercent=nullptr)
 Checks whether two camera frames have a guaranteed intersection. More...
 
static bool haveIntersectionByRays (const PinholeCamera &pinholeCamera0, const SquareMatrix3 &orientation0, const PinholeCamera &pinholeCamera1, const SquareMatrix3 &orientation1, const Scalar borderFactor=Scalar(0.1), const unsigned int minimalIntersections=2u)
 Checks whether two camera frames have a guaranteed intersection. More...
 
static Scalar approximateIntersectionArea (const PinholeCamera &pinholeCamera0, const SquareMatrix3 &orientation0, const PinholeCamera &pinholeCamera1, const SquareMatrix3 &orientation1, Scalar *intersectionRatio=nullptr)
 Approximate the area of the intersection of two frames. More...
 
static Vector2 angle2pixel (const Vector2 &angle, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight)
 Converts an angle in the entire (maximal possible) panorama frame to the corresponding pixel position in the entire panorama frame. More...
 
static Vector2 angle2pixelStrict (const Vector2 &angle, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight)
 Converts an angle in the entire (maximal possible) panorama frame to the corresponding pixel position in the entire panorama frame. More...
 
static Vector2 pixel2angle (const Vector2 &position, const Scalar invPanoramaDimensionWidth, const Scalar invPanoramaDimensionHeight)
 Converts a pixel position in the entire (maximal possible) panorama frame (or outside this panorama frame) to the corresponding angle in the entire panorama frame. More...
 
static Vector2 pixel2angleStrict (const Vector2 &position, const Scalar invPanoramaDimensionWidth, const Scalar invPanoramaDimensionHeight)
 Converts a pixel position in the entire (maximal possible) panorama frame to the corresponding angle in the entire panorama frame. More...
 
static Vector2 ray2angle (const Vector3 &ray, const Vector2 &referenceAngle)
 Converts a unit ray starting at the panorama frame's center to the corresponding angle. More...
 
static Vector2 ray2angleStrict (const Vector3 &ray)
 Converts a unit ray starting at the panorama frame's center to the corresponding angle. More...
 
static Vector3 angle2ray (const Vector2 &angle)
 Converts an angle in the panorama frame to a unit ray starting at the panorama frame's center. More...
 
static Vector3 angle2rayStrict (const Vector2 &angle)
 Converts an angle in the panorama frame to a unit ray starting at the panorama frame's center. More...
 
static Vector2 cameraPixel2cameraPixel (const PinholeCamera &inputCamera, const SquareMatrix3 &inputOrientation, const Vector2 &inputPosition, const PinholeCamera &outputCamera, const SquareMatrix3 &outputOrientation)
 Converts a camera pixel position defined in one frame into a camera pixel position defined in another frame. More...
 
static bool cameraFrame2cameraFrame (const PinholeCamera &inputCamera, const SquareMatrix3 &inputOrientation, const Frame &inputFrame, const Frame &inputMask, const PinholeCamera &outputCamera, const SquareMatrix3 &outputOrientation, Frame &outputFrame, Frame &outputMask, const uint8_t maskValue, const unsigned int approximationBinSize, Worker *worker)
 Converts a given input camera frame captured with a given orientation into a corresponding camera frame with different orientation. More...
 
static bool panoramaFrame2cameraFrame (const PinholeCamera &pinholeCamera, const Frame &panoramaFrame, const Frame &panoramaMask, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const PixelPosition &panoramaFrameTopLeft, const SquareMatrix3 &orientation, Frame &cameraFrame, Frame &cameraMask, const uint8_t maskValue=0xFFu, const unsigned int approximationBinSize=20u, Worker *worker=nullptr, const LookupTable *fineAdjustment=nullptr)
 Copies (interpolates) a section from the entire panorama frame to a camera frame with specified camera orientation. More...
 
static bool cameraFrame2panoramaFrame (const PinholeCamera &pinholeCamera, const Frame &cameraFrame, const SquareMatrix3 &orientation, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const PixelPositionI &panoramaFrameTopLeft, Frame &panoramaFrame, Frame &panoramaMask, const uint8_t maskValue=0xFFu, const unsigned int approximationBinSize=20u, Worker *worker=nullptr, const LookupTable *fineAdjustment=nullptr)
 Copies (interpolates) the entire area of a camera frame with specified camera orientation to a section of an entire panorama frame. More...
 
static bool cameraFrame2panoramaFrame (const PinholeCamera &pinholeCamera, const Frame &cameraFrame, const Frame &cameraMask, const SquareMatrix3 &orientation, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const PixelPositionI &panoramaFrameTopLeft, Frame &panoramaFrame, Frame &panoramaMask, const uint8_t maskValue=0xFFu, const unsigned int approximationBinSize=20u, Worker *worker=nullptr, const LookupTable *fineAdjustment=nullptr)
 Copies (interpolates) the a subset of a camera frame (specified by a mask) with specified camera orientation to a section of an entire panorama frame. More...
 
template<unsigned int tChannels>
static void cameraFrame2cameraFrame8BitPerChannel (const PinholeCamera &inputCamera, const SquareMatrix3 &inputOrientation, const uint8_t *inputFrame, const uint8_t *inputMask, const unsigned int inputFramePaddingElements, const unsigned int inputMaskPaddingElements, const PinholeCamera &outputCamera, const SquareMatrix3 &outputOrientation, uint8_t *outputFrame, uint8_t *outputMask, const unsigned int outputFramePaddingElements, const unsigned int outputMaskPaddingElements, const uint8_t maskValue, const unsigned int approximationBinSize, Worker *worker)
 Converts a given input camera frame with 8 bit per channel captured with a given orientation into a corresponding camera frame with different orientation. More...
 
template<unsigned int tChannels>
static void panoramaFrame2cameraFrame8BitPerChannel (const PinholeCamera &pinholeCamera, const uint8_t *panoramaFrame, const uint8_t *panoramaMask, const unsigned int panoramaFrameWidth, const unsigned int panoramaFrameHeight, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const PixelPosition &panoramaFrameTopLeft, const SquareMatrix3 &orientation, uint8_t *cameraFrame, uint8_t *cameraMask, const unsigned int cameraFramePaddingElements, const unsigned int cameraMaskPaddingElements, const uint8_t maskValue=0xFFu, const unsigned int approximationBinSize=20u, Worker *worker=nullptr, const LookupTable *fineAdjustment=nullptr)
 Copies (interpolates) a section from the entire panorama frame with 8 bit per data channel to a camera frame with specified camera orientation. More...
 
template<unsigned int tChannels>
static void cameraFrame2panoramaFrame8BitPerChannel (const PinholeCamera &pinholeCamera, const uint8_t *cameraFrame, const unsigned int cameraFramePaddingElements, const SquareMatrix3 &orientation, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const PixelPositionI &panoramaFrameTopLeft, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaFrameWidth, const unsigned int panoramaFrameHeight, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const uint8_t maskValue=0xFFu, const unsigned int approximationBinSize=20u, Worker *worker=nullptr, const LookupTable *fineAdjustment=nullptr)
 Copies (interpolates) the entire area of an 8 bit per data channel camera frame with specified camera orientation to a section of an entire panorama frame. More...
 
template<unsigned int tChannels>
static void cameraFrame2panoramaFrameMask8BitPerChannel (const PinholeCamera &pinholeCamera, const uint8_t *cameraFrame, const uint8_t *cameraMask, const unsigned int cameraFramePaddingElements, const unsigned int cameraMaskPaddingElements, const SquareMatrix3 &orientation, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const PixelPositionI &panoramaFrameTopLeft, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaFrameWidth, const unsigned int panoramaFrameHeight, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const uint8_t maskValue=0xFFu, const unsigned int approximationBinSize=20u, Worker *worker=nullptr, const LookupTable *fineAdjustment=nullptr)
 Copies (interpolates) a subset of an 8 bit per data channel camera frame (specified by a mask) with specified camera orientation to a section of an entire panorama frame. More...
 

Protected Types

typedef std::vector< uint8_t > Buffer
 Definition of a vector holding 8 bit characters. More...
 
typedef std::vector< BufferBuffers
 Definition of a vector holding buffers. More...
 
typedef std::unordered_map< uint32_t, uint32_t > IndexMap
 Definition of a map mapping indices. More...
 
typedef std::multimap< uint64_t, uint64_t > FeaturePointMap
 Definition of a map mapping unique frame-feature-point-ids to unique frame-feature-point-ids. More...
 
- Protected Types inherited from Ocean::CV::Advanced::PanoramaFrame
typedef LookupCorner2< Vector2LookupTable
 Definition of a lookup table for 2D vectors. More...
 

Static Protected Member Functions

template<unsigned int tSize>
static Buffer interpolateSquarePatches (const Frame &frame, const Vectors2 &positions, Worker *worker=nullptr)
 Interpolates square image patches with sub-pixel position and stores the image content as patch buffer. More...
 
template<unsigned int tChannels, unsigned int tSize>
static void interpolateSquarePatches8BitPerChannel (const uint8_t *frame, const unsigned int width, const unsigned int height, const unsigned int framePaddingElements, const Vectors2 &positions, uint8_t *result, Worker *worker=nullptr)
 Interpolates square image patches with sub-pixel position and stores the image content as patch buffer. More...
 
template<unsigned int tChannels, unsigned int tSize>
static void interpolateSquarePatches8BitPerChannelSubset (const uint8_t *frame, const unsigned int width, const unsigned int height, const unsigned int framePaddingElements, const Vector2 *positions, uint8_t *result, const unsigned int firstPosition, const unsigned int numberPositions)
 Interpolates a subset of square image patches with sub-pixel position and stores the image content as patch buffer. More...
 
template<unsigned int tSize>
static IndexPairs32 findBijectiveCorrespondences (const PinholeCamera &camera0, const PinholeCamera &camera1, const FrameType::PixelFormat pixelFormat, const SquareMatrix3 &orientation0, const SquareMatrix3 &orientation1, const Buffer &buffer0, const Buffer &buffer1, const Vectors2 &points0, const Vectors2 &points1, const Geometry::SpatialDistribution::DistributionArray &distribution0, const Geometry::SpatialDistribution::DistributionArray &distribution1, Worker *worker)
 Finds unique bijective point correspondences between two given camera frames from a set of already detected unique feature points. More...
 
template<unsigned int tChannels, unsigned int tSize>
static IndexPairs32 findBijectiveCorrespondences8BitPerChannel (const PinholeCamera &camera0, const PinholeCamera &camera1, const SquareMatrix3 &orientation0, const SquareMatrix3 &orientation1, const uint8_t *datas0, const uint8_t *datas1, const Vectors2 &points0, const Vectors2 &points1, const Geometry::SpatialDistribution::DistributionArray &distribution0, const Geometry::SpatialDistribution::DistributionArray &distribution1, Worker *worker)
 Finds unique bijective point correspondences between two given camera frames with eight bit per channel from a set of already detected unique feature points. More...
 
template<unsigned int tChannels, unsigned int tSize>
static IndexPairs32 findBidirectionalCorrespondences8BitPerChannel (const PinholeCamera &camera0, const PinholeCamera &camera1, const SquareMatrix3 &orientation0, const SquareMatrix3 &orientation1, const uint8_t *datas0, const uint8_t *datas1, const Vectors2 &points0, const Vectors2 &points1, const Geometry::SpatialDistribution::DistributionArray &distribution0, const Geometry::SpatialDistribution::DistributionArray &distribution1, Worker *worker)
 Finds bidirectional point correspondences between two given camera frames with eight bit per channel from a set of already detected unique feature points. More...
 
template<unsigned int tChannels, unsigned int tSize>
static void findBidirectionalCorrespondences8BitPerChannelSubset (const PinholeCamera *camera0, const PinholeCamera *camera1, const SquareMatrix3 *orientation0, const SquareMatrix3 *orientation1, const uint8_t *datas0, const uint8_t *datas1, const Vectors2 *points0, const Vectors2 *points1, const Geometry::SpatialDistribution::DistributionArray *distribution0, const Geometry::SpatialDistribution::DistributionArray *distribution1, Lock *lock, IndexPairs32 *results, const unsigned int firstPoint, const unsigned int numberPoints)
 Finds subsets of bidirectional point correspondences between two given camera frames with eight bit per channel from a set of already detected unique feature points. More...
 
template<unsigned int tChannels, unsigned int tSize>
static unsigned int findCorrespondingPoint8BitPerChannel (const uint8_t *data0, const uint8_t *datas1, const Indices32 &indices)
 Finds a corresponding patch for a given patch from a second set of patches. More...
 
static std::vector< Indices64determineFeaturePointsFromPointCloud (const FeaturePointMap &correspondences, const unsigned int minSiblings=0u)
 Determines a set of corresponding image points representing the same unique feature point (only observed in individual camera frames). More...
 
static FeaturePointMap::const_iterator determineSiblings (const FeaturePointMap &correspondences, const FeaturePointMap::const_iterator &iStart, UnorderedIndexSet64 &siblings, UnorderedIndexSet64 &usedSet, IndexMap &frameSet)
 Determines all sibling image point correspondences for a given correspondence. More...
 
static uint64_t uniqueFeaturePointId (const uint32_t frameIndex, const uint32_t pointIndex)
 Creates a unique ids for a given frame index and points index located in the frame. More...
 
static uint32_t frameIndex (const uint64_t id)
 Extracts the frame index of a unique feature point id. More...
 
static uint32_t pointIndex (const uint64_t id)
 Extracts the point index of a unique feature point id. More...
 
- Static Protected Member Functions inherited from Ocean::CV::Advanced::PanoramaFrame
static void cameraFrame2cameraFrameLookupTable (const PinholeCamera &inputCamera, const SquareMatrix3 &world_R_input, const PinholeCamera &outputCamera, const SquareMatrix3 &world_R_output, LookupTable &input_LT_output)
 Creates a 2D lookup table allowing to interpolate pixel locations defined in one camera frame to pixel locations defined in another camera frame. More...
 
static void panoramaFrame2cameraFrameLookupTable (const PinholeCamera &pinholeCamera, const SquareMatrix3 &orientation, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const PixelPosition &panoramaFrameTopLeft, LookupTable &lookupTable, const LookupTable *fineAdjustment)
 Creates a 2D lookup table allowing to interpolate positions defined in the camera frame to positions defined in the panorama sub-frame. More...
 
static void cameraFrame2panoramaFrameLookupTable (const PinholeCamera &pinholeCamera, const SquareMatrix3 &orientation, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const PixelPositionI &panoramaFrameTopLeft, LookupTable &lookupTable, const LookupTable *fineAdjustment)
 Creates a 2D lookup table allowing to interpolate positions defined in the entire panorama frame to positions defined in the camera frame. More...
 
template<unsigned int tChannels>
static void mergeSetAll8BitPerChannel (const uint8_t *panoramaSubFrame, const uint8_t *panoramaSubMask, const unsigned int subFrameWidth, const unsigned int subFrameHeight, const unsigned int panoramaSubFramePaddingElements, const unsigned panoramaSubMaskPaddingElements, const PixelPosition &subTopLeft, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaWidth, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const PixelPosition &panoramaTopLeft, const uint8_t maskValue, Worker *worker=nullptr)
 Merges a given panorama sub frame with the already existing panorama frame by setting all valid pixels of the sub frame. More...
 
template<unsigned int tChannels>
static void mergeSetNew8BitPerChannel (const uint8_t *panoramaSubFrame, const uint8_t *panoramaSubMask, const unsigned int subFrameWidth, const unsigned int subFrameHeight, const unsigned int panoramaSubFramePaddingElements, const unsigned panoramaSubMaskPaddingElements, const PixelPosition &subTopLeft, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaWidth, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const PixelPosition &panoramaTopLeft, const uint8_t maskValue, Worker *worker=nullptr)
 Merges a given panorama sub frame with the already existing panorama frame by setting only pixels which haven't been set before. More...
 
template<unsigned int tChannels>
static void mergeAverageLocal8BitPerChannel (const uint8_t *panoramaSubFrame, const uint8_t *panoramaSubMask, const unsigned int subFrameWidth, const unsigned int subFrameHeight, const unsigned int panoramaSubFramePaddingElements, const unsigned panoramaSubMaskPaddingElements, const PixelPosition &subTopLeft, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaWidth, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const PixelPosition &panoramaTopLeft, const uint8_t maskValue, Worker *worker=nullptr)
 Merges a given panorama sub frame with the already existing panorama frame by averaging the current pixel value with the given pixel value. More...
 
template<unsigned int tChannels>
static void mergeAverageGlobal8BitPerChannel (const uint8_t *panoramaSubFrame, const uint8_t *panoramaSubMask, const unsigned int subFrameWidth, const unsigned int subFrameHeight, const unsigned int panoramaSubFramePaddingElements, const unsigned panoramaSubMaskPaddingElements, const PixelPosition &subTopLeft, uint32_t *panoramaNominatorFrame, uint32_t *panoramaDenominatorFrame, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaWidth, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const PixelPosition &panoramaTopLeft, const uint8_t maskValue, Worker *worker=nullptr)
 Merges a given panorama sub frame with the already existing panorama frame by averaging the all pixel values from the past and the current pixel values. More...
 
template<unsigned int tChannels>
static void mergeSetAll8BitPerChannelSubset (const uint8_t *panoramaSubFrame, const uint8_t *panoramaSubMask, const unsigned int subFrameWidth, const unsigned int panoramaSubFramePaddingElements, const unsigned int panoramaSubMaskPaddingElements, const unsigned int subTopLeftX, const unsigned int subTopLeftY, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaWidth, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const unsigned int panoramaTopLeftX, const unsigned int panoramaTopLeftY, const uint8_t maskValue, const unsigned int firstSubRow, const unsigned int numberSubRows)
 Merges a subset of a given panorama sub frame with the already existing panorama frame by setting all valid pixels of the sub frame. More...
 
template<unsigned int tChannels>
static void mergeSetNew8BitPerChannelSubset (const uint8_t *panoramaSubFrame, const uint8_t *panoramaSubMask, const unsigned int subFrameWidth, const unsigned int panoramaSubFramePaddingElements, const unsigned int panoramaSubMaskPaddingElements, const unsigned int subTopLeftX, const unsigned int subTopLeftY, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaWidth, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const unsigned int panoramaTopLeftX, const unsigned int panoramaTopLeftY, const uint8_t maskValue, const unsigned int firstSubRow, const unsigned int numberSubRows)
 Merges a subset of a given panorama sub frame with the already existing panorama frame by setting only pixels which haven't been set before. More...
 
template<unsigned int tChannels>
static void mergeAverageLocal8BitPerChannelSubset (const uint8_t *panoramaSubFrame, const uint8_t *panoramaSubMask, const unsigned int subFrameWidth, const unsigned int panoramaSubFramePaddingElements, const unsigned int panoramaSubMaskPaddingElements, const unsigned int subTopLeftX, const unsigned int subTopLeftY, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaWidth, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const unsigned int panoramaTopLeftX, const unsigned int panoramaTopLeftY, const uint8_t maskValue, const unsigned int firstSubRow, const unsigned int numberSubRows)
 Merges a subset of a given panorama sub frame with the already existing panorama frame by averaging the current pixel value with the given pixel value. More...
 
template<unsigned int tChannels>
static void mergeAverageGlobal8BitPerChannelSubset (const uint8_t *panoramaSubFrame, const uint8_t *panoramaSubMask, const unsigned int subFrameWidth, const unsigned int panoramaSubFramePaddingElements, const unsigned int panoramaSubMaskPaddingElements, const unsigned int subTopLeftX, const unsigned int subTopLeftY, uint32_t *panoramaNominatorFrame, uint32_t *panoramaDenominatorFrame, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaWidth, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const unsigned int panoramaTopLeftX, const unsigned int panoramaTopLeftY, const uint8_t maskValue, const unsigned int firstSubRow, const unsigned int numberSubRows)
 Merges a subset of a given panorama sub frame with the already existing panorama frame by averaging the all pixel values from the past and the current pixel values. More...
 
template<unsigned int tChannels>
static void cameraFrame2cameraFrame8BitPerChannelSubset (const PinholeCamera *inputCamera, const SquareMatrix3 *inputOrientation, const uint8_t *inputFrame, const unsigned int inputFramePaddingElements, const PinholeCamera *outputCamera, const SquareMatrix3 *outputOrientation, uint8_t *outputFrame, uint8_t *outputMask, const unsigned int outputFramePaddingElements, const unsigned int outputMaskPaddingElements, const uint8_t maskValue, const unsigned int firstOutputRow, const unsigned int numberOutputRows)
 Converts a subset of a given input camera frame with 8 bit per channel captured with a given orientation into a corresponding camera frame with different orientation. More...
 
template<unsigned int tChannels>
static void cameraFrame2cameraFrameLookup8BitPerChannelSubset (const LookupTable *lookupTable, const uint8_t *inputFrame, const unsigned int inputWidth, const unsigned int inputHeight, const unsigned int inputFramePaddingElements, uint8_t *outputFrame, uint8_t *outputMask, const unsigned int outputFramePaddingElements, const unsigned int outputMaskPaddingElements, const uint8_t maskValue, const unsigned int firstOutputRow, const unsigned int numberOutputRows)
 Converts a subset of a given input camera frame with 8 bit per channel captured with a given orientation into a corresponding camera frame with different orientation. More...
 
template<unsigned int tChannels>
static void cameraFrame2cameraFrameMask8BitPerChannelSubset (const PinholeCamera *inputCamera, const SquareMatrix3 *inputOrientation, const uint8_t *inputFrame, const uint8_t *inputMask, const unsigned int inputFramePaddingElements, const unsigned int inputMaskPaddingElements, const PinholeCamera *outputCamera, const SquareMatrix3 *outputOrientation, uint8_t *outputFrame, uint8_t *outputMask, const unsigned int outputFramePaddingElements, const unsigned int outputMaskPaddingElements, const uint8_t maskValue, const unsigned int firstOutputRow, const unsigned int numberOutputRows)
 Converts a subset of a given input camera frame with 8 bit per channel captured with a given orientation into a corresponding camera frame with different orientation. More...
 
template<unsigned int tChannels>
static void cameraFrame2cameraFrameMaskLookup8BitPerChannelSubset (const LookupTable *lookupTable, const uint8_t *inputFrame, const uint8_t *inputMask, const unsigned int inputWidth, const unsigned int inputHeight, const unsigned int inputFramePaddingElements, const unsigned int inputMaskPaddingElements, uint8_t *outputFrame, uint8_t *outputMask, const unsigned int outputFramePaddingElements, const unsigned int outputMaskPaddingElements, const uint8_t maskValue, const unsigned int firstOutputRow, const unsigned int numberOutputRows)
 Converts a subset of a given input camera frame with 8 bit per channel captured with a given orientation into a corresponding camera frame with different orientation. More...
 
template<unsigned int tChannels>
static void panoramaFrame2cameraFrame8BitPerChannelSubset (const PinholeCamera *pinholeCamera, const uint8_t *panoramaFrame, const uint8_t *panoramaMask, const unsigned int panoramaFrameWidth, const unsigned int panoramaFrameHeight, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const unsigned int panoramaFrameTopLeftX, const unsigned int panoramaFrameTopLeftY, const SquareMatrix3 *orientation, uint8_t *cameraFrame, uint8_t *cameraMask, const unsigned int cameraFramePaddingElements, const unsigned int cameraMaskPaddingElements, const uint8_t maskValue, const LookupTable *fineAdjustment, const unsigned int firstCameraRow, const unsigned int numberCameraRows)
 Copies (interpolates) a subset of a section from the entire panorama frame with 8 bit per data channel to a camera frame with specified camera orientation. More...
 
template<unsigned int tChannels>
static void panoramaFrame2cameraFrameLookup8BitPerChannelSubset (const LookupTable *lookupTable, const uint8_t *panoramaFrame, const uint8_t *panoramaMask, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const unsigned int panoramaFrameTopLeftX, const unsigned int panoramaFrameTopLeftY, const unsigned int panoramaFrameWidth, const unsigned int panoramaFrameHeight, uint8_t *cameraFrame, uint8_t *cameraMask, const unsigned int cameraFramePaddingElements, const unsigned int cameraMaskPaddingElements, const uint8_t maskValue, const unsigned int firstCameraRow, const unsigned int numberCameraRows)
 Copies (interpolates) a subset of a section from the entire panorama frame with 8 bit per data channel to a camera frame with specified camera orientation. More...
 
template<unsigned int tChannels>
static void cameraFrame2panoramaFrame8BitPerChannelSubset (const PinholeCamera *pinholeCamera, const uint8_t *cameraFrame, const unsigned int cameraFramePaddingElements, const SquareMatrix3 *orientation, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const int panoramaFrameTopLeftX, const int panoramaFrameTopLeftY, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaFrameWidth, const unsigned int panoramaFrameHeight, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const uint8_t maskValue, const LookupTable *fineAdjustment, const unsigned int firstPanoramaRow, const unsigned int numberPanoramaRows)
 Copies (interpolates) the entire area of an 8 bit per data channel camera frame with specified camera orientation to a subset of a section of an entire panorama frame. More...
 
template<unsigned int tChannels>
static void cameraFrame2panoramaFrameLookup8BitPerChannelSubset (const LookupTable *lookupTable, const uint8_t *cameraFrame, const unsigned int cameraFrameWidth, const unsigned int cameraFrameHeight, const unsigned int cameraFramePaddingElements, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const uint8_t maskValue, const unsigned int firstPanoramaRow, const unsigned int numberPanoramaRows)
 Copies (interpolates) the entire area of an 8 bit per data channel camera frame with specified camera orientation to a subset of a section of an entire panorama frame. More...
 
template<unsigned int tChannels>
static void cameraFrame2panoramaFrameMask8BitPerChannelSubset (const PinholeCamera *pinholeCamera, const uint8_t *cameraFrame, const uint8_t *cameraMask, const unsigned int cameraFramePaddingElements, const unsigned int cameraMaskPaddingElements, const SquareMatrix3 *orientation, const unsigned int panoramaDimensionWidth, const unsigned int panoramaDimensionHeight, const int panoramaFrameTopLeftX, const int panoramaFrameTopLeftY, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaFrameWidth, const unsigned int panoramaFrameHeight, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const uint8_t maskValue, const LookupTable *fineAdjustment, const unsigned int firstPanoramaRow, const unsigned int numberPanoramaRows)
 Copies (interpolates) a subset of an 8 bit per data channel camera frame (specified by a mask) with specified camera orientation to subset of a section of an entire panorama frame. More...
 
template<unsigned int tChannels>
static void cameraFrame2panoramaFrameMaskLookup8BitPerChannelSubset (const LookupTable *lookupTable, const uint8_t *cameraFrame, const uint8_t *cameraMask, const unsigned int cameraFrameWidth, const unsigned int cameraFrameHeight, const unsigned int cameraFramePaddingElements, const unsigned int cameraMaskPaddingElements, uint8_t *panoramaFrame, uint8_t *panoramaMask, const unsigned int panoramaFramePaddingElements, const unsigned int panoramaMaskPaddingElements, const uint8_t maskValue, const unsigned int firstPanoramaRow, const unsigned int numberPanoramaRows)
 Copies (interpolates) a subset of an 8 bit per data channel camera frame (specified by a mask) with specified camera orientation to subset of a section of an entire panorama frame. More...
 
static Vectors2 generateFrameContour (const unsigned int width, const unsigned int height, const unsigned int count)
 Creates are contour of (the outside of) a camera frame. More...
 

Protected Attributes

SquareMatrix3 initialOrientation_ = SquareMatrix3(true)
 The initial orientation of the first camera frame. More...
 
SquareMatrix3 previousOrientation_ = SquareMatrix3(false)
 The orientation of the camera of the most recent frame. More...
 
PinholeCamera previousCamera_
 The camera profile of the most recent frame. More...
 
CV::FramePyramid previousFramePyramid_
 The frame pyramid of the most recent frame. More...
 
- Protected Attributes inherited from Ocean::CV::Advanced::PanoramaFrame
Frame frame_
 The actual panorama frame, may be a sub-frame of the entire panorama frame. More...
 
Frame mask_
 The mask of the panorama frame defining valid and invalid pixels. More...
 
Frame nominatorFrame_
 The optional nominator frame of the panorama frame, necessary if UM_AVERAGE_GLOBAL is set as update mode. More...
 
Frame denominatorFrame_
 The optional denominator frame of the panorama frame, necessary if UM_AVERAGE_GLOBAL is set as update mode. More...
 
unsigned int dimensionWidth_ = 0u
 The maximal width of the panorama frame representing horizontal 360 degrees, in pixel. More...
 
unsigned int dimensionHeight_ = 0u
 The maximal height of the panorama frame representing vertical 180 degrees, in pixel. More...
 
Scalar invertedDimensionWidth_ = Scalar(0)
 The inverse of the maximal width of the panorama frame, panoramaInvDimensionWidth = (1 / panoramaDimensionWidth). More...
 
Scalar invertedDimensionHeight_ = Scalar(0)
 The inverse of the maximal height of the panorama frame, panoramaInvDimensionHeight = (1 / panoramaDimensionHeight). More...
 
PixelPosition frameTopLeft_ = CV::PixelPosition((unsigned int)(-1), (unsigned int)(-1))
 The top left position of the sub-frame of the entire panorama frame. More...
 
uint8_t maskValue_ = 0xFFu
 The mask value defining the mask value of valid pixels. More...
 
UpdateMode updateMode_ = UM_INVALID
 The update mode of this panorama frame. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Ocean::CV::Advanced::PanoramaFrame
Box2 panoramaSubFrameBoundingBox (const PinholeCamera &pinholeCamera, const SquareMatrix3 &orientation) const
 Determines the bounding box for a camera frame with given orientation in the panorama frame. More...
 
bool update (const PinholeCamera &pinholeCamera, const Frame &frame, const Frame &mask, const SquareMatrix3 &orientation, const unsigned int approximationBinSize=20u, Worker *worker=nullptr, const LookupTable *fineAdjustment=nullptr)
 Updates the panorama frame data with a new camera frame. More...
 
bool reset (const PinholeCamera &pinholeCamera, const Frame &frame, const SquareMatrix3 &orientation, const unsigned int approximationBinSize=20u, Worker *worker=nullptr)
 Resets the panorama frame of this object by one new single camera frame. More...
 
bool reset (const PixelPosition &topLeft, const Frame &frame, const Frame &mask, Worker *worker=nullptr)
 Resets the panorama frame of this object by one new panorama sub-frame. More...
 
void resize (const PixelPosition &topLeft, const unsigned int width, const unsigned int height)
 Resizes the internal panorama sub-frame. More...
 
bool merge (const Frame &panoramaSubFrame, const Frame &panoramaSubMask, const PixelPosition &subTopLeft, Worker *worker=nullptr)
 Merges a given panorama sub-frame with given top left start position with the panorama frame of this object by application of the update mode of this object. More...
 

Detailed Description

This class implements a spherical environment based on a panorama frame.

The environment can be extended by new camera frame with unknown orientation as long as the orientation offset between successive frames is not too large.
Further, the environment can be used to determine the orientation of a given camera frame capturing an already known area.

Member Typedef Documentation

◆ Buffer

typedef std::vector<uint8_t> Ocean::Tracking::SphericalEnvironment::Buffer
protected

Definition of a vector holding 8 bit characters.

◆ Buffers

Definition of a vector holding buffers.

◆ FeaturePointMap

typedef std::multimap<uint64_t, uint64_t> Ocean::Tracking::SphericalEnvironment::FeaturePointMap
protected

Definition of a map mapping unique frame-feature-point-ids to unique frame-feature-point-ids.

◆ FrameCallback

Definition of a callback function allowing to determine an update mask for a current camera frame.

Parameter 0: The frame pyramid of the previous frame Parameter 1: The frame pyramid of the current frame Parameter 2: The camera profile of the previous frame Parameter 3: The camera profile of the current frame Parameter 4: The camera orientation of the previous frame Parameter 5: The camera orientation of the current frame Parameter 6: The mask value for static image content Parameter 7: The resulting update mask frame Parameter 8: An optional worker object Return value: True, if the camera frame can be used to update the panorama frame

◆ IndexMap

typedef std::unordered_map<uint32_t, uint32_t> Ocean::Tracking::SphericalEnvironment::IndexMap
protected

Definition of a map mapping indices.

◆ PoseImagePointPairGroups

Definition of a vector holding groups of pairs between camera pose ids and image point ids.

Constructor & Destructor Documentation

◆ SphericalEnvironment() [1/2]

Ocean::Tracking::SphericalEnvironment::SphericalEnvironment ( )
default

Creates an invalid spherical environment object.

◆ SphericalEnvironment() [2/2]

Ocean::Tracking::SphericalEnvironment::SphericalEnvironment ( const unsigned int  panoramaDimensionWidth,
const unsigned int  panoramaDimensionHeight,
const uint8_t  maskValue,
const UpdateMode  frameMode 
)
inline

Creates a new spherical environment object.

Parameters
panoramaDimensionWidthThe width of the entire panorama frame (the maximal possible size) representing horizontal 360 degrees, in pixel with range [1, infinity)
panoramaDimensionHeightThe height of the entire panorama frame (the maximal possible size) representing vertical 180 degrees, in pixel with range [1, infinity)
maskValueThe mask value defining the 8 bit pixel value of valid pixels
frameModeThe update mode of this panorama frame

Member Function Documentation

◆ clear()

virtual void Ocean::Tracking::SphericalEnvironment::clear ( )
virtual

Clears the panorama frame and allows to set a new first camera frame.

See also
PanoramaFrame::clear().

Reimplemented from Ocean::CV::Advanced::PanoramaFrame.

◆ determineFeaturePointsFromPointCloud()

static std::vector<Indices64> Ocean::Tracking::SphericalEnvironment::determineFeaturePointsFromPointCloud ( const FeaturePointMap correspondences,
const unsigned int  minSiblings = 0u 
)
staticprotected

Determines a set of corresponding image points representing the same unique feature point (only observed in individual camera frames).

Parameters
correspondencesAll possible correspondences from which the set will be extracted
minSiblingsThe minimal number of image points which are necessary to define one unique feature point (the minimal number of frames in which the feature point has been observed), 0u if any number is welcome
Returns
The set of unique feature points

◆ determinePointCorrespondencesHomography() [1/2]

static bool Ocean::Tracking::SphericalEnvironment::determinePointCorrespondencesHomography ( const CV::FramePyramid sourceFramePyramid,
const Frame targetFrame,
const SquareMatrix3 homography,
const Vectors2 sourcePointCandidates,
Vectors2 validSourcePoints,
Vectors2 validTargetPoints,
Indices32 validSourcePointIndices,
const unsigned int  patchSize,
const unsigned int  maximalDistance = 32u,
const unsigned int  coarsestLayerRadius = 8u,
const CV::FramePyramid::DownsamplingMode  downsamplingMode = CV::FramePyramid::DM_FILTER_14641,
Worker worker = nullptr,
size_t *  usedPointCandidates = nullptr 
)
static

Determines point correspondences between two camera frames captured with individual locations (describable by a homography) by application of a pyramid-based patch tracking approach.

The given homography can be a full 8-DOF homography including e.g., scale and projection.

Parameters
sourceFramePyramidThe frame pyramid of the source frame for which the correspondences will be determined, should hold enough layers, must be valid
targetFrameThe second frame for which the correspondences will be determine, with same pixel format as the first frame, must be valid
homographyThe known homography between both frames, transforming points defined in the first frame to points defined in the second frame (pointTargetFrame = H * pointSourceFrame), must be valid
sourcePointCandidatesThe candidate of source points out of which the resulting correspondences will be created, defined in the source frame
validSourcePointsThe resulting points of the correspondences, defined in the source frame and a subset of sourcePointCandidates
validTargetPointsThe resulting points of the correspondences, defined in the target frame, one for each source point
validSourcePointIndicesThe resulting indices of the candidates of the source points which actually has been used as correspondences, one for each correspondence
patchSizeThe size of the patches to be used for tracking, possible values are 7, 15 or 31
maximalDistanceMaximal expected distance (radius) between two tracked correspondences in pixel, with range [1, infinity)
coarsestLayerRadiusThe search radius on the coarsest layer, with range [2, infinity)
downsamplingModeThe downsampling mode that is applied to create the pyramid layers
workerOptional worker object to distribute the computation
usedPointCandidatesOptional resulting number of point candidates that have been used (e.g., that are located inside the intersection of both frames), with range [0, sourcePointCandidates.size()]
Returns
True, if succeeded

◆ determinePointCorrespondencesHomography() [2/2]

static bool Ocean::Tracking::SphericalEnvironment::determinePointCorrespondencesHomography ( const Frame sourceFrame,
const Frame targetFrame,
const SquareMatrix3 homography,
Vectors2 sourcePoints,
Vectors2 targetPoints,
const unsigned int  patchSize,
const unsigned int  maximalDistance = 32u,
const unsigned int  coarsestLayerRadius = 8u,
const CV::FramePyramid::DownsamplingMode  downsamplingMode = CV::FramePyramid::DM_FILTER_14641,
Worker worker = nullptr 
)
static

Determines point correspondences between two camera frames captured with individual locations (describable by a homography) by application of a pyramid-based patch tracking approach.

The given homography can be a full 8-DOF homography including e.g., scale and projection.

Parameters
sourceFrameThe source frame for which the correspondences will be determined, must be valid
targetFrameThe second frame for which the correspondences will be determine, with same pixel format as the first frame, must be valid
homographyThe known homography between both frames, transforming points defined in the first frame to points defined in the second frame (pointTargetFrame = H * pointSourceFrame), must be valid
sourcePointsThe resulting points of the correspondences, defined in the source frame
targetPointsThe resulting points of the correspondences, defined in the target frame, one for each source point
patchSizeThe size of the patches to be used for tracking, possible values are 7, 15 or 31
maximalDistanceMaximal expected distance (radius) between two tracked correspondences in pixel, with range [1, infinity)
coarsestLayerRadiusThe search radius on the coarsest layer, with range [2, infinity)
downsamplingModeThe downsampling mode that is applied to create the pyramid layers
workerOptional worker object to distribute the computation
Returns
True, if succeeded

◆ determineSiblings()

static FeaturePointMap::const_iterator Ocean::Tracking::SphericalEnvironment::determineSiblings ( const FeaturePointMap correspondences,
const FeaturePointMap::const_iterator &  iStart,
UnorderedIndexSet64 siblings,
UnorderedIndexSet64 usedSet,
IndexMap frameSet 
)
staticprotected

Determines all sibling image point correspondences for a given correspondence.

Parameters
correspondencesThe set of all correspondences
iStartThe current correspondence for which all sibling correspondences are determined
siblingsThe resulting unique ids of all sibling correspondences which have been found
usedSetA set of unique correspondences which have been used/marked already
frameSetA map of frame indices counting the number of image points for each frame to valid that a frame holds more than one image point
Returns
The iterator of the next correspondence to be investigated

◆ determineTransformationTable2x2()

static bool Ocean::Tracking::SphericalEnvironment::determineTransformationTable2x2 ( const unsigned int  width,
const unsigned int  height,
const Vectors2 points0,
const Vectors2 points1,
LookupCorner2< Vector2 > &  transformation0to1,
const unsigned int  iterations = 20u,
const Geometry::Estimator::EstimatorType  estimator = Geometry::Estimator::ET_SQUARE,
Scalar  lambda = Scalar(0.001),
const Scalar  lambdaFactor = Scalar(5),
Scalar initialError = nullptr,
Scalar finalError = nullptr 
)
static

Determines a 2x2 transformation table (a lookup table) transforming a set of points (defined in the domain of the transformation table) to another set of points.

The resulting transformation provides relative transformation offset from one point set to the other point set: points1 = transformation(points0).

Parameters
widthThe width of the resulting lookup table, with range [1, infinity)
heightThe height of the resulting lookup table, with range [1, infinity)
points0The set of points lying inside the resulting lookup table, the transformation will provide corrected positions for these points, with ranges [0, width)x[0, height)
points1The set of points corresponding to the first set of points but having the correct positions, with ranges (-infinity, infinity)x(-infinity, infinity)
transformation0to1The resulting transformation which will transform points0 to points1
iterationsNumber of iterations to be applied at most, if no convergence can be reached
estimatorRobust error estimator to be used
lambdaInitial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity)
lambdaFactorLevenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity)
initialErrorOptional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator
finalErrorOptional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator
Returns
True, if succeeded

◆ extendEnvironment()

bool Ocean::Tracking::SphericalEnvironment::extendEnvironment ( const PinholeCamera pinholeCamera,
const Frame frame,
const unsigned int  approximationBinSize = 20u,
const Geometry::Estimator::EstimatorType  fineAdjustmentEstimator = Geometry::Estimator::ET_INVALID,
const bool  optimizeCamera = false,
Worker worker = nullptr,
SquareMatrix3 orientation = nullptr,
PinholeCamera optimizedCamera = nullptr,
const FrameCallback frameCallback = FrameCallback() 
)

Adds a new camera frame to the panorama frame for which the orientation is unknown.

The frame may be either the first frame of a sequence of frame or a subsequent frame in the sequence as long as the frame content of successive frames does not change too much.
The first frame is assigned with the default camera orientation, the orientation of successive frames is determined automatically.

Parameters
pinholeCameraThe camera profile of the current frame
frameThe camera frame which will be added
approximationBinSizeOptional width of a bin in a lookup table to speedup the in interpolation in pixel, 0u to avoid the application of a lookup table
fineAdjustmentEstimatorA robust estimator type, if the given camera frame will be distorted up to a small scale so that it fits with the already existing image content in the environment
optimizeCameraTrue, to optimize the given camera profile, False to use the given camera profile
workerOptional worker object to distribute the computation
orientationOptional the resulting orientation of the given camera frame, with respect to the default orientation of the first camera frame
optimizedCameraOptional resulting optimized camera profile
frameCallbackOptional callback function that is invoked before the panorama frame will be updated and which allows to define a frame mask separating the frame in static and dynamic image areas, only static image content is used to extend the environment
Returns
True, if succeeded

◆ findBidirectionalCorrespondences8BitPerChannel()

template<unsigned int tChannels, unsigned int tSize>
static IndexPairs32 Ocean::Tracking::SphericalEnvironment::findBidirectionalCorrespondences8BitPerChannel ( const PinholeCamera camera0,
const PinholeCamera camera1,
const SquareMatrix3 orientation0,
const SquareMatrix3 orientation1,
const uint8_t *  datas0,
const uint8_t *  datas1,
const Vectors2 points0,
const Vectors2 points1,
const Geometry::SpatialDistribution::DistributionArray distribution0,
const Geometry::SpatialDistribution::DistributionArray distribution1,
Worker worker 
)
staticprotected

Finds bidirectional point correspondences between two given camera frames with eight bit per channel from a set of already detected unique feature points.

Parameters
camera0The camera profile of the first frame, must be valid
camera1The camera profile of the second frame, must be valid
orientation0The orientation of the first frame, must be valid
orientation1The orientation of the second frame, must be valid
datas0The buffer storing interpolated image patches from the first frame, matching with the given image points
datas1The buffer storing interpolated image patches form the second frame, matching with the given image points
points0The center positions of the image patches in the first frame
points1The center positions of the image patches in the second frame
distribution0The point distribution of the image points from the first frame
distribution1The point distribution of the image points from the second frame
workerOptional worker object to distribute the computation
Returns
A set if unique bijective point correspondences between the first and second frame
Template Parameters
tChannelsThe number of image channels, with range [1, infinity)
tSizeThe size of the image patches (tSize x tSize), with range [1, infinity) must be odd
See also
findBidirectionalCorrespondences8BitPerChannelSubset().

◆ findBidirectionalCorrespondences8BitPerChannelSubset()

template<unsigned int tChannels, unsigned int tSize>
static void Ocean::Tracking::SphericalEnvironment::findBidirectionalCorrespondences8BitPerChannelSubset ( const PinholeCamera camera0,
const PinholeCamera camera1,
const SquareMatrix3 orientation0,
const SquareMatrix3 orientation1,
const uint8_t *  datas0,
const uint8_t *  datas1,
const Vectors2 points0,
const Vectors2 points1,
const Geometry::SpatialDistribution::DistributionArray distribution0,
const Geometry::SpatialDistribution::DistributionArray distribution1,
Lock lock,
IndexPairs32 results,
const unsigned int  firstPoint,
const unsigned int  numberPoints 
)
staticprotected

Finds subsets of bidirectional point correspondences between two given camera frames with eight bit per channel from a set of already detected unique feature points.

Parameters
camera0The camera profile of the first frame, must be valid
camera1The camera profile of the second frame, must be valid
orientation0The orientation of the first frame, must be valid
orientation1The orientation of the second frame, must be valid
datas0The buffer storing interpolated image patches from the first frame, matching with the given image points
datas1The buffer storing interpolated image patches form the second frame, matching with the given image points
points0The center positions of the image patches in the first frame
points1The center positions of the image patches in the second frame
distribution0The point distribution of the image points from the first frame
distribution1The point distribution of the image points from the second frame
lockOptional lock for multi-thread execution
resultsThe resulting unique bijective point correspondences between the first and second frame
firstPointThe first point to be handled
numberPointsThe number of points to be handled
Template Parameters
tChannelsThe number of image channels, with range [1, infinity)
tSizeThe size of the image patches (tSize x tSize), with range [1, infinity) must be odd
See also
findBidirectionalCorrespondences8BitPerChannel().

◆ findBijectiveCorrespondences()

template<unsigned int tSize>
static IndexPairs32 Ocean::Tracking::SphericalEnvironment::findBijectiveCorrespondences ( const PinholeCamera camera0,
const PinholeCamera camera1,
const FrameType::PixelFormat  pixelFormat,
const SquareMatrix3 orientation0,
const SquareMatrix3 orientation1,
const Buffer buffer0,
const Buffer buffer1,
const Vectors2 points0,
const Vectors2 points1,
const Geometry::SpatialDistribution::DistributionArray distribution0,
const Geometry::SpatialDistribution::DistributionArray distribution1,
Worker worker 
)
staticprotected

Finds unique bijective point correspondences between two given camera frames from a set of already detected unique feature points.

Parameters
camera0The camera profile of the first frame, must be valid
camera1The camera profile of the second frame, must be valid
pixelFormatThe pixel of the given buffers storing interpolated image patches
orientation0The orientation of the first frame, must be valid
orientation1The orientation of the second frame, must be valid
buffer0The buffer storing interpolated image patches from the first frame, matching with the given image points
buffer1The buffer storing interpolated image patches form the second frame, matching with the given image points
points0The center positions of the image patches in the first frame
points1The center positions of the image patches in the second frame
distribution0The point distribution of the image points from the first frame
distribution1The point distribution of the image points from the second frame
workerOptional worker object to distribute the computation
Returns
A set if unique bijective point correspondences between the first and second frame
Template Parameters
tSizeThe size of the image patches (tSize x tSize), with range [1, infinity) must be odd
See also
findBijectiveCorrespondences8BitPerChannel().

◆ findBijectiveCorrespondences8BitPerChannel()

template<unsigned int tChannels, unsigned int tSize>
static IndexPairs32 Ocean::Tracking::SphericalEnvironment::findBijectiveCorrespondences8BitPerChannel ( const PinholeCamera camera0,
const PinholeCamera camera1,
const SquareMatrix3 orientation0,
const SquareMatrix3 orientation1,
const uint8_t *  datas0,
const uint8_t *  datas1,
const Vectors2 points0,
const Vectors2 points1,
const Geometry::SpatialDistribution::DistributionArray distribution0,
const Geometry::SpatialDistribution::DistributionArray distribution1,
Worker worker 
)
staticprotected

Finds unique bijective point correspondences between two given camera frames with eight bit per channel from a set of already detected unique feature points.

Parameters
camera0The camera profile of the first frame, must be valid
camera1The camera profile of the second frame, must be valid
orientation0The orientation of the first frame, must be valid
orientation1The orientation of the second frame, must be valid
datas0The buffer storing interpolated image patches from the first frame, matching with the given image points
datas1The buffer storing interpolated image patches form the second frame, matching with the given image points
points0The center positions of the image patches in the first frame
points1The center positions of the image patches in the second frame
distribution0The point distribution of the image points from the first frame
distribution1The point distribution of the image points from the second frame
workerOptional worker object to distribute the computation
Returns
A set if unique bijective point correspondences between the first and second frame
Template Parameters
tChannelsThe number of image channels, with range [1, infinity)
tSizeThe size of the image patches (tSize x tSize), with range [1, infinity) must be odd
See also
findBijectiveCorrespondences().

◆ findCorrespondingPoint8BitPerChannel()

template<unsigned int tChannels, unsigned int tSize>
static unsigned int Ocean::Tracking::SphericalEnvironment::findCorrespondingPoint8BitPerChannel ( const uint8_t *  data0,
const uint8_t *  datas1,
const Indices32 indices 
)
staticprotected

Finds a corresponding patch for a given patch from a second set of patches.

Parameters
data0The image patch for which a second best matching patch has to be found
datas1The set of image patches from which the best matching patch has to be found
indicesThe indices of possible patch candidates from the set of image patches
Returns
The index of the image patch best matching to the given patch
Template Parameters
tChannelsThe number of image channels, with range [1, infinity)
tSizeThe size of the image patches (tSize x tSize), with range [1, infinity) must be odd

◆ findInitialFieldOfView()

static bool Ocean::Tracking::SphericalEnvironment::findInitialFieldOfView ( const unsigned int  width,
const unsigned int  height,
const SquareMatrices3 orientations,
const ImagePoints imagePoints,
const PoseImagePointPairGroups orientationImagePointPairGroups,
PinholeCamera optimizedCamera,
SquareMatrices3 optimizedOrientations,
const Scalar  lowerFovX = Numeric::deg2rad(40),
const Scalar  upperFovX = Numeric::deg2rad(90),
const unsigned int  steps = 10u 
)
static

Determines the initial field of view for a set of camera frames with known orientation and a corresponding set of unique features observed in several individual frames.

Parameters
widthThe width of the camera profile in pixel, with range [1, infinity)
heightThe height of the camera profile in pixel, with range [1, infinity)
orientationsThe known orientations of the individual camera frames
imagePointsThe entire set of image points observed in individual camera frames
orientationImagePointPairGroupsGroups of pairs combining indices from the set of image points with indices of unique feature points, one set of pairs for each camera frame
optimizedCameraThe resulting camera profile with ideal field of view
optimizedOrientationsThe camera orientations matching with the new camera profile
lowerFovXThe lower bound of the possible horizontal field of view
upperFovXThe upper bound of the possible horizontal field of view
stepsThe number of steps in which the defined angle range is subdivided
Returns
True, if succeeded

◆ frameIndex()

uint32_t Ocean::Tracking::SphericalEnvironment::frameIndex ( const uint64_t  id)
inlinestaticprotected

Extracts the frame index of a unique feature point id.

Parameters
idThe unique feature point id
Returns
The frame index of the id

◆ interpolateSquarePatches()

template<unsigned int tSize>
static Buffer Ocean::Tracking::SphericalEnvironment::interpolateSquarePatches ( const Frame frame,
const Vectors2 positions,
Worker worker = nullptr 
)
staticprotected

Interpolates square image patches with sub-pixel position and stores the image content as patch buffer.

Parameters
frameThe frame in which the patches are located, must be valid
positionsThe center positions of the individual patches, with ranges [tSize / 2, frame.width() - tSize / 2 - 1)x[tSize / 2, frame.height() - tSize / 2 - 1)
workerOptional worker object to distribute the computation
Returns
The buffer storing all interpolated patches consecutively
Template Parameters
tSizeThe size of the image patches (tSize x tSize)

◆ interpolateSquarePatches8BitPerChannel()

template<unsigned int tChannels, unsigned int tSize>
static void Ocean::Tracking::SphericalEnvironment::interpolateSquarePatches8BitPerChannel ( const uint8_t *  frame,
const unsigned int  width,
const unsigned int  height,
const unsigned int  framePaddingElements,
const Vectors2 positions,
uint8_t *  result,
Worker worker = nullptr 
)
staticprotected

Interpolates square image patches with sub-pixel position and stores the image content as patch buffer.

Parameters
frameThe frame in which the patches are located with 8 bit per channel
widthThe width of the given frame in pixel, with range [1, infinity)
heightThe height of the given frame in pixel, with range [1, infinity)
framePaddingElementsThe number of padding elements at the end of each frame row, in elements, with range [0, infinity)
positionsThe center positions of the individual patches, with ranges [tSize / 2, width - tSize / 2 - 1)x[tSize / 2, height - tSize / 2 - 1)
resultThe buffer receiving the resulting interpolated patches
workerOptional worker object to distribute the computation
Template Parameters
tChannelsThe number of image channels, with range [1, infinity)
tSizeThe size of the image patches (tSize x tSize), with range [1, infinity) must be odd

◆ interpolateSquarePatches8BitPerChannelSubset()

template<unsigned int tChannels, unsigned int tSize>
static void Ocean::Tracking::SphericalEnvironment::interpolateSquarePatches8BitPerChannelSubset ( const uint8_t *  frame,
const unsigned int  width,
const unsigned int  height,
const unsigned int  framePaddingElements,
const Vector2 positions,
uint8_t *  result,
const unsigned int  firstPosition,
const unsigned int  numberPositions 
)
staticprotected

Interpolates a subset of square image patches with sub-pixel position and stores the image content as patch buffer.

Parameters
frameThe frame in which the patches are located with 8 bit per channel
widthThe width of the given frame in pixel, with range [1, infinity)
heightThe height of the given frame in pixel, with range [1, infinity)
framePaddingElementsThe number of padding elements at the end of each frame row, in elements, with range [0, infinity)
positionsThe center positions of the individual patches, with ranges [tSize / 2, width - tSize / 2 - 1)x[tSize / 2, height - tSize / 2 - 1)
resultThe buffer receiving the resulting interpolated patches
firstPositionThe first position to be handled
numberPositionsThe number of positions to be handled
Template Parameters
tChannelsThe number of image channels, with range [1, infinity)
tSizeThe size of the image patches (tSize x tSize), with range [1, infinity) must be odd

◆ nonHomographyMask()

static bool Ocean::Tracking::SphericalEnvironment::nonHomographyMask ( const CV::FramePyramid previousFramePyramid,
const CV::FramePyramid currentFramePyramid,
const PinholeCamera previousCamera,
const PinholeCamera currentCamera,
const SquareMatrix3 previousOrientation,
const SquareMatrix3 currentOrientation,
const uint8_t  maskValue,
Frame currentMask,
Worker worker = nullptr 
)
static

This function determines a mask for image areas not matching with the common homography between two successive camera frames.

An image point does not match with the common homography if the point has a distance larger than 3 pixels to the expected homography point.

Parameters
previousFramePyramidThe frame pyramid of the previous camera frame
currentFramePyramidThe frame pyramid of the current camera frame
previousCameraThe camera profile of the previous camera frame
currentCameraThe camera profile of the current camera frame
previousOrientationThe orientation of the previous camera frame, in relation to the coordinate system of the panorama frame
currentOrientationThe orientation of the current camera frame, in relation to the coordinate system of the panorama frame
maskValueThe mask value for static image content
currentMaskThe resulting mask for the current camera frame separating static and dynamic image content
workerOptional worker object to distribute the computation
Returns
True, if a valid mask could be determined

◆ optimizeCamera() [1/2]

static bool Ocean::Tracking::SphericalEnvironment::optimizeCamera ( const PinholeCamera pinholeCamera,
const Frames frames,
const SquareMatrices3 orientations,
PinholeCamera optimizedCamera,
Worker worker = nullptr 
)
static

Optimizes the camera profile for a given set of camera frames with known orientations so that the offset between corresponding points in the individual camera frames becomes as small as possible.

Parameters
pinholeCameraThe camera profile which will be optimized
framesThe individual camera frame
orientationsThe orientations of the individual camera frames, one orientation for each frame
optimizedCameraThe resulting optimized camera profile
workerOptional worker object to distribute the computation
Returns
True, if a valid mask could be determined

◆ optimizeCamera() [2/2]

static bool Ocean::Tracking::SphericalEnvironment::optimizeCamera ( const PinholeCamera pinholeCamera,
const SquareMatrices3 orientations,
const ImagePoints imagePoints,
const PoseImagePointPairGroups orientationImagePointPairGroups,
PinholeCamera optimizedCamera,
SquareMatrices3 optimizedOrientations,
const unsigned int  iterations = 20u,
const Geometry::Estimator::EstimatorType  estimator = Geometry::Estimator::ET_SQUARE,
Scalar  lambda = Scalar(0.001),
const Scalar  lambdaFactor = Scalar(5),
Scalar initialError = nullptr,
Scalar finalError = nullptr,
Scalars intermediateErrors = nullptr 
)
static

Optimizes the camera profile for a given set of image points from individual camera frames so that the offset between the corresponding points becomes as small as possible.

Parameters
pinholeCameraThe camera profile which will be optimized
orientationsThe orientations of the individual camera frames, one orientation for each frame
imagePointsThe entire set of image points holding all image points from all image frames
orientationImagePointPairGroupsGroups of pairs combining indices from the set of image points with indices of unique feature points, one set of pairs for each camera frame
optimizedCameraThe resulting camera profile with ideal field of view
optimizedOrientationsThe camera orientations matching with the new camera profile
iterationsNumber of iterations to be applied at most, if no convergence can be reached
estimatorRobust error estimator to be used
lambdaInitial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity)
lambdaFactorLevenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity)
initialErrorOptional resulting averaged robust (depending on estimator) pixel error for the given initial parameters
finalErrorOptional resulting averaged robust (depending on estimator) pixel error for the final optimized parameters
intermediateErrorsOptional resulting intermediate (improving) errors
Returns
True, if the camera profile could be optimized

◆ optimizeOrientation()

bool Ocean::Tracking::SphericalEnvironment::optimizeOrientation ( const PinholeCamera pinholeCamera,
const SquareMatrix3 orientation,
const Frame frame,
const Frame mask,
const Geometry::Estimator::EstimatorType  estimator,
SquareMatrix3 optimizedOrientation,
PinholeCamera optimizedCamera = nullptr,
LookupTable fineAdjustment = nullptr,
const unsigned int  approximationBinSize = 20u,
Worker worker = nullptr 
)

Determines the precise orientation of a given camera frame.

Parameters
pinholeCameraThe camera profile of the current frame, must be valid
orientationThe rough orientation of the given frame, in relation to the spherical environment, must be valid
frameThe camera frame which will be added, must be valid
maskAn optional mask defining valid and invalid pixels in the given frame, may be invalid if all pixels are valid
estimatorThe estimator type which is applied to determine the precise orientation
optimizedOrientationThe resulting precise orientation best matching to the given camera frame
optimizedCameraOptional resulting optimized camera profile, nullptr if the given camera profile is not optimized internally
fineAdjustmentOptional resulting transformation lookup table with relative offsets providing a fine adjustment for the camera frame
approximationBinSizeOptional width of a bin in a lookup table to speedup the in interpolation in pixel, 0u to avoid the application of a lookup table
workerOptional worker object to distribute the computation
Returns
True, if succeeded

◆ pointIndex()

uint32_t Ocean::Tracking::SphericalEnvironment::pointIndex ( const uint64_t  id)
inlinestaticprotected

Extracts the point index of a unique feature point id.

Parameters
idThe unique feature point id
Returns
The point index of the id

◆ uniqueFeaturePointId()

uint64_t Ocean::Tracking::SphericalEnvironment::uniqueFeaturePointId ( const uint32_t  frameIndex,
const uint32_t  pointIndex 
)
inlinestaticprotected

Creates a unique ids for a given frame index and points index located in the frame.

Parameters
frameIndexThe index of the frame
pointIndexThe index of the point ion the frame
Returns
Resulting unique feature point id

Field Documentation

◆ initialOrientation_

SquareMatrix3 Ocean::Tracking::SphericalEnvironment::initialOrientation_ = SquareMatrix3(true)
protected

The initial orientation of the first camera frame.

◆ previousCamera_

PinholeCamera Ocean::Tracking::SphericalEnvironment::previousCamera_
protected

The camera profile of the most recent frame.

◆ previousFramePyramid_

CV::FramePyramid Ocean::Tracking::SphericalEnvironment::previousFramePyramid_
protected

The frame pyramid of the most recent frame.

◆ previousOrientation_

SquareMatrix3 Ocean::Tracking::SphericalEnvironment::previousOrientation_ = SquareMatrix3(false)
protected

The orientation of the camera of the most recent frame.


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