Archive for November, 2009

Hirai Ken, Pop star

I like this song because of many reasons. First it is easy to understand. Also it is very moving. I leave the appreciation for you to judge about it. Please share with me your comments.

Click to continue reading “Hirai Ken, Pop star”

IMG_0034

Tsukuba Mountain Hike

Today I had a trip to Mountain Tsukuba with TWMC Club.
I did not catch them in the beginning. I reached つつじヶ丘(Tsutsujigaoka) station. I got the rope way. It is really scaring view.

As you may know, Tsukuba mountain has two picks: One pick is associated with a girl. The second is associated with boy. There is a myth that this mountain bring love and bring couple together.

May be it is true. I met my wife there and I am living a romantic love story.

Here are some of my pictures I took there.

Remove items from deque, list or vector in a loop

Recently I needed to delete items from a sequence like a deque , list or vector from a for loop, I figured out that I have to do something like this:

for(iter = list.begin(); iter != list.end(); ++iter)
{
// your code
iter = list.erase(iter);
--iter;
// your code
}

It looks basic but it took me a while to figure it out so I wanted to share in case somebody need it.

Finally on Google Wave

I received yesterday an invitation from Google team to join the preview version of their last innovation “Google Wave”. They say: It will re invent the mailing service. Ok, let’s see.

This video shows in a funny way, what is Goole Wave.

Convert Polar image into Cartesian

This a simple implementation of Polar to Cartesian transformation applied to the image case. It is useful to unroll an omni image to convert it to panoramic image.

imgPol = cvCreateImage(cvSize(2*CV_PI*RadiusMax,RadiusMax-RadiusMin),IPL_DEPTH_8U,1);
cvSet(imgPol,CV_WHITE,NULL);
int x0,y0;
double Radius;
double Angle;
for(int x=1; x < imgPol->width; x++)
{
	for(int y=1; y < imgPol->height; y++)
	{
		Radius = RadiusMin + y;
		Angle = 2 * CV_PI * x / imgPol->width;
		x0 = cvRound(CenterX + Radius * cos(Angle));
		y0 = cvRound(CenterY + Radius * sin(Angle));

		cvSet2D(imgPol, y, x, cvGet2D(imgBase,y0,x0));
	}
}

cvSaveImage("imgPol.bmp",imgPol);