Linear Algebra in OpenCV: Assignment, Cloning and Accessing Sub-parts

In the last post, we saw the basic methods to load and display matrices. Let us see some more aspects of an OpenCV matrix. Matrix Assignment and Cloning In opencv, the assignment (“=”) operator does not copy a matrix. It only attaches a new label or alias to a matrix. In c/c++ when we write A = B, we expect A and B to be two different variables with same value. However, in OpenCV, such an assignment operation will actually say that A and B are invariably the same matrix. This will be illustrated in the following opencv snippet.

Continue Reading

Linear Algebra in OpenCV: OpenCV Matrices

I know many people will look at me in frowning eyes after reading the title. Yes, OpenCV is an image processing and computer vision library. But believe me, the most rudimentary works you need to do in these fields are essentially “Linear Algebra”. Think about an image — it is a matrix; and most of the time you’ll work on matrices. Even other data structures like vectors and points — all are some kind of matrices. Necessity of doing linear algebra is one of the main reasons for burgeoning MATLAB (which is an acronym for MATrix LABoratory) libraries for image processing. In fact, …

Continue Reading

Picture of the Biggest Moon

Last night was a night of biggest moon for this year. I tried to capture some pictures of the moon using my Canon EOS Rebel T3. It was getting overexposed in the beginning. The picture was looking like a bowl of white milk. Then I started reducing the exposure by increasing the shutter speed while keeping the ISO fixed to 100. Then I got a shot. How is it?

Continue Reading