Skip to content
Snippets Groups Projects
Commit 3abc0a44 authored by smayer's avatar smayer
Browse files

Added sketch for tiling algorithm.

parent c048ae96
Branches
No related tags found
No related merge requests found
from scan import *
class Tile:
def __init__(self, side_length=100, top_left=(0, 0), roi=(0, 0, 100, 100), img_names=None):
self.side_length = side_length
self.top_left = top_left
self.roi = roi
self.img_names = img_names
def draw(self):
if self.img_names is None:
raise EmptyTileError
pass
def load_image(self, img_name, directory):
pass
def move(self):
if self.is_out_of_roi():
raise OutOfBoundsError
def is_out_of_roi(self):
pass
def has_overlap(self, vertices):
pass
def check_intersections(self, data):
pass
class EmptyTileError(Exception):
pass
class OutOfBoundsError(Exception):
pass
if __name__ == '__main__':
with open('10pct_stitch_data.json', 'r') as fp:
all_comp = json.load(fp)
print(get_roi(all_comp))
scaled_all = scale_data(all_comp, 10)
for dat in all_comp:
print(dat)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment