I am developing application for recognising Sudoku from paper and showing it on the screen. Since I am using OpenCV, I\'ve tried to convert Mat object to PNG image. I tried