Commit 53c42f2f authored by Andy Regensky's avatar Andy Regensky
Browse files

Update perspective images on dependent changes

parent d66fceff
......@@ -72,14 +72,17 @@ class MainViewModel(QObject):
def setSensorSize(self, sensor_size):
self.sensor_size_mm = sensor_size
self.updateProjections()
self.updatePerspectiveImagesAsync()
def setSensorResolution(self, resolution):
self.sensor_size_px = resolution
self.updateProjections()
self.updatePerspectiveImagesAsync()
def setFocalLength(self, focal_length_mm):
self.focal_length_mm = focal_length_mm
self.updateProjections()
self.updatePerspectiveImagesAsync()
def setProjection(self, projection_key, calib_file=None):
if projection_key == 'calibrated' and calib_file is not None:
......@@ -297,9 +300,10 @@ class MainViewModel(QObject):
def updatePerspectiveImages(self):
self._perspective_images = []
self.didChange.emit()
perspective_images = []
for fisheye_image in self._fisheye_images:
image = imageio.imread(fisheye_image)
image = imageio.imread(fisheye_image)[:, :, :3]
scale_images = []
for scale in range(1, 11):
scale_images.append(self.interpolatePerspectiveImage(image, scale))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment