iVS3D v2.0.0
Loading...
Searching...
No Matches
SmoothController Class Reference
Inheritance diagram for SmoothController:
IAlgorithm IAlgorithm

Public Member Functions

 SmoothController ()
 StationaryCamera Constructor sets default values for member variables.
 
QWidget * getSettingsWidget (QWidget *parent) override
 getSettingsWidget creates a Widget, which can be used to change the algorithm parameters and returns it
 
std::vector< uint > sampleImages (const std::vector< uint > &imageList, Progressable *receiver, volatile bool *stopped, bool useCuda, LogFileParent *logFile) override
 sampleImages selects keyframe if the camera is currently not stationary
 
QString getName () const override
 getName Returns a name for displaying this algorithm to the user.
 
void initialize (Reader *reader, QMap< QString, QVariant > buffer, signalObject *sigObj) override
 initialize Sets up the default value which is corresponding to video information
 
void setSettings (QMap< QString, QVariant > settings) override
 setter for plugin's settings settings structure: <QMap> settings (all settings) <QVariant> samplingResolution (enable/disable diffrent resolution for sampling) <QVariant> selector_threshold </QMap>
 
QMap< QString, QVariant > generateSettings (Progressable *receiver, bool useCuda, volatile bool *stopped) override
 generateSettings tries to generate the best settings for the current input
 
QMap< QString, QVariant > getSettings () override
 getter for plugin's settings
 

Private Member Functions

Q_INTERFACES(IAlgorithm) public ~SmoothController ()
 StationaryCamera Constructor sets default values for member variables.
 
QWidget * getSettingsWidget (QWidget *parent) override
 getSettingsWidget creates a Widget, which can be used to change the algorithm parameters and returns it
 
std::vector< uint > sampleImages (const std::vector< uint > &imageList, Progressable *receiver, volatile bool *stopped, bool useCuda, LogFileParent *logFile) override
 sampleImages selects keyframe if the camera is currently not stationary
 
QString getName () const override
 getName Returns a name for displaying this algorithm to the user.
 
void initialize (Reader *reader, QMap< QString, QVariant > buffer, signalObject *sigObj) override
 initialize Sets up the default value which is corresponding to video information
 
void setSettings (QMap< QString, QVariant > settings) override
 setter for plugin's settings settings structure: <QMap> settings (all settings) <QVariant> selector_threshold </QMap>
 
QMap< QString, QVariant > generateSettings (Progressable *receiver, bool useCuda, volatile bool *stopped) override
 generateSettings tries to generate the best settings for the current input
 
QMap< QString, QVariant > getSettings () override
 getter for plugin's settings
 
QMap< QString, QVariant > sendBuffer ()
 sendBuffer Sends all buffered values for storeing previously calculated Infos
 
void recreateBufferMatrix (QMap< QString, QVariant > buffer)
 recreateBufferMatrix initalizes the buffer matix whith the new values from nBuffer
 
void stringToBufferMat (QString string)
 recreateMovementFromString is used to extract the movement value from a string and write it in the buffer
 
QMap< QString, QVariant > sendBuffer ()
 sendBuffer Sends all buffered values for storeing previously calculated Infos
 
void recreateBufferMatrix (QMap< QString, QVariant > buffer)
 recreateBufferMatrix initalizes the buffer matix whith the new values from nBuffer
 
void stringToBufferMat (QString string)
 recreateMovementFromString is used to extract the movement value from a string and write it in the buffer
 

Additional Inherited Members

- Signals inherited from IAlgorithm
void updateKeyframes (std::vector< uint > keyframes)
 updateKeyframes updates the keyframe list in the core object.
 
void updateBuffer (QMap< QString, QVariant > buffer)
 updateBuffer stores the given buffer for future uses of the buffered data.
 

Member Function Documentation

◆ generateSettings() [1/2]

QMap< QString, QVariant > SmoothController::generateSettings ( Progressable receiver,
bool  useCuda,
volatile bool *  stopped 
)
overrideprivatevirtual

generateSettings tries to generate the best settings for the current input

Parameters
receiveris a progressable, which displays the already made progress
useCudatrue if cv::cuda can be used
stoppedis set if the algorithm should abort
Returns
QMap with the settings

Implements IAlgorithm.

◆ generateSettings() [2/2]

QMap< QString, QVariant > SmoothController::generateSettings ( Progressable receiver,
bool  useCuda,
volatile bool *  stopped 
)
overridevirtual

generateSettings tries to generate the best settings for the current input

Parameters
receiveris a progressable, which displays the already made progress
useCudatrue if cv::cuda can be used
stoppedis set if the algorithm should abort
Returns
QMap with the settings

Implements IAlgorithm.

◆ getName() [1/2]

QString SmoothController::getName ( ) const
overrideprivatevirtual

getName Returns a name for displaying this algorithm to the user.

Returns
the name as QString.

Implements IAlgorithm.

◆ getName() [2/2]

QString SmoothController::getName ( ) const
overridevirtual

getName Returns a name for displaying this algorithm to the user.

Returns
the name as QString.

Implements IAlgorithm.

◆ getSettings() [1/2]

QMap< QString, QVariant > SmoothController::getSettings ( )
overrideprivatevirtual

getter for plugin's settings

Returns
QMap with the settings

Implements IAlgorithm.

◆ getSettings() [2/2]

