Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well, openCV ist not so strong in reading raw image files. You should give a try to FreeImage, which is an open source library, especially for raw image loading and converting e.g. tone mapping.

Since it is a Canon camera, what is the file size of the images? If these are 15+ megabytes, it should be a raw image with ending ".CR2" or ".CRW". So, what do you mean with "renaming of some other program?".

Try to make a copy of the image file and change it to ".CR2", for example. In FreeImage, which builds also upon LibRaw an image loading would be:

const std::string inpath = "input.cr2";
const FREE_IMAGE_FORMAT infif = FreeImage_GetFIFFromFilename(inpath.c_str());

FIBITMAP* dib = FreeImage_Load(infif, inpath.c_str());

A conversion to openCV is normally possible. For testing purposes you could write this image to disk and see whats happening...

Well, openCV ist not so strong in reading raw image files. You should give a try to FreeImage, which is an open source library, especially for raw image loading and converting e.g. tone mapping.

Since it is a Canon camera, what is the file size of the images? If these are 15+ megabytes, it should be a raw image with ending ".CR2" or ".CRW". So, what do you mean with "renaming of some other program?". program"?.

Try to make a copy of the image file and change it to ".CR2", for example. In FreeImage, which builds also upon LibRaw an image loading would be:

const std::string inpath = "input.cr2";
const FREE_IMAGE_FORMAT infif = FreeImage_GetFIFFromFilename(inpath.c_str());

FIBITMAP* dib = FreeImage_Load(infif, inpath.c_str());

A conversion to openCV is normally possible. For testing purposes you could write this image to disk and see whats happening...

Well, openCV ist not so strong in reading raw image files. You should give a try to FreeImage, which is an open source library, especially for raw image loading and converting e.g. tone mapping.

Since it is a Canon camera, what is the file size of the images? If these are 15+ megabytes, it should be a raw image with ending ".CR2" or ".CRW". So, what do you mean with "renaming of some other program"?.

Try to make a copy of the image file and change it to ".CR2", for example. In FreeImage, which builds also upon LibRaw an image loading would be:

const std::string inpath = "input.cr2"; 
const FREE_IMAGE_FORMAT infif = FreeImage_GetFIFFromFilename(inpath.c_str());

FreeImage_GetFIFFromFilename(inpath.c_str());

FIBITMAP* dib = FreeImage_Load(infif, inpath.c_str());

inpath.c_str());

A conversion to openCV is normally possible. For testing purposes you could write this image to disk and see whats happening...