Posts

Showing posts from February, 2012

Thresholding (Iterative Method)

Image
Thresholding is inevitably one of the mostly used image processing algorithm. It is told as the simplest method of image segmentation. In this post, I want to introduce one thresholding algorithm that is powerful enough yet simple enough to implement. The method called "Iterative Method." Below is the step by step used in the algorithm: An initial threshold (T) is chosen, this can be done randomly or according to any other method desired. The image is segmented into object and background pixels as described above, creating two sets: G 1  = {f(m,n):f(m,n)>T} (object pixels) G 2  = {f(m,n):f(m,n) T} (background pixels) (note, f(m,n) is the value of the pixel located in the  m t h  column,  n t h  row) The average of each set is computed. m 1  = average value of  G 1 m 2  = average value of  G 2 A new threshold is created that is the average of  m 1  and  m 2 T’ = ( m 1  +  m 2 )/2 Go back to step two, now using the new threshold computed in step four, kee

Android and Security

By Hiroshi Lockheimer, VP of Engineering, Android The last year has been a phenomenal one for the Android ecosystem. Device activations grew 250% year-on-year, and the total number of app downloads from Android Market topped 11 billion. As the platform continues to grow, we’re focused on bringing you the best new features and innovations - including in security. Adding a new layer to Android security Today we’re revealing a service we’ve developed, codenamed Bouncer, which provides automated scanning of Android Market for potentially malicious software without disrupting the user experience of Android Market or requiring developers to go through an application approval process. The service performs a set of analyses on new applications, applications already in Android Market, and developer accounts. Here’s how it works: once an application is uploaded, the service immediately starts analyzing it for known malware, spyware and trojans. It also looks for behaviors that indicate an appl

Sale Queue

A big shop selling nice principal foods is doing a big sale. Early in the morning, there has already been a long queue of people waiting for the shop to open at 9 o'clock in the morning. An old man looked so inpatient and cut the queue to the front. The people there were so mad and yelling, "Hei!! On queue please....", and pushing the old man to the back again. The old man seemed not really care about this. He tried again to cut the queue and walk to the front. The second time, people there yelled at him and pushed him to the back. For the third time, he walked again to the front. This time, the people there lost their patience. Whilst cursing him, they pushed the old man 'till he felt down.... The old man then stood up and yelled, "If you guys dare to push me again, I won't open the shop!! I'll let you guys queue 'till old!! Haiya!!!"

Kisah Nyata Seorang Anak Bernama Andoy dari Filipina

This post is in Bahasa. Ada seorang anak kecil kelas 4 SD yang selalu mengucap syukur dalam keadaan apapun. Ia tinggal di suatu desa di Negara Filipina. Setiap hari untuk sampai ke sekolahnya ia harus berjalan kaki melintasi daerah yang tanahnya berbatu dan menyeberangi jalan raya yang berbahaya dimana banyak kendaraan yang melaju kencang. Setiap kali berhasil menyeberangi jalan raya tersebut, Andoy selalu mampir sebentar ke Gereja untuk berdoa. Tindakannya ini diamati oleh Pdt. Agaton. Karena merasa terharu dengan sikap Andoy yang lugu dan beriman tersebut. Suatu hari ketika Andoy hendak masuk ke Gereja Pdt. Agaton menyapanya. Bpk. Pdt : "Selamat pagi Andoy, apa kabarmu? Apakah kamu akan ke sekolah?" Andoy : "Ya, Bapa Pendeta!" balas Andoy sambil tersenyum. Bpk.Pdt : "Mulai sekarang saya akan membantu dan menemani kamu menyeberangi jalan raya tersebut setiap kali kamu akan menyeberang. Andoy : Terima kasih, Bapa Pendeta." Bpk. Pdt : "sekarang a

Whatsapp in Indonesia?

