I did a little comparison because I was bored.
Color:
Motion detection (no plugin):
Color:
Simba Code:
procedure trackSheep();
var
b: TBox := mainscreen.getBounds;
tpa, tpa2: TPointArray;
atpa: T2DPointArray;
begin
findColors(tpa, 14079702, b);
findColorsTolerance(tpa2, 13553620, b, 6);
tpa := combineTPA(tpa, tpa2);
findColorsTolerance(tpa2, 13421522, b, 14);
tpa := combineTPA(tpa, tpa2);
findColorsTolerance(tpa2, 12434374, b, 16);
tpa := combineTPA(tpa, tpa2);
atpa := clusterTPA(tpa, 3);
filterTPAsBetween(atpa, 0, 90);
tpa := mergeATPA(atpa);
//smartImage.clear();
//smartImage.drawTPA(tpa, clAqua);
end;
Motion:
Simba Code:
function motion(b: TBox; time: integer; skip: integer = 0): TPointArray;
var
i, c, x, y, bmp1, bmp2: integer;
begin
bmp1 := bitmapFromClient(b.x1, b.y1, b.x2, b.y2);
wait(time);
bmp2 := bitmapFromClient(b.x1, b.y1, b.x2, b.y2);
setLength(result, ((b.x2 - b.x1) * (b.y2 - b.y1)));
for x := 0 to (b.x2 - b.x1) do
begin
for y := 0 to (b.y2 - b.y1) do
begin
if (fastGetPixel(bmp1, x, y) <> fastGetPixel(bmp2, x, y)) then
begin
result[c] := point(x, y);
inc(c);
end;
inc(y, skip);
end;
inc(x, skip);
end;
setLength(result, c);
offsetTPA(result, point(b.x1, b.Y1));
freeBitmap(bmp1);
freeBitmap(bmp2);
end;
procedure trackSheep();
var
b: TBox := mainscreen.getBounds;
tpa: TPointArray;
begin
tpa := motion(b, 27, 0);
//smartImage.clear();
//smartImage.drawTPA(tpa, clOrange);
end;
Motion detection usually looks a bit better than this, but sheep are weird and I didn't use a plugin.