OpenCV4Android - Image Blank After Using MorphologyEX

asked 2015-07-01 14:31:39 -0500

DDS_Mytheral gravatar image

updated 2015-07-07 08:05:41 -0500

So I'm attempting to get a BlackHat Morph of an image but after applying the Morph operation I'm getting a Blank image and I'm not sure why.


private coid convertToBlackHat( Mat passedImage )
        // Create a structuring element (SE)
    int morph_size = 100;
    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(); // result matrix
    // Apply the specified morphology operation
    Imgproc.morphologyEx( passedImage, dst, MORPH_TOPHAT, element, Point(-1,-1));   

    mBlackhatOutput = dst.clone();

The image is a 24-Bit jpeg at 1920x1080 with 100px circles on it.

edit retag flag offensive close merge delete