Direct Graphical Models  v.1.7.0
Global.h
1 //
2 // Writtem by Sergey G. Kosov in 2015 for Project X
3 #pragma once
4 
5 #include "types.h"
6 
7 namespace DirectGraphicalModels { namespace fex {
8 
9  // ================================ Global Namespace ==============================
16  namespace global {
24  DllExport size_t getNumLines(const Mat &img, int threshold1 = 100, int threshold2 = 50);
33  DllExport size_t getNumCircles(const Mat &img, int threshold1 = 100, int threshold2 = 30);
42  DllExport float getOpacity(const Mat &img);
48  DllExport float getVariance(const Mat &img);
54  DllExport int getArea(const Mat &img);
61  DllExport int getPerimeter(const Mat &img);
68  DllExport float getCompactness(const Mat &img);
69  }
70 } }
float getCompactness(const Mat &img)
Returns the compactness of the object in the source image.
Definition: Global.cpp:194
float getOpacity(const Mat &img)
Returns the weighted-mean transparancy of the source image.
Definition: Global.cpp:112
int getArea(const Mat &img)
Returns the number of non-zero pixels in the source image.
Definition: Global.cpp:155
int getPerimeter(const Mat &img)
Returns the perimeter of an object in the source image.
Definition: Global.cpp:172
float getVariance(const Mat &img)
Retunrs the variance of the source image.
Definition: Global.cpp:141
size_t getNumCircles(const Mat &img, int threshold1, int threshold2)
Returns the number of circles in the source image.
Definition: Global.cpp:71
size_t getNumLines(const Mat &img, int threshold1, int threshold2)
Returns the number of staight lines in the image.
Definition: Global.cpp:5