Algorithmix.Preprocessing.Preprocessing.AspectRatioFilter C# (CSharp) Method

AspectRatioFilter() public static method

Simple helper function test to filter extracted images based on their aspect ratio height/width
public static AspectRatioFilter ( Bitmap shred ) : bool
shred System.Drawing.Bitmap the extracted shred
return bool
        public static bool AspectRatioFilter(Bitmap shred)
        {
            return ((shred.Height / (float)shred.Width) > MinAspectRatio) && ((shred.Height / (float)shred.Width) < MaxAspectRatio);
        }