Closedown
This commit is contained in:
@@ -2,7 +2,10 @@ from jeputils import *
|
||||
|
||||
def img_get_int(fname, thres1, thres2, thres3, thres4, header, width, height, depth, x1,y1,x2,y2, bx1,by1,bx2,by2 ):
|
||||
ret = call_jep("cpython/image_functions", "img_get_int", [fname, thres1, thres2, thres3, thres4, header, width, height, depth, x1,y1,x2,y2, bx1,by1,bx2,by2])
|
||||
return ret
|
||||
#return ret
|
||||
#TODO: Why I_sum ans I_sum_bgr are strings?
|
||||
(I_sum, area_I, thresh1_count, thresh2_count, thresh3_count, thresh4_count, I_sum_bgr, area_bgr) = ret
|
||||
return (int(I_sum), area_I, thresh1_count, thresh2_count, thresh3_count, thresh4_count, int(I_sum_bgr), area_bgr)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -49,13 +49,13 @@ class Image(DeviceBase, Readable):
|
||||
tmp_file = self.pixel.image_root_folder + "tmp/spec_image_info.dat"
|
||||
copyfile(filename, tmp_file)
|
||||
|
||||
return img_get_int(tmp_file, threshold1, threshold2, threshold3, threshold4, \
|
||||
ret = img_get_int(tmp_file, threshold1, threshold2, threshold3, threshold4, \
|
||||
self.pixel.IMAGE_HEADER_LENGTH, self.pixel.PIX_XDIM, self.pixel.PIX_YDIM,self.pixel.PIX_COLOR_DEPTH, \
|
||||
self.roi[0], self.roi[1], self.roi[2], self.roi[3], self.broi[0], self.broi[1], self.broi[2], self.broi[3])
|
||||
|
||||
print ret
|
||||
self.setCache(ret)
|
||||
return I_sum
|
||||
self.setCache(ret, None)
|
||||
return ret
|
||||
|
||||
def read(self):
|
||||
(I_sum, area_I, thresh1_count, thresh2_count, thresh3_count, thresh4_count, I_sum_bgr, area_bgr) = self.get_int()
|
||||
|
||||
Reference in New Issue
Block a user