d91a666123809f191084b1c7199cd38c8e8f1be2,kraken/contrib/repolygonize.py,,,#,18

Before Change


    print(fname)
    seg = xml.parse_alto(fname)
    im = Image.open(seg["image"]).convert("L")
    im = Image.open(seg["image"]).convert("L")
    scal_im = _fixed_resize(im, (1200, 0))
    scale = np.divide(im.size, scal_im.size)
    scal_bls = scale_polygonal_lines([(x["baseline"], x["boundary"]) for x in seg["lines"]], 1/scale)
    scal_bls = [x[0] for x in scal_bls]

After Change


    for x in seg["lines"]:
        bl = x["baseline"] if x["baseline"] is not None else [0, 0]
        pl = x["boundary"] if x["boundary"] is not None else [0, 0]
        l.append((bl, pl))
    scal_bls = scale_polygonal_lines(l, 1/scale)
    scal_bls = [x[0] for x in scal_bls]
    o = calculate_polygonal_environment(scal_im, scal_bls)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: mittagessen/kraken
Commit Name: d91a666123809f191084b1c7199cd38c8e8f1be2
Time: 2020-03-04
Author: mittagessen@l.unchti.me
File Name: kraken/contrib/repolygonize.py
Class Name:
Method Name:


Project Name: rodluger/starry
Commit Name: 6ce0cc4d818237c431f80adef2196f4549469483
Time: 2021-02-18
Author: rodluger@gmail.com
File Name: tests/greedy/test_load.py
Class Name:
Method Name: test_load_normalization


Project Name: mittagessen/kraken
Commit Name: 4b5a73270f473a3ac35318484c0033886da92ff6
Time: 2020-03-04
Author: mittagessen@l.unchti.me
File Name: kraken/contrib/repolygonize.py
Class Name:
Method Name: