Blog of things

PiWars 2019 Diary - Mid October update

2018-10-17

It's been a month since our last post and our PiWars build has been chugging along slowly but surely. Unfortunately I am not getting solid chunks of time, instead it is little bits at a time, but I've managed to do it regularly. A few things happened since our last post a month ago:

read more

PiWars 2019 - So it begins

2018-9-18

I sent my PiWars 2019 application in about ten days ago (weekend before last). I wasn't ready to the extent I wanted, but then again, you never are, and I didn't want to wait for the last two weekends. Hopefully the application has enough meat to see it through the first round of eliminations. I can't reveal much about the application until the results are announced so, suffice to say, brand new, built from scratch, robot, by the same team as last year. It does have a new name though :).

read more

OpenCV Baby steps 6: From VM to metal, OpenCV 3.4.2 on RaspberryPi

2018-8-8

Last weekend a fellow PiWars competitor (Vishal) pinged me and said my instructions for installing OpenCV on RaspberryPi were not working. OpenCV was getting installed but Python wouldn't load it, with missing dependency errors. My entire OpenCV series is for the sole purposes of a gentle introduction to OpenCV including how to set it up. If it wasn't working, we had a major problem. It was time to go digging...

read more

OpenCV baby steps 5b: Tweaking HSV masks using Morphological transformations

2018-7-19

Well I did think I'll get to blogging so quickly again, but I am currently 'marooned' at one of the most scenic places on earth - Columbia Ice Fields, Jasper, Canada. Our bus has been impounded by the DoT and we are waiting for a replacement. I've done the nearby hikes and now sitting around in a sun lounger. This was too good a place to not write some code or write about code 🤓. So today I'll just add a couple of lines of code to our previous application, that will improve the HSV mask and make the circles more contiguous.

read more

OpenCV baby steps 5: Tracking multiple colours

2018-7-17

Sorry, its been a while since I took my last baby step. I have been in the midst of a few things and funnily enough, as I start typing this, I am actually holidaying in Canada. The drive from Vancouver to Kamloops is very very scenic :D. Eitherways, learning never stops, holidaying or not. I have been struggling to go ahead with my plans to track multiple coloured objects in the same frame. I mean in the last post we saw how we can identify four coloured balls using HSV masking. Also in step 3 we saw how to detect circles using OpenCV's HoughCircles function. What I wanted was a combination of the two - Detect position of a ball of my choice e.g. Red ball is placed here (x,y,radius). Turns out it was my lack of Python knowledge than OpenCV that got in the way. OpenCV continues to amaze me for its versatility and ease of use.

read more

OpenCV baby steps 4: Building a HSV calibrator

2018-6-26

So far we have taken small bits of OpenCV goodness and explored them independently. Today we are going to see how we can combine a few things together and build ourselves a small app that helps us convert a coloured image into its Hue, Saturation and Value equivalent, and then adjust the HSV range to isolate one or more colours in the image.

read more