Text this: In-pixel foreground and contrast enhancement circuits with customizable mapping