Package Jama

Examples of Jama.Matrix.inverse()


                        cameraRGBWB[j][i] *= wb[i];

                Matrix B = new Matrix(ColorScience.chromaticAdaptation(daylightTemperature, originalTemperature, caMethod));
                Matrix combo = XYZtoRGB.times(B.times(RGBtoZYX));

                cameraRGBWB = combo.inverse().times(new Matrix(cameraRGBWB)).getArrayFloat();
            }
           
            cameraRGBCA = dcRaw.getCameraRGB();
            dcRaw.getDaylightMultipliers();

View Full Code Here


        for (int i = 0; i < 3; i++)
            for (int j = 0; j < 3; j++)
                mdata[i][j] = rgbXYZ[i][j];
        Matrix XYZRGB = new Matrix(mdata);

        float[][] S = new Matrix(new double[][] {{wtptXYZ[0], wtptXYZ[1], wtptXYZ[2]}}).times(XYZRGB.inverse()).getArrayFloat();

        return new float[][] {
            {S[0][0] * rgbXYZ[0][0], S[0][0] * rgbXYZ[0][1], S[0][0] * rgbXYZ[0][2]},
            {S[0][1] * rgbXYZ[1][0], S[0][1] * rgbXYZ[1][1], S[0][1] * rgbXYZ[1][2]},
            {S[0][2] * rgbXYZ[2][0], S[0][2] * rgbXYZ[2][1], S[0][2] * rgbXYZ[2][2]}
 
View Full Code Here

            {0, sXYZ[1] / tXYZ[1], 0},
            {0, 0, sXYZ[2] / tXYZ[2]}
        };

        // total tansform
        return B.times(new Matrix(diag)).times(B.inverse()).getArrayFloat();
    }

    public static double saturation(double r, double g, double b) {
        double min = Math.min(r, Math.min(g, b));
        double max = Math.max(r, Math.max(g, b));
View Full Code Here

        X.set(i, j, (Math.pow((4 * ((double) i + 1) - 1) / (2 * (double) K), j)));
      }
    }
    Xt = X.transpose();
    square = Xt.times(X);
    square = square.inverse();
    //System.out.println("calcConst "+square.get(0,0));
    return (.645 * square.get(0, 0));
  }

  /**
 
View Full Code Here

        X.set(i, j, (Math.pow((4 * ((double) i + 1) - 1) / (2 * (double) K), j)));
      }
    }
    Xt = X.transpose();
    square = Xt.times(X);
    square = square.inverse();
    //System.out.println("calcConst "+square.get(0,0));
    return (.645 * square.get(0, 0));
  }

  /**
 
View Full Code Here

            final Matrix reference = new Matrix(elements, numCol).transpose();
            if (!(reference.det() >= DETERMINANT_THRESHOLD)) {
                continue; // To close to a singular matrix - search an other one.
            }
            final MatrixSIS matrix = Matrices.create(numRow, numCol, elements);
            assertEqualsJAMA(reference.inverse(), matrix.inverse(), TOLERANCE);
        }
    }

    /**
     * Tests matrix serialization.
View Full Code Here

            try_success("LUDecomposition...", "");
        } catch (java.lang.RuntimeException e) {
            errorCount = try_failure(errorCount, "LUDecomposition...",
                    "incorrect LU decomposition calculation");
        }
        X = A.inverse();
        try {
            check(A.times(X), Matrix.identity(3, 3));
            try_success("inverse()...", "");
        } catch (java.lang.RuntimeException e) {
            errorCount = try_failure(errorCount, "inverse()...",
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.