8d0d0c7a6db3904f0222cbe058388a92cf21a548,calamari_ocr/ocr/dataset/imageprocessors/center_normalizer.py,CenterNormalizer,dewarp,#CenterNormalizer#,43

Before Change


        // The actual image img is embedded into a larger image by
        // adding vertical space on top and at the bottom (padding)
        hpadding = r // this is large enough
        padded = np.vstack([cval * np.ones((hpadding, w)), img, cval * np.ones((hpadding, w))])
        center = center + hpadding
        dewarped = [padded[center[i] - r:center[i]+r, i] for i in range(w)]
        dewarped = np.array(dewarped, dtype=dtype).T

After Change


            // Empty image
            return img

        if img.ndim > 2:
            temp = (cv.cvtColor(img, cv.COLOR_BGR2GRAY) / 255).astype(dtype)
        else:
            temp = (img / 255).astype(dtype)
        temp = np.amax(temp) - (temp)
        amax = np.amax(temp)
        if amax == 0:
            // white image
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: Calamari-OCR/calamari
Commit Name: 8d0d0c7a6db3904f0222cbe058388a92cf21a548
Time: 2021-02-06
Author: ChWick@users.noreply.github.com
File Name: calamari_ocr/ocr/dataset/imageprocessors/center_normalizer.py
Class Name: CenterNormalizer
Method Name: dewarp


Project Name: D2KLab/entity2rec
Commit Name: 23ee13aef276de7ad726eb4825e201d3c885c008
Time: 2018-01-25
Author: enricopalumbo0@gmail.com
File Name: entity2rec/entity2rec.py
Class Name: Entity2Rec
Method Name: content_similarities


Project Name: scikit-image/scikit-image
Commit Name: 1cc277630f2381f2ba0f01dcf833801a830f5c3b
Time: 2020-08-04
Author: rfezzani@gmail.com
File Name: skimage/metrics/_contingency_table.py
Class Name:
Method Name: contingency_table