Search this site
Embedded Files
Skip to main content
Skip to navigation
Computer Vision 106-2
Home
Announcement
CV News
AI News
CV Industry
Syllabus
Tutorial
Supplement
Homework
Exercise
Programming
Reading
Student's Work
About This Course
Schedule
Computer Vision 106-2
Home
Announcement
CV News
AI News
CV Industry
Syllabus
Tutorial
Supplement
Homework
Exercise
Programming
Reading
Student's Work
About This Course
Schedule
More
Home
Announcement
CV News
AI News
CV Industry
Syllabus
Tutorial
Supplement
Homework
Exercise
Programming
Reading
Student's Work
About This Course
Schedule
Programming Homework HWP1:
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 2 computer vision application programming cookbook. R. Laganière, Packt Publishing, 2011. [
Book URL
]
Chapter 1 Playing with images (
PDF
,
code
), Chapter 2 Manipulating the Pixels (
PDF
,
code
)
OpenCV 3 computer vision application programming cookbook. R. Laganière, Packt Publishing, 2017. [
Book URL
]
Chapter 1 Playing with images (
code
), Chapter 2 Manipulating the Pixels (
code
)
Test images
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
saltImage.cpp: Add salt-and-pepper noise into an image. (p.40 in OpenCV2 PDF)
colorReduce.cpp: Reduce the number of colors into 1/N. (p.43 in OpenCV2 PDF)
Compare speeds of different pixel access methods with the table in p.53. (p.53 in OpenCV2 PDF)
Use an OpenCV function cv:getTickCount() to obtain the speed of pixel access.
contrast.cpp: Enhance an image by sharpening methods. (p.57 in OpenCV2 PDF)
addImages.cpp: Add two images to get a result image (p.61 & 65 in OpenCV2 PDF)
Note for
the students who already did this homework
Study the
Video IO
and
Video Analysis
modules of OpenCV, and write a report. Yo have to show some programming results in your report.
References from OpenCV tutorials:
Video Input and Output (videoio module)
,
Video analysis (video module)
Report abuse
Report abuse