CSV export in suite
This commit is contained in:
parent
0738cb6a52
commit
8ad51ab63a
11
src/suite.py
11
src/suite.py
@ -66,12 +66,17 @@ class MainApp:
|
|||||||
# Load values from config after UI has been initialised
|
# Load values from config after UI has been initialised
|
||||||
self.img_path.set(config_json["path"])
|
self.img_path.set(config_json["path"])
|
||||||
self.img_size.set(config_json["size"])
|
self.img_size.set(config_json["size"])
|
||||||
|
|
||||||
|
now = datetime.datetime.now()
|
||||||
|
self.log = open(pathlib.Path(config_json["out"], F"result-{now.strftime('%Y-%m-%dT%H.%M.%S')}.csv"), "x")
|
||||||
|
self.log.write("test")
|
||||||
|
|
||||||
def on_quit(self, event=None):
|
def on_quit(self, event=None):
|
||||||
'''
|
'''
|
||||||
Close PLT windows on main app quit
|
Close PLT windows on main app quit
|
||||||
'''
|
'''
|
||||||
plt.close()
|
plt.close()
|
||||||
|
self.log.close()
|
||||||
self.mainwindow.quit();
|
self.mainwindow.quit();
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
@ -358,6 +363,12 @@ class MainApp:
|
|||||||
if not part_update:
|
if not part_update:
|
||||||
self.drawCannyHM(img, 1, 1)
|
self.drawCannyHM(img, 1, 1)
|
||||||
|
|
||||||
|
# Write results to CSV file
|
||||||
|
if not part_update:
|
||||||
|
# if self.log.
|
||||||
|
# Only do this if the image has changed
|
||||||
|
self.log.write(F"{self.img_name[1]}, test\n")
|
||||||
|
|
||||||
# Show all data
|
# Show all data
|
||||||
plt.show(block=False) ## Graphs
|
plt.show(block=False) ## Graphs
|
||||||
self.draw_output(size) ## Images
|
self.draw_output(size) ## Images
|
||||||
|
Loading…
Reference in New Issue
Block a user