Programming Homework

HWP2: Counting Pixels with Histograms

Goal: Histogram processing for image enhancement

    • Know how to enhance image by histogram processing
    • Apply look-up table to enhance images
    • Learn histogram equalization, histogram backpropagation, and mean shift
    • Practice image retrieval by histogram matching.

Readings and sample codes

    • OpenCV 3 computer vision application programming cookbook. R. Laganière, Packt Publishing, 2017. [Book URL]
      • Chapter 4 Counting Pixels with Histograms (PDF, code)
    • See the README.txt in code for more details of sample codes.
    • You can use the provided sample codes in your homework, but you have to replace the images with yours.

Web Report

    • Create a web page with description texts and a lot of pictures for the following programs
      • histogram.cpp: (1) Computing the image histogram. (2) Equalize the image. (3) Applying Look-up Tables to Modify Image Appearance. (p.106, p.107, p.112, p.114, p.116, p.117 in PDF)
        • Change the image and the look-up tables to practice this sample code.
      • contentfinder.cpp: Backprojecting a Histogram to Detect Specific Image Content. (p.118, p.120, p.124 in PDF).
        • Change images with blue sky or green grass to get your results.
      • finder.cpp: Using the Mean-shift Algorithm to Find an Object. (p.126, p.128 in PDF).
        • Change the image with persons and use human's face as the target to apply mean-shot algorithm.
      • retrieve.cpp: Retrieving Similar Images using Histogram Comparison (p.132 in PDF)
        • Collect a set of images with "similar colors". Use one image as query image, all the other images as gallary images. Retrieve similar image of the query from the gallery.
      • integral.cpp: Create a binary image by adaptively setting a threshold. (p.140 in PDF)
      • tracking.cpp: Locate an object in the image. (p.144 in PDF)
    • You have to give explanations of the codes. And you have to identify how did you modify the source code to get your results.
    • Submit your web address by Google Classroom.