Is a screen snapshot 4k? Let's say you took a snapshot of the screen, and then waited 1 minute. Then you compared your previous snapshot with what is currently displayed. Commit necessary "masking" (maybe even use the snapshot as a pixel fader alpha mask). Then you make another snapshot, wait 1 minute, repeat. Maybe you'll need another 4k as a separate alpha mask template, and 4k as a "previous record" of what the screen looked like.

You'll save memory and since you do a comparison every minute (or whatever threshold) you're not consuming CPU doing this. Also the more prior snapshots kept and frequency of snapshots alter the accuracy, obviously, but you can scale the accuracy of this against memory and cpu.

Calvin