Ask Your Question

Revision history [back]

Convert JavaFX image to openCV Mat

Hi!

I'm trying to convert an Image from JavaFX to a Mat structure. I can't find a solution, can anyone help me please?

I want to write a method like this:

public Mat fromImageToMat(Image i){
        Mat out=new Mat((int)i.getWidth(), (int)i.getHeight(), CvType.CV_8UC3);
        ....
        return out;
    }

Thank you!!! :)