Assigning exclusivity and evicting processes from a CPU core

I have a need to move one process to a vacant core – but is the core vacant? Does it stay vacant? Step 1 – move the process to a core, Step 2 (which should happen before Step 1) is to see what core has least activity, evict the squatters to another core, then move the relevant process.

Image Processing to detect differences in flashing frames

I have a need to detect when a screen “stops changing” and that time will then be considered “done”. So first, the flashing is every 1 seconds, so if we average out frames in 2 seconds and use that “rolling averaged” frame vs. the subsequent rolling average (so 1 averaged frame later) and do some math to say “how much different” then we can look for when the changes stop and be happy we have an answer. So average 48 frames if you are using 24fps.

Where to start? ImageMagick I think is a good place.