Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove line throws nullpointer #8

Closed
ghost opened this issue Nov 30, 2016 · 2 comments
Closed

remove line throws nullpointer #8

ghost opened this issue Nov 30, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 30, 2016

I have an scanned document from which i am trying to remove lines. I am getting Nullpointer as
Leptonica1.pixThresholdToBinary(pixs, 170) returns Null (in LeptUtils.removeLines method . line 107).

if i try with the image available in test_data i.e. dave-orig.png everything works fine.

Any idea what could be the reason ?

@nguyenq
Copy link
Owner

nguyenq commented Nov 30, 2016

Make sure the input image is grayscale.

@nguyenq nguyenq closed this as completed Jun 12, 2017
@braj302019
Copy link

braj302019 commented Oct 4, 2018

Thanks its working after converting image to gray scale.

Sample code:
Pix grayPix = Leptonica1.pixConvertRGBToGrayFast(pixs);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants