From a7597c8d4f33d6cdd79125afcd3a503e73d3fbdb Mon Sep 17 00:00:00 2001 From: Nathalie Seen Date: Fri, 21 May 2021 15:24:06 +0200 Subject: [PATCH] [ADD] comments to backgroundRemover --- src/computervision/BackgroundRemover.h | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/computervision/BackgroundRemover.h b/src/computervision/BackgroundRemover.h index 2c49932..b925597 100644 --- a/src/computervision/BackgroundRemover.h +++ b/src/computervision/BackgroundRemover.h @@ -11,15 +11,48 @@ using namespace std; class BackgroundRemover { public: + + /** + * @brief constructor, + * create background variable and set calibrated to faslse + * + */ BackgroundRemover(void); + + /** + * @brief sets the input image to a grayscale image + * sets calibrated to true + * + * @param input input the image that has to be calibrated + */ void calibrate(Mat input); + + /** + * @brief Gets the mask of the foregorund of the input image + * and copies it to another image + * + * @param input The image from which the forground needs to be picked + * @return The image on which te foregroundmask is copied + */ Mat getForeground(Mat input); private: Mat background; bool calibrated = false; + /** + * @brief Sets the image to grayscale and removes the background + * + * @param input The image from which the forground needs to be picked + * @return The mask of the foreground of the image + */ Mat getForegroundMask(Mat input); + /** + * @brief makes everything on the background black + * + * @param input the image from which the background needs to be removed + * @param background the background of the image + */ void removeBackground(Mat input, Mat background); }; } \ No newline at end of file