J
J
Julia2017-07-02 23:14:38
C++ / C#
Julia, 2017-07-02 23:14:38

Why is the picture black and white?

Hi all..

string filename = " Image4.jpg";

    Mat img = imread(filename, 0);
    cvNamedWindow("original");
    cv::imshow("original", img);

I'm new to OpenCv and don't understand why the image is shown in black and white even though it's in color.
And how do you color it?
Thanks for the help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
devalone, 2017-07-02
@Julila

Here it says docs.opencv.org/2.4/modules/highgui/doc/reading_an...
pass CV_LOAD_IMAGE_ANYDEPTH as the second parameter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question