public IImageBuffer RenderThumbnail(IImageBuffer image) { IImageBuffer resizedImage = null; if (image.Width == 0 || image.Height == 0) { return(I.CreateRgbF32(0, 0)); } Int2 size; IntRect cropRect; base.CalculateNewSize(new Int2(image.Width, image.Height), this.DesiredSize, out size, out cropRect); if (image.Width <= size.X && image.Height <= size.Y) { return(image); } resizedImage = image.ToF32().Resize(size, cropRect, ResizeFilterType.Quadratic); var f32image = resizedImage as I <float>; if (f32image != null) { return(f32image.ToU8()); } return(resizedImage); }
public I <float> Crop( IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] IntRect area ) { return(image.ToF32().Crop(area)); }
public int[][] CreateHistogramm( IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] int bins ) { return(image.ToF32().CreateHistogram(bins)); }
public I <float> Equalize( IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] int bins ) { return(image.ToF32().HistogramEqualization(bins)); }
public I <float> Filter( IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] double weight ) { return(image.ToF32().FastDoGFilter(weight)); }
public int[] CreateChannelHistogram( IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] int bins, [InputPin(PropertyMode = PropertyMode.Default)] int channel ) { return(image.ToF32().CreateChannelHistogram(bins, channel)); }
public I <float> Equalize( IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] int channel, [InputPin(PropertyMode = PropertyMode.Default)] int bins ) { return(image.ToF32().EqualizeSingleChannel(channel, bins)); }
public I <float> Filter( IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] double weight, [InputPin(PropertyMode = PropertyMode.Default)] double scaling ) { return(image.ToF32().FastDivisionFilter(weight, scaling)); }
public I <float> ConvertColor( IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] ColorSpaceConversionType conversion ) { var converter = GetConverter(conversion); return(converter(image.ToF32())); }
public I <float> Filter( IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] int matrixSize, [InputPin(PropertyMode = PropertyMode.Default)] double weight, [InputPin(PropertyMode = PropertyMode.Default)] double scaling ) { return(image.ToF32().DivisionOfGaussianFilter(matrixSize, weight, scaling)); }
public I <float> Filter( IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] int width, [InputPin(PropertyMode = PropertyMode.Default)] int height, [InputPin(PropertyMode = PropertyMode.Default)] ResizeFilterType resizeFilterType = ResizeFilterType.Lanczos8 ) { return(image.ToF32().Resize(new Int2(width, height), resizeFilterType)); }
public IEnumerable <I <float> > Split(IImageBuffer image) { var img = image.ToF32(); for (int c = 0; c < img.Channels; ++c) { yield return(img.GetChannel(c)); } }
public I <float> EqualizeAdaptive( IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] int bins, [InputPin(PropertyMode = PropertyMode.Default)] int numTilesY, [InputPin(PropertyMode = PropertyMode.Default)] int numTilesX, [InputPin(PropertyMode = PropertyMode.Default)] double normalizedClipLimit ) { return(image.ToF32().AdaptiveHistogramEqualization(bins, numTilesY, numTilesX, normalizedClipLimit)); }
public int[] CreateChannelHistogramOfRect( IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] int startRow, [InputPin(PropertyMode = PropertyMode.Default)] int startCol, [InputPin(PropertyMode = PropertyMode.Default)] int height, [InputPin(PropertyMode = PropertyMode.Default)] int width, [InputPin(PropertyMode = PropertyMode.Default)] int bins, [InputPin(PropertyMode = PropertyMode.Default)] int channel ) { return(image.ToF32().CreateChannelHistogramOfRect(startRow, startCol, height, width, bins, channel)); }
public IImageBuffer Calculate(IImageBuffer image1, IImageBuffer image2) { return(I.Divide(image1.ToF32(), image2.ToF32())); }
public IImageBuffer Calculate(IImageBuffer image1, IImageBuffer image2) { return(I.Multiply(image1.ToF32(), image2.ToF32())); }
public I <float> ConvertDepth(IImageBuffer image) { return(image.ToF32()); }
public I <float> Process(IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] double[] stepSize) { return(image.ToF32().Quantization(stepSize)); }
public I <float> Scale(IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] Range <double>[] inRange, [InputPin(PropertyMode = PropertyMode.Default)] Range <double>[] outRange, [InputPin(PropertyMode = PropertyMode.Default)] double[] gamma = null) { return(image.ToF32().ScaleRanges(inRange, outRange, gamma)); }
public I <float> Filter(IImageBuffer image) { return(image.ToF32().CenteringAroundMean()); }
public I <float> Saturate(IImageBuffer image, [InputPin(PropertyMode = PropertyMode.Default)] double saturationFactor = 0.01, [InputPin(PropertyMode = PropertyMode.Default)] int bins = 500) { return(image.ToF32().AutoSaturate(saturationFactor, bins)); }