Week4: Introduction to OpenCV

Sumary

Assigments

Basic Operations

Assign 1

  • Inspect the pixel x=300, y=25 of ../images/input.jpg
    • Which values have the RGB channels?

Assign 2

  • Crop the image "input.jpg" to centered rectangle with half the width and half the height of the pyramid in the photo

Assign 3

  • Develop a script which create a puzzle of an image (swapping four regions of a picture in clockwise), and one of the quarter only is shown the green channel as in the example
    1. Taking as input the Lena image avaliable in images directory

Original Lena image

    2. As an output the image (swapped) should be created

Swaped Lena image

Image Processing

Assign 4

  • Detecting lane lines on a binary mask
    • Create a masks to be applied e.g. ROI (trapezoid) to lane detection

image

Assign 5

  • Create a code that segmentated the ball of a video using cv2.inRange function
  • A video can be found in the link

image

Assign 6

  • Create an application that count the number of coins through an image as in the following images
  • Extra: can be extended using CSI camera in real-time and counting

Image Image

Assign 7

  • Detecting lane lines on a binary mask
  • Create a masks to be applied e.g. ROI (trapezoid) to lane detection
  • Detect lane from the road appling the Hough transform

Assign 8

  • Using Hough transform, it is also possible to detect circles
  • Use the OpenCV function HoughCircles() to detect circles in an image. Take as input images the coins examples