Skip to main content

Posts

Showing posts from 2013

Converting a Panoromic Image into a circular Image

rect2circ.c is a small piece of C code based on OpenCV to convert a panoramic image into a circular image. My idea was to convert a speech signal recorded for a long duration of time continuously to be represented in a way the time during which it was recorded. In the below image it is between 10 and 5. While this is simple, I did not find anything readily available and hence write this small piece of C code using OpenCV . The usage (when compiled) is Usage: ./rect2circ -> an input rectangle image -> output circular image -> start time (0 .. 12) -> number of hours (0 .. 12) -> inner radius (0 .. 200) The source code. /*====== Convert a panoramic image into a circular image. La updated by Sunil Kumar Kopparapu at 21/10/2013 (23:07) ===== */ #include "stdio.h" #include "stdlib.h" #include "math.h" #include "opencv/cv.h" #include "opencv/cxcore.h" #include

Math Problem: When is Sn = n^2+20n+12 a perfect square?

This is a question that appeared in RMO in 2012 I guess. Let  Sn = n^2+20n+12,   n is a positive integer.  What is the sum of all possible values of n for which Sn is a perfect square.  Solution:   The solution was suggested by one of my colleagues Ashish Panda.

Remembering -My Umbrella-

May 2006 Baba. Mamoni says that I can not play outside because it is drizzling. Can we play inside? says Sumit my 4+ year son. It is 630 am on the penultimate day of May 2006. I seldom make a note of when the monsoon starts in Mumbai because I depend on MRF advertisement to tell about the MRF rainday! I don’t know if the newspaper still carries an advertisement about the possible rainday because of late I have switched loyalties to another new(s)paper who were prepared to supply newspaper for one full year for the price of 1 month subscription of my earlier paper. As I listen to Sumit my mind goes back in time down the memory lane trying to sense my own reaction to Mumbai monsoon. Mumbai monsoon can be very unwelcome especially if one is staying in Tiruchirapalli, a small sleepy town in south India, which hardly saw any rains in my three years stay there was substituted by the monsoon in Mumbai. The feeling can be overwhelming if this change happens in a span of 24 hours after a l

Driving in Mumbai

Driving in Mumbai can be crazy especially if you are a new driver or if you have only driven on rules following drivers. However there are stretches in Mumbai depending on the time of the day and the direction of the ride that allows you to drive quite comfortably. So if you are new driver or a driver new to Mumbai roads, do not panic. It is quite alright to drive in Mumbai. I thought some real and actual drives might be useful for someone who might be wondering what is it to drive in Mumbai drive on Eastern Express (Freeway) Highway drive in Monsoon Eastern Express Highway Driving on the Mumbai Eastern Express ( Video ) Highway (EEH) is not so bad if you are driving against the traffic! What started off as an intent to capture the long jam along the EEH turned out to be a nice view of the EEH. Happy Video Eastern Express Ride ;-) Weekdays mornings from Chembur to Thane and Weekdays evenings from Thane to Chembur While the recommended max speed is 60 kmph; unless you d

Some Useful Stuff that I use (Linux/Video)

These are some of the command like stuff that I use regularly. I thought I will put all of this in one place; though you will find a lot more detail if you GoBiYa! Playing a VCD $ mplayer vcd://1 $ mplayer-cdrom-device /dev/cdrom vcd://1 Playing a DVD $ mplayer dvd://[title [start_title]-end_title] [options] Ripping a DVD $ mplayer -dumpstream dvd://2 -dumpfile ripped_output.avi Creating an MPEG-4 file from JPG all the JPEG files in the current directory $ mencoder mf://*.jpg -mf w=800:h=600:fps=1:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi list of JPEG files (list.txt in current directory contains the list of files to use as source, one per line) $ mencoder mf://@list.txt -mf w=800:h=600:fps=25:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi Combining two videos concatenate 2 avi files $ cat 1.avi 2.avi > 12.avi   combing audio and video files $ mencoder -oac

SMC2F: Helping Socalize

I got a call from one of my friends asking me if I had called. Shamelessly I admitted that I had not called because that was the truth; but the fact was that I had always wanted to call him but finding a non-busy slot which is an intersection of not-busy slot of my friend and the not busy-slot of me was null for a good long time. Nevertheless to say we never called each other for a long time. Nonetheless we eventually ended up talking for a quite a few minutes. I guess this is a very common scenario and most of us can relate to this in one form or other. We want to socialize but do not know when or how. When the number of days from the lasttime we called increases, the resistance to make the connect increases. So the connect is not made for a long time and sometimes it is a life time. Can technology help? Mobile phones are omni present. They have our contact telephone number and they have a good memory. Why not mix all this up and enable Smart Missed Call to Connec