model
SLAM.LoopClosure.RGBDBagOfWords
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| constant | featureCapacity | Integer | = 350 | |
| constant | descriptorSize | Integer | = 49 | |
| constant | vocabularyCapacity | Integer | = 256 | |
| constant | keyframeCapacity | Integer | = 128 | |
| constant | candidateCapacity | Integer | = 4 | |
| parameter | maximumWordDistanceSquared | Real | = 0.8 | |
| parameter | minimumAssignments | Real | = 8.0 | |
| parameter | minimumSimilarity | Real | = 0.35 | |
| parameter | minimumAge | Real | = 2.0 | Simulation seconds; independent of frame rate |
| input | descriptor | Real | [featureCapacity,descriptorSize] = zeros(featureCapacity,descriptorSize) | |
| input | descriptorEnabled | Real | [featureCapacity] = zeros(featureCapacity) | |
| input | descriptorCount | Real | = 0.0 | |
| input | vocabulary | Real | [vocabularyCapacity,descriptorSize] = zeros(vocabularyCapacity,descriptorSize) | |
| input | vocabularyEnabled | Real | [vocabularyCapacity] = zeros(vocabularyCapacity) | |
| input | vocabularyVersion | Real | = 1.0 | |
| input | previousHistogram | Real | [keyframeCapacity,vocabularyCapacity] = zeros(keyframeCapacity,vocabularyCapacity) | |
| input | previousEnabled | Real | [keyframeCapacity] = zeros(keyframeCapacity) | |
| input | previousKeyframeId | Real | [keyframeCapacity] = zeros(keyframeCapacity) | |
| input | previousKeyframeTime | Real | [keyframeCapacity] = zeros(keyframeCapacity) | |
| input | previousVersion | Real | = 0.0 | |
| input | previousNextSlot | Real | = 1.0 | |
| input | previousTime | Real | = 0.0 | |
| input | queryKeyframeId | Real | = 0.0 | |
| input | timeNow | Real | = 0.0 | |
| input | storeKeyframe | Real | = 0.0 | |
| input | resetRequested | Real | = 0.0 | |
| output | wordIndex | Real | [featureCapacity] | |
| output | histogram | Real | [vocabularyCapacity] | |
| output | candidateId | Real | [candidateCapacity] | |
| output | candidateSlot | Real | [candidateCapacity] | |
| output | candidateScore | Real | [candidateCapacity] | |
| output | nextHistogram | Real | [keyframeCapacity,vocabularyCapacity] | |
| output | nextEnabled | Real | [keyframeCapacity] | |
| output | nextKeyframeId | Real | [keyframeCapacity] | |
| output | nextKeyframeTime | Real | [keyframeCapacity] | |
| output | nextVersion | Real | | |
| output | nextSlot | Real | | |
| output | nextTime | Real | | |
| output | configurationValid | Real | | |
| output | vocabularyCount | Real | | |
| output | assignmentCount | Real | | |
| output | retrievalValid | Real | | |
| output | candidateCount | Real | | |
| output | stored | Real | | |
| output | invalidHistoryCount | Real | |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
model RGBDBagOfWords
import RetrieveVisualWords = SLAM.LoopClosure.RetrieveVisualWords;
constant Integer featureCapacity = 350;
constant Integer descriptorSize = 49;
constant Integer vocabularyCapacity = 256;
constant Integer keyframeCapacity = 128;
constant Integer candidateCapacity = 4;
parameter Real maximumWordDistanceSquared = 0.8;
parameter Real minimumAssignments = 8.0;
parameter Real minimumSimilarity = 0.35;
parameter Real minimumAge = 2.0 "Simulation seconds; independent of frame rate";
input Real descriptor[featureCapacity,descriptorSize] = zeros(featureCapacity,descriptorSize);
input Real descriptorEnabled[featureCapacity] = zeros(featureCapacity);
input Real descriptorCount = 0.0;
input Real vocabulary[vocabularyCapacity,descriptorSize] = zeros(vocabularyCapacity,descriptorSize);
input Real vocabularyEnabled[vocabularyCapacity] = zeros(vocabularyCapacity);
input Real vocabularyVersion = 1.0;
input Real previousHistogram[keyframeCapacity,vocabularyCapacity] = zeros(keyframeCapacity,vocabularyCapacity);
input Real previousEnabled[keyframeCapacity] = zeros(keyframeCapacity);
input Real previousKeyframeId[keyframeCapacity] = zeros(keyframeCapacity);
input Real previousKeyframeTime[keyframeCapacity] = zeros(keyframeCapacity);
input Real previousVersion = 0.0;
input Real previousNextSlot = 1.0;
input Real previousTime = 0.0;
input Real queryKeyframeId = 0.0;
input Real timeNow = 0.0;
input Real storeKeyframe = 0.0;
input Real resetRequested = 0.0;
output Real wordIndex[featureCapacity];
output Real histogram[vocabularyCapacity];
output Real candidateId[candidateCapacity];
output Real candidateSlot[candidateCapacity];
output Real candidateScore[candidateCapacity];
output Real nextHistogram[keyframeCapacity,vocabularyCapacity];
output Real nextEnabled[keyframeCapacity];
output Real nextKeyframeId[keyframeCapacity];
output Real nextKeyframeTime[keyframeCapacity];
output Real nextVersion;
output Real nextSlot;
output Real nextTime;
output Real configurationValid;
output Real vocabularyCount;
output Real assignmentCount;
output Real retrievalValid;
output Real candidateCount;
output Real stored;
output Real invalidHistoryCount;
equation
(wordIndex,histogram,candidateId,candidateSlot,candidateScore,nextHistogram,nextEnabled,nextKeyframeId,nextKeyframeTime,
nextVersion,nextSlot,nextTime,configurationValid,vocabularyCount,assignmentCount,retrievalValid,candidateCount,stored,invalidHistoryCount) =
RetrieveVisualWords(descriptor,descriptorEnabled,descriptorCount,vocabulary,vocabularyEnabled,vocabularyVersion,
previousHistogram,previousEnabled,previousKeyframeId,previousKeyframeTime,previousVersion,previousNextSlot,previousTime,
queryKeyframeId,timeNow,storeKeyframe,resetRequested,maximumWordDistanceSquared,minimumAssignments,minimumSimilarity,minimumAge);
end RGBDBagOfWords;