Commit 928c9b1da8eca4a1b0c09caf9a5adde68181924a

Authored by Josh Klontz
1 parent 148f52d1

remove sobel

openbr/plugins/imgproc/sobel.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/imgproc.hpp>
20   -
21   -using namespace cv;
22   -
23   -namespace br
24   -{
25   -
26   -/*!
27   - * \ingroup transforms
28   - * \brief Approximates the gradient in an image using sobel operator.
29   - * \author Scott Klum \cite sklum
30   - */
31   -class SobelTransform : public UntrainableTransform
32   -{
33   - Q_OBJECT
34   -
35   - Q_PROPERTY(int ksize READ get_ksize WRITE set_ksize RESET reset_ksize STORED false)
36   - Q_PROPERTY(float scale READ get_scale WRITE set_scale RESET reset_scale STORED false)
37   - BR_PROPERTY(int, ksize, 3)
38   - BR_PROPERTY(float, scale, 1)
39   -
40   - void project(const Template &src, Template &dst) const
41   - {
42   - Mat dx, abs_dx, dy, abs_dy;
43   - Sobel(src, dx, CV_32F, 1, 0, ksize, scale);
44   - Sobel(src, dy, CV_32F, 0, 1, ksize, scale);
45   - convertScaleAbs(dx, abs_dx);
46   - convertScaleAbs(dy, abs_dy);
47   - addWeighted(abs_dx, 0.5, abs_dy, 0.5, 0, dst);
48   - }
49   -};
50   -
51   -BR_REGISTER(Transform, SobelTransform)
52   -
53   -} // namespace br
54   -
55   -#include "imgproc/sobel.moc"
56   -
57   -