Friday, November 21, 2008

create your twin

Recently Parag saw a photograph somewhere with a person sitting at two places in the same photograph. He wanted to do something similar and asked me if I can help. Giving it a thought I found that its not that difficult. Following is what I did:

You'll need an image manipulation software, I used GIMP 2.6.2. Its open source and freely available.

1] First thing to do is to take two pictures of yours. While taking the pictures utmost care must be taken that the camera (and other objects in the scene) are not moved. Try to make sure that everything else except you in the pictures should remain still. For example following are the two pictures that Parag gave me (resized to 1024x768):



2] Next thing you need to do is open these images in GIMP. You can use "File | Open as Layers" to open the two images as two layers. You should have something like this:



3] Hide the first layer (click on the eye against the first layer in the layers dialog)

4] Take the "Scissors Select Tool" and use it to select the person in the second layer (you can also use "Free Select Tool") try to keep the selection close to the person.

5] Grow the selection using "Select | Grow" so that some more area around the person is selected. I grew the selection by 25px. You shoud have something as below:


6] Make the first layer visible (make sure the selection is not lost). Right click on the layer and select "Add layer mask". Select "White (full opacity)" in the dialog and click "Add". You should see that there is another white layer added to the right of the first layer.

7] Click on the layer mask added, select the "Bucket Fill Tool", make sure that foreground color is set to black and the selection is still there. Click inside the selection. This should fill the selected area on the layer mask with black colour. Also, the person in the second layer should become visible. You can lose the selection now.


8] Its almost done, but there might be some sharp color changes around the second person because of the change in the lighting. To Fix this we will blur the layer mask a bit so that the colours of the two layers are blended. Select the layer mask and select gaussian blur from "Filter | Blur | Gaussian Blur". Select radius something less than how much we grew the selection, I used 22px.

9] Done!!




Some other images I made:




Friday, October 17, 2008

Mind and God

Mind and God
--------------
After my previous post, last week I had a discussion with Agam. He has some thoughts similar to mine. He was planning to write a book on this topic but it appears he lost his interest for some reason. Anyway, I suggested him to blog it so that if he ever thinks again to write a book, it could help, moreover he'll get other people's comments as well, which could help improving the content. But I guess he wasn't interested in putting it down anyway. So, here I am putting his content my way. There might be places where I deviate from his theory, miss some points, or add something, but I already said I'm putting it my way!

Agam's theory is based on a simple postulate:
Our mind can emit electromagnetic waves AND it can also absorb them.

With this he tried to explain me the existence of God and various other things that we see around us.

Our mind has three levels of consciousness:

1] The Conscious Mind - This is what we know very well. All that we think or do is taken care by our conscious mind. Its very logical in nature, puts things together so that they make sense.

2] The Subconscious Mind - Next to the Conscious Mind, comes the Subconscious Mind. We don't actually see it working, but we can feel its presence through intuitions, involuntary actions, dreams, deja vu. Anything that happens automatically without our consent i.e. without our conscious mind coming into action. The Subconscious Mind is not very logical, though it can be very accurate at times.

3] The Unconscious Mind - Last comes the Unconscious Mind. The Unconscious Mind is the one that emits and absorbs the electromagnetic waves. It communicates with the rest of the universe. Its our sixth sense that gets us information that the other five senses don't or can't get.

Effect of these three levels of our mind on our lives:

The conscious mind does everything we want to do. It represents "us" thinking and doing what we "want" it to do. That doesn't needs much explanation.

Coming to the Subconscious Mind. It handle our intuitions, dreams, luck etc. Subconscious Mind keeps on getting inputs from the our 5 senses and the Unconscious Mind (the sixth sense). It filters out things not usually required by the Conscious Mind, puts them away for its own use and gives the rest information to the Conscious Mind. Few things I'd like to explain on this logic:

o Sometimes it happens, that you read about something or someone talks about it, and from that point you notice or find something closely related to it everywhere. These closely related things were always there, but you wonder that you never noticed them before. Earlier the Subconscious Mind was filtering out that information, but not anymore.

o Sometimes you are looking for something, say a pen, you don't know where to find it. Suddenly out of nowhere you look under the pillow, and there it is! May be sometime back you did look at the pen very near to the pillow, but the Subconscious Mind filtered out that piece of information and you never noticed it. While you were looking for it, the Subconscious Mind responded and told the Conscious Mind to look under the pillow.

o The intuitions, dreams, deja vu are all results of the Subconscious Mind processing every bit of information it receives. Since it processess too much information very fast, it doesn't follows a logical path. It jumps from one thing to other. Only when you (Conscious Mind) are too much stressed for something (like finding the pen) it comes for the help, gives a hint and gets back to its work.

