java - OpenImaj AdaptiveLocalThresholdContrast null pointer exception -


i'm trying learn how use openimaj's adaptivelocalthresholdcontrast thresholder process image 2 "segments" , view processed image. when run following code:

adaptivelocalthresholdcontrast thresholder = new adaptivelocalthresholdcontrast(10); mbfimage input = imageutilities.readmbf(new file("/path/to/file.jpg")); fimage flat = input.flatten(); displayutilities.display(flat); thresholder.processimage(flat); displayutilities.display(flat); 

the original (flattened) image displayed, , following null pointer exception @ line thresholder.processimage(flat):

exception in thread "main" java.lang.nullpointerexception @ org.openimaj.image.processing.threshold.adaptivelocalthresholdcontrast.processimage(adaptivelocalthresholdcontrast.java:74) 

i looked @ source code adaptivelocalthresholdcontrast @ line 74, it's not clear me what's causing null pointer exception. appreciated.

http://www.openimaj.org/openimaj-image/image-processing/xref/org/openimaj/image/processing/threshold/adaptivelocalthresholdcontrast.html

hmm, that's bug (probably result of refactoring @ point - sorry). should fixed in source (https://github.com/openimaj/openimaj/commit/2f247e4ab0f7da02713e8545d4ac153aa08070b8) & available in latest "1.4-snapshot" version of jars.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -