There is an API for the Raspberry Pi called DispmanX that allows you to add layers that are displayed over other layers.  It seems the API isn't documented but as far as we know everything on the Raspberry Pi display is a DispmanX layer.  So this means you can use it to do things like overlay images on top of say the camera live stream, another application, etc.

Resources

https://jan.newmarch.name/RPi/Dispmanx/

Setting which layer applications should use

Some applications will allow you to specify the layer they should use.

pngview

By default the pngview program adds a black background (on layer 0) to obscure the framebuffer. Use -b 0 to make this layer transparent instead. The new parameter -l specifies which DispmanX layer to display the image on. PNG file transparency is handled correctly

./pngview -b 0 -l 3 /usr/share/raspberrypi-artwork/raspberry-pi-logo-small.png

omxplayer

Use layer 2:

omxplayer –layer 2 /opt/vc/src/hello_pi/hello_video/test.h264

Examples

Place an image over raspvid

./pngview -b 0 -l 3 my_overlay_image.png &		#Transparent background (-b), Layer 3 (-l)
raspivid -t 0

killall pngview #Use this to close the pngview afterwards