What does cv2.imwrite(SWTpath, (255-(255*SWTbib))) accomplish?
adrian1906 opened this issue · 1 comments
adrian1906 commented
Hello,
I'm trying to understand this line located in bibtagger.py - run_swt_and_ocr()
robertoarg78 commented
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.