Hi,I am trying to do histogram equalization using opencv java, but i keep getting Assertion failed (_src.type() == CV_8UC1) anyone can help?
this is my code
Mat doraImage= Imgcodecs.imread("C:/test/dora.jpg" , Imgcodecs.CV_LOAD_IMAGE_COLOR);
if(doraImage.channels() == 3) {
doraImage.convertTo(doraImage, Imgproc.COLOR_BGR2YCrCb);
else if(doraImage.channels() == 4) {
doraImage.convertTo(doraImage, Imgproc.COLOR_BGR2YCrCb);
}
Imgproc.equalizeHist(doraImage, doraImage);