Assignment - Code
OpenCV file 1 - Bitwise Operations
Opencv file 2 - Simple Image Thresholding
Invisibility Cloak - Code
Paper Keyboard - Code
Documentation of what I learnt from 23rd to 29th march 2020
GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.
Learnt how to -
- Create and use a repository
- Start and manage a new branch
- Make changes to a file and push them to GitHub as commits
- Open and merge a pull request
Made my first github repository.
References- Github basics
Markdown is a lightweight markup language with plain-text-formatting syntax.Markdown is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor.
Learnt how to -
- Create headers H1 to H6
- Italicize, bold, strikethrough words
- Create ordered and unordered lists
- Creating links, tables and linebreaks
- Putting images and blockquotes
- Code and Syntax Highlighting
References- Markdown Quickguide
Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.
- Learnt about numbers, strings and lists in python
- Control flow statements: if and for statements, range() function, break, continue, pass statements, defining functions, lambda expressions
- Data structures: Tuples, dictionaries,
- Input and output: formatting strings
- Errors and Exceptions
- Classes
References- Python resource 1, Python resource 2
NumPy is an extension package to Python for multi-dimensional arrays. It is a general-purpose array processing package library and is highly optimised for numerical operations.
Learnt-
- Creating arrays, data types, indexing and slicing
- Numerical operations on arrays: Elementwise operations, Basic reductions, Array shape manipulation, Sorting data
Matplotlib is probably the most used Python package for 2D-graphics. It provides both a quick way to visualize data from Python and publication-quality figures in many formats. We are going to explore matplotlib in interactive mode covering most common cases.
Learnt-
- Plotting: Changing colors and line widths, Setting limits and ticks and labels, Adding a legend
- Figures, Subplots, Axes and Ticks
- Regular plots, Scatter plots, Bar Plots, Contour Plots, Pie Charts, Grids, Multi Plots
The scipy package contains various toolboxes dedicated to common issues in scientific computing. Its different submodules correspond to different applications, such as interpolation, integration, optimization, image processing, statistics, special functions, etc.
Learnt-
- Linear algebra operations
- Interpolation
- Optimization and fit: Curve Fitting, Finding the minimum and roots of a scalar function
- Distributions: histogram and probability density function
- Mean, median and percentiles and Statistical tests
- Numerical integration: Function integrals, Integrating differential equations
- Fourier Transforms: Denoise moon landing image and Signal Processing
- Image Manipulation: Geometrical transformations on images, Image filtering, Mathematical morphology
References- Scipy Lectures
In this week we were given our First assignment which consisted of four questions based on basics of python and involving numpy, matplotlib and scipy. We were divided into teams consisting of four members and each member was required to solve one question.I took the question in which we were asked to create certain functions, apply them and visualising their results. In that problem we were to write code for mean filter in which we play with means instead of median as in median filter.Mean filter is an image processing technique to remove noise and smoothen the edges of an image. We were asked to create another function to generate sin wave. Next we need to write a function to add gaussian noise. Gaussian noise is statistical noise having a probability density function (PDF) equal to that of the normal distribution, which is also known as the Gaussian distribution.In other words, the values that the noise can take on are Gaussian-distributed. Finally, we need to create a function applying already created functions. I learnt to apply various functions of numpy and matplotlib.
OpenCV is an open source computer vision library. It is a library of programming functions mainly aimed at real-time CV. It mainly deals with images and videos. It is an image processing library created by Intel. Numpy is automatically installed with opencv and all opencv array structures are converted to and from numpy arrays. There are several things which I learnt-
- To read, write and show images and videos from camera in OpenCV
- Draw geometrical shapes on images and detecting geometrical shapes
- Setting camera parameters and showing date and time on videos
- Handling mouse events
- split, merge, resize, add, addWeighted functions and region of interest related concepts
- Bitwise operations and Binding Trackbars
- Object Detection and Tracking using HSV color space , Simple and Adaptive Image Thresholding
- Matplotlib with OpenCV
- Morphological Transformations and Smoothing or blurring images
- Image Gradient and Edge Detection and Canny edge detection
- Image pyramids and blending images using pyramids
- Finding and Drawing Contours and Motion Detection and Tracking using OpenCV contours
- Image histograms and Hough Line Transform theory( Standard Hough Transform and Probabilistic Hough Transform)
- Road lane line detection and Circle detection using Hough Circle Transform
- Face and Eye Detection using Haar Cascade Classifiers
- Detection of corners with Harris corner detector and Shi Tomasi corner detection
- Background Subtraction methods
- Mean shift and Camshift Object tracking
References- OpenCV Tutorials, OpenCV Videos
Next, we were asked to make 2 files each for different functions of opencv in github opencv-master folder. I wrote about Bitwise Operations and Simple Image Thresholding
Next, we were asked to write code for Invisibility Cloak .An invisibility cloak is a magical garment which renders whomever or whatever it covers invisible.
Steps involved in it are -
- Capture and store background frame( use VideoCapture class to capture video and read() method to get background frame)
- Detect red coloured(we can also use some other colour) using color detection algorithm (use trackbars or lower and upper range directly)
- Segment out red coloured cloth by generating a mask.
- Generate the final augmented output to create the magical effect
We were given Sudoku Solver Project. I was able to complete Image preprocessing part but could not complete digit recognition part using machine learning because of which I could not complete this part. I learnt perspective and warped transformation and approxing polygon. I enjoyed working and trying this part.
In this week we were asked to implement code for paper keyboard. Completed paper keyboard implementation.