Commit 9e147c58 authored by Will Brennan's avatar Will Brennan

Modified main to include new superpixel method!

parent 1fff7085
...@@ -11,6 +11,7 @@ import cv2 ...@@ -11,6 +11,7 @@ import cv2
import numpy import numpy
# Custom Modules # Custom Modules
import scripts import scripts
import SpeedySuperPixels
import mean_color import mean_color
...@@ -127,7 +128,7 @@ class SkinDetector(object): ...@@ -127,7 +128,7 @@ class SkinDetector(object):
return self.mask return self.mask
def process(image, save=False, display=False, args=None): def process(image, save=False, display=False, args=None, segment=False):
assert isinstance(image, numpy.ndarray) assert isinstance(image, numpy.ndarray)
if not args: if not args:
args = scripts.gen_args() args = scripts.gen_args()
...@@ -136,6 +137,11 @@ def process(image, save=False, display=False, args=None): ...@@ -136,6 +137,11 @@ def process(image, save=False, display=False, args=None):
args.save = save args.save = save
args.display = display args.display = display
detector = SkinDetector(args) detector = SkinDetector(args)
if segment:
slic = SpeedySuperPixels.
contours =
pass
else:
return detector.process(image) return detector.process(image)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment