RSLightFields
Disparity map estimator from 3D light fields
Classes | Functions
rslf_plot.hpp File Reference

Implement functions to scale and plot matrices. More...

#include <rslf_types.hpp>
Include dependency graph for rslf_plot.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  rslf::ImageConverter_uchar
 Image normalizer to be fitted on a given image, that will further scale images given the preceding fitted values. Enables to maintain a coherent color scale in plots for instance. More...
 

Functions

void rslf::plot_mat (Mat img, std::string window_name="Image")
 Plot the provided cv::Mat in a cv::namedWindow. More...
 
Mat rslf::copy_and_scale_uchar (Mat img)
 Build a copy of the matrix scaled to uchar (0..255). More...
 
Mat rslf::draw_red_lines (Mat img, int fill_row_red=-1, int max_height=-1, int fill_col_red=-1, int max_width=-1)
 Scale values to plottable (uchar 0..255) and overlays the given matrix with red lines. More...
 

Detailed Description

Implement functions to scale and plot matrices.

Function Documentation

◆ copy_and_scale_uchar()

rslf::Mat rslf::copy_and_scale_uchar ( Mat  img)

Build a copy of the matrix scaled to uchar (0..255).

Parameters
imgThe matrix to be scaled.
Returns
A copy of the matrix, scaled to uchar.

◆ draw_red_lines()

rslf::Mat rslf::draw_red_lines ( Mat  img,
int  fill_row_red = -1,
int  max_height = -1,
int  fill_col_red = -1,
int  max_width = -1 
)

Scale values to plottable (uchar 0..255) and overlays the given matrix with red lines.

Parameters
imgThe matrix to be plotted.
fill_rowFill a row in blank? -1 for no, else row index
max_heightTruncate the image to this height.
fill_colFill a col in blank? -1 for no, else col index
max_widthTruncate the image to this width.

◆ plot_mat()

void rslf::plot_mat ( Mat  img,
std::string  window_name = "Image" 
)

Plot the provided cv::Mat in a cv::namedWindow.

Parameters
imgThe matrix to be plotted.
window_nameName of the created window.