bib-tagger
bib-tagger copied to clipboard
What does cv2.imwrite(SWTpath, (255-(255*SWTbib))) accomplish?
Hello,
I'm trying to understand this line located in bibtagger.py - run_swt_and_ocr()
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.