Package boofcv.alg.structure
Class InitializeCommonProjective
java.lang.Object
boofcv.alg.structure.InitializeCommonProjective
- All Implemented Interfaces:
VerbosePrint
Given a set of views and a set of features which are visible in all views, estimate their structure up to a
projective transform. Summary of processing steps:
- Select initial set of 3 views
- Association between all 3 views
- RANSAC to find Trifocal Tensor
- 3 Projective from trifocal
- Triangulate features
- Find remaining projective camera matrices
- Refine with bundle adjustment
getStructure() and
getPairwiseGraphViewByStructureIndex(int)-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DogArray<AssociatedPair>protected final DogArray<DogArray_I32>List of feature indexes for each view that are part of the inlier set.protected final DogArray<Point4D_F64>protected final DogArray_I32lookup table from feature ID in seed view to structure index.protected final int[]protected final ImageDimensionCommon algorithms for reconstructing the projective sceneprotected final FastArray<PairwiseImageGraph.View> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateObservationsForBundleAdjustment(DogArray_I32 seedConnIdx) Convert observations into a format which bundle adjustment will understandgetPairwiseGraphViewByStructureIndex(int index) Returns thePairwiseImageGraph.Viewgiven the index of the view in structureReturns the estimated scene structurevoidlookupInfoForMetricElevation(List<String> viewIds, DogArray<ElevateViewInfo> views, DogArray<DMatrixRMaj> cameraMatrices, DogArray<AssociatedTupleDN> observations) Copies results into a format that's useful for projective to metric conversionbooleanprojectiveSceneN(LookUpSimilarImages dbSimilar, LookUpCameraInfo dbCams, PairwiseImageGraph.View seed, DogArray_I32 seedFeatsIdx, DogArray_I32 seedConnIdx) Computes a projective reconstruction.voidsetVerbose(@Nullable PrintStream out, @Nullable Set<String> configuration)
-
Field Details
-
utils
Common algorithms for reconstructing the projective scene -
inlierIndexes
List of feature indexes for each view that are part of the inlier set. The seed view is at index 0. The other indexes are in order of 'seedConnIdx'. -
viewsByStructureIndex
-
selectedTriple
protected final int[] selectedTriple -
points3D
-
assocPixel
-
shape
-
seedToStructure
lookup table from feature ID in seed view to structure index. There will only be 3D features for members of the inlier set.
-
-
Constructor Details
-
InitializeCommonProjective
-
InitializeCommonProjective
public InitializeCommonProjective()
-
-
Method Details
-
projectiveSceneN
public boolean projectiveSceneN(LookUpSimilarImages dbSimilar, LookUpCameraInfo dbCams, PairwiseImageGraph.View seed, DogArray_I32 seedFeatsIdx, DogArray_I32 seedConnIdx) Computes a projective reconstruction. Reconstruction will be relative the 'seed' and only use features listed in 'common'. The list of views is taken from seed and is specified in 'motions'.- Parameters:
dbSimilar- (Input) Data based used to look up information on each imageseed- (Input) The seed view that will act as the originseedFeatsIdx- (Input) Indexes of common features in the seed view which are to be used.seedConnIdx- (Input) Indexes of motions in the seed view to use when initializing- Returns:
- true is successful or false if it failed
-
createObservationsForBundleAdjustment
Convert observations into a format which bundle adjustment will understand- Parameters:
seedConnIdx- Which edges in seed to use
-
lookupInfoForMetricElevation
public void lookupInfoForMetricElevation(List<String> viewIds, DogArray<ElevateViewInfo> views, DogArray<DMatrixRMaj> cameraMatrices, DogArray<AssociatedTupleDN> observations) Copies results into a format that's useful for projective to metric conversion- Parameters:
viewIds- (Output) ID of each viewviews- (Output) Shape of images in each viewcameraMatrices- (Output) Found camera matrices. view[0] is skipped since it is identityobservations- (Output) Found observations shifted to have (0,0) center
-
getStructure
Returns the estimated scene structure -
getPairwiseGraphViewByStructureIndex
Returns thePairwiseImageGraph.Viewgiven the index of the view in structure -
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbosein interfaceVerbosePrint
-