Skip to content

BoofCV on Android - threshold() returns black image #27

@SherMish

Description

@SherMish
        Bitmap blurredBitmap = GaussianBlur.with(sApp.getApplicationContext()).radius(5).render(R.drawable.test_img_divider);
        GrayU8 imageGray = ConvertBitmap.bitmapToGray(blurredBitmap,(GrayU8) null, null);
        GrayU8 imageThreshold = GThresholdImageOps.threshold(imageGray, null, GThresholdImageOps.computeEntropy(imageGray, 0, 255), true);

        Bitmap output = Bitmap.createBitmap(imageThreshold.width, imageThreshold.height, Bitmap.Config.ARGB_8888);
        ConvertBitmap.grayToBitmap(imageThreshold, output, null); // output is totally black.

R.drawable.test_img_divider:
test_img_divider

blurredBitmap:
image

imageGray(after it was converted to bitmap):
image

output:
image

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions