The FlowCalculator class is an interface which defines the structure for the hardware specific algorithm. The algorithm takes two pictures and calculates a flow matrix using the Farneback algorithm. Than the flow matrix is evalutated and reduced to one single flow value.
More...
#include <flowcalculator.h>
|
| virtual double | calculateFlow (cv::Mat fromMat, cv::Mat toMat)=0 |
| | calculateFlow computes the flow between two images and reduces the resulting flow-matrix to a single floating point value
|
| |
| virtual double | calculateFlow (cv::Mat fromMat, cv::Mat toMat)=0 |
| | calculateFlow computes the flow between two images and reduces the resulting flow-matrix to a single floating point value
|
| |
|
| double | flowMatToDouble (cv::Mat mat) |
| | flowMatToDouble reduces a flow-matrix to a single floating point value, if that mat was empty return -1.0
|
| |
| double | flowMatToDouble (cv::Mat mat) |
| | flowMatToDouble reduces a flow-matrix to a single floating point value, if that mat was empty return -1.0
|
| |
|
| double | median (std::vector< double > vec) |
| | median calculates the median of a double vector in place
|
| |
| double | median (std::vector< double > vec) |
| | median calculates the median of a double vector in place
|
| |
The FlowCalculator class is an interface which defines the structure for the hardware specific algorithm. The algorithm takes two pictures and calculates a flow matrix using the Farneback algorithm. Than the flow matrix is evalutated and reduced to one single flow value.
- Author
- Dominic Zahn
- Date
- 2022/04/12
◆ calculateFlow() [1/2]
| virtual double FlowCalculator::calculateFlow |
( |
cv::Mat |
fromMat, |
|
|
cv::Mat |
toMat |
|
) |
| |
|
pure virtual |
calculateFlow computes the flow between two images and reduces the resulting flow-matrix to a single floating point value
- Parameters
-
| fromMat | cv::Mat which is the image before the posible movement |
| toMat | cv::Mat which is the image after the posible movement |
- Returns
- doubel which represents the movement between the images
Implemented in FlowCalculatorCpu, FlowCalculatorCuda, FlowCalculatorCpu, and FlowCalculatorCuda.
◆ calculateFlow() [2/2]
| virtual double FlowCalculator::calculateFlow |
( |
cv::Mat |
fromMat, |
|
|
cv::Mat |
toMat |
|
) |
| |
|
pure virtual |
calculateFlow computes the flow between two images and reduces the resulting flow-matrix to a single floating point value
- Parameters
-
| fromMat | cv::Mat which is the image before the posible movement |
| toMat | cv::Mat which is the image after the posible movement |
- Returns
- doubel which represents the movement between the images
Implemented in FlowCalculatorCpu, FlowCalculatorCuda, FlowCalculatorCpu, and FlowCalculatorCuda.
◆ flowMatToDouble() [1/2]
| double FlowCalculator::flowMatToDouble |
( |
cv::Mat |
mat | ) |
|
|
protected |
flowMatToDouble reduces a flow-matrix to a single floating point value, if that mat was empty return -1.0
- Parameters
-
| mat | cv::Mat which hold represents the flow-matrix |
- Returns
- double which represents the reduced flow-matrix
◆ flowMatToDouble() [2/2]
| double FlowCalculator::flowMatToDouble |
( |
cv::Mat |
mat | ) |
|
|
protected |
flowMatToDouble reduces a flow-matrix to a single floating point value, if that mat was empty return -1.0
- Parameters
-
| mat | cv::Mat which hold represents the flow-matrix |
- Returns
- double which represents the reduced flow-matrix
◆ median() [1/2]
| double FlowCalculator::median |
( |
std::vector< double > |
vec | ) |
|
|
private |
median calculates the median of a double vector in place
- Parameters
-
- Returns
- the median of the double vector
◆ median() [2/2]
| double FlowCalculator::median |
( |
std::vector< double > |
vec | ) |
|
|
private |
median calculates the median of a double vector in place
- Parameters
-
- Returns
- the median of the double vector
The documentation for this class was generated from the following files:
- iVS3D/src/iVS3D-smoothCameraMovementPlugin/flowcalculator.h
- iVS3D/src/iVS3D-stationaryCameraPlugin/flowcalculator.h
- iVS3D/src/iVS3D-smoothCameraMovementPlugin/flowcalculator.cpp
- iVS3D/src/iVS3D-stationaryCameraPlugin/flowcalculator.cpp