File size: 381 Bytes
d3b88f5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import cv2
import numpy as np
import plasma.functional as f


class TableRestore(f.Pipe):

    def __init__(self):
        super().__init__()
    
    def run(self, tables, ratio):
        new_tables = []
        for table in tables:
            new_table = [(coordinate / ratio) for coordinate in table]
            new_tables.append(new_table)
        return np.array(new_tables)