I want to read grayscale jpg image stored using opencv. OpenCV code is
im = cv2.imread("cat.jpg", cv2.CV_8UC1)
im = cv2.resize(im, (224, 224))
cv2.imwrite("cat_8uc1.jpg", im)
I want to read this image as below
uint8_t image[294][294] = { all image data }
Do I need to convert this .jpg image into another format and use?
I want to read this image into 2D array/matrix in C not using any library.
Any Leads will be very helpful.