Example #1
0
 def makeFrameTransform(region, binning):
     """Make a transform that maps from image coordinates to whole-sensor coordinates,
     given the region-of-interest and binning used to acquire the image."""
     tr = SRTTransform3D()
     tr.translate(*region[:2])
     tr.scale(binning[0], binning[1], 1)
     return tr
Example #2
0
 def __init__(self, data, info):
     object.__init__(self)
     self._data = data
     self._info = info
     ## Complete transform maps from image coordinates to global.
     if 'transform' not in info:
         info['transform'] = SRTTransform3D(self.deviceTransform() *
                                            self.frameTransform())
Example #3
0
 def globalTransform(self):
     """Return the transform that maps this frame's image coordinates
     to global coordinates. This is equivalent to (deviceTransform * frameTransform).
     """
     return SRTTransform3D(self._info['transform'])
Example #4
0
 def frameTransform(self):
     """Return the transform that maps from this frame's image coordinates
     to its imager device coordinates. This transform takes into account
     the camera's region and binning settings.
     """
     return SRTTransform3D(self._info['frameTransform'])
Example #5
0
 def deviceTransform(self):
     """Return the transform that maps from imager device coordinates to global."""
     return SRTTransform3D(self._info['deviceTransform'])