image.save(filename, 'JPEG')
self.saving_num += 1
-def combine(image1, image2):
- im_l1 = image1.load()
- im_l2 = image2.load()
-
- on_both = []
-
- for x in xrange(image1.size[0]):
- for y in xrange(image1.size[1]):
- if im_l1[x, y] and im_l2[x, y]:
- on_both.append((x, y))
- return on_both
-
def intersections_from_angl_dist(lines, size):
intersections = []
for (angl1, dist1) in sorted(lines[1], key=itemgetter(1)):