Closedown

This commit is contained in:
gac-x04sa
2018-10-30 17:58:58 +01:00
parent 5adf25cbd1
commit e80afad377

View File

@@ -15,4 +15,11 @@ def img_get_int(fname, thres1, thres2, thres3, thres4, header, width, height, d
# background roi
I_sum_bgr = img[by1:by2, bx1:bx2].sum()
area_bgr= (bx2 - bx1 + 1) * (by2 - by1 + 1)
return (I_sum, area_I, thresh1_count, thresh2_count, thresh3_count, thresh4_count, I_sum_bgr, area_bgr)
return (I_sum, area_I, thresh1_count, thresh2_count, thresh3_count, thresh4_count, I_sum_bgr, area_bgr)
def img_read(fname, header, width, height, depth):
img = numpy.fromfile(fname, dtype=numpy.uint32)
img.shape = height, width
return img