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

Why do I get reports of java.lang.UnsatisfiedLinkError from Market
Android Andengine Psyhics - relation between text and sprite in DynamicBody
Android Listview only shows one page and can't scroll down
determine wheteher android asset entry is a file or directory
Does Titanium is the best way for Mobile Developer?
Android Camera Server Died and Camera ERROR 100
Compass not working on some devices
AIDL and Messenger at the same time
Android listpreferences, how to save individual preference
Android cancel event when cancel button is pressed
Retrieve all Values of Checked Item in a custom Listview (Cursor Adapter)
Android: Force 480x320 screen resolution
Android c2dm how to work with turkish(all languages) characters?
Can't get successful Twitter login (using Twitter4J library) to redirect back to my Android app
two service with the same intent filter
Android 2.2 Click and Drag Image Centered Under Touch

Categories

HOME
httparty
microsoftgraph
adal
checkstyle
time-complexity
jmeter
phpmyadmin
datastore
solaris
vsm
python-multithreading
lanczos
recordrtc
fosrestbundle
little-proxy
openstreetmap
reactive-programming
fhir
capistrano3
coin3d
powershell-v5.0
dimensional-modeling
visual-glitch
cgbitmapcontext
imageresizer
mount
licensing
android-things
eviews
paragraph
mockjax
utorrent
playstation-portable
android-maps-extensions
fiware-cygnus
openerp-7
reason
salesforce-communities
git-rewrite-history
google-earth-engine
ideascript
metaprogramming
apache-stanbol
plaintext
laravel-elixir
datacachefactory
branching-and-merging
movilizer
print-css
oracle-service-bus
angular-http
puredata
ovf
arq
stdmap
qtranslate
static-cast
azure-cli
oracleclient
boo
arules
rackspace-cloud
gpg-signature
cpu-cache
offline.js
py2neo
bootstrap-tags-input
pacemaker
centrifuge
segment-io
ng-grid
cda
phpwebsocket
redis-cluster
beanstalk
jparsec
boomerang
terracotta
qt5.2
iokit
forwarding
evolus-pencil
sha512
keyup
telepat
mraid
bufferedinputstream
jquery-forms-plugin
fits
umlgraph
structuremap3
nsmenu
insight.database
websphere-esb
menubar
traceability
onload-event
server-administration
device-width
pyunit
josql
oracle-enterprise-linux
httponly
fitbounds
wiimote
msr
objective-j
undefined-index
globals
easyb
purepdf
mathematical-notation
leader

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