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

Use CV_8UC1 type create a single channel image, but actually create a 3 channel image. #153

Open
yuzu-ogura opened this issue Oct 21, 2024 · 0 comments

Comments

@yuzu-ogura
Copy link

yuzu-ogura commented Oct 21, 2024

cv::Mat grayImage(height, width, CV_8UC1, cv::Scalar(128));
cv::imwrite("output_gray.bmp",grayImage);

Actually, image file output_gray.bmp is a 3channel image file.
Is my usage correct?

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