Script execution

This commit is contained in:
gac-x04sa
2018-10-30 15:25:19 +01:00
parent 1e1237616f
commit 1c38d455ae

View File

@@ -19,14 +19,10 @@ class Image(DeviceBase, Readable):
filename = self.pixel.get_image_filename()
tmp_file = "/tmp/ls ..dat"
copyfile(filename, tmp_file)
commandDir = ""
unix(sprintf("dirname %s", IMAGE_MAC),commandDir)
if(index(commandDir,"\n") != 0:
commandDir = substr(commandDir,0,length(commandDir)-1)
unixCommand = "%s%s %s %d %d %d %d -median 30" % (commandDir,"/bin/image_get_int.py","/tmp/spec_image_info.dat", \
threshold1, threshold2, threshold3, threshold4)
#unixCommand = "%s%s %s %d %d %d %d -median 30" % (commandDir,"/bin/image_get_int.py","/tmp/spec_image_info.dat", \
# threshold1, threshold2, threshold3, threshold4)
ret = run("image_get_int.py", ["/tmp/spec_image_info.dat", threshold1, threshold2, threshold3, threshold4, "-median", 30])
(I_sum, area_I, thresh1_count, thresh2_count, thresh3_count, thresh4_count, I_sum_bgr, area_bgr) = ret
print ret
@@ -49,7 +45,7 @@ class Image(DeviceBase, Readable):
"""
def read():
def read(self):
pixel.get_image_filename()