Accord.Imaging.Tools.Min C# (CSharp) Method

Min() public static method

Computes the minimum pixel value in the given image.
public static Min ( this image ) : int
image this
return int
        public static int Min(this UnmanagedImage image)
        {
            return Min(image, new Rectangle(0, 0, image.Width, image.Height));
        }

Same methods

Tools::Min ( this image, Rectangle rectangle ) : int
Tools::Min ( this image, int channel ) : int

Usage Example

コード例 #1
0
        public void MinTest2()
        {
            Bitmap image = new byte[, ]
            {
                { 5, 2, 7 },
                { 5, 3, 5 },
                { 9, 1, 2 }
            }.ToBitmap();

            {
                Rectangle rectangle = new Rectangle(1, 0, 2, 2);
                int       expected  = 2;
                int       actual    = Tools.Min(image, rectangle);
                Assert.AreEqual(expected, actual);
            }
            {
                int expected = 1;
                int actual   = Tools.Min(image);
                Assert.AreEqual(expected, actual);
            }
        }