The Blur class is responsible for selecting they keyframes based on the blu values calculated by a BlurAlgorithm.
More...
#include <blur.h>
|
| void | slot_blurAlgoChanged (const QString &name) |
| | [slot] slot_blurAlgoChanged selects the algorithm identified by name.
|
| |
| void | slot_wsChanged (int ws) |
| | [slot] slot_wsChanged updates the windowsize.
|
| |
| void | slot_ldChanged (int ld) |
| | [slot] slot_ldChanged updates local deviation.
|
| |
| void | slot_selectedImageIndex (uint index) |
| | [slot] slot_selectedImageIndex changes currently displayed info (blur value of current image)
|
| |
|
|
Q_INTERFACES(IAlgorithm) public | ~Blur () |
| | Blur Constructor which creates an instance of every BlurAlgorithm and stets standard values (WindowSize = 30, LocalDeviation = 95)
|
| |
| QWidget * | getSettingsWidget (QWidget *parent) override |
| | getSettingsWidget Returns the settings widget where BlurAlgorithm, WindowSizw and LocalDeviation can be set
|
| |
| std::vector< uint > | sampleImages (const std::vector< unsigned int > &imageList, Progressable *receiver, volatile bool *stopped, bool useCuda, LogFileParent *logFile) override |
| | sampleImages selects keyframes based on their bluriness. It differs between a calulation on all images and a caculation only on keyframes.
|
| |
| QString | getName () const override |
| | getName Returns the plugin Name
|
| |
| void | initialize (Reader *reader, QMap< QString, QVariant > buffer, signalObject *sigObj) override |
| | initialize Blur doesn't use this currently
|
| |
| void | setSettings (QMap< QString, QVariant > settings) override |
| | setter for plugin's settings
|
| |
| 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
|
| |
|
| 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.
|
| |
| virtual std::vector< uint > | sampleImages (const std::vector< uint > &imageList, Progressable *receiver, volatile bool *stopped, bool useCuda, LogFileParent *logFile)=0 |
| | sampleImages selects the keyframes from the given images. The computation is based on the images provided by the given Reader. The imageList provides indices for the currently selected keyframes. This way the current selection can be taken in account in the calculation. Since the algorithm can be very time consuming, it is recommended to report progress to the given Progressable by invoking Progressable::slot_makeProgress. It should be possible to abort calculation by setting the value of stopped to true. Therefore it is necessary to repeatedly check its state. To speedup calculation, data can be buffered to accelerate the next call of sampleImages. On some systems the gpu can be utilized for acceleration as well, but only if useCuda is true. See following example implementation for sampleImages:
|
| |
The Blur class is responsible for selecting they keyframes based on the blu values calculated by a BlurAlgorithm.
- Author
- Daniel Brommer
- Date
- 2021/02/19
◆ generateSettings()
| QMap< QString, QVariant > Blur::generateSettings |
( |
Progressable * |
receiver, |
|
|
bool |
useCuda, |
|
|
volatile bool * |
stopped |
|
) |
| |
|
overrideprivatevirtual |
generateSettings tries to generate the best settings for the current input
- Parameters
-
| receiver | is a progressable, which displays the already made progress |
| buffer | QVariant with the buffered data form last call to sampleImages |
| useCuda | true if cv::cuda can be used |
| stopped | is set if the algorithm should abort |
- Returns
- QMap with the settings
Implements IAlgorithm.
◆ getName()
| QString Blur::getName |
( |
| ) |
const |
|
overrideprivatevirtual |
getName Returns the plugin Name
- Returns
- "Blur"
Implements IAlgorithm.
◆ getSettings()
| QMap< QString, QVariant > Blur::getSettings |
( |
| ) |
|
|
overrideprivatevirtual |
getter for plugin's settings
- Returns
- QMap with the settings
Implements IAlgorithm.
◆ getSettingsWidget()
| QWidget * Blur::getSettingsWidget |
( |
QWidget * |
parent | ) |
|
|
overrideprivatevirtual |
getSettingsWidget Returns the settings widget where BlurAlgorithm, WindowSizw and LocalDeviation can be set
- Parameters
-
| parent | Parent of the created QWidget |
- Returns
- The Settings Widget
Implements IAlgorithm.
◆ initialize()
| void Blur::initialize |
( |
Reader * |
reader, |
|
|
QMap< QString, QVariant > |
buffer, |
|
|
signalObject * |
sigObj |
|
) |
| |
|
overrideprivatevirtual |
initialize Blur doesn't use this currently
- Parameters
-
| reader | the images |
| buffer | is a QVariant, which holds previous computions that could be usefull for the next selection |
| sigObj | provides signals from the core |
Implements IAlgorithm.
◆ sampleImages()
| std::vector< uint > Blur::sampleImages |
( |
const std::vector< unsigned int > & |
imageList, |
|
|
Progressable * |
receiver, |
|
|
volatile bool * |
stopped, |
|
|
bool |
useCuda, |
|
|
LogFileParent * |
logFile |
|
) |
| |
|
overrideprivate |
sampleImages selects keyframes based on their bluriness. It differs between a calulation on all images and a caculation only on keyframes.
If allImages are used, sampleImages calulates the blur value of every image with the selected BlurAlgorithm. Then it creates a window for every image x. This window is defined as [x - windowSize, .., x, .. , x + windowSize] (This window will be cropped to 0 on the left and picCOunt on the rigth side). For every window the average Blur values y of it's images is calculated. If (Blur value from x) / y >= LocalDeviation / 100 Image x is considered a sharpImage.
If only keyframes are used, sampleImages creates the same windows, but only for keyframes and it will selected the Image in a window with the largest blur value.
- Parameters
-
| imageList | is a preselection of frames |
| receiver | is a progressable, which displays the already made progress |
| stopped | Pointer to a bool indication if user wants to stop the computation |
| useCuda | defines if the compution should run on graphics card |
| logFile | can be used to protocoll progress or problems |
- Returns
- A list of indices, which represent the selected keyframes.
◆ setSettings()
| void Blur::setSettings |
( |
QMap< QString, QVariant > |
settings | ) |
|
|
overrideprivatevirtual |
setter for plugin's settings
- Parameters
-
Implements IAlgorithm.
◆ slot_blurAlgoChanged
| void Blur::slot_blurAlgoChanged |
( |
const QString & |
name | ) |
|
|
slot |
[slot] slot_blurAlgoChanged selects the algorithm identified by name.
- Parameters
-
◆ slot_ldChanged
| void Blur::slot_ldChanged |
( |
int |
ld | ) |
|
|
slot |
[slot] slot_ldChanged updates local deviation.
- Parameters
-
| ld | The new local deviation |
◆ slot_selectedImageIndex
| void Blur::slot_selectedImageIndex |
( |
uint |
index | ) |
|
|
slot |
[slot] slot_selectedImageIndex changes currently displayed info (blur value of current image)
- Parameters
-
| index | index of the currently shown image |
◆ slot_wsChanged
| void Blur::slot_wsChanged |
( |
int |
ws | ) |
|
|
slot |
[slot] slot_wsChanged updates the windowsize.
- Parameters
-
The documentation for this class was generated from the following files:
- iVS3D/src/iVS3D-blurPlugin/blur.h
- iVS3D/src/iVS3D-blurPlugin/blur.cpp