QMap< QString, QVariant > SmoothController::getSettings ( )
overridevirtual

getter for plugin's settings

Returns
QMap with the settings

Implements IAlgorithm.

◆ getSettingsWidget() [1/2]

QWidget * SmoothController::getSettingsWidget ( QWidget *  parent)
overrideprivatevirtual

getSettingsWidget creates a Widget, which can be used to change the algorithm parameters and returns it

Parameters
parentis the parent of the newly created SettingsWidget
Returns
a settingWidget, which can be used to change the algorithm parameters

Implements IAlgorithm.

◆ getSettingsWidget() [2/2]

QWidget * SmoothController::getSettingsWidget ( QWidget *  parent)
overridevirtual

getSettingsWidget creates a Widget, which can be used to change the algorithm parameters and returns it

Parameters
parentis the parent of the newly created SettingsWidget
Returns
a settingWidget, which can be used to change the algorithm parameters

Implements IAlgorithm.

◆ initialize() [1/2]

void SmoothController::initialize ( Reader reader,
QMap< QString, QVariant >  buffer,
signalObject sigObj 
)
overrideprivatevirtual

initialize Sets up the default value which is corresponding to video information

Parameters
readeris used to get video or image information
bufferQVariant with the buffered data form last call to sampleImages
sigObjprovides signals from the core application

Implements IAlgorithm.

◆ initialize() [2/2]

void SmoothController::initialize ( Reader reader,
QMap< QString, QVariant >  buffer,
signalObject sigObj 
)
overridevirtual

initialize Sets up the default value which is corresponding to video information

Parameters
readeris used to get video or image information
bufferQVariant with the buffered data form last call to sampleImages
sigObjprovides signals from the core application

Implements IAlgorithm.

◆ recreateBufferMatrix() [1/2]

void SmoothController::recreateBufferMatrix ( QMap< QString, QVariant >  buffer)
private

recreateBufferMatrix initalizes the buffer matix whith the new values from nBuffer

Parameters
bufferholds the new movement values which should be stored in the buffer matrix

◆ recreateBufferMatrix() [2/2]

void SmoothController::recreateBufferMatrix ( QMap< QString, QVariant >  buffer)
private

recreateBufferMatrix initalizes the buffer matix whith the new values from nBuffer

Parameters
bufferholds the new movement values which should be stored in the buffer matrix

◆ sampleImages() [1/2]

std::vector< uint > SmoothController::sampleImages ( const std::vector< uint > &  imageList,
Progressable receiver,
volatile bool *  stopped,
bool  useCuda,
LogFileParent logFile 
)
overrideprivatevirtual

sampleImages selects keyframe if the camera is currently not stationary

Parameters
readergives the method access to the video/image sequence, which should be used
imageListis a preselection of frames
receiveris a progressable, which displays the already made progress
stoppedPointer to a bool indication if user wants to stop the computation
logFilepoiter to the log file
Returns
A list of indices, which represent the selected keyframes.

Implements IAlgorithm.

◆ sampleImages() [2/2]

std::vector< uint > SmoothController::sampleImages ( const std::vector< uint > &  imageList,
Progressable receiver,
volatile bool *  stopped,
bool  useCuda,
LogFileParent logFile 
)
overridevirtual

sampleImages selects keyframe if the camera is currently not stationary

Parameters
readergives the method access to the video/image sequence, which should be used
imageListis a preselection of frames
receiveris a progressable, which displays the already made progress
stoppedPointer to a bool indication if user wants to stop the computation
logFilepoiter to the log file
Returns
A list of indices, which represent the selected keyframes.

Implements IAlgorithm.

◆ sendBuffer() [1/2]

QMap< QString, QVariant > SmoothController::sendBuffer ( )
private

sendBuffer Sends all buffered values for storeing previously calculated Infos

Returns
the buffer as a QVariant (empty)

◆ sendBuffer() [2/2]

QMap< QString, QVariant > SmoothController::sendBuffer ( )
private

sendBuffer Sends all buffered values for storeing previously calculated Infos

Returns
the buffer as a QVariant (empty)

◆ setSettings() [1/2]

void SmoothController::setSettings ( QMap< QString, QVariant >  settings)
overrideprivatevirtual

setter for plugin's settings settings structure: <QMap> settings (all settings) <QVariant> selector_threshold </QMap>

Parameters
QMapwith the settings

Implements IAlgorithm.

◆ setSettings() [2/2]

void SmoothController::setSettings ( QMap< QString, QVariant >  settings)
overridevirtual

setter for plugin's settings settings structure: <QMap> settings (all settings) <QVariant> samplingResolution (enable/disable diffrent resolution for sampling) <QVariant> selector_threshold </QMap>

Parameters
QMapwith the settings

Implements IAlgorithm.

◆ stringToBufferMat() [1/2]

void SmoothController::stringToBufferMat ( QString  string)
private

recreateMovementFromString is used to extract the movement value from a string and write it in the buffer

Parameters
stringthat holds the two compared images indices and the movement value (most likeyl from settings.json)

◆ stringToBufferMat() [2/2]

void SmoothController::stringToBufferMat ( QString  string)
private

recreateMovementFromString is used to extract the movement value from a string and write it in the buffer

Parameters
stringthat holds the two compared images indices and the movement value (most likeyl from settings.json)

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