Ask Your Question

acevans's profile - activity

2016-01-26 03:23:20 -0500 commented answer depth() and channel() function return incorrect values

But what I dont get is why a greyscale image was loaded with 3 channels. The picture properties show 'Bit depth' as 8 bits so clearly there is just one channel. Why does opencv load it "unchanged" with 3 channels ?

2016-01-25 11:05:38 -0500 commented answer depth() and channel() function return incorrect values

I do have one more question though... I loaded a greyscale image but it showed 3 channels. Why would a greyscale image need 3 channels ? I know this isnt connected to opencv... just curious.

2016-01-25 05:43:35 -0500 received badge  Scholar (source)
2016-01-25 05:39:05 -0500 commented answer depth() and channel() function return incorrect values

Thanks. I got it now. I was just checking it against the properties window and it showed 'Bit Depth 32'. Now I get it that it meant 32 bits alltogether for all channels.

2016-01-25 05:34:28 -0500 commented question depth() and channel() function return incorrect values

Sorry I meant CV_32S.... that would be a 4. I just wanted to read the depth so I code use it later in my code maybe.

2016-01-25 04:57:50 -0500 received badge  Editor (source)
2016-01-25 04:55:44 -0500 asked a question depth() and channel() function return incorrect values

Hi,

I am a newbie with opencv. I am using opencv3.1. I was reading the depth and channles of images but it returns weird values.

Here is my code:

string filepath = "C:/Users/studentlab/Desktop/koora/opencv-logo.png";
cv::Mat image_1= cv::imread(filepath.data(),CV_LOAD_IMAGE_UNCHANGED);
int DEPTH = image_1.depth();
int CHANNELS=image_1.channels();

The depth should be 4(CV_32U) but it reads 0(CV_8U). And the channels reads 4 for every image(i tried checking it for a greyscale image too). Can someone point out my mistake ?

I am using Qt Creator on Windows(64 bit) with MinGW(32 bit).

2016-01-04 05:26:21 -0500 commented answer Not able to build OpenCV3-RC1 with 'Debug' build type

Actually it did help. But I get other warnings now.

c:\mingw\include\strsafe.h:987:10: error: 'dwFlags' was not declared in this scope

2016-01-04 05:26:21 -0500 commented answer Not able to build OpenCV3-RC1 with 'Debug' build type

I have the same problem. adding your(chinadragon) piece of code did not help. Any other suggestions ?

2016-01-04 05:12:45 -0500 received badge  Supporter (source)