Accord.Imaging.MatrixH.MatrixH C# (CSharp) Method

MatrixH() public method

Creates a new projective matrix.
public MatrixH ( float elements ) : System
elements float
return System
        public MatrixH(float[] elements)
        {
            if (elements.Length == 8)
            {
                this.elements = elements;
            }
            else if (elements.Length == 9)
            {
                this.elements = new float[8];
                for (int i = 0; i < elements.Length; i++)
                    this.elements[i] = (float)(elements[i] / elements[8]);
            }
            else
            {
                throw new ArgumentException("The element vector should contain either 8 or 9 members.", "elements");
            }
        }

Same methods

MatrixH::MatrixH ( ) : System
MatrixH::MatrixH ( double matrix ) : System
MatrixH::MatrixH ( float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32 ) : System
MatrixH::MatrixH ( float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33 ) : System