34 lines
842 B
C++
34 lines
842 B
C++
#pragma once
|
|
|
|
#include <opencv2/opencv.hpp>
|
|
|
|
|
|
/*! \file integral_image.h
|
|
\brief The file provides functions that calculate an integral image.
|
|
*/
|
|
|
|
|
|
|
|
namespace integral_image {
|
|
|
|
|
|
using Mat = cv::Mat_<double>;
|
|
|
|
//! A reference serial implementation of the integral image algorithm.
|
|
/*!
|
|
\param image an input 1-channel image.
|
|
\return The integral image of the input
|
|
\sa integral_image_openmp
|
|
*/
|
|
Mat integral_image_serial(const Mat &image);
|
|
|
|
//! An OpenMP-accelerated function that calculates an integral image.
|
|
/*!
|
|
\param image an input 1-channel image.
|
|
\param thread_number number of worker threads. If \p thread_number is equal to 0, the threads are created dynamically. Defaults to 0.
|
|
\return The integral image of the input
|
|
\sa integral_image_serial
|
|
*/
|
|
Mat integral_image_openmp(const Mat &image, int thread_number = 0);
|
|
|
|
}
|