public static void show(Mat mat, Dimension frameSize, String frameTitle,
boolean resizable, int closeOperation) {
Imshow frame = new Imshow(frameTitle, frameSize.height, frameSize.width);
frame.setResizable(resizable);
/*
* This is a bad way to access the window, but due to legacy stuff I
* won't change the access patterns
*/
frame.Window.setDefaultCloseOperation(closeOperation);
frame.showImage(mat);
}