Exemple #1
0
        /// <summary>
        /// Grab an HDR frame from context A and B in rapid succession.Camera is restored to context A when
        /// complete.
        /// </summary>
        /// <returns><c>true</c>, if successful, <c>false</c> otherwise.</returns>
        /// <param name="imageA">Instance of image in which to write the grabbed frame for context A.</param>
        /// <param name="flashA">Required flash power for context A.</param>
        /// <param name="imageB">Instance of image in which to write the grabbed frame for context B.</param>
        /// <param name="flashB">Required flash power for context B.</param>
        public bool GrabMultiple(ImageHDR imageA, byte flashA, ImageHDR imageB, byte flashB)
        {
            bool result = false;

            Psinc.SetContext(this.camera, 0);
            Psinc.SetFlash(this.camera, flashA);

            if (Psinc.GrabHDR(this.camera, imageA.Pointer) == (int)ReturnCodes.Ok)
            {
                Psinc.SetContext(this.camera, 1);
                Psinc.SetFlash(this.camera, flashB);

                result = Psinc.GrabHDR(this.camera, imageB.Pointer) == (int)ReturnCodes.Ok;

                Psinc.SetContext(this.camera, 0);
            }

            return(result);
        }
Exemple #2
0
 /// <summary>
 /// Grab an HDR frame and write to the supplied image instance. This function blocks until
 /// an image has been grabbed or an error occurrs.
 /// </summary>
 /// <returns>True if a camera was connected and an image was succesfully grabbed.</returns>
 /// <param name="image">Instance of image in which to write the grabbed frame.</param>
 public bool Grab(ImageHDR image)
 {
     return(Psinc.GrabHDR(this.camera, image.Pointer) == (int)ReturnCodes.Ok);
 }