Reputation: 1101
I capture a raw image from a grayscale camera. When I transfer the image to OpenCV's IplImage and use cvSaveImage("image.jpg",image)
, the image is saved with a size of around 160K. Whereas, if I use fwrite
function in C to save the image buffer in .pgm
format, the saved image size is 1.4M.
My question is:
Does cvSaveImage()
compress the image into the specified format while saving? Actually, I am working on a smart camera with ARM platform and I want to avoid the overhead of cross-compiling OpenCV for ARM. How can I compress this image to .jpg
without using cvSaveImage
, but rather using C functions?
Upvotes: 2
Views: 1634