C# Класс Detector.Motion.MotionDetector

The engine in which detects the motion and put it in an easy to use format
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
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