Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmirgut committed Apr 9, 2017
1 parent cf15439 commit efbdde5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
6 changes: 5 additions & 1 deletion bb_stitcher/scripts/bb_rect_stitcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
import os

import cv2

import bb_stitcher.core as core


def process_images(args):

name_l = os.path.splitext(os.path.basename(args.left))[0]
Expand All @@ -20,6 +22,7 @@ def process_images(args):
pano = rect_stitcher.compose_panorama(image_left, image_right)
cv2.imwrite(pano_basename, pano)


def main():
parser = argparse.ArgumentParser(
prog='BeesBook Rectangle Stitcher.',
Expand All @@ -37,5 +40,6 @@ def main():
args = parser.parse_args()
process_images(args)


if __name__ == '__main__':
main()
main()
2 changes: 1 addition & 1 deletion bb_stitcher/stitcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_parameters(self):
Use this function if you estimated the transform and did not want to estimate the parameters
"""
return self.homo_left, self.homo_right, self.homo_world,\
self.size_left, self.size_right,self.pano_size
self.size_left, self.size_right, self.pano_size

def estimate_transform(self, image_left, image_right, angle_left=0, angle_right=0):
"""Estimate transformation/homography of the left and right images/data to form a panorama.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'with an affine transformation',
long_description='',
entry_points={
'console_scripts':[
'console_scripts': [
'bb_rect_stitcher = bb_stitcher.scripts.bb_rect_stitcher:main'
]

Expand Down
13 changes: 5 additions & 8 deletions tests/test_stitcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,8 @@ def mockreturn(myself, image_list, all):
monkeypatch.setattr(bb_stitcher.picking.picker.PointPicker, 'pick', mockreturn)
monkeypatch.setitem(__builtins__, 'input', lambda x: "348")
fb_stitcher.estimate_transform_to_world(left_img['img'], right_img['img'])
points_left = fb_stitcher.map_left_points(left_img['detections'], world=True)
points_right = fb_stitcher.map_right_points(right_img['detections'], world=True)
points_left2, angles_left = fb_stitcher.map_left_points_angles(left_img['detections'],
left_img['yaw_angles'],
world=True)
points_right2, angles_tight = fb_stitcher.map_right_points_angles(right_img['detections'],
right_img['yaw_angles'],
world=True)
fb_stitcher.map_left_points(left_img['detections'], world=True)
fb_stitcher.map_right_points(right_img['detections'], world=True)
fb_stitcher.map_left_points_angles(left_img['detections'], left_img['yaw_angles'], world=True)
fb_stitcher.map_right_points_angles(right_img['detections'], right_img['yaw_angles'],
world=True)

0 comments on commit efbdde5

Please sign in to comment.