So, I'm trying to get a BlackHat Morph image, but after applying the Morph operation, I get a blank image, and I'm not sure why.
private coid convertToBlackHat( Mat passedImage )
{
int morph_size = 2;
Mat element = Imgproc.getStructuringElement( Imgproc.MORPH_RECT, new Size( 2*morph_size + 1, 2*morph_size+1 ), new Point( morph_size, morph_size ) );
Mat dst = new Mat();
Imgproc.morphologyEx( passedImage, dst, MORPH_TOPHAT, element, Point(-1,-1));
mBlackhatOutput = dst.clone();
}
The image is a 24-bit jpeg in 1920x1080 with circles of 100 pixels on it.
source
share