SRL Archive - Research & Development Lounge

Bitmap Analyzer


Markus

2007-10-25 13:40:32

Well I was bored, angry at my computer and after way too much lag of scar, I decided to port this thing by Boreas to Delphi. You enter a few bitmaps, and this outputs colors/tolerances to use with them to ALWAYS find the MS object, from any angle and from any world.

GUI is pretty basic and straightforward, you can paste from clipboard or open from file, then press do it :)
NOTE: You can't remove bitmaps once loaded, you have to restart the program.

CREDITS
Boreas for the original source
Benland100 for telling how CTS 1 works :)

R0b0t1

2007-10-25 14:51:17

ooooh…. Ahhhh.


Cool.

Smartzkid

2007-10-25 15:07:55

Good work, Markus.

Any idea how much faster it is?

mastaraymond

2007-10-25 15:35:55

From: Smartzkid
Good work, Markus.

Any idea how much faster it is?

Leme guess : 3 times or even faster?

Markus

2007-10-26 11:28:51

From: mastaraymond
Leme guess : 3 times or even faster?


Na, even better.
Comp Specs: P4 2.1 GHZ 256MB ram.
Two bitmaps
Scar: around 5 minutes?
Delphi: 2 seconds :f:

Mine is 150 times as fast :p

Lalaji

2007-12-13 16:41:02

Just ran it…

What does this mean?
1648941 100


Color : 1648941
Tolerance : 100
??

Boreas

2007-12-14 00:58:01

Yes. And if thats the lowest tolerance, then you probably want to try it again with different bitmaps (in a lot of situations, any tol over 50 would probably get too many false positives). Crop the bitmaps as small as possible around the target, and make all background pixels black(0) in paint (also any part of target you know is similar to surroundings, or is subject to change, or you just want to ignore).

Markus

2007-12-14 08:51:32

Oh, be aware that this version is actually CTS 0, not CTS 1. I forgot somehow to save the CTS 1 one :duh:
I was testing it a minute ago, and I saw different results between mine and the scar one.
ColorToleranceSpeed(0); in the scar one fixed it.

Naum

2007-12-14 11:55:31

so instead of making a huge laggy bmp i could use this and just use find color. Thx markus you are amazing :)

A G E N T

2007-12-14 18:09:23

I ran it with three piccys of the shopkeeper, and it returned -1 and 3 tolerance. :/

chitin

2007-12-27 03:46:14

i think i could use this, but im not enirly sure what it does, or how to use it…how do these colors help?

edit:wait…so i should make it search for all the colors (in x1,y1,x2,y2) it gives me instead of searching for the same bitmap (in x1,y1,x2,y2) –because its faster?!?!?