adaptiveThreshold getting blank (full white) image
I want to apply adaptiveThreshold using open cv library to my bitmap image, but once i do with following code, it shows blank (full white) image, please help me to resolve it. following is code: Mat grayMat = imread(getImageUri(this, photo).getPath(), IMREAD_GRAYSCALE); Mat resultMat = new Mat(); Imgproc.adaptiveThreshold(grayMat, resultMat, 255, Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY, 3, 40); Bitmap imgBitmap = Bitmap.createBitmap(resultMat.cols(), resultMat.rows(), Bitmap.Config.ARGB_8888);
Add following line after init. bitmap Utils.matToBitmap(resultMat, imgBitmap); and load imgBitmap to your ImageView, I hope this will solve your problem.
How to calculate multiplication of 2 values that is coming from another activity using Intent in android?
How can update the Realm DB when the JSON updates
How to return only first result hit from Google Drive?
How to pass data from an activity to a fragment in TabHost?
pjsip2 issue during build
Captured image cropping issue
Tweets are not posted using Fabric
How to root Genymotion Android Emulator?
cannot run emulator in android studio and in genymotion
What is the meaning of switchSearch() method, KWS_SEARCH attribute, and parameter of startListening() method, in the demo project?
Adding onClick to RecyclerView Android [duplicate]
RecyclerView Hide behind AppbarLayout?
How to display image with intent.ACTION_VIEW
NDK Error occured while importing telegram source code from github
Picking only images from gallery Android
Getting thread error in ui automation android