Saturday, 28 November 2015

The Instagram Generation

Being an 80s kid, I have seen the technology evolve from nothing. I got my first PC when I was 8 years old - it was a very basic intel 386 desktop clocked at just a few Mhz. We only had MS-DOS and mainly used the desktop for games. It had no internet, a black and white monitor and an actual floppy disk drive. The 1.44mb floppy disk typically held 1-2 awesome MS-DOS games. I remember I used to get super excited when my dad would tell me that he is getting a new game. And some other unfortunate times when the floppy disks would fail to load, and I would be left anxious for the next day to try with a new disk. I was famous within all the kids on our block, who would want to come and play cool games. There was no concept of the online web, social media or any media at all. We had a camera that used a film that would only store 36 pictures. And because it took a day, at a photo studio, and some money to develop this film into pictures - these 36 moments were picked carefully. Someone's birthday, someone's happy and sad emotions on their first day going to school, picnics, family dinners, festivals, an achievement etc. The other pieces of technology we had were a TV which showed only 2 channels and a landline telephone (no internet). All the kids on the block used to play a sport (mostly cricket) in the streets.

Sunday, 25 October 2015

FFMPEG: Convert an image sequence to a compressed video

Just putting this here for my future self and anyone out there who might need to converts an image sequence into a video.

I have been using the following code to generate compressed videos from a big image sequence. It seems to have a really good balance between quality and compression.
ffmpeg -r 30 -f image2 -i out_%05d.png -vcodec libx264 -crf 25  test.mp4


Wednesday, 7 October 2015

Different types of Randomness..

Randomness is an integral part of a number of programming algorithms. In fact most of my research until now has been based on a computer algorithm that only uses random numbers for learning a specific task.

A while back I was trying to write some code to define and visualize different Random number generation models. For this task I was playing with a number of different algorithms and visualizing the output on a (kind of a ) probability map. [Not to mention that I use OpenCV for this project as well].

Some of these maps looked pretty cool, so I am just embedding them in this post - also if anyone is interested I have shared the link to this project at the bottom of this post, check that and modify --> make your own random distributions :D

So the input to each of my functions is a Uniform Distribution which looks like this:
A 2D Uniform Distribution

Tuesday, 21 July 2015

"Welcome to the Virtual World...may I take your username?"

Quick note: I wrote this a long time back, but never published - thought it wasn't good enough. This just occurred to me --> it's just a post - doesnt need to be perfect right?!? So posting this now - Please be sure to leave a comment with what you think!

Over the last few years, there have been some amazing advancements in gadgets - specifically the new imaging devices have emerged and a new horizon for virtual reality has been set. These devices have opened up a door for limitless future development possibilities. "Occulus Rift", the virtual reality head-mounted device that was received with overwhelming Kickstarter response, has been the pioneer in developing the key tech that can realise the virtual reality. The reason behind this huge success is an amazing idea which transfers all your senses into a digitally created world. Although this concept has been recently recognised, the idea has been around for decades.

Sunday, 24 May 2015

What if I told you, you can use OpenCV code with Matlab mex!!

Matlab is probably one of the best tools for quickly prototyping and testing your research ideas. As quick and flexible it is, sometimes Matlab code can consume a lot of execution time. This is specifically a big hurdle when multiple experiments need to be run. A real-time execution alternative is to implement Matlab compatible C++ code and compile it with mex-compiler. While this works most of the time, it is well known that quickly implementing ideas in C++ is not possible.