8 public static partial class ChannelOperations
19 int SrcOffset = M.
Start;
23 byte[] Dest =
new byte[w * h];
25 for (y = 0; y < h; y++, SrcOffset += SrcSkip)
27 for (x = 0; x < w; x++)
28 Dest[DestOffset++] = (
byte)(Src[SrcOffset++] >> 16);
44 throw new ArgumentException(
"Unsupported type: " + M.GetType().FullName, nameof(M));
static Matrix< byte > BlueChannel(this Matrix< uint > M)
Creates a matrix of pixel blue channel values.
static IMatrix BlueChannel(this IMatrix M)
Creates a matrix of pixel blue channel values.
Implements a Matrix, basic component for computations in Image Processing and Computer Vision.
int Height
Height of matrix (number of rows)
T[] Data
Underlying data on which the matrix is defined.
int Width
Width of matrix (number of columns)
int Skip
Number of elements to skip from the right edge in the underlying data to the left edge of the new row...
int Start
Start offset of matrix in underlying data.