Image Processing

What is image processing?

As per wikipedia (over simplified explanation), Image Processing involves signal processing where an image is the input signal. The purpose of processing is to either get another image or extract some features from the image.

 

Role of Image Processing in ADRA?

One of the challenges in our project is that of detecting and identifying humans in the scenario. The surveillance copter provides imagery data to the master node for processing, through cameras (and/or other sensors) mounted on it.

ADRA - IP Workflow

 

Peek into our Image Processing Techniques?

In our project, we are using OpenCV for the purpose of Image Processing, and in particular Histograms of Oriented Gradients algorithm for human detection. By default, OpenCV comes with its own HoG implementation, however we have decided to train the algorithm with our set of base pictures.

I’ll try to walk you through some of the basics of image processing in OpenCV:

[ NOTE: You can take a look at the examples library at github/vageeshb ]

#include <iostream>
#include <opencv2/opencv.hpp>

using namespace cv;
using namespace std;

int VC_Example()
{
    // Create the Video Capture Object
    // and open video device with index '0'
	VideoCapture cap(0);

	// Check if capture object failed to open
	if(!cap.isOpened()) {
		cout << "Could not open video cam" << endl;
		return -1;
	}

	// Get the device;s frame resolution (width X height)
	double dWidth = cap.get(CV_CAP_PROP_FRAME_WIDTH);
	double dHeight = cap.get(CV_CAP_PROP_FRAME_HEIGHT);

	cout << "Frame size: " << dWidth << " x " << dHeight<< endl;

	// Create a window to show our captured frame
	namedWindow("Video", CV_WINDOW_AUTOSIZE);

	// Loop until user wants to quit
	while(1) {
		Mat frame;

		// Read frame from capture object to matrix 'frame'
		bool b = cap.read(frame);

		// Check if frame capture failed
		if(!b) {
			cout << "Could not read frame" << endl;
			return -1;
		}

		// Show the frame in the window
		imshow("Video", frame);

		// Quit if user presses 'ESC Key'
		if(waitKey(30) == 27) {
			cout << "Esc key pressed by user" << endl;
			break;
		}
	}

	return 0;
}

I hope you found this introduction to Image Processing interesting, and I look forward to discuss advanced topics in the future.