File displayFunctional.h
FileList > src > displayFunctional.h
Go to the source code of this file
#include <xiApi.h>#include <boost/thread.hpp>#include <opencv2/core/core.hpp>#include <opencv2/imgproc.hpp>#include "constants.h"#include "display.h"#include "mainwindow.h"#include "util.h"
Classes
| Type | Name |
|---|---|
| class | DisplayerFunctional The DisplayerFunctional class is responsible for displaying images. |
Public Functions
| Type | Name |
|---|---|
| QImage | GetQImageFromMatrix (const cv::Mat & image, QImage::Format format) Creates a QImage object from an OpenCv matrix and a given image format. |
| std::pair< double, double > | GetSaturationPercentages (const cv::Mat & image, int minValue, int maxValue) Computes the saturation percentages for underexposed and overexposed pixels from an image. |
| void | PrepareBGRImage (cv::Mat & bgr_image, int bgr_norm) Normalize and convert an input BGR image to 8-bit unsigned integer format. |
Public Functions Documentation
function GetQImageFromMatrix
Creates a QImage object from an OpenCv matrix and a given image format.
Parameters:
imageOpenCV matrix.formatformat of image, for example QImage::Format_BGR888.
Returns:
QImage.
Exception:
std::invalid_argumentif the input matrix is empty or of the wrong type.
function GetSaturationPercentages
Computes the saturation percentages for underexposed and overexposed pixels from an image.
std::pair< double, double > GetSaturationPercentages (
const cv::Mat & image,
int minValue,
int maxValue
)
Parameters:
imageOpenCV matrix.minValuesaturation minimum value.maxValuesaturation maximum value.
Returns:
Percentage of underexposed pixels (first value) and overexposed ones (second value).
function PrepareBGRImage
Normalize and convert an input BGR image to 8-bit unsigned integer format.
This function takes an input BGR (Blue-Green-Red) image represented by a cv::Mat object and applies normalization and conversion operations. The normalization process calculates the minimum and maximum values of the input image and scales the image values to fit within a specified normalization range. The resulting image is then converted to 8-bit unsigned integer format, such that its pixel values range from 0 to 255.
Parameters:
bgr_imageThe input BGR image to be processed. The image gets modified in-place.bgr_normThe normalization factor to adjust the image intensity range. The higher the value, the larger the intensity range of the resulting image.
The documentation for this class was generated from the following file src/displayFunctional.h