Lab Exercise: Installation of Software and Data =============================================== OpenCV ------ Installing OpenCV is not trivial. You can download binary distributions and install them but it is not always clear that all we need is packaged. For the course we need the module containing the non-free SIFT software. I am using the anaconda Python distribution. I didn't install the standard OpenCV but i got a version from binstar:: conda install -c https://conda.binstar.org/menpo opencv3 If all went well you must be able to run the following code: .. ipython:: python import cv2 x = np.arange(128)-64 X, Y = np.meshgrid(x,x) f = (100*(np.hypot(X,Y)<32)).astype(np.uint8) plt.clf() plt.imshow(f); plt.gray() sift = cv2.xfeatures2d.SIFT_create() kps, dscs = sift.detectAndCompute(f, mask=None) ax = plt.gca() for kp in kps: ax.add_artist( plt.Circle((kp.pt), kp.size/2, color='green', fill=False)) @savefig siftdetect.png width=10cm plt.show() No worries (yet) in case you have a hard time understanding what is done in this code fragment. If you get an image that looks like the one above you have correctly installed OpenCV. Standard Images and Data Sets ----------------------------- In the lab exercises you will need some standard data files. All these files are collected in one directory on the web. Skin Color Data Set ................... - :download:`SkinColor.zip` Standard Images ............... Below are some standard images used a lot in image processing research. The images shown here a small images ($256\times256$) which is an advantage when experimenting with code in development. You can download these images by clicking right on an image. ---- .. figure:: /images/trui.png :align: center The girl from an advertisement. This image is used a lot by researchers (originally) from Delft University. It is a nice image to use because it contains a lot of details. ---- .. figure:: /images/colortrui.png :align: center :width: 256px The same girl from the advertisement, this time in color. Note that this is NOT the color version of the same image as shown in gray. Also note that this is scanned copy of a printed image. If you look up close you can see the primary color dots. ---- .. figure:: /images/cameraman.png :align: center The camera man image. Originally used by researchers in the field of image and video compression. ---- .. figure:: /images/schema.jpg :align: center A hand drawn scheme of an electrical circuit. Nowadays most of the technical line drawings are made with computers. In the past most of these drawings were made by hand. Considerable effort has been made to automatically digitize these line drawings into vector graphics formats (i.e. not a simple sampled version of the scanned drawing but a version were lines are recognized and stored as lines). ---- .. figure:: /images/nachtwacht1.jpg :align: center A picture of a small part of the famous 'Nachtwacht' painting by Rembrandt van Rijn. Together with the nachtwacht2.jpg image this image is used as an example for building image mosaics. .. figure:: /images/nachtwacht2.jpg :align: center ---- .. figure:: /images/calibrationpoints.jpg :align: center :width: 400px A 2D projection of a 3D object. The checkerboards provide the data to calibrate the camera. .. figure:: /images/view1.jpg :align: center :width: 400px A view of the same calibration object and a cudly animal next to it. There are several views on this scene available: :download:`/images/view1.jpg`, :download:`/images/view2.jpg`, :download:`/images/view3.jpg`, :download:`/images/view4.jpg`. ---- .. figure:: /images/peppers.png :align: center :width: 400px peppers.png. Nice bright colors... ----- .. figure:: /images/lena.jpg :align: center :width: 10px Lena. I am aware of the controversy produced by the use of this image in image processing papers (see `Wikipedia `_). This image is refered to here because of its historic relevance. ----- .. figure:: /images/flyeronground.png :align: center :width: 400px A flyer of size A4 lying on the ground and photographed at an angle from above. The flyer is perspectivily distorted. -----