-
Notifications
You must be signed in to change notification settings - Fork 0
/
laplace_blending.h
28 lines (22 loc) · 1.21 KB
/
laplace_blending.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef LAB_2_BLENDING_LAPLACE_BLENDING_H
#define LAB_2_BLENDING_LAPLACE_BLENDING_H
#include "opencv2/core.hpp"
/// \brief Blends two images according to scale.
/// \param img_1 A three channel image with data type CV_32F.
/// \param img_2 A three channel image with data type CV_32F.
/// \param weights A three channel image with data type CV_32F, containing the weights in the range [0,1].
/// \return The resulting blended image.
cv::Mat laplaceBlending(const cv::Mat& img_1, const cv::Mat& img_2, const cv::Mat& weights);
/// \brief Constructs a gaussian pyramid.
/// \param img The original image.
/// \return The pyramid represented as a std::vector with images, starting at the original scale.
std::vector<cv::Mat> constructGaussianPyramid(const cv::Mat& img);
/// \brief Constructs a laplacian pyramid.
/// \param img The original image.
/// \return The pyramid represented as a std::vector with images, starting at the original scale.
std::vector<cv::Mat> constructLaplacianPyramid(const cv::Mat& img);
/// \brief Collapses a laplacian pyramid into a image.
/// \param pyr A laplacian pyramid.
/// \return The resulting image.
cv::Mat collapsePyramid(const std::vector<cv::Mat>& pyr);
#endif //LAB_2_BLENDING_LAPLACE_BLENDING_H