public override IObservable <IplImage> Process(IObservable <IplImage> source) { return(source.Select(input => { var output = new IplImage(input.Size, IplDepth.F32, 1); CV.DistTransform(input, output, DistanceType); return output; })); }
public override IObservable <IplImage> Process(IObservable <IplImage> source) { return(source.Select(input => { var output = new IplImage(input.Size, IplDepth.U8, 1); distance = IplImageHelper.EnsureImageFormat(distance, input.Size, IplDepth.F32, 1); laplacian = IplImageHelper.EnsureImageFormat(laplacian, input.Size, IplDepth.F32, 1); CV.DistTransform(input, distance, DistanceType); CV.Laplace(distance, laplacian, LaplacianAperture); CV.Threshold(laplacian, output, RidgeThreshold, 255, ThresholdTypes.BinaryInv); return output; })); }