def build_operator(win, imgset, fname): """ This function is meant to build first level operators win - window file path imgset - image set file path fname - output operator file """ ensemble.trios_build(win, imgset, fname) return 1
def main(trainset, window, image, savetodir): output = savetodir+"temp.xpl" fname = savetodir+"operator" #building the xpl file ensemble.build_xpl(trainset,window,output) #writing minterm file to disk ensemble.trios_build_mtm(window, trainset, savetodir+"mintermfile.mtm") #building an operator with trios_build tool ensemble.trios_build(window, trainset, fname) result_img = savetodir+"Image_applied" #applying the operator on the image ensemble.apply_operator(savetodir+"operator", image, result_img)