Posts

Showing posts from June, 2019

Program of the Week 03 - Motion Detection Using OpenCV

Image
So this week as promised last week I'll delve a bit into OpenCV. I've used OpenCV for object detection and facial recognition and detection in the past, but I would not like to go that deep into it for the time being. Today we'll take something much more simple, okay not as simple as opening up an image and changing some colors or say using grayscale or blurs and the like; I'll be doing a small program on motion detection using differences between frames and contours. Now contours are basically an outline that represent or bound a shape of an object. Contours will be used to pin point the motion happening in the image. This is a fairly simple example where I'll be using my webcam to basically detect some motion in the video feed. Before we do that, we'll apply some transformations to the incoming video frames and use these to detect motion. There are several programs for this already online, but I'll do this one here as a start. Code

Program of the Week 02 - Unique Element

So initially I was planning to do a program on basic object / motion detection from video using opencv. I tried to find my old code for it but was unable to find it. So I thought rather than wasting time finding it, I'd rather find it myself. But since you are reading this long introduction and you probably have read the title by now, that ain't happening; this week at least. So what alternative I have then today, pretty sure there are a ton of programs for finding unique elements from a list or what not, and this one will probably join its ranks as well. A little bit of backstory for the problem / program at hand is that last week one of my friends went for an interview for a new job. He'd cleared many rounds before and was now in the technical round. The problem given to him was simple: "Given a list of elements, you need to find the non-repeating element from the list. The space complexity needs to be O(k) and