-
Notifications
You must be signed in to change notification settings - Fork 2
/
ColorBackgroundSubtractor.cpp
56 lines (34 loc) · 1.39 KB
/
ColorBackgroundSubtractor.cpp
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// ColorBackgroundSubtractor.cpp
// segmenthreetion
//
// Created by Cristina Palmero Cantariño on 07/03/14.
//
//
#include "BackgroundSubtractor.h"
#include "ColorBackgroundSubtractor.h"
#include <opencv2/opencv.hpp>
ColorBackgroundSubtractor::ColorBackgroundSubtractor()
: BackgroundSubtractor()
{ }
/*
void ColorBackgroundSubtractor::setMasksOffset(unsigned char masksOffset) {
m_masksOffset = masksOffset;
}
*/
void ColorBackgroundSubtractor::getMasks(ModalityData& mdInput, ModalityData& mdOutput) {
mdOutput.setPredictedMasks(mdInput.getPredictedMasks());
}
void ColorBackgroundSubtractor::getBoundingRects(ModalityData& mdInput, ModalityData& mdOutput) {
mdOutput.setPredictedBoundingRects(mdInput.getPredictedBoundingRects());
cout << "Color bounding boxes: " << this->countBoundingBoxes(mdOutput.getPredictedBoundingRects()) << endl;
}
void ColorBackgroundSubtractor::adaptGroundTruthToReg(ModalityData& mdInput, ModalityData& mdOutput) {
mdOutput.setGroundTruthMasks(mdInput.getGroundTruthMasks());
}
void ColorBackgroundSubtractor::getRoiTags(ModalityData& mdInput, ModalityData& mdOutput) {
mdOutput.setTags(mdInput.getTags());
}
void ColorBackgroundSubtractor::getGroundTruthBoundingRects(ModalityData& mdInput, ModalityData& mdOutput) {
mdOutput.setGroundTruthBoundingRects(mdInput.getGroundTruthBoundingRects());
}