-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGridPartitioner.h
39 lines (28 loc) · 1012 Bytes
/
GridPartitioner.h
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
//
// GridPartitioner.h
// segmenthreetion
//
// Created by Albert Clapés on 01/03/14.
//
//
#ifndef __segmenthreetion__GridPartitioner__
#define __segmenthreetion__GridPartitioner__
#include <iostream>
#include "GridMat.h"
#include "ModalityData.hpp"
#include "ModalityGridData.hpp"
class GridPartitioner
{
public:
GridPartitioner(); // default: 2 x 2
GridPartitioner(unsigned int hp, unsigned int wp);
void setGridPartitions(unsigned int hp, unsigned int wp);
void grid(ModalityData& md, ModalityGridData& mgd);
private:
unsigned int m_hp, m_wp; // partitions in height and width
// Trim subimages (using the rects provided) from frames
void gridFrames(ModalityData& md, vector<GridMat>& gframes, cv::Mat& frameIDs);
void gridMasks(ModalityData& md, vector<GridMat>& gmasks);
void gridMasks(ModalityData& md, vector<GridMat>& gmasks, vector<cv::Rect>& grects, cv::Mat& gtags);
};
#endif /* defined(__segmenthreetion__GridPartitioner__) */