Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program colorTest;
- {$DEFINE SMART}
- {$I SRL/OSR.simba}
- {$I RSWalker/Walker.simba}
- var
- hello, TPA: TPointArray;
- ATPA : T2DPointArray;
- begin
- smart.EnableDrawing := True;
- SRL.Setup;
- if (SRL.FindColors(hello, CTS2(14599336, 18, 0.10, 1.28), MainScreen.GetBounds) > 0) then
- begin
- Writeln('found the color');
- mouse.Move(hello[0]);
- Smart.Image.DrawTPA(hello, clred);
- ATPA := hello.Cluster(3); //returns array of TPAs of pixels within 3 of eachother
- ATPA.FilterSize(3, 50); //get rid of stray pixels (>3 in group) or groups that are way to big to be fishing spot
- writeln(hello.edges);
- writeln(hello.bounds);
- writeln('bounds of first TPA coming up');
- writeln(length(hello.Cluster(3)));
- writeln((hello.Cluster(3))[0].bounds);
- for TPA in ATPA do Smart.Image.DrawBox(TPA.bounds); //draw the fishing boxes??
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement