C# 클래스 Detector.Motion.MotionDetector

The engine in which detects the motion and put it in an easy to use format
파일 보기 프로젝트 열기: AshleighAdams/Detector

공개 프로퍼티들

프로퍼티 타입 설명
motionpic System.Drawing.Bitmap

공개 메소드들

메소드 설명
DoNextScanLine ( int x, int y, MotionHelper &motion ) : void

Recursave function for scanlines

GetBoundsFromMotion ( byte &motion, Point size, Point seed ) : MotionHelper

Uses a FloodFill scanline algorithm to get a targets bounds

GetTargets ( ) : IEnumerable
MotionDetector ( ) : System

The engine in which detects the motion and put it in an easy to use format

MotionDetector ( Image last_img, Image cur_img ) : System

Compare to images to one another

SetNextImages ( Image Last, Image Current ) : void

Set the next images to compare

SubtractPixels ( BitmapData curimg, BitmapData lastimg, byte &pixeldata ) : BitmapData

Subtract any pixels that havent changed, set those that have to 255

UpdateIgnoreMotion ( ) : void

Set the byte array up for fast access to thes pixels

비공개 메소드들

메소드 설명
Distance ( int x, int y, int a, int b ) : int

Calculate the distance between to points

Error ( string error ) : void

Error without halting on release builds

GetAverage ( BitmapData bdata, int x, int y, int width, int height ) : int

Gets the average color in a cerain area

InRangeOfTarget ( Target &targs, int x, int y ) : int

Checks to see if movement pixels are in range of a target

IsInsideIgnoreArea ( int x, int y ) : bool

Is the pixel inside of the ignore position?

NotInsideOfTarget ( Target &targs, int x, int y ) : bool

Is the target inside of a specific X and Y

메소드 상세

DoNextScanLine() 공개 메소드

Recursave function for scanlines
public DoNextScanLine ( int x, int y, MotionHelper &motion ) : void
x int
y int
motion MotionHelper
리턴 void

GetBoundsFromMotion() 공개 메소드

Uses a FloodFill scanline algorithm to get a targets bounds
public GetBoundsFromMotion ( byte &motion, Point size, Point seed ) : MotionHelper
motion byte
size Point
seed Point
리턴 MotionHelper

GetTargets() 공개 메소드

public GetTargets ( ) : IEnumerable
리턴 IEnumerable

MotionDetector() 공개 메소드

The engine in which detects the motion and put it in an easy to use format
public MotionDetector ( ) : System
리턴 System

MotionDetector() 공개 메소드

Compare to images to one another
public MotionDetector ( Image last_img, Image cur_img ) : System
last_img Image The previous image
cur_img Image The current image
리턴 System

SetNextImages() 공개 메소드

Set the next images to compare
public SetNextImages ( Image Last, Image Current ) : void
Last Image Image to compare to
Current Image Image at this moment in time
리턴 void

SubtractPixels() 공개 메소드

Subtract any pixels that havent changed, set those that have to 255
public SubtractPixels ( BitmapData curimg, BitmapData lastimg, byte &pixeldata ) : BitmapData
curimg System.Drawing.Imaging.BitmapData Current image
lastimg System.Drawing.Imaging.BitmapData Last image
pixeldata byte 2 Dem byte array to place movement
리턴 System.Drawing.Imaging.BitmapData

UpdateIgnoreMotion() 공개 메소드

Set the byte array up for fast access to thes pixels
public UpdateIgnoreMotion ( ) : void
리턴 void

프로퍼티 상세

motionpic 공개적으로 프로퍼티

public Bitmap,System.Drawing motionpic
리턴 System.Drawing.Bitmap