cvCalcHist() public static method

Calculates the histogram of one or more single-channel images. The elements of a tuple that is used to increment a histogram bin are taken at the same location from the corresponding input images.
public static cvCalcHist ( IntPtr image, IntPtr hist, bool accumulate, IntPtr mask ) : void
image IntPtr Source images (though, you may pass CvMat** as well), all are of the same size and type
hist IntPtr Pointer to the histogram
accumulate bool Accumulation flag. If it is set, the histogram is not cleared in the beginning. This feature allows user to compute a single histogram from several images, or to update the histogram online
mask IntPtr The operation mask, determines what pixels of the source images are counted
return void
コード例 #1
0
ファイル: DenseHistogram.cs プロジェクト: ssor/csharpDemos
 private void Calculate(IntPtr[] arrays, bool accumulate, CvArray <Byte> mask)
 {
     Debug.Assert(arrays.Length == Dimension, Properties.StringTable.IncompatibleDimension);
     CvInvoke.cvCalcHist(
         arrays,
         _ptr,
         accumulate,
         mask == null ? IntPtr.Zero : mask.Ptr);
 }
コード例 #2
0
        private void Calculate(IntPtr[] arrays, bool accumulate, CvArray <Byte> mask)
        {
#if !NETFX_CORE
            Debug.Assert(arrays.Length == Dimension, "IncompatibleDimension");
#endif
            CvInvoke.cvCalcHist(
                arrays,
                _ptr,
                accumulate,
                mask == null ? IntPtr.Zero : mask.Ptr);
        }