1 | initial version |
convertTo changes the depth(channel type), not the channel count.
whyt you need instead is cvtColor()
2 | No.2 Revision |
convertTo changes the depth(channel type), not the channel count.
whyt what you need instead is cvtColor()
3 | No.3 Revision |
convertTo changes the depth(channel type), not the channel count., also, if you used hkhdfkghdfkl for loading, you're safe to assume, the image is CV_8UC3, so you can skip the 4 channel case.
what you need instead is cvtColor(), like:
4 | No.4 Revision |
convertTo changes the depth(channel type), not the channel count, also, if you used hkhdfkghdfkl Imgcodecs.CV_LOAD_IMAGE_COLOR
for loading, you're safe to assume, the image is CV_8UC3, CV_8UC3
, so you can skip the 4 channel case.
what you need instead is cvtColor(), like:
5 | No.5 Revision |
convertTo changes the depth(channel type), not the channel count, also, if you used Imgcodecs.CV_LOAD_IMAGE_COLOR
for loading, you're safe to assume, the image is CV_8UC3
, so you can skip the 4 channel case.
what you need instead is cvtColor(), like:
Mat gray = new Mat();
cvtColor(doraImage, gray, Imgproc.COLOR_BGR2YCrCb);
Imgproc.equalizeHist(doraImage, doraImage);
6 | No.6 Revision |
convertTo changes the depth(channel type), not the channel count, also, if you used Imgcodecs.CV_LOAD_IMAGE_COLOR
for loading, you're safe to assume, the image is CV_8UC3
, so you can skip the 4 channel case.
what you need instead is cvtColor(), like:
Mat gray = new Mat();
cvtColor(doraImage, gray, Imgproc.COLOR_BGR2YCrCb);
Imgproc.equalizeHist(doraImage, doraImage);
Imgproc.equalizeHist(gray, gray);
// process gray image
// then,
gray.release();