Opened 15 years ago

Closed 15 years ago

#912 closed Feature Request (Rejected)

Avarage Color

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


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 Changed 15 years ago by TicketCleanup

  • Version deleted

Automatic ticket cleanup.

comment:2 Changed 15 years ago by Jpm

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

comment:3 Changed 15 years ago by dexto

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 Changed 15 years ago by Valik

  • Resolution set to Rejected
  • Status changed from new to closed

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.