A working solution

This commit is contained in:
Dmitry Kokorin 2018-09-05 20:26:58 +03:00
parent 9016f8461e
commit 196957f3d0
8 changed files with 14213 additions and 10 deletions

34
integral_image.h Normal file
View file

@ -0,0 +1,34 @@
#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);
}