Example #1
0
        internal override void Maximum(Image originalImage, KernelFunction kernelFunction, uint neighborhoodSize, uint x, uint y, Image outputImage)
        {
            ImageRGB <T> castedOriginalImage = (ImageRGB <T>)originalImage;
            ImageRGB <T> castedOutputImage   = (ImageRGB <T>)outputImage;

            castedOutputImage.R.Maximum(castedOriginalImage.R, kernelFunction, x, y, neighborhoodSize);
            castedOutputImage.G.Maximum(castedOriginalImage.G, kernelFunction, x, y, neighborhoodSize);
            castedOutputImage.B.Maximum(castedOriginalImage.B, kernelFunction, x, y, neighborhoodSize);
        }
Example #2
0
        public override Image Clone()
        {
            ImageRGB <T> clone = (ImageRGB <T>)ImageFactory.Create(Width, Height, ColorModel.RGB, GetDataType());

            clone.R = (GenericChannel <T>)R.Clone();
            clone.G = (GenericChannel <T>)G.Clone();
            clone.B = (GenericChannel <T>)B.Clone();
            return(clone);
        }
Example #3
0
        internal override GenericImage <T> Add(GenericImage <T> other)
        {
            ImageRGB <T> outcome  = (ImageRGB <T>)ImageFactory.Create(Width, Height, GetColorModel(), GetDataType());
            ImageRGB <T> otherRGB = (ImageRGB <T>)other.ToRGB();

            outcome.R = R.Add(otherRGB.R);
            outcome.G = G.Add(otherRGB.G);
            outcome.B = B.Add(otherRGB.B);
            return(outcome);
        }