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.
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
Post a Comment