Posts

Showing posts from September, 2020

Geometric image transforms

Image
 The sample code and data for this tutorial can be downloaded from here . The result files are here . The accompanying slide deck for this tutorial is here . After downloading the code, run the following commands:  acv@acv-vm : ~/vision/practice/bin $ cmake ..; make; ./homework transformDemo -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Found OpenCV: /usr/local (found...

Testing image capture with high speed cameras

Image
In industrial systems, objects may be moving along conveyor belts or carried on pick and place machines. A camera based inspection solution for such situations needs to take into accoun that the object in question may not be stationery, or at a fixed distance from the camera. Ergo, the captured image may not contain the object in focus, or not have the object in view at all. One option would be to stop the conveyor belt to take a photo of the object:   However, stopping a conveyor belt is not always possible. You would need cameras that can capture a clear image even when objects are moving. Enthusiasts naiively assume that one can take a video and perform analysis on individual frames of the video. Unless the video has the correct frame rate and good resolution, the solution would not work. Assume that you need to implement an industrial imaging solution to monitor items moving on a conveyor belt. You should consider specifications such as these: Distance from camera t...

Adding sine curves to obtain a complex 1D signal.

Image
The following code demonstrates how different sine curves can be added to obtain a complex signal. demoSine(){ const int maxTime = 300; const int numSignals = 5; float phase[numSignals] = {0.06, 0.1, 0.2, 0.4, 0.55}; float amplitude[numSignals] = {50, 40, 10, 30, 20}; Scalar colors[numSignals] = {Scalar(255,0,0), Scalar(180,170,255), Scalar(0,0,255), Scalar(0,255,0), Scalar(255,0,255)}; double y[numSignals][maxTime]; double allAdded[numSignals][maxTime]; //int yAxisLocation = 100; int imageColumns = maxTime; int minY = 1, maxY = -1; for (int i=0; i = 2){ value = allAdded[i-2][x] + y[i][x]; allAdded[i-1][x] = value; } if (minY > value) minY = value; if (maxY 2000){ std::stringstream errMsg; errMsg

Designing Gaussian, Averaging, and Fourier frequency domain filters using Opencv

Image
This tutorial covers the design of various types of filters using Opencv. Source code and input images for this tutorial can be downloaded from here . The result images are here . A set of slides explaining the theory behind these processes is here .  After unzipping the code, run the commands as shown below. The output should also be similar to what is shown.  acv@acv-vm : ~/vision/practice/bin $ cmake ..; make; ./homework correlationDemo -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile ...

Correlation using OpenCV

Image
 This tutorial covers the correlation operator in OpenCV. The slides relevant to this tutorial can be downloaded from here . The source code for this tutorial can be accessed from here . The result files that we will discuss can be downloaded from here .  Unzip the result and source zip files to a folder on your system and run the following commands: "cmake ..; make; ./homework". We have unzipped the source code into the folder /vision/practice/. You should see the following output: acv@acv-vm:~/vision/practice/bin$ cmake ..; make; ./homework -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- wo...

NCERT Class 7 Chapter 1 - Integers

Image
 This tutorial discusses NCERT Class 7 Chapter 1 - Integers. We cover the following topics: Number line How to perform  + - x and ÷ operations with integers  BODMAS (Not in your book) Properties of operations on Integers Closure under + - x and ÷ Identity  under + - x and ÷ Commutative property of  + - x and ÷ Associative Property of + - x and ÷ Distributive Property of + - x and ÷ Click on this link to download the material used in this tutorial and video lecture. The video lectures are: