bib-tagger icon indicating copy to clipboard operation
bib-tagger copied to clipboard

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

Open adrian1906 opened this issue 6 years ago • 1 comments

Hello,

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

adrian1906 avatar May 03 '18 20:05 adrian1906

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.

robertoarg78 avatar Sep 10 '18 11:09 robertoarg78