Whatsapp was establishing them-self by claiming that they will be a good replacement for SMS service provided by default by network operators (go to http://www.whatsapp.com/ for more information) . However, can whatsapp really do that good job? Below are eight reasons I found why whatsapp won't do a good job as SMS replacement in Indonesia (yet maybe): Internet connection here is not stable and reliable enough to make sure that the message will arrive instantly. Even here, we cannot make sure that SMS will arrive instantly. People tend to ignore whatsapp notification compare to SMS notification. The server is just not too stable as the number of users is increasing (for now maybe) People tend to mute the notification for whatsapp or other instant messaging (not including BBM though) but not SMS. It means, they will know if a new SMS (or BBM message) arrived, but not whatsapp. For some people, turning off internet will cost them less money and of course save more battery power

Consecutive Letters

This is an answer for test case 2 given by PT. GDI Indonesia, as can be seen from its website ( http://www.ptgdi.com/#Career ).... The code is in C++ // // main.cpp // Consecutive Letters // // Created by Handra on 5/28/11. // Copyright 2011 Handra. All rights reserved. // #include <iostream> using namespace std ; int main ( int argc , const char * argv [ ] ) { char letters [ ] = "AAAAAAAAAA" ; int number = 0 ; do { if ( number == 1000 ) { number = 0 ; for ( int i = ( int ) strlen ( letters ) - 1 ; i >= 0 ; i -- ) { if ( letters [ i ] != 'Z' ) { letters [ i ] ++ ; break ; } } } cout << letters << ( ( number < 10 ) ? "00" : ( number < 100 ) ? "0" : "" ) << number << endl ; number ++ ; if ( strcmp ( letters , "ZZZZZZZZZZ" ) == 0 && number == 1000 ) break ; } while ( true) ; return 0 ; }

1 to 1000

This is an answer from the test case 1 given by PT. GDI Indonesia ( http://www.ptgdi.com/#Career )... The code is in C++ // // main.cpp // 1 to 1000 // // Created by Handra on 5/28/11. // Copyright 2011 Handra. All rights reserved. // #include <iostream> using namespace std ; int main ( int argc , const char * argv [ ] ) { unsigned int number = 1 ; unsigned int lastStep = 3 ; unsigned int step = 0 ; for ( number = 1 ; number <= 1000 ; number ++ ) { cout << number ; step ++ ; if ( number < 1000 && ( ( lastStep == 3 && step == 5 ) || ( lastStep == 5 && step == 3 ) ) ) { lastStep = step ; step = 0 ; cout << "*" ; } } return 0 ; }

Physics Exam

The following concerns a question in a physics degree exam at the University of Copenhagen: "Describe how to determine the height of a skyscraper with a barometer." One student replied: "You tie a long piece of string to the neck of the barometer, then lower the barometer from the roof of the skyscraper to the ground. The length of the string plus the length of the barometer will equal the height of the building." This highly original answer so incensed the examiner that the student was failed. The student appealed on the grounds that his answer was indisputably correct, and the university appointed an independent arbiter to decide the case. The arbiter judged that the answer was indeed correct, but did not display any noticeable knowledge of physics. To resolve the problem it was decided to call the student in and allow him six minutes in which to provide a verbal answer which showed at least a minimal familiarity with the basic principles of physics. For five

A Short Story of Blind Woman

Once upon a time, there was a blind woman. Everyone hated her, except her lover. The woman always said, "I will marry you when I am able to see." One day, someone donated eyes to the woman. At last, she could see the world. In a hurry, she went to meet her lover. Unfortunately, she was really shocked when she saw her lover, because he was also blind. Her lover asked, "Will you marry me?" Without any reason, the woman rejected the proposal. Her lover then just smiled and went away whilst saying, "Please take care of my eyes..."

Kelompok 99

This post is in Bahasa. Apakah Anda termasuk anggota Kelompok 99? Apa yang sedang saya bicarakan? Mari dengar suatu kisah terlebih dahulu dan baru Anda bisa menjawabnya. Zaman dahulu kala, hiduplah seorang Raja. Raja ini seharusnya puas dengan kehidupannya, dengan segala harta benda dan kemewahan yang ia miliki. Tapi Raja ini tidak seperti itu. Sang Raja selalu bertanya-tanya mengapa ia tidak pernah puas dengan kehidupannya. Tentu saja, ia memiliki perhatian semua orang kemana pun ia pergi, menghadiri jamuan makan malam dan pesta yang mewah, tetapi, ia tetapi merasa ada sesuatu yang kurang dan ia tidak tahu apa sebabnya. Suatu hari, sang Raja bangun lebih pagi dari biasanya dan memutuskan untuk berjalan-jalan di sekitar istananya. Sang Raja masuk ke dalam ruang tamunya yang luas dan berhenti ketika ia mendengarkan seseorang bernyanyi dengan riang... dan perhatiannya tertuju kepada salah satu pembantunya... yang bersenandung gembira dan wajahnya memancarkan sukacita serta kepuasan. H

Five NIE Practices

IT is now indeed an indispensable component of Business. For a business to move faster and bigger, there need to be a great support by IT. This makes the management of IT and how it used accordingly to support business even more important. In the New Information Economics (NIE) era, there are five common practices that are used in managing IT so that it can give its full potential to support the bottom-line impact of the business. Below are the five NIE practices to help company manage its business and IT: Strategic Demand/Supply Planning Strategic Demand/Supply Planning means that IT acts as a service provider for business necessity. In other words, IT does something to fulfil the need of business. This is the traditional way of managing IT. There is demand, then there is supply. Innovation Innovation is fundamentally different from Strategic Demand/Supply Planning. In the innovation process, IT drives new business initiatives. Prioritisation Prioritisation is the process where t

The Meaning of Open

Last week I sent an email to Googlers about the meaning of "open" as it relates to the Internet, Google, and our users. In the spirit of openness, I thought it would be appropriate to share these thoughts with those outside of Google as well. At Google we believe that open systems win. They lead to more innovation, value, and freedom of choice for consumers, and a vibrant, profitable, and competitive ecosystem for businesses. Many companies will claim roughly the same thing since they know that declaring themselves to be open is both good for their brand and completely without risk. After all, in our industry there is no clear definition of what open really means. It is a Rashomon-like term: highly subjective and vitally important. The topic of open seems to be coming up a lot lately at Google. I've been in meetings where we're discussing a product and someone says something to the effect that we should be more open. Then a debate ensues which reveals that even thou

Why the ‘Linux System’ should be called GNU/Linux

Names convey meanings; our choice of names determines the meaning of what we say. An inappropriate name gives people the wrong idea. A rose by any other name would smell as sweet—but if you call it a pen, people will be rather disappointed when they try to write with it. And if you call pens “roses”, people may not realize what they are good for. If you call our operating system Linux, that conveys a mistaken idea of the system's origin, history, and purpose. If you call it GNU/Linux, that conveys (though not in detail) an accurate idea. Does this really matter for our community? Is it important whether people know the system's origin, history, and purpose? Yes—because people who forget history are often condemned to repeat it. The Free World that has developed around GNU/Linux is not guaranteed to survive; the problems that led us to develop GNU are not completely eradicated, and they threaten to come back. When I explain why it's appropriate to call the operating syste