#pragma once #include /*! \file integral_image.h \brief The file provides functions that calculate an integral image. */ namespace integral_image { //TODO: The algorithms do not require the data to be of 'double' type. //Consider to turn functions into template functions. using Mat = cv::Mat_; //! 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); }