Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
BlackHat.cs
2
4{
8 public static partial class MorphologicalOperations
9 {
14 public static Matrix<float> BlackHat(this Matrix<float> M)
15 {
16 return M.BlackHat(3, 3, 0f, 1f);
17 }
18
24 public static Matrix<float> BlackHat(this Matrix<float> M, int NeighborhoodWidth)
25 {
26 return M.BlackHat(NeighborhoodWidth, NeighborhoodWidth, 0f, 1f);
27 }
28
35 public static Matrix<float> BlackHat(this Matrix<float> M, int NeighborhoodWidth,
36 int NeighborhoodHeight)
37 {
38 return M.BlackHat(NeighborhoodWidth, NeighborhoodHeight, 0f, 1f);
39 }
40
49 public static Matrix<float> BlackHat(this Matrix<float> M, int NeighborhoodWidth,
50 int NeighborhoodHeight, float MinThreshold, float MaxThreshold)
51 {
52 Matrix<float> Result = M.Close(NeighborhoodWidth, NeighborhoodHeight, MinThreshold, MaxThreshold);
53 Result.AbsoluteDifference(M);
54 return Result;
55 }
56
61 public static Matrix<int> BlackHat(this Matrix<int> M)
62 {
63 return M.BlackHat(3, 3, 0, 0x01000000);
64 }
65
71 public static Matrix<int> BlackHat(this Matrix<int> M, int NeighborhoodWidth)
72 {
73 return M.BlackHat(NeighborhoodWidth, NeighborhoodWidth, 0, 0x01000000);
74 }
75
82 public static Matrix<int> BlackHat(this Matrix<int> M, int NeighborhoodWidth,
83 int NeighborhoodHeight)
84 {
85 return M.BlackHat(NeighborhoodWidth, NeighborhoodHeight, 0, 0x01000000);
86 }
87
96 public static Matrix<int> BlackHat(this Matrix<int> M, int NeighborhoodWidth,
97 int NeighborhoodHeight, int MinThreshold, int MaxThreshold)
98 {
99 Matrix<int> Result = M.Close(NeighborhoodWidth, NeighborhoodHeight, MinThreshold, MaxThreshold);
100 Result.AbsoluteDifference(M);
101 return Result;
102 }
103 }
104}
Implements a Matrix, basic component for computations in Image Processing and Computer Vision.
Definition: Matrix.cs:12
Static class for Morphological Operations, implemented as extensions.
Definition: BlackHat.cs:9
static Matrix< int > BlackHat(this Matrix< int > M, int NeighborhoodWidth)
The absolute difference between an image, and its opening.
Definition: BlackHat.cs:71
static Matrix< float > BlackHat(this Matrix< float > M, int NeighborhoodWidth, int NeighborhoodHeight)
The absolute difference between an image, and its opening.
Definition: BlackHat.cs:35
static Matrix< float > BlackHat(this Matrix< float > M)
The absolute difference between an image, and its opening.
Definition: BlackHat.cs:14
static Matrix< float > BlackHat(this Matrix< float > M, int NeighborhoodWidth, int NeighborhoodHeight, float MinThreshold, float MaxThreshold)
The absolute difference between an image, and its opening.
Definition: BlackHat.cs:49
static Matrix< int > BlackHat(this Matrix< int > M)
The absolute difference between an image, and its opening.
Definition: BlackHat.cs:61
static Matrix< int > BlackHat(this Matrix< int > M, int NeighborhoodWidth, int NeighborhoodHeight)
The absolute difference between an image, and its opening.
Definition: BlackHat.cs:82
static Matrix< float > BlackHat(this Matrix< float > M, int NeighborhoodWidth)
The absolute difference between an image, and its opening.
Definition: BlackHat.cs:24
static Matrix< int > BlackHat(this Matrix< int > M, int NeighborhoodWidth, int NeighborhoodHeight, int MinThreshold, int MaxThreshold)
The absolute difference between an image, and its opening.
Definition: BlackHat.cs:96