/// <summary> /// Initializes a new instance of the <see cref="InterpolatedDepth"/> class. /// </summary> /// <param name="sampledDepth">The depth map to be interpolated.</param> public InterpolatedDepth(ISampled2D <float> sampledDepth) { if (sampledDepth == null) { throw new ArgumentNullException("sampledDepth"); } _sampledDepth = sampledDepth; _width = sampledDepth.Width; _height = sampledDepth.Height; }
/// <summary> /// Initializes a new instance of the <see cref="InterpolatedImage"/> class. /// </summary> /// <param name="sampledImage">The image to be interpolated.</param> public InterpolatedImage(ISampled2D <ColorRgb128Float> sampledImage) { if (sampledImage == null) { throw new ArgumentNullException("sampledImage"); } _sampledImage = sampledImage; _width = sampledImage.Width; _height = sampledImage.Height; }
/// <summary> /// Initializes a new instance of the <see cref="UVImage"/> class. /// </summary> /// <param name="rawImage">The raw sensor image.</param> /// <param name="lens">The microlens which image to represent.</param> public UVImage(ISampled2D <ColorRgb128Float> rawImage, MicroLens lens) { if (rawImage == null) { throw new ArgumentNullException("rawImage"); } if (lens == null) { throw new ArgumentNullException("lens"); } _rawImage = new InterpolatedImage(rawImage); _lens = lens; _width = rawImage.Width; _height = rawImage.Height; _xMin = -lens.Diameter / 2; _yMin = -lens.Diameter / 2; }
/// <summary> /// Initializes a new instance of the <see cref="XYImage"/> class. /// </summary> /// <param name="rawImage">The raw sensor image.</param> /// <param name="mla">The microlens collection to use.</param> /// <param name="u">Horizontal offset from the microlens center.</param> /// <param name="v">Vertical offset from the microlens center.</param> public XYImage(ISampled2D <ColorRgb128Float> rawImage, MicroLensCollection mla, int u, int v) { if (rawImage == null) { throw new ArgumentNullException("rawImage"); } if (mla == null) { throw new ArgumentNullException("mla"); } _rawImage = new InterpolatedImage(rawImage); _mla = mla; _u = u; _v = v; _width = rawImage.Width; _height = rawImage.Height; int dummy; mla.GetBounds(out _xMin, out dummy, out _yMin, out dummy); }