def convert_to_jpeg(self, nparray):

        cvmat = cv.fromarray(nparray)
        cvmat = cv.EncodeImage(JPEG_EXTENSION, cvmat)
        return cvmat
Converts a numpy array to a jpeg cv2.Mat image.
dataset/ETHPy150Open GoogleCloudPlatform/appengine-opencv-sudoku-python/sudoku_image_parser.py/SudokuImageParser.convert_to_jpeg