Combine multiple video frames into one using OpenCV

I’m playing a lot with OpenCV and object recognition recently (I started from Python, but now I’ve moved to C++) and what I wanted to do to make my life easier was putting 4 different video frames (original, thresholded, grayscaled & thresholded and original with marked face). Even if it’s not very difficult task, it took me a while to do it, because – definitely – I’m not an OpenCV expert. This article shows how I did it using the new 2.3 (or – actually – 2.X) OpenCV API.

Continue reading

A few words about Python’s extended slices

One thing that most Python users learn at the very beginning are list slices – defining a part of the list using the samplelist[begin:end] syntax. It’s great thing, but – surprisingly – many people don’t even know, that there’s different syntaxt for this, containing one additional parameter – “step”: samplelist[begin:end:step]. How does it work?

Continue reading

5 Python features you might not know about

Few days ago I was talking with my friend about most useful Python features we use almost every day. It was not about any sophisticated tools or libraries, but about the things we use often and which are “given” by the language and its syntax itself – the ones which we like just because they’re “pythonic”. I’ve picked and some of them, which are easy to describe in short devblog article. Even if most of these things should be known for most of the Python developers, I bet that many of you don’t know about at least one of them or just use to forget about using it ;)

Continue reading