cvWriteFrame() приватный Метод

private cvWriteFrame ( IntPtr writer, IntPtr image ) : bool
writer IntPtr
image IntPtr
Результат bool
Пример #1
0
        /// <summary>
        /// Write a single frame to the video writer
        /// </summary>
        /// <typeparam name="TColor">The color type of the frame</typeparam>
        /// <typeparam name="TDepth">The depth of the frame</typeparam>
        /// <param name="frame">The frame to be written to the video writer</param>
        public void WriteFrame <TColor, TDepth>(Image <TColor, TDepth> frame)
            where TColor : struct, IColor
            where TDepth : new()
        {
            int result = CvToolbox.HasFFMPEG ?
                         CvInvoke.cvWriteFrame_FFMPEG(_ptr, frame.Ptr) :
                         CvInvoke.cvWriteFrame(_ptr, frame.Ptr);

            if (result == 0)
            {
                throw new InvalidOperationException("Unable to write frame to the video writer");
            }
        }
Пример #2
0
        /// <summary>
        /// Write a single frame to the video writer
        /// </summary>
        /// <typeparam name="TColor">The color type of the frame</typeparam>
        /// <typeparam name="TDepth">The depth of the frame</typeparam>
        /// <param name="frame">The frame to be written to the video writer</param>
        public void WriteFrame <TColor, TDepth>(Image <TColor, TDepth> frame)
            where TColor : struct, IColor
            where TDepth : new()
        {
            bool success = /*CvToolbox.HasFFMPEG ?
                            * CvInvoke.cvWriteFrame_FFMPEG(_ptr, frame.Ptr) :*/
                           CvInvoke.cvWriteFrame(_ptr, frame.Ptr);

            if (!success)
            {
                throw new InvalidOperationException("Unable to write frame to the video writer");
            }
        }
Пример #3
0
 /// <summary>
 /// Write a single frame to the video writer
 /// </summary>
 /// <typeparam name="TColor">The color type of the frame</typeparam>
 /// <typeparam name="TDepth">The depth of the frame</typeparam>
 /// <param name="frame">The frame to be written to the video writer</param>
 public void WriteFrame <TColor, TDepth>(Image <TColor, TDepth> frame)
     where TColor : struct, IColor
     where TDepth : new()
 {
     CvInvoke.cvWriteFrame(_ptr, frame.Ptr);
 }