Treenum + no resize in suite

This commit is contained in:
Arne van Iterson 2023-10-11 12:02:54 +02:00
parent fc0ae3517e
commit d443fa1d2b
4 changed files with 13 additions and 13 deletions

Binary file not shown.

View File

@ -4,22 +4,12 @@ from cv2.mat_wrapper import Mat as Mat
import os
import numpy as np
import csv
from enum import Enum
from ...helpers.treenum import Tree
CSV_PATH = "src\\experiments\\algorithms\\data\\"
IMG_PATH = "dataset\\accasia_1210048 (2023_09_28 12_19_26 UTC).JPG"
BARK_TYPES = 8
class Tree(Enum):
ACCASIA = 0
BERK = 1
EIK = 2
ELS = 3
ESDOORN = 4
ES = 5
LINDE = 6
PLATAAN = 7
class ColourSpace(Enum):
BGR = 0
HSV = 1

11
src/helpers/treenum.py Normal file
View File

@ -0,0 +1,11 @@
from enum import Enum
class Tree(Enum):
ACCASIA = 0
BERK = 1
EIK = 2
ELS = 3
ESDOORN = 4
ES = 5
LINDE = 6
PLATAAN = 7

View File

@ -388,7 +388,7 @@ class MainApp:
# Import and resize image
# img = cv2.imread(images[self.img_current])
img = cv2.imread(os.path.join(self.img_path.get(), self.img_name))
img = cv2.resize(img, (size, size), interpolation=cv2.INTER_AREA)
# img = cv2.resize(img, (size, size), interpolation=cv2.INTER_AREA)
self.addOutput(img, "Original")
# Set grayscale
@ -468,7 +468,6 @@ class MainApp:
plt.show(block=False) ## Graphs
self.drawOutput(size) ## Images
if __name__ == "__main__":
app = MainApp()
app.run()