Script execution
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#import ch.psi.pshell.device.DeviceBase as DeviceBase
|
||||
from startup import *
|
||||
import ch.psi.utils.Convert.toBidimensional as mono_to_bidi
|
||||
import ch.psi.utils.Convert.toDouble as toDouble
|
||||
import org.apache.commons.math3.linear.Array2DRowRealMatrix as Matrix
|
||||
|
||||
|
||||
@@ -13,8 +14,8 @@ class CamToolImage(ReadableMatrix):
|
||||
|
||||
def read(self):
|
||||
raw = self.camtool.data.read()
|
||||
return Matrix(mono_to_bidi(raw, self.getHeight(), self.getWidth())).transpose().getData() #data is transposed
|
||||
#return mono_to_bidi(raw, self.getWidth(), self.getHeight())
|
||||
#return Matrix(toDouble(mono_to_bidi(raw, self.getHeight(), self.getWidth()))).transpose().getData() #data is transposed
|
||||
return mono_to_bidi(raw, self.getWidth(), self.getHeight())
|
||||
|
||||
def getWidth(self):
|
||||
return self._width
|
||||
|
||||
Reference in New Issue
Block a user