o Some people are lucky they just do the right thing at the right time. Its there Subconscious Mind that gives them intuitions to do the right thing.

The Unconscious Mind, I haven't said much about it till now, but it does the most important job: emitting and receiving electromagnetic waves. These mind waves are a way of communicating with the rest of the universe. Every information we receive from our senses, the Subconscious Mind and the Conscious Mind is transmitted by the Unconscious Mind, and the information transmitted by others is absorbed and fed to the Subconscious Mind.

The amazing thing about The Unconscious Mind is that it works at a very low level, it doesn't differentiate itself from the other Unconscious Minds. It works as if there is a single Unconscious Mind located at different places in parts connected to each other with the electromagnetic waves that it emits and absorbs.

Few more things I'd like to point in support of the Unconscious Mind
o Have you ever looked up suddenly and found someone directly looking at you.
o Similarly, have you ever looked at someone and suddenly he/she looks at you.
o When you look at a person for the first time and before your conscious mind brings up its own conclusions about him/her you get a feeling of what kind of person he/she is, which is usually correct.

Many of us have heard about people who can tell your past and future just by seeing your face, hand, or can tell where to find your stolen or lost valuables. The explanation of this based on this theory is that they have a very trained Subconscious Mind. Something similar to a trained Conscious Mind of a mathematician who can do large mental calculations in seconds. When they look at you, their mind tries to recollect all the information you already have knowingly or unknowingly. Based on this information their Subconscious Mind tells them the needed details.

Prayers: Another interesting thing that Agam discussed were prayers. I haven't noticed much, but according to him its true that when you pray for others they are mostly accepted, but when you pray for yourself they are not accepted that often. Some people get their most of the prayers answered, while others get no success. His logic with respect to the things I said above is that, when you pray for others, you mostly say their name or visualize them. Your prayer gets registered in the (collective) Unconsious Mind, which immediately starts working for it. The visualization or being specific about their name helps the Unconscious Mind to do the job efficiently and accurately. While you pray for yourself, they prayers are something like this "oh God! I want to be a good singer". When the Unconscious Mind gets this, he doesn't know who exactly wants to a good singer? All he knows is a "I" or "me". It choses the nearest match it finds depending upon the rest of the information that it got with the payer. Sometimes its you, sometimes someone else. So, finally your prayer does gets answered, but in favour of someone else.

This again reminds me of the Affirmations. The correct way of writing affirmations was to include your name in it, and visualize the results. Thus making it easier for the Unconscious Mind to work for you. So, if you think that God doesn't listens to your prayer, try prying this way i.e. mentioning your name and visualizing yourself, and if it comes true, do mention it in this blog's comment! I'd really like to know if it works.

While thinking about all this, an earlier thought was that their is no God. But now it seems as if this collection of Unconscious Mind is the God. God, who is present everywhere, invisible to our eyes, knows everything, can control everyone, who listens to our prayers, God who resides in us.

Wednesday, September 24, 2008

God, Destiny etc

God, Destiny etc
----------------

Ever since I was a child I have heard about God and Destiny. God I was told is an omnipotent supreme power who watches everyone and rewards or punishes everyone's deeds. A man can always make his choice of Good and Bad. Depending on what choices he makes, he goes to Heaven as a reward of Good choices or to Hell as a punishment for Bad choices. Destiny was on other hand meant that (the same) God has decided the paths of our life. Whatever happens is just his wish. Earlier these two facts seemed to bother me a lot. I just couldn't understand if everything what I do was God's wish, why should I be punished for it. He could have used me better!
That was almost 17-18 years ago. As I grew up, slowly I started following the "hybrid" way that's followed by most of us. If I made a good choice, I felt good, feeling I'm making my way to heaven. If I made a bad choice, blamed it on destiny.

Things went on as they were, until I got hold of Scott Adams' The Dilbert Future. In his book Adams talked about 'Affirmations' (Which he read in another book). Affirmations are as weird as they appear. You write down your goals fifteen times a day and then somehow they come true as if by magic. Those who have not heard about affirmations I'll brief it here:

1. Have a specific goal, one that you can visualize.
2. Write it down fifteen times in a row, once a day, using the form:
"I, [your name] , WILL GET/DO/ACCOMPLISH WHATEVER"
3. There's no set time to expect results, but you should see some movement towards the objective
4. It doesn't matters if you forget to write it for a few days or if you typed it.
5. You don't need to have faith in affirmations in order for the process to work. You should get the same results if you wrote the affirmations while thinking the whole thing is a load of crap.

