Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Contrast.cs
3
5{
9 public static partial class TransformationOperations
10 {
15 public static void Contrast(this Matrix<float> M)
16 {
17 M.Range(out float Min, out float Max);
18 M.Contrast(Min, Max);
19 }
20
27 public static void Contrast(this Matrix<float> M, float Min, float Max)
28 {
29 M.ScalarLinearTransform(-Min, 1f / (Max - Min), 0);
30 }
31
36 public static void Contrast(this Matrix<int> M)
37 {
38 M.Range(out int Min, out int Max);
39 M.Contrast(Min, Max);
40 }
41
48 public static void Contrast(this Matrix<int> M, int Min, int Max)
49 {
50 M.ScalarLinearTransform(-Min, 0x01000000, Max - Min, 0);
51 }
52 }
53}
Implements a Matrix, basic component for computations in Image Processing and Computer Vision.
Definition: Matrix.cs:12
Static class for Transformation Operations, implemented as extensions.
Definition: Contrast.cs:10
static void Contrast(this Matrix< float > M)
Improves contrast by maximizing the range of visible values.
Definition: Contrast.cs:15
static void Contrast(this Matrix< int > M)
Improves contrast by maximizing the range of visible values.
Definition: Contrast.cs:36
static void Contrast(this Matrix< float > M, float Min, float Max)
Improves contrast by setting the range of visible values.
Definition: Contrast.cs:27
static void Contrast(this Matrix< int > M, int Min, int Max)
Improves contrast by setting the range of visible values.
Definition: Contrast.cs:48