Wednesday, July 11, 2012

python and opencv

Install OpenCV and Python
Yesterday we had problem about installing OpenCV with python, so I tried to install on my computer and it work quite well here. I also have problem with new version of OpenCV (OpenCV version 2). It seems like new version of OpenCV is just a zip file and we need more step that we have tried but it didn’t work such as Add <...>\OpenCV\bin to the system PATH and so on.
What I have installed: python-2.6 and OpenCV1.1 (OpenCV1.1 is .exe file, so it automatically add path for us. If you found problem about downloading the old version of OpenCV, you can email me to send the link to you, it’s about 25.5 MB)
After you installed those two programs, you can try if it work or not by import these two libraries from Python shell

>> from opencv.cv import *
>> from opencv.highgui import *

If it works, it means you can use this function with python.
There are some examples that you can learn more from <yourOpenCVpath>\samples\python. They also provided the example for C if you prefer to use.

Getting start with Python
To create new project,

  • File>New Window, then you will have new space to create your program
  • Import CV and Highgui
    from opencv.cv import *
    from opencv.highgui import *
  • You can try with load image and show image here I show the image called penguins.jpg here is the program;

from opencv.cv import *
from opencv.highgui import *

img = cvLoadImage ("penguin.png",0)
cvNamedWindow("Image", CV_WINDOW_AUTOSIZE)
cvShowImage("Image", img);

while cvWaitKey(0) != 0x1b: pass

  • After that, for test your program just press F5.


I hope I might help you to start your project, you can email me if you have problem about programming or image procelssing. I would glad to help you if I could.

Monday, July 9, 2012

I was hacked!!

When I got Hacked!
It was just this morning, I woke up at 5:30 am as usual, took a bath, check e-mail. Then I found that I was hacked and it charged from my Credit card about 23k THB! (Around 600 Euro) Oh my god! I was like stunning for 30 seconds. I got the receipt from Paypal and Skype for purchasing Skype credit but I didn’t! It reduced my Paypal money 9 times and each time with 85.40 Euro!
My transaction last night

5:55 am

First, I called my credit card provider to check is it true and yes, it already in the bill! Oh my god! Then Costumer service transfer my line to technical support (I guess) and complain that I didn’t do any transaction please check! They asked me many question to make sure and tell me that they will check and call me later. As you see from the picture, I think I was hacked by Chinese hacker for sure! They send me the information about Skype activities in Chinese and I don't understand! This morning I was in hurry because I was in the line for so long and didn’t feel the breakfast anymore. I slept all the way to work.
Email I got

8:00 am
Arrived work place but my mind still thinking about the money. For your information, I don’t have internet access on my computer at workplace. So everything I have to done on my mobile phone.
I contacted Paypal team about my problem via their web form once, and then 10 minute later I realize that I might send with wrong type of problem because I expect that they will have the auto reply email to me but it didn’t. At that time I really want to make a call but the nearest local was located at Singapore! I didn’t worry about speak English but to call to Singapore so it means I have to use long distance call isn’t it? No way! Email is okay.
Web form from Paypal


What! Singapore,



9:15 am
After that just notice that I didn’t contact with Skype yet! I was paid from Skype, how can I forgot! I send my problem to Skype team and they have auto reply email. Gosh!
Skype status

9:44 am
Got Email from Paypal, they already review my account and suggest me to cancel an automatic payment on merchant-to-merchant basis. Honestly, I don’t even know what is it, but when I did on the steps, I found that it was automatic payment! You don’t need to make a review again if you do another transaction! That’s why I have like 9 transactions with the same amount! As I told you I never know about this function, it was shock because it show that I have active this activity since 2010! I think it was my first time buying Skype credit.

Automatic payment list
Merchant detail, it started from 2010, 2 years ago! Did they just hack me or they already plan since last 2 years?

10:09 am
Got Email from Skype, they need me to verify that the payments are genuine. So I need to have a live chat with agent to give them my information. Then, I need to prepare the information such as my Skype name, email address, Paypal email, transaction ID, etc.

10:30 am
After taking a break, talking to my mother and crying, I’m ready to have a live chat! I go to Skype chat room talking to Skype Staff, Mr. G. He asked me the information about my name, my account, my email and so on. He said it seems not usual compare with my previous transaction. Then they transfer my chat to Skype-Paypal staff, for specialize my problem. Then I talked with Mr. R. He just needed to review my account and the previous chat with Mr. G. Then he said like skype team already inspect my problem, I will got the email about the billing cancellation as soon as possible and then I need to filling the form about refunding from Paypal. We finished live chat around 12:30! Wow, It was time for lunch, I think I started to hungry.
Live chat with Mr. R, finally they can provide me a help :)

1:00 pm
I finished my lunch early in order to get anything done. I got the email from Skype about charge back my order so it means skype already confirm that all transaction last night have been made fraudulently. I filled the form about transaction information and sent them to Paypal. Right after I send, I got the email about investigating status. Paypal said skype has been asked to provide more information about the transaction. During this time, I cannot do any thing via paypal until they decided and then I'll got the refund for the amount of the transaction. It was about 10 days for investigate process. So I think I won't be the problem because I already got the charged back email from skype. I hope I'll get my refund soon. I have no money to pay for sure, I don't even have money to buy stuff.
One (from 7) of the email from Paypal
This is from Skype
Note from this morning. Not only the basic information, I also prepare some vocabulary about money and privacy activities



Wow! Finally! All done before the afternoon section, then I can concentrate to my work as usual. 

To prevent this experience
Skype and Paypal suggested me to change my password and security question. Moreover, they suggested to use Antivirus too. I'm not really sure, I use Mac OS. - -" And I can't believe I got hacked! As firefox said, มันช่างน่าอับอายยิ่งนัก, Computer Engineering student got hacked!

Pay safe,
Patama R.



Last but not lease
4:48 pm
I got the phone call from my credit card provider! What! Don't you think is it too late? The staff call me in order to ask for my email address because she want to send me what should I do to about this problem. She said, they provided Thai language for Thai customer (but why they go to Singapore! Why do I need to use long distance call while you have Thai language from Thai stuff! And this was really make me upset, the email said for Thai language, I need to call between 9am to 5pm but you called me at 4:48am! GOSH! I didn't complain her about how late they are, they might have many thing to do in order to email to paypal to check them for me. (- -”) because I got the email that was the forword mail from paypal team which are the same as I saw from the Paypal website except the have Thai language. She told me if I already got the email please forward all email to them to check and they will contact again if they got the refund from Paypal and Skype.