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

What does cv2.imwrite(SWTpath, (255-(255*SWTbib))) accomplish? #3

Open
adrian1906 opened this issue May 3, 2018 · 1 comment
Open

Comments

@adrian1906
Copy link

adrian1906 commented May 3, 2018

Hello,

I'm trying to understand this line located in bibtagger.py - run_swt_and_ocr()

@adrian1906 adrian1906 changed the title What does cv2.imwrite(SWTpath, (255-(255*SWTbib))) accomplish What does cv2.imwrite(SWTpath, (255-(255*SWTbib))) accomplish? May 3, 2018
@robertoarg78
Copy link

cv2.imwrite(file, content)

file is os.path.join(outdir,"{}3_SWTimage{}.jpg".format(i, name))

content is some image channel operation
out = ((image1 + image2) / scale + offset)
(255-(255*SWTbib))

just guessing, but I think you have a 0-1 image and want to invert it to 0-255 range. a 2-bit to gray image.

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