For Unit 1 and 2 Refer Embedded System: Architecture, Programming and Design by Rajkamal,2nd edition,2010, Tata McGraw Hill, ppts for the same is attached here.
Learning links for Image processing with opencv:
http://www.robindavid.fr/opencv-tutorial/chapter1-starting-with-opencv.html
http://www.robindavid.fr/opencv-tutorial/chapter2-filters-and-arithmetic.html
http://www.robindavid.fr/opencv-tutorial/chapter3-pixel-access-and-matrix-iteration.html
http://www.robindavid.fr/opencv-tutorial/chapter5-line-edge-and-contours-detection.html
http://www.robindavid.fr/opencv-tutorial/chapter7-video-io-and-sources.html
GPIO interfacing link:
https://learn.sparkfun.com/tutorials/raspberry-gpio/all
https://learn.sparkfun.com/tutorials/python-programming-tutorial-getting-started-with-the-raspberry-pi/experiment-5-file-reading-and-writing