m.cutUnloaded() thres1 = 35 N1=20 thres2 = 20 N2 = 10 errorList=[] for a in m: try: print '-----------------------------------------------' print a.dataTime print 'thres, N:', thres1, N1 if scale>0: print 'scale:', scale a1 = lf.thresholding(a, thres=thres1, N=N1, newObject=True, scale=scale, showImage=False) a1.imagePath = '/media/KINGSTON/ARMOR/python/armor/geometry/' +\ a.name + '_threshold' + str(thres1) + '_N' + str(N1) + '.png' if scale > 0: a1.imagePath = a1.imagePath[:-4] + '_scale' + str(scale) + a1.imagePath[-4:] print 'saving image:', a1.imagePath a1.saveImage() print 'thres, N:', thres2, N2 a2 = lf.thresholding(a, thres=thres2, N=N2,scale=scale, newObject=True, showImage=False) a2.imagePath = '/media/KINGSTON/ARMOR/python/armor/geometry/' +\ a.name + '_threshold' + str(thres2) + '_N' + str(N2) + '.png' if scale > 0: a2.imagePath = a2.imagePath[:-4] + '_scale' + str(scale) + a2.imagePath[-4:] print 'saving image:', a2.imagePath a2.saveImage()
########################################## # defining the parameters #r = 30 #sigma = 5 #r = 50 #sigma = 10 r=30 sigma=5 ######################################## # analysing w1 = lf.thresholding(w, thres=30, N=15, scale=4, operator='opening') k1 = lf.thresholding(k, thres=30, N=15, scale=20,operator='closing') #w_coords = w.features[1]['coordinates'] #k_coords = k.features[1]['coordinates'] ww = w.getWindow(*w.features[1]['coordinates']) kk = k.getWindow(*k.features[1]['coordinates']) ww.show() kk.show() #ww1 = w.above(20) #kk1 = k.above(20) ######################################### # can't do this straight, need to fix the grids - need arrays of the same sizes