Modify

Opened 17 years ago

Closed 17 years ago

#912 closed Feature Request (Rejected)

Avarage Color

Reported by: dexto Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

Just an idea that you can work on if you like it:
Function that calculates and return average for Red Green and Blue separately. This function would have a lot of uses anything from searching solid color (combined with PixelSearch) to specific motion detect, Flash macro, picture tone finder and so on...

Attachments (0)

Change History (4)

comment:1 by TicketCleanup, 17 years ago

Version: 3.3.0.0

Automatic ticket cleanup.

comment:2 by J-Paul Mesnage, 17 years ago

caan you post or PM what an algorithm that you yhink will implement what you think about.
Thanks ;)

comment:3 by dexto, 17 years ago

I think it will have same (opimised) pixel capturing algorithm as PixelSearch since i dono what it is its hard to speculate on how they will be processed.

General idea (low memory use high CPU use):
-Keep tack of how may pixels where processed.
-While calculating R B G for first 2 pixels store it in R G and B temp long double
-With a third pixel calculate R G B and divide it by the number of pixels already processed (to average it correctly later on) add that value to temp R G and B and divide by number of pixels proceed divided by 2.
-(Formula: ([current average]+[current pix]/[number of pixels processed+1])/([number of pixels processed+1]/2)
-Move on to the next pixel.

Another idea (high memory use low CPU):
-Calculate R G B store it in array
-Calculate average of every two pixels store it in array (destroy previous array)
-Calculate average of every two pixels in the new reduced array.
-and so on until only one pair left.

Can you think of a better one? ;)

comment:4 by Valik, 17 years ago

Resolution: Rejected
Status: newclosed

This seems like the kind of thing best implemented in a plugin or standard DLL.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.