Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_MAT returns empty Mat #399

Open
noblockhit opened this issue Sep 13, 2023 · 0 comments
Open

get_MAT returns empty Mat #399

noblockhit opened this issue Sep 13, 2023 · 0 comments

Comments

@noblockhit
Copy link

noblockhit commented Sep 13, 2023

I use CImg to load a NEF file, show it (which works perfectly fine) but then when i try to convert it to a mat for further inspection in opencv it silently fails and when i display the cv mat on screen i just get an empty gray window. This is the relevant snippet of code:


   CImg<float> image;
   image.load(img_path.c_str());
   Mat frameIn = image.get_MAT();
   Mat frameOut;
   cv::resize(frameIn, frameOut, cv::Size(), 0.25, 0.25);
   imshow("I", frameOut);

BTW: if i could convert it to an HBITMAP for the win32 application i want to actually display into afterwords could be sufficient using a couple workarounds on my side!

I do the resizing bcs the image is huge but it also doesnt work with showing it directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant