Exercise
Ex4: Counting Pixels with Histograms
Ex4: Counting Pixels with Histograms
- Goal: Histogram processing
- Know image histogram and how to utilize histogram to improve images
- Apply look-up table to enhance images
- Learn histogram equalization, histogram backpropagation, and mean sift
- Practice image retrieval by histogram matching
- Understand an integral image processing technique.
- Readings and sample codes
- OpenCV 3 computer vision application programming cookbook. R. Laganière, Packt Publishing, 2017. [Book URL]
- Please see the README.txt 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.
- 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 OpenCV3 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 OpenCV3 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 OpenCV3 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 OpenCV3 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 OpenCV3 PDF)
- tracking.cpp: Locate an object in the image. (p.144 in OpenCV3 PDF)
- 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 OpenCV3 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.
Ex3: Manipulating Pixels
Ex3: Manipulating Pixels
- Goal: Build OpenCV project and learn to access(read/write) image pixels.
- Practice some basic image processing functions: add noise, color reduction, image enhancement, image addition.
- Learn to access pixels by different ways: scanning an image with pointers, scanning an image with iterators.
- Learn to write efficient image scanning loops.
- Readings and sample codes
- OpenCV 3 computer vision application programming cookbook. R. Laganière, Packt Publishing, 2017. [Book URL]
- Chapter 1 Playing with images (pdf, code), Chapter 2 Manipulating the Pixels (pdf, code)
- Test images
- You can use the provided sample codes in your homework, but you have to replace the images with yours.
- OpenCV 3 computer vision application programming cookbook. R. Laganière, Packt Publishing, 2017. [Book URL]
- Report
- Create a web page with description texts and a lot of pictures for the following programs
- saltImage.cpp: Add salt-and-pepper noise into an image. (p.40)
- colorReduce.cpp: Reduce the number of colors into 1/N. (p.44)
- Compare speeds of different pixel access methods with the OpenCV function cv:getTickCount() to obtain the speed of pixel access (p.55).
- contrast.cpp: Enhance an image by sharpening methods. (p.60)
- addImages.cpp: Add two images to get a blended image. (p.64)
- remapping.cpp: Simulate a lens distortion to create a distorted images. (p.68)
- You have to give explanations of the codes. And you have to identify how did you modify the source code to get your results.
- Create a web page with description texts and a lot of pictures for the following programs
Submit your web address by Google Classroom.
Ex2: Install OpenCV
Ex2: Install OpenCV
- Goal: Download and install OpenCV 3.x on your computer.
- Instructions
- Go to OpenCV's home page: https://opencv.org/, and download v3.4.x for Windows or MacOS/Linux.
- Windows installation: Installation in Windows, How to build applications with OpenCV inside the Microsoft Visual Studio
- MacOS/Linux installation: Using OpenCV with gcc and CMake, Installation in Linux.
- There are more tutorials of MacOS installation on Internet. Please GOOGLE it by yourself.
- Readings
- Introduction to OpenCV
- Read the following materials What's new in OpenCV 3.4.
- Google search or Youtube search by yourself with the keywords: "OpenCV", "OpenCV Tutorial", ...
- Report
- Complete the installation of OpenCV 3.4.x
- Complete the readings
- Create a web page with at most 1000 words (Chinese or English) and a lot of pictures for
- What is OpenCV
- What is new in OpenCV 3.4.x
- How do you install OpenCV (with screen captures)
Submit your web address by Google Classroom.
Ex1. Create a web site for your homework
Ex1. Create a web site for your homework
- All of the home works in this course should be submitted to a web site created by you.
- The students have to use the FJU Google account: xxx@gapp.fju.edu.tw.
If you do not have a FJU Google account, please go to the FJU application page to apply a FJU Google account.
- Go to google sites "http://sites.google.com/new", use your FJU Google account to log in, and create a web site called: "XXX website for Image Analysis course".
- Fill-in your web site
- Upload some of your personal pictures into your web site.
- Create four web pages: Home, HW-exercise, HW-reading, HW-programming.
- Sample: Stephanie Wang for CV 106-2 course
Submit your web address by Google Classroom.