android


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.

Related Links

Android Amazon S3 exception: “The specified key does not exist”
2D List with RecyclerView in HorizontalScrollView
Clarification regarding Pending Intent
ANDROID Rendering problems NullException
MVC Web API Call From Android Application
Exporting a writable database to the SD card and importing to Visual Studio
Google Api Client Media Router is not getting connected after disconnecting in Chromecast
how to upload files using retrofit?
Cursor in sqlite remaining in -1 position
How to get value while onProgressUpdate AsyncTask from another class?
Image View is opening a wrong image when clicked on thumbnail image in grid view android
How to check availability and length of new data through Android Volley
Download service and update another activity
Stripe integration in Android Eclipse
When is implementing RecyclerView absolutely necessary?
Formatting Menu for Edittext in Android

Categories

HOME
phantom-dsl
hyperlink
paraview
rdbms
switch-statement
pearson-correlation
character
bing-maps
32bit-64bit
owin
comsol
flash-player
magnetic-cards
selectize.js
symbol
altera
internationalization
entitymanager
sigma.js
ember-cli
object-storage
rpgle
openmdao
finagle
custom-controls
eviews
deltaspike
r-grid
laravel-eloquent
nested-lists
apic
node-mssql
recurrent-neural-network
resolution
importerror
rfc3339
fwrite
openal
sonarlint-eclipse
facebook-pixel
payara-micro
aquamacs
context-sensitive-grammar
template-toolkit
rsa-archer-grc
vcloud-director-rest-api
taocp
pacemaker
adafruit
watch-os-2
neon
windows-azure-queues
rspec2
avspeechsynthesizer
xdoclet
firebase-security
http-status-code-401
query-by-example
beanstalk
qbxml
java-money
roadkill-wiki
django-urls
doctype
wso2greg
nutiteq
actionfilterattribute
rapidsvn
packet-sniffers
uncaught-typeerror
mruby
imagefilter
nsmenu
jqmodal
template-deduction
personalization
mintty
lnk
gwt-openlayers
kogrid
cffile
android-icons
midlet
uimanageddocument
web-farm
apache-whirr
usertype
screen-size
pylucene
cdonts
luajava
application-verifier
tabpanel
pagemethods
complex-event-processing
xpsdocument
localizable.strings
application-planning
linfu-dynamicproxy
contentpresenter
commercial-application

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App