C# 클래스 Algorithmix.Preprocessing.Preprocessing

파일 보기 프로젝트 열기: Algorithmix/Papyrus

공개 프로퍼티들

프로퍼티 타입 설명
DOUBLE_ROTATE bool
MaskColor Color
MaxAspectRatio int
MinAspectRatio int
MinDimension int
MinTransparencyRatio double
log Logger

공개 메소드들

메소드 설명
AspectRatioFilter ( Bitmap shred ) : bool

Simple helper function test to filter extracted images based on their aspect ratio height/width

ExtractImages ( Bitmap Source, Bitmap Mask ) : List

Extracts all objects from the source image

FindBottomTransparent ( Byte>.Image myImg ) : int

Find the bottow row with non-transparent pixels

FindLeftTransparent ( Byte>.Image myImg ) : int

Find the leftmost column with non-transparent pixels

FindRightTransparent ( Byte>.Image myImg ) : int

Find the rightmost column with non-transparent pixels

FindTopTransparent ( Byte>.Image myImg ) : int

Find the top row of non-transparent pixels

FloodFill ( Bitmap image, int xpixel, int ypixel, double threshold, Bgr myColor ) : Bitmap

Flood fill in a BFS manner, so as not to overwhelm the stack

LabelConnectedComponents ( Bitmap &image ) : int

Lable Connected Components of the scan, Identify unique objects

Orient ( Bitmap blob ) : Bitmap

Rotates the blobs to be vertical

Orient_Hough ( Bitmap blob ) : Bitmap
Orient_Step2 ( Bitmap blob ) : Bitmap
RotateImg ( Bitmap bmp, float angle, Color bkColor ) : Bitmap

Rotate the image by angle degrees, with bkColor as new background Uses some magic with the translatetransform and pixel2d :P WOW!

TransparencyFilter ( Bitmap shred ) : bool

Simple helper function that will test to make sure that more than a certain percentage of the shred is non a transparent color.

비공개 메소드들

메소드 설명
ApplyBlobExtractor ( Bitmap Mask, Bitmap Source ) : Bitmap>>.List

Applies the blob extraction feature of Aforge

ExtractSingleImage ( Bitmap TheBlob, Bitmap Source ) : Bitmap

Extracts a single object given the corresponding mask and rectangle

FilterBlob ( Bitmap mask ) : bool

Simple helper function to filter blobs. Currently works solely on size.

GetCropZone ( Byte>.Image myImg ) : Rectangle

Simple helper function for cropping the image after rotation

메소드 상세

AspectRatioFilter() 공개 정적인 메소드

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
리턴 bool

ExtractImages() 공개 정적인 메소드

Extracts all objects from the source image
public static ExtractImages ( Bitmap Source, Bitmap Mask ) : List
Source System.Drawing.Bitmap the scan of all the shreds
Mask System.Drawing.Bitmap
리턴 List

FindBottomTransparent() 공개 정적인 메소드

Find the bottow row with non-transparent pixels
public static FindBottomTransparent ( Byte>.Image myImg ) : int
myImg Byte>.Image the image to find the last row with non-transparent pixels
리턴 int

FindLeftTransparent() 공개 정적인 메소드

Find the leftmost column with non-transparent pixels
public static FindLeftTransparent ( Byte>.Image myImg ) : int
myImg Byte>.Image the image to find the first column with non-transparent pixels
리턴 int

FindRightTransparent() 공개 정적인 메소드

Find the rightmost column with non-transparent pixels
public static FindRightTransparent ( Byte>.Image myImg ) : int
myImg Byte>.Image the image to find the last column with non-transparent pixels
리턴 int

FindTopTransparent() 공개 정적인 메소드

Find the top row of non-transparent pixels
public static FindTopTransparent ( Byte>.Image myImg ) : int
myImg Byte>.Image image to find top non-transparent pixels
리턴 int

FloodFill() 공개 정적인 메소드

Flood fill in a BFS manner, so as not to overwhelm the stack
public static FloodFill ( Bitmap image, int xpixel, int ypixel, double threshold, Bgr myColor ) : Bitmap
image System.Drawing.Bitmap the image we wish to fill on
xpixel int the x pixel to sample from
ypixel int the y pixel to sample from
threshold double the threshold of difference
myColor Bgr
리턴 System.Drawing.Bitmap

LabelConnectedComponents() 공개 정적인 메소드

Lable Connected Components of the scan, Identify unique objects
public static LabelConnectedComponents ( Bitmap &image ) : int
image System.Drawing.Bitmap The mask
리턴 int

Orient() 공개 정적인 메소드

Rotates the blobs to be vertical
public static Orient ( Bitmap blob ) : Bitmap
blob System.Drawing.Bitmap image blob to orient
리턴 System.Drawing.Bitmap

Orient_Hough() 공개 정적인 메소드

public static Orient_Hough ( Bitmap blob ) : Bitmap
blob System.Drawing.Bitmap
리턴 System.Drawing.Bitmap

Orient_Step2() 공개 정적인 메소드

public static Orient_Step2 ( Bitmap blob ) : Bitmap
blob System.Drawing.Bitmap
리턴 System.Drawing.Bitmap

RotateImg() 공개 정적인 메소드

Rotate the image by angle degrees, with bkColor as new background Uses some magic with the translatetransform and pixel2d :P WOW!
public static RotateImg ( Bitmap bmp, float angle, Color bkColor ) : Bitmap
bmp System.Drawing.Bitmap the image to be rotated
angle float the angle to rotate by
bkColor Color background color for new background pixels
리턴 System.Drawing.Bitmap

TransparencyFilter() 공개 정적인 메소드

Simple helper function that will test to make sure that more than a certain percentage of the shred is non a transparent color.
public static TransparencyFilter ( Bitmap shred ) : bool
shred System.Drawing.Bitmap
리턴 bool

프로퍼티 상세

DOUBLE_ROTATE 공개적으로 정적으로 프로퍼티

public static bool DOUBLE_ROTATE
리턴 bool

MaskColor 공개적으로 정적으로 프로퍼티

public static Color MaskColor
리턴 Color

MaxAspectRatio 공개적으로 정적으로 프로퍼티

public static int MaxAspectRatio
리턴 int

MinAspectRatio 공개적으로 정적으로 프로퍼티

public static int MinAspectRatio
리턴 int

MinDimension 공개적으로 정적으로 프로퍼티

public static int MinDimension
리턴 int

MinTransparencyRatio 공개적으로 정적으로 프로퍼티

public static double MinTransparencyRatio
리턴 double

log 공개적으로 정적으로 프로퍼티

public static Logger log
리턴 Logger