Commit fd0d3efa1d293b7c91e3df7aa6b6ffa32c073b00

Authored by Josh Klontz
1 parent 54b1195c

remove draw delaunay

openbr/plugins/gui/drawdelaunay.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 -#include <openbr/core/opencvutils.h>  
19 -  
20 -#include <opencv2/imgproc.hpp>  
21 -  
22 -using namespace cv;  
23 -  
24 -namespace br  
25 -{  
26 -  
27 -/*!  
28 - * \ingroup transforms  
29 - * \brief Creates a Delaunay triangulation based on a set of points  
30 - * \author Scott Klum \cite sklum  
31 - */  
32 -class DrawDelaunayTransform : public UntrainableTransform  
33 -{  
34 - Q_OBJECT  
35 -  
36 - void project(const Template &src, Template &dst) const  
37 - {  
38 - dst = src;  
39 -  
40 - if (src.file.contains("DelaunayTriangles")) {  
41 - QList<Point2f> validTriangles = OpenCVUtils::toPoints(src.file.getList<QPointF>("DelaunayTriangles"));  
42 -  
43 - // Clone the matrix do draw on it  
44 - for (int i = 0; i < validTriangles.size(); i+=3) {  
45 - line(dst.m(), validTriangles[i], validTriangles[i+1], Scalar(0,0,0), 1);  
46 - line(dst.m(), validTriangles[i+1], validTriangles[i+2], Scalar(0,0,0), 1);  
47 - line(dst.m(), validTriangles[i+2], validTriangles[i], Scalar(0,0,0), 1);  
48 - }  
49 - } else qWarning("Template does not contain Delaunay triangulation.");  
50 - }  
51 -};  
52 -  
53 -BR_REGISTER(Transform, DrawDelaunayTransform)  
54 -  
55 -} // namespace br  
56 -  
57 -#include "gui/drawdelaunay.moc"