Monday, April 14, 2008

Secret Research Project 1: Graphics Classifier

One of the 'secret research projects' I'm working on currently is a graphics classifier. Basically, the aim of the research is to build a classifier capable of differentiating between a graphics image and a realistic image.

To be clearer, a graphics image is an image which is artificial. This type of image is not directly captured from the physical environment. Hence, drawings, paintings, cartoons and clipart are considered to be graphics images.

On the other hand, realistic images are images which are directly captured from the physical environment. In other words, these are photographs of real objects.

A sample of a realistic image and a graphics image is shown below.


Left : Graphics Image
Below: Realistic Image









I'm now using simple metrics to metrify the images. According to intuition, graphics and realistic images will have different metrics, hence enabling me to clasify them. Some metrics that I have adopted, and the assumptions behind them, are:

Saturation Metric
: Graphics, especially computer generated ones, tend to have higher saturation values compared to photographs, which are invariably less saturated (more faded/dull) due to natural effects.

Number of Colors Metric: Graphics tend to be composed of a small palette of colors compared to realistic images, which tend to occupy much of the spectrum.

I've also used a number of other metrics, but I'll share those at a later point of time. In any case, the effectiveness of the existing metrics are reasonable, but not spectacular, achieving only about a 60~70% correct classification rate.

However, by combining the different metrics into a single classifier system (aka boosting), I expect the performance of the system to improve.

More updates on the secret project will come later.

Friday, February 15, 2008

Cursor*10

I found a game with a very unique and interesting gameplay, one which was so fresh that I had never seen before. I was so impressed by the game that I had to introduce it here.
I can't reveal much about the game without spoiling it. All that I can say is that the game requires you to "Cooperate by oneself ?!".

By the way, my (unimpressive) high score is 139. It is probably easy to beat this, but I don't want to click madly again.

Hope everyone enjoys this short game.

Wednesday, February 06, 2008

Test your Induction

The following sequence of three characters obeys a certain secret rule.

2, 4, 6

Your task is to infer the secret rule. To help you to discover the secret rule, you can produce any number of three character sequences for testing. I will then reply whether the produced sequence(s) obey the secret rule. (Pls try to propose sequences only in the tagboard; I will update the tested sequences in this post.)

As you can propose any number of character sequences for testing, you should only attempt to report the secret rule when you are absolutely sure that you have the correct rule in mind. To keep the game suspenseful, post rules only in the comments.

Thursday, January 31, 2008

Why are the Month Lengths Irregular?

I consider the lengths of the months to be irregular. I came to this conclusion after I asked myself the question, "How would I distribute the 365 day calendar into 12 months ?".

My (intuitive) solution was to divide 365 by 12. This leaves 30 days per month, with 5 days left over. A reasonable split would be 7 months of 30 days, and 5 months of 31 days. Regarding the ordering of the months, I considered 2 ways. The first would be to place the 5 odd months at an end of the calendar (either the front or the back). However, after some consideration, I felt that this method, while being easy to remember, seemed unsymmetric, and might leave the halves of the calender unbalanced. My second idea was to alternate the long and short months. The last 3 months would be short.

The resulting calender would be : 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 30, 30.

Evidently, this is quite different from the current form of the calendar. The current calendar has 7 months with 31 days, 5 months with 30 days, and 1 month with 29 days. This is clearly an arbitary arrangement of days. This leads me to the conclusion that the calender was not created and imposed at a single moment in history by a single planner or authority, but rather the result of a series of incremental changes.

Here's how I hypothesise the calendar came about (based on pure speculation alone):



Original creator : Let's make a 365 day calendar with 12 months ! The calendar should be symmetric around the center.
Result : 31, 30, 31, 30, 31, 30, 30, 31, 30, 31, 30, 31

Problems : 366 day calendar.
Solution : Borrow 1 day from some random month.
Result : 31, 29, 31, 30, 31, 30, 30, 31, 30, 31, 30, 31

After some time : Hey let's make this month longer ! For no reason !
Result : 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31

Problems : 366 days again ! You clown !
Solution : Pick on the loser month with 29 days. Easier to recall which month is odd.
Result : Existing calendar.



Of course, the previous speculation was utter nonsense. However, I do believe that the present calendar was slowly morphed from a predecessor calendar slowly. The gradual changes were implemented such that the newer calendars would be minimally different from the earlier calendars. In other words, if they added a day to another month, and needed to remove a day from an existing month, the best candiate would be a month which was already an oddity.

Perhaps that is why February is such a 'loser' month. It's at least 2 whole days shorter than everyone else, and even at it's best it's still shorter by 1 day. It must have been the victim of multiple 'shortenings' !

Tuesday, January 15, 2008

Simplicity

Occam's razor, expressed as "Of two equivalent theories or explanations, all other things being equal, the simpler one is to be preferred", emphasizes simplicity over complexity. Yet, what is simplicity ? I suspect that there can be no answer to the question (or, rather, no simple answer to the question).

Simplicity is a concept that is dependent on the viewer, and different viewers would have differing ideas of the simple. Unfortunately, due to the mental and psychological similarities between most humans, this fact is not immediately obvious. Given two differing items, most people would agree on which is simpler. For example, most people would find the equation "2 X 2 = 4" as a simpler variant of the phrase "Integral of 2 over the bounds of 0 to 2". And yet, for a hypothetical person who was taught calculus before arithmetic, the reverse would be true. Hence, simplicity is really dependent on the viewer.

Monday, December 31, 2007

Queer Altering of Behavior

I find it interesting that when people visit foreign lands, their behavior is often different from their usual state. This effect is particularly evident in tourists.

Consider a person A, who is usually unadventurous in his choice of food. And yet, upon arrival at the foreign land, A decides to try each and every kind of strange food he chances upon. Queer.

Or that A decides to climb a famous mountain, and yet, A has never even mounted the hill back in his native land. Odder and odder.

Fortunately, I am rational and consistent. My behavior is similar to my original state, with the only difference being that I have more cash to spend, and that spending all the cash is acceptable.

This is the last post of the year. I shall now take some photos of the fireworks, although I consider that to be irrational and inconsistent with my initial state.

This irrationality must be corrected.

Sunday, December 09, 2007

Kill the Penguins !

Penguins led by the evil Guin Nep have invaded an iceberg ! There are so many penguins on the iceberg that every inch of the iceberg is covered with penguins.

You have to stop the infestation of penguins! You have 5 rockets, which can be used to bombard the iceberg. The rockets are all identical, and can hit any area of the iceberg. Each rocket will explode and kill all penguins within a radius Z of its landing spot. The yield of the rockets can be adjusted, hence, Z can be set to any value you desire. However, all the rockets must be set to the same yield, otherwise the launching platform will malfunction.

Your task is to choose 5 spots to target the five rockets at. Also, you must choose the minimum yield needed to kill all the penguins. In other words, choose 5 spots and the smallest Z such that the each spot of the iceberg is covered.

The final piece of information needed before you can save the iceberg from the penguins is that the iceberg happens to be in the shape of a perfect circle of radius R.