This was something different from everything that I had known. It made me to think a bit more; What if there is no God or Destiny. There is no one watching us and we are free to do whatever we want to. Even if we make Bad choices there's no one to punish except other people in the world. Whatever happens in our life is a result of everyone wanting something. Our decisions/choices/actions are affected by the people around us.

Assume everyone in this world is a variable that keeps on changing its value. A value represents the variable's current state. While we do our day to day work, the variables(we) keep on changing their values such that
F( f1(v1), f2(v2), f3(v3)....) = K,
F, a function of our values always maintains a constant value. Here v1, v2, v3... variables represent people. f1, f2, f3.. are functions that represents the effect of the variables on the whole world. So, a person living in seclusion might have a function that results in a very small value to effect other variables(people), for a very important person it might result in a very big value that can affect other variables(people) in a significant way. K is a universal constant, that forces all variables to maintain a balance. Putting it in simpler words, whatever we do or think affects everyone else or the, actions and thought of others determine our destiny.

Linking this theory with affirmations, when I write the same thing again and again, thinking of what I want, keeping it as specific as possible, visualizing it in my mind, I am just forcing other people(variables) to change so that I can achieve my desired state. The points (3), (4) and (5) are the views of Adams (as it appears from the text in his book). What I believe, is that it certainly matters how desperately you want to achieve your goal. The more desperate and focused you are while writing, the more force you put on other variables, and the faster you should get results.

Infact, from what I said earlier, I believe you can even change past! As we assumed that every person is a variable that keeps on changing its value. If you can concentrate hard and long enough to change all other variables to a new value, a new value that completely changes their thoughts, their memories, what they remember of the past, then you have already changed the past.

Whatever I have said are just my random thoughts and as I let my mind wander more another question pops up in my mind. Earlier I wondered what if there is no God or Destiny, now I think, if our thoughts and actions affect everything happening in this world, with so many people believing that there is a God, we might have created a real God. Someone with all those supreme powers to do anything. Still worse, with everyday we think that things are not coming our way and the God (that we created) is being unfair to us, we might be forcing Him to be more unfair, turning him into a devil that does good to no one, who's unfair, unjust, merciless to everyone.

This all gets me back to my childhood, with just one thought, have faith in God, always remember that He is your friend and He will be. The more you doubt Him the less He'll help you out. With this I now have a new image of God in my mind. He has no interest in rewarding or punishing me. He's a friend who'll always help me out no matter how difficult the situation is, and as long as I believe in Him, He'll always be on my side.

Thursday, September 4, 2008

Google Chrome

Finally google launched its browser "Chrome" but truly speaking it didn't impress me much.
The first thing that I came to know was about the objectionable EULA for chrome. The original license agreement had following lines in its setion 11:

11.1 ...By submitting, posting or displaying the content you give Google a perpetual, irrevocable, worldwide, royalty-free, and non-exclusive license to reproduce, adapt, modify, translate, publish, publicly perform, publicly display and distribute any Content which you submit, post or display on or through, the Services...


Summing up in simpler words by agreeing to this license a user gives Google right to:
o Save his bank id and password..
o Display his private albums publicly..
o Share his private information with other companies..
o Use any copyright material he publishes through Chrome..

Another line says that:
11.4 You confirm and warrant to Google that you have all the rights, power and authority necessary to grant the above license.

No, I don't have power to grant Google access to my company's forum, which means I (and millions of other users) can't use Chrome. And if a user agrees to the above license, its he who is responsible for any information leak that Google can do, because agreeing to the license means that he has the authority to grant these rights to Google. which he doesn't has.

And, after all this Google puts out a statement saying the terms of service for Chrome was simply copied from other applications it has been designing and the overly intrusive copyright aspects were a mistake and will be corrected.
I don't believe that a company like Google doesn't inspects its license agreements closely before presenting them. I suspect if it was just a trick on common user who usually don't read the license agreements before signing up for web services or software. This way Google would get access to almost everything (private or public) available on internet without being held responsible for anything, as according to the license its the user who is lying by saying that he has the authority to allow Google to use all the sensitive information on his company's website that otherwise is only available to the site members!!

According to the latest updates Google modified the EULA to remove these lines. What bothers me is the fact that Chrome was designed to send everything to the Google servers, just removing these lines from the agreement doesn't means that the content is not being sent to the Google servers. Till now many users would have downloaded and installed Chrome that would be sending loads of information to the Google servers right now. Either Google would be storing that information anyway or would be just discarding it thereby wasting network bandwidth. What I believe is that Google is a company that can store all this sensitive information and keep it hidden so that they can't be held.

Till now I am pretty satisfied with Firefox 3, and don't really see a reason to switch to Chrome.