//--------------------------------------------------------------------------------------------------------------
        //Приведение матрицы фаз к диапазону 0..255 ( уровень серого )
        public static RealMatrix TrnsformPhaseMatrixToGrayScaleMatrix(RealMatrix matrix)
        {
            Interval <double>     startInterval     = new Interval <double>(0, 2 * Math.PI);
            Interval <double>     finishInterval    = new Interval <double>(0, 255);
            RealIntervalTransform intervalTransform = new RealIntervalTransform(startInterval, finishInterval);
            RealMatrix            scaledMatrix      =
                RealMatrixValuesTransform.TransformMatrixValues(matrix, intervalTransform);

            return(scaledMatrix);
        }
Esempio n. 2
0
        //-----------------------------------------------------------------------------------------------------
        //Логарифмическое преобразование
        public static RealMatrix[] GetLogTransforms(RealMatrix[] matrices, double coefficient)
        {
            LogTransform logTransform = new LogTransform(coefficient);

            RealMatrix[] newMatrices = new RealMatrix[matrices.Length];
            for (int index = 0; index < matrices.Length; index++)
            {
                RealMatrix matrix    = matrices[index];
                RealMatrix newMatrix = RealMatrixValuesTransform.TransformMatrixValues(matrix, logTransform);
                newMatrices[index] = newMatrix;
            }
            return(newMatrices);
        }
Esempio n. 3
0
        //----------------------------------------------------------------------------------------------
        //----------------------------------------------------------------------------------------------
        //Привести матрицы к диапазону
        public static RealMatrix[] TransformMatricesValuesToFinishIntervalValues(
            Interval <double> finishInterval,
            params RealMatrix[] matrices
            )
        {
            RealMatrix[] newMatrices = new RealMatrix[matrices.Length];

            for (int index = 0; index < matrices.Length; index++)
            {
                RealMatrix matrix    = matrices[index];
                RealMatrix newMatrix =
                    RealMatrixValuesTransform.TransformMatrixValuesToFinishIntervalValues
                        (matrix, finishInterval);
                newMatrices[index] = newMatrix;
            }
            return(newMatrices);
        }