def captureFrameforAnalysis(self): try: self.mydatasetlist.get(self.mydatasetlist.curselection()) datasetName = self.mydatasetlist.get(self.mydatasetlist.curselection()) dataset_path = "binData/"+datasetName+".npz" print dataset_path img = cv2.cvtColor(self.current_frame, cv2.COLOR_BGR2RGB) cv2.namedWindow("CurrentFrame",cv2.WINDOW_NORMAL) cv2.imshow("CurrentFrame",img) cl = Classifier(img) cl.classifieSample(dataset_path) except: tkMessageBox.showerror("Error","Please pick a Dataset")