Carnegie Mellon University

Data Privacy Center

Data Privacy Course


Objective

The objective of this lab is for you to explore benefits and privacy concerns related to video surveillance.

Considerations that should come to mind:


Overview of activities

The in-class activities concern your designing a simple, automated surveillance system. The space you will survey will be public spaces available through publicly available, on-line cameras.

Part I. Automated Video Surveillance (30 minutes)

For the first activity in this lab, you will take a set of consecutive still images available from an on-line camera and detect changes in the images to see how such changes could be used for automated video surveillance. Below are the steps you must complete.

  1. Find 2 camera URLs.
    Remember the CameraWatch project examined earlier. This project consists of publicly-available, on-line cameras that are observing people and vehicles in public spaces. Visit the CameraWatch website and find cameras showing two kinds of scenes, as described below. (Or alternatively, search Google for webcams showing the kinds of scences described below.) The cameras must provide still images. For this activity, you cannot use cameras with zoom features or those showing streaming video. CameraWatch identifies whether the camera provides a still or video image. Also, make sure the camera is updating images. The date and time of the image typically appears on or near the image. You want a camera that provides still images that are being updated.

    • Find a camera that provides still images of a relatively calm scene with little or no changes. Record the URL. This will be camera C, named after the calm scene it shows.
    • Find a camera that provides still images of a scene having reasonable or constant changes. This will be camera A, named after the active image it displays. Record the URL.

  2. Capture a consecutive sequence of images.
    For each of the 2 camera URLs you found, you will need to capture a sequence of images. To do this, visit the URL. The image should appear as a JPEG (.jpg) image in the web page. You can right click on the image and save a copy of the image file to disk. Save a sequence of 6 consecutive images. These images should be the next image immediately available from the camera. It is very important to have the next available image from the camera, especially for scenes that have changes between images. For the calm camera, C, the images must be named CP1.jpg, ..., CP6.jpg. For the active camera, A, the images must be named AP1.jpg, ..., AP6.jpg.

  3. Share the original images and the difference images.
    Examine the original sequence of images for a camera. One way to do this is to FTP the images to a web-accessible location along with an HTML page that will display them for you.

    1. FTP to dataprivacylab.org. Login as padstud with the password given in class.
    2. Go to your assigned directory (the folder that bears your name!). Place your files within your assigned directory. Be sure to transfer files in "binary" mode. Below are the files you must FTP:
      • CP1.jpg, ..., CP6.jpg
      • AP1.jpg, ..., AP6.jpg

    3. Vist URL to view your results, along with those of your classmates.

Questions

Lab Results


Part II. JPEG Notes


Part III. Statistical Comparison of Images (15 minutes)

  1. Compute the average image for your series.
    For each camera, A and C, you have a sequence of images [CP1, ..., CP6] and [AP1, ..., AP6]. Using the Java code, generate corresponding matrix files, avgc.jpg and avga.jpg for [CP1, ..., CP6], and [AP1, ..., AP6], respectively, that is the pixel-wise average of those sets of images. Below is a copy of the header comment from the file.

    
     ** This application achieves the single operation of producing a 
     ** JPEG file whose pixel values are the color value average
     ** of the images appearing in the given directory.
     **  
     ** Usage: java JPGavg dirname avg.jpg
    

    FTP these two images to your space on dataprivacylab.org. Examine how the average image compares with the original images.

  2. Compute the pixel-wise standard deviation of your images.
    Using the Java code, generate corresponding matrix files, stdc.jpg and stda.jpg for [CP1, ..., CP6], and for [AP1, ..., AP6], respectively, that is the pixel-wise standard deviation of those sets of images. Below is a copy of the header comment from the file.

    
     ** This application achieves the single operation of producing a 
     ** an JPEG file whose pixel values are the standard deviation 
     ** of the color values found in the images appearing in the 
     ** given directory using the avg.jpg.
     **  
     ** Usage: java JPGstd avg.jpg dirname std.jpg
    

    FTP these two images to your space on dataprivacylab.org. Examine how the image of standard deviations compares with the original images.

  3. Report comparative statistics to determine the similarity of images.
    Using the Java code, generate corresponding matrix files, stdc.jpg and stda.jpg for [CP1, ..., CP6], and for [AP1, ..., AP6], respectively, that is the pixel-wise standard deviation of those sets of images. Below is a copy of the header comment from the file.

    
     ** This application displays the number and percentage of pixels
     ** for each JPEG file in dirname that is 1, 2, or 3 standard
     ** deviations from avg using std.
     **  
     ** Usage: java JPGstats avg.jpg std.jpg dirname
    

    Examine the results and notice how similar they appear.


Part IV. Statistical Comparison of Difference Images (15 minutes)

    In Part I, you compared adjacent images. In part II, you compared a set of images together (using an average image). Now you will compare the differences of the images from the average image.

    1. Make a new directory to hold your "difference" images. These are the original images less the average. The result shows the extent to which the original image differs from the group average.


      Using the Java code, generate corresponding matrix files for [CP1, ..., CP6], and [AP1, ..., AP6], respectively, that report the pixel-wise difference of those images from the average image, computed above. Below is a copy of the header comment from the file.

      
       ** This application reads the JPEG files in the indir and 
       ** writes a corresponding JPEG file in the outdir that has its 
       ** pixel values reduced by those in a.jpg. The absolute value of 
       ** the difference in the color values for each pixel is stored 
       ** in the outdir image. Files not ending in .jpg are ignored. 
       **  
       ** Usage: java JPGdiffAll a.jpg indir outdir
      

    2. Re-compute the average and standard deviation images based on the difference images. In the work above, you used the regular images. This time you will only use the difference images.

    3. Re-run the comparative statistics based on the difference images. Write down these results. You can cut-and-paste them to a text file for review later. How do they compare with your earlier findings?

    Questions

    Lab Results

    • What are some interesting differences? Volunteers accepted to show some image results.
    • What can be detected and what are possible uses of this kind of technology?
    • What kind of false signals might result?

    Technical observations

    • We used simple difference matrices in this lab. What would be achieved if we used variance? How would it be computed? Give it a try and record and view your findings.


Spring 2006 Privacy Technology
Professor: Latanya Sweeney, Ph.D. [latanya@dataprivacylab.org]