changed internal system to use Mat everywhere

converting to jfx-image only for gui, brings speedup ~120%