Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. program colorTest;
  2. {$DEFINE SMART}
  3. {$I SRL/OSR.simba}
  4. {$I RSWalker/Walker.simba}
  5.  
  6. var
  7. hello, TPA: TPointArray;
  8. ATPA : T2DPointArray;
  9. begin
  10. smart.EnableDrawing := True;
  11. SRL.Setup;
  12. if (SRL.FindColors(hello, CTS2(14599336, 18, 0.10, 1.28), MainScreen.GetBounds) > 0) then
  13. begin
  14.  
  15. Writeln('found the color');
  16. mouse.Move(hello[0]);
  17. Smart.Image.DrawTPA(hello, clred);
  18.  
  19. ATPA := hello.Cluster(3); //returns array of TPAs of pixels within 3 of eachother
  20. ATPA.FilterSize(3, 50); //get rid of stray pixels (>3 in group) or groups that are way to big to be fishing spot
  21.  
  22. writeln(hello.edges);
  23. writeln(hello.bounds);
  24. writeln('bounds of first TPA coming up');
  25. writeln(length(hello.Cluster(3)));
  26. writeln((hello.Cluster(3))[0].bounds);
  27.  
  28. for TPA in ATPA do Smart.Image.DrawBox(TPA.bounds); //draw the fishing boxes??
  29. end;
  30.  
  31. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement