Skip to content
Permalink
Browse files

pre pm and sm rework

  • Loading branch information...
mluerig committed Aug 5, 2019
1 parent 26990ef commit 886b0b1bf75da0c7e8a8dac239433721f336e285
@@ -10,7 +10,8 @@ Unreleased
- a quick-thresholding method in marked area for single images
- object_finder returns histogram of length, area and grayscale of all objects
- scale_maker is initialized empty to return scale object, that can either draw or detect scales and return mask objects (tuple of 3)
-
- inlude/exclude function in masking not working properly global

Known bugs
==========
- high GUI / windows sometimes crash. Stop Kernel and use "cv2.destroyAllWindows()"
Binary file not shown.
Binary file not shown.
@@ -519,8 +519,8 @@ def detect(self, image, **kwargs):
return "no current scale", "no scale mask"


class polygon_maker:
"""Intialize polygon maker, loads image.
class mask_maker:
"""Intialize mask maker, loads image.
Parameters
----------
@@ -563,8 +563,8 @@ def _on_mouse(self, event, x, y, buttons, user_param):
else:
print("No points to delete")

def draw(self, **kwargs):
"""Polygon maker method to draw rectangle or polygon mask onto image.
def draw_mask(self, **kwargs):
"""Mask maker method to draw rectangle or polygon mask onto image.
Parameters
----------
@@ -643,7 +643,6 @@ def draw(self, **kwargs):
self.overlay[mask_bool,2] = 200
self.overlay[mask_bool,1] = 0
line_col = red


if mode == "rectangle":
cv2.rectangle(self.overlay,(int(self.points[0][0]),int(self.points[0][1])),(int(self.points[2][0]),int(self.points[2][1])),line_col,10)
@@ -254,6 +254,9 @@ def set_landmarks(self, **kwargs):

if self.idx > 0:
self.df["id"] = self.ID

else:
sys.exit("WARNING: No landmarks set!")

# =============================================================================
# add arc-points
@@ -341,12 +344,12 @@ def set_landmarks(self, **kwargs):
# =============================================================================
# save and return
# =============================================================================

if self.draw_line == True:
self.df = self.df[["filename", "id", "idx", "x","y","scale","arc_length"]]
else:
sys.exit("WARNING: No landmarks set!")
self.df = self.df[["filename", "id", "idx", "x","y","scale"]]

if self.show == True:
show_img(self.drawn)
show_img(self.drawn)

return self.df

0 comments on commit 886b0b1

Please sign in to comment.
You can’t perform that action at this time.