MikeP Posted May 7, 2008 Posted May 7, 2008 (edited) Hi ! Here's what i'm trying to do, if anyone got ideas or knows which functions would help me, feel free to post ! Thanks I would like to calculate the average color value in an area and have the function returning wether it belongs to a color range or not. Something like that :Boolean PixelColorCheckSum (x1, y1, x2, y2, $colorA, $colorB, $colorTest)returns True if $colorTest is within the range $colorA - $colorBgoal : given a square area of the screen.. telling if the average color is more "yellow" .."orange", "red", "blue", "green", "purple", "pink", .. Edited May 8, 2008 by MikeP
BrettF Posted May 8, 2008 Posted May 8, 2008 Hi ! Here's what i'm trying to do, if anyone got ideas or knows which functions would help me, feel free to post ! Thanks I would like to calculate the average color value in an area and have the function returning wether it belongs to a color range or not. Something like that :Boolean PixelColorCheckSum (x1, y1, x2, y2, $colorA, $colorB, $colorTest)returns True if $colorTest is within the range $colorA - $colorBAs the colours are all hex, couldn't you add them all together and divide by the total? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
MikeP Posted May 8, 2008 Author Posted May 8, 2008 That would be easy but it's not working (in RGB) : pure blue = 0000FF pure yellow = FFFF00 hex addition = FFFFFF hex division by 2 = 7FFFFF.8 which is a color near Cyan and everyone knows blue+yellow = green
LarryDalooza Posted May 8, 2008 Posted May 8, 2008 average every octet... Average 00 and FF = 88 or some crap Lar. AutoIt has helped make me wealthy
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now