Commit dc83113ab281c87dda1ea99aa3b6795c9642864f

Authored by Josh Klontz
1 parent 3080864a

remove mask

Showing 1 changed file with 0 additions and 51 deletions
openbr/plugins/imgproc/mask.cpp deleted
1 -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
2 - * Copyright 2012 The MITRE Corporation *  
3 - * *  
4 - * Licensed under the Apache License, Version 2.0 (the "License"); *  
5 - * you may not use this file except in compliance with the License. *  
6 - * You may obtain a copy of the License at *  
7 - * *  
8 - * http://www.apache.org/licenses/LICENSE-2.0 *  
9 - * *  
10 - * Unless required by applicable law or agreed to in writing, software *  
11 - * distributed under the License is distributed on an "AS IS" BASIS, *  
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *  
13 - * See the License for the specific language governing permissions and *  
14 - * limitations under the License. *  
15 - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */  
16 -  
17 -#include <openbr/plugins/openbr_internal.h>  
18 -  
19 -#include <opencv2/imgproc.hpp>  
20 -  
21 -using namespace cv;  
22 -  
23 -namespace br  
24 -{  
25 -  
26 -/*!  
27 - * \ingroup transforms  
28 - * \brief Applies an eliptical mask  
29 - * \author Josh Klontz \cite jklontz  
30 - */  
31 -class MaskTransform : public UntrainableTransform  
32 -{  
33 - Q_OBJECT  
34 -  
35 - void project(const Template &src, Template &dst) const  
36 - {  
37 - const Mat &m = src;  
38 - Mat mask(m.size(), CV_8UC1);  
39 - mask.setTo(1);  
40 - const float SCALE = 1.1;  
41 - ellipse(mask, RotatedRect(Point2f(m.cols/2, m.rows/2), Size2f(SCALE*m.cols, SCALE*m.rows), 0), 0, -1);  
42 - dst = m.clone();  
43 - dst.m().setTo(0, mask);  
44 - }  
45 -};  
46 -  
47 -BR_REGISTER(Transform, MaskTransform)  
48 -  
49 -} // namespace br  
50 -  
51 -#include "imgproc/mask.moc"