sksurgerysurfacematch.algorithms.value_threshold_segmentor module

Dummy segmentor, just to test the framework.

class sksurgerysurfacematch.algorithms.value_threshold_segmentor.ValueThresholdSegmentor(threshold=127)[source]

Bases: sksurgerysurfacematch.interfaces.video_segmentor.VideoSegmentor

Dummy segmentor, to test the framework. Simply converts BGR to HSV, extracts the value channel, and applies a threshold between [0-255].

It’s not really useful for anything other than testing the interface.

segment(image: numpy.ndarray)[source]

Converts image from BGR to HSV and thresholds the Value channel.

Parameters:image – image, BGR
Returns:image, same size as input, 1 channel, uchar, [0-255].