Sunday, May 09, 2010

Knowledge and Simplicity

Everything should be made as simple as possible, but not simpler.
Albert Einstein

The Most important thing , I've learned here is to simplify stuff as much as you can "understand" every single detail of it . That's it , no more ....

My conclusion is so close to what Albert Einstein has told before !! But I didn't understand it till I figured out a concept in "Reinforcement Learning" during "Machine Learning" course . I'm used to give up or neglect very tricky and hard problems before , but for the first time in my life (yes,it's sad) , I decided to change my mind.
And guess what ?? By only spending one hour on one page , the result was awesome and I did understand the whole chapter afterwards .

The moral result : NOTHING is hard ; Some stuff just need more focus and dedication ...

That's it friends :)

Saturday, March 20, 2010

Fuzzy image Dilation and Erosion

One of the generic approaches to fuzzy Morphology is the Fuzzy Dilation and Fuzzy Erosion . Based on an trouble that I faced with during the Fuzzy image Analysis course , I decided to publish the Matlab code , based on the paper by "Bloch and Maitre" on "Fuzzy mathematical morphologies: A comparative study" . This is just the implementation of Definition 1 (page 1344 ). Needless to say that next definition are the same to Def 1 . Just play with the parameters :)

Here is the code :

%{
        Fuzzy Dilation and Erosion
        
        Copyright 2010 Vahid Rafiei .        
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
        
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
        
        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software
        Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
        MA 02110-1301, USA.
%}


% Settings
len=512;
useNoise=0;
strel=1;

%% Define v
if strel==1
x=linspace(-10,10,len);
v=2-(x).^2;
v(v<0)=0;
end

v=v/max(v);
plot(v,'--');


%% define mu
x=linspace(-4,4,len);
mu=3-x.^4+4*x.^2;
mu(mu<0)=0;
mu=mu/max(mu);
if(useNoise)
    mu=mu+0.1*(rand(size(mu))-0.5);
end

hold on
plot(mu,'-','Color','red')


legend({'V','mu'})

% mu and v is ready

%% Definition 1

% Dilation

nalpha=10;
alph=linspace(0.0001,1,nalpha);
deltaAlpha=1/nalpha;

Dmu=zeros(size(mu));

tic
for a = alph
   valpha=v>=a;     
  for x=1:numel(mu)    
      mask=zeros(size(mu));
      mask(x)=1;
      mask=convn(mask,valpha,'same');
      Dmu(x)=Dmu(x)+max(mask.*mu)*deltaAlpha;      
  end  
end
toc

figure(2)
plot(mu,'Color', 'red');
hold on
plot(Dmu,'Color','blue');
legend({'\mu','D\mu'})
title('Dilation (Def. 1)');

% Erosion
Emu=zeros(size(mu));

tic
for a = alph
   valpha=v>=a;     
  for x=1:numel(mu)    
      mask=zeros(size(mu));
      mask(x)=1;
      mask=convn(mask,valpha,'same');
      mask(mask==0)=NaN;
      Emu(x)=Emu(x)+min(mask.*mu)*deltaAlpha;   
  end  
end
toc

figure(3)
plot(mu,'Color', 'red');
hold on
plot(Emu,'Color','blue');
legend({'\mu','E\mu'})
title('Erosion (Def. 1)');


Cheers ,

Sunday, February 21, 2010

Meditate in Science

After years of thinking about what's exactly the difference between super succeed persons (Science in my concern) and ordinary people , I've come up with this :
"You have to Meditate in Science .... There is no other way".
The set point was an article in Newyork Times ; This article is about the importance of Practise and hard working which is not new of course . The difference starts by this sentence :
Mozart played a lot of piano at a very young age, so he got his 10,000 hours of practice in early and then he built from there.
 This is exactly what I want to talk about : 10,000 hours ! If you spend 3 hours a day on an specific work , it takes about 10 years and if you devote more ,say 6 hours per day , it takes 5 years to be master in your stuff .

This kind of devotion needs a self-disciplined mind and a powerful motivation , and that's why I say you have to meditate in science . In meditation you almost cut your communications with around world and just concentrate on your breath, for example . But if you extend this mindset to your specific interest (any interest , from music to science ,etc.) and start to meditate on it , you'll get there so sooner as you imagine .
Again , it needs hard self-discipline, but as soon as you start it, you will get used to it little by little . Inertia occurs when you want to start something, but after that stage, another inertia needs to stop you ; and in your situation you don't need second type of it anymore :)

Good luck on your journey ...

Saturday, February 13, 2010

New mapping technology from Microsoft.


This is what that changed my viewpoint to Microsoft Research for ever !!
This fantastic brand-new technology from Microsoft is exactly what I though about in Visualization course . I wanted to mix the same idea with Google Map , but I didn't know how to start :)
Anyway , Microsoft implemented it comprehensively , and I'm really excited about it . This is a glamorous technology that delighted me deeply .

Well done :)

Where is the privacy Google BUZZ ?

Lately , the Google company have presented their new brand product , Google Buzz . Though, it seems that Buzz is an interesting technology , the level of privacy is awful ! As soon as I award this problem, I turned it off . Mail address is a key in privacy and personal stuff and Google should think about it more conservative . I Hope they fix this problem soon ....

Update 1: This is the first attempt of Google to fix the problem .

Monday, February 08, 2010

So long till now

OOPS ! It seems that I'm not an active blogger anymore !! I think it's because of social networks like Facebook and Twitter . They are really addictive .

Not really important .... I'll be active more by the end of February and the nature of posts tends to be more technical and less personal . 

Monday, January 11, 2010

TODO list for 2010

For coming year, I want to do some interesting works and I publish them here to reinforce my motivation !

1- I've decided to open source some of my projects . I'll do it little-by-little . I think they are 7-8 projects . I want to actively contribute to open source world. I don't want to shame when I face the sentence "Speak is chip, Show me the code " anymore !!

2- I've decided to switch to "Front-End" world (mostly JavaScript) for fun , beside of my main area of interest (Computer Vision).

3- This year is a so critical year or me . Lots of works are waiting to get done. Fortunately , I've become more self-disciplined nowadays, and this rises my expectations ....



** Any suggestion guys ??

Thursday, December 17, 2009

a one-day trip to Malmo

Here is some pics of my one-day trip to Malmo city , south of Sweden .

You can see the pics in Flicker .

Friday, December 04, 2009

IEEE and LinkedIn activities

I updated my IEEE and LinkedIn accounts !
IEEE has always been a must for me , and on the other hand , I've recently decided to involve in LinkedIn activities more .
Honestly , I didn't know that LinkedIn is social network (embarrassing , yes ) !!
If you are a "Techie" and you want to connect with me , please drop me a line .You can find me easily by googling me ...

Thursday, November 12, 2009

A seminar at Scientific computing

Today , Dr. Frank Ham from Center for Turbulence Research, Stanford University attended a seminar in Uppsala University and gave a lecture on "Large Eddy Simulation on Unstructured Grids" . You can find the abstract of it here .

There is no doubt at all, that Computational Fluid Dynamics (CFD) is one the most complicated science that we have ever made ! And maybe that's why many of the most brilliant minds are working in this or related fields .
I was interested in two aspect of this lecture : the Visualization stage and the backbone GRID infrastructure of the their project .
Surprisingly , they need the technology 100 times faster than what they have now (Nov 2009) by the end of 2017 !! It means an enormous progress in both hardware and software . Can they achieve this ?? I don't know , but I hope so ....

Monday, November 09, 2009

The second period

For the second period , I chose two courses :
"Scientific Visualization" and "Computer-intensive Statistics and Data Mining".

In Scientific Visualization course, they focus on VTK library and consider this huge library as a high level abstract one . I mean they don't concentrate on "under the hood" computer graphics basis; instead, they train students how to think from a level upper to determine the problem specifications and apply visualization techniques to demonstrate the results.
Another point about the course is that the formal programming language for this course is Python !! Oh my goodness ! It was one of the best news I had ever heard :)

But the second course is more interesting ; it's about "Statistical Pattern Recognition" ; thought, the primitive 8 lecture (out of 21 lectures) is about "random number generation, Monte Carlo , and Bootstrap techniques" . A nice point about this course is that We have to do our project in "R programming language" , which is an amazing language with exceptional capabilities for Statistical Programming .

Nevertheless , I have to try hard to dominate all of them . It takes 99% perspiration :)

Thursday, October 15, 2009

Favorite picture

Licensed by NASA


This is the most inspirational picture I've ever seen !!
It will (maybe) become my permanent Desktop background . I changed my Facebook's profile picture too !!
As you can see it's so mysterious , weird, lovely.... Something about our pure curiously to unknown areas (I don't mean Theology bullshits, I mean absolutely Nature) . Something which rises from your inner whispers, Something that forced our ancestors to move out from their caves ....

Sunday, September 13, 2009

About me these days

1- My classes have started since Aug 31. Here , the educational system is very packed . I mean each semester is divided into about two "2 months period", and normally you pick up two course per period.
Well , in my opinion , it's a good method for hacker-minded people (or self-taughts ones). You just focus on two topics and finish them , that's all ! Like a hacker who wants to penetrate a new stuff !!

2- My research interests are shifting to "Data mining / Visualisation", but it's not clear at the moment... I'll write about it later.

3- Human beings are the same any where :) I knew this, but I can see it here more ...

Sunday, August 30, 2009

A Heavenly Voice

oh my goodness !

I've just discovered this heavenly voice by surfing the web during
last weekend !! Her name is "Jessica Mauboy". She is Australian and I'm her fan from now !! You can see one of her nice music videos :

Sunday, August 16, 2009

Facebook

I joined the Facebook today !!
I want to become more familiar with web2 technology ...

You can find my profile here :)

Update :
First Impression : Facebook is so amazing !!

Thursday, August 13, 2009

Uppsala Pics

Here is the first pictures that I took on my arrival to Uppsala city .

Please see them at Flickr !!

Sunday, August 09, 2009

UPPSALA

I'm in Uppsala , Sweden at the moment .


Uppsala is a very lovely city; Lots of bicycles, nice and neat weather and guess what ! Full of historical buildings ....

UPDATE: There is a revision in my post ,as may be you can see :/

Wednesday, June 10, 2009

Huge setp to vision

At last , I got the Sweden student visa. No news from Australia,
but I'm not sad anymore !
After a long thoughts about my future, I believe that the Uppsala University is a unique and extra ordinary opportunity to go further into Computer Vision.
Frankly, I felt disappointment when I faced new mathematical algorithm during my work on vision problems. For instance, in Optimization techniques I suffered from lack of advanced math courses and someone who can debug my problems !! In some cases, I had to re-invent the wheel again and again !! But , it seems that conditions are changing.
I really love collage life, because I don't have to invest entire of my time on , for example, dealing with customers rather than focusing on technical problems. I don't want to say that customers always suck! But, It's clear that working with potential customers in countries like middle-east is too different from a country like United States. Things are not classified here, and I do hate disorderliness ...
long story short, the most prominent aspect of Computational Science at Uppsala University is that it reinforces my math basis. Look the first quarter lessons : "Scientific Computing, bridging course" and "Optimization" ! The first concentrates on some subjects like Linear Algebra , Numerical Analysis, etc. and second one has no need to explain ...
On the other hand, let's not forget some other technical areas like "High Performance Computing" which Uppsala is very well-known for it.
As you see, this Master program is really GREAT.

WOW ! What a challenging and active researches I will face :)

Wednesday, May 20, 2009

Missing Link Found

"Scientists working in Africa have discovered a Stone Age skull that could be a link between the extinct Homo erectus species and modern humans"
--National Geographic

As a someone who believes in Darwin's theory, I'm so happy to hear this :)
Though, regarding to the nature of the science , any new discovery needs lots of work and examines to prove ...

Thursday, May 07, 2009

OOPS ..... UPPSALA ?

I got another admission from Uppsala University , Uppsala, Sweden .
I admitted at IT department, Computational Science Division.
As you can see at it's syllabus page, it has lots of Math based courses which is necessary for high-tech areas like Computer vision.
On the other hand, the Uppsala's ranking is so amazing :
1st in Sweden and 63th in the world !

What a weird admission. I was preparing myself for QUT, Australia !!!
But after 4.5 month there is no news from Australia Embassy :(
I'm so confused ! I love Australia and its hyperactive atmosphere. But I think that Uppsala provides me challenging projects as well ; I mean the program is an exciting challenge itself too :)

Hope I make the right decision ...

Thursday, April 16, 2009

An amazing Flight attendant

Just see how much creative this guy is !! He's a staff member of Southwest Airlines ...



Tuesday, April 14, 2009

Why I love FOSS - 2

As you can see in Eric's essay, he strongly recommend to start programming by Python. I was familiar with programming languages before; I had passed the programming course ( C language) a year before, so I was familiar with some basic skills of programming (loops, I/O, etc).
But in my opinion , python was absolutely different from C.
As you can guess, the most visible aspect was indentation! I didn't use to it and I had lots of struggles with it.
Another part was classes. The "__init__" syntax was so weird to me and I was more comfortable with something like "this" in Java.
Anyway, I had to fight with these initial set points, and I did. I started with python tutorial in its homepage, but it was(is?) so fuzzy. Unfortunately, there were and are too rare python developer in Iran and my English literature was not so good to start reading a book from the beginning to end.
Yes ! I confess that it was not a smooth path, but i do believe that it was worthwhile to try...
On the other hand, Inasmuch as I was studying Electrical Engineering (power) and the nature of lessons were so different from the subjects like O.S. and web programming, this problem got bewildered my mind.
Because of lots of input data and lack of proper concentration, my productivity was too low. Essentially, take this as an experimental result :
"Focus on just one subject or go to the hell !!"
If you want to be a genius in a major, you have to focus on it days and nights in an uninterpretable form. Only this can show you the magical doors. That's it , That's all.
As I mentioned before, the lack of focus on one subject decreased my productivity enormously and the biggest result of it was the decline of self confidence. You know, lack of self confidence is the mother of any defeat....
If I invest my time and energy on just hacking rather than work on some stuff like H.V. structures and Linux kernel processes at the same time, I had been a hacker till now...
Long story short, after graduation, I decided to put entire of my time on cutting-edge software developing; nevertheless, at this period of time my country is not a high-tech one. I couldn't find even one company that works on Computer Vision. Hence, my friend and I found a new one, but it's not so promising.
I really intend to immigrate from Iran to to some where else that I can work on my area of interest and have active connections with international community ...

Wednesday, March 11, 2009

Why I love FOSS

I started my Hacking Path [1] with Eric Raymond's legendary essay (How to become a hacker) in 2002 .
Though, I'm not a hacker, I really love it's culture and communications.
I knew nothing about computers and honestly I scared of them before.
You know why ? Because my first contact with computers was through Microsoft Windows some years before(win95 I think) .
It was all wizard (type of installation of software,etc)... When I was turning on the PC, the magic was starting, I was seeing a monocolor
screen and then a nice background . "How does windows do it ?" I asked this question numerous times from myself, and you know,
no one knew it. Everybody was conquered by its wizards.
Damn you Microshit with your damn wizards.
But,then, a flickering light enlightened my brain suddenly. I read Eric's essay, and I think you can guess what's happened after it .
I started to convey the linux and re-assembled it from scratch several times.There was no magic anymore. Every thing was absolutely clear , numerous papers were in the queue to read and lots of dedicated developers were ready to answer the questions.
My life and mindset changed completely. When I say my whole life, I'm not kidding. Because I have been an absolute freedom fan, I found
the liberality spirit in FOSS culture. Linux has never been just a simple O.S for me , but it's been a new viewpoint to the world to me.
Thanks Eric for Your legendary essay. Thanks Richard Stallman,the great, for GNU Idea and your dedicated works to support it.
I will talk about my first impression when I saw python soon ...


[1] Please attention, I mean the Hacker in free/open source software (FOSS) term .
The distance between Hacking and Cracking is the same as the distance between Heaven and Hell !!

Monday, January 26, 2009

ClusterMaps New policy

I just noticed that the ClusterMaps window on the right side of my weblog has changed !
They emailed me at the same time that they have decided to make annual archive of locations !
Hey, Come On guys ! We live in the 21th century and we have a term call opinion poll :/

Wednesday, December 17, 2008

My Admission

After receiving some offers of admission, I plan to accept the offer of "Queensland University of Technology" (QUT) , Brisbane, Australia .
I found them so active in my area of research ( Computer Vision), so I think If I can get the Australia's student VISA too (this is a so molesting procedure) a new season of my life will begin.
I can work on what I do love in a dedicated form. I will have lots of talented colleagues and we can work in exclusive teams. I really like team-work projects and I believe that it increases my productivity enormously. Two brain are always more productive that one!
I've never been sure about the future , but I've decided to work hard and keep my hopes. That's every thing I can do :)

Update 1: Humm .... maybe I get another offer from different university !
It is Curtin University of Technology , and has a VERY active lab in computer vision area. Its projects make any geek crazy :)
It's a hard dilemma ! Any suggestion ???

Update 2: At last , I decided to choose QUT !
I didn't know that QUT has very strong relations with industry !
Here are some of their Areas of Research and collaboration :

Image and Video Research Lab
Speech and Audio Research Lab
Australian Research Center for Aerospace Automation
CRC for Spatial Information

Seems so promising, isn't it ?

Tuesday, November 18, 2008

An interview with Dr.Naderi

" Firuz Naderi (PhD) is the associate director if NASA's Jet Propulsion Laboratory (JPL) , responsible for projetc formulation and strategy.
Before this, he was the head of Mars Exploration Program which he led successful launch of Mars Odyssey, landing of the Mars Exploration Rovers (Spirit and Opportunity) and the development of the Mars Reconnaissance Orbiter ."
-- from JPL's website


 
 

Wednesday, November 05, 2008

OBAMA WON

AT LAST ...... OBAMA won !!

One point, I saw the McCain's last speech in Arizona . I do respect his great personality and peaceful soul. I understand why America knows him as a Hero now. He is so modest.

And Congratulations to Barak Obama for his decisive victory,and hope he acts to what he told before ...
I saw his first speech as a president of Unites States at a huge crowd in Chicago too.
It was perfect, as expected, and was full of hope and prosperity.
This African-American guy has a genius to inspire people :)

Here is some quotes in his speech :
"
+ We rise and fall as one nation.
+ Strength comes from Ideas. --- WOW! He is a solicitor. Don't forget it...
+ It's time to reclaim American dreams.

"
Humm.... One thing is clear : Sweety America will never forget her children ....

GOD BLESS OBAMA.
GOD BLESS AMERICA.
GOD BLESS ANY FREE HUMAN.
GOD BLESS OUR PLANET; EARTH :)

Friday, October 17, 2008

Why I like Obama



That's why I like Obama .
He is a gentle man, So self-confident ,a dandy guy, and a skilled solicitor who knows how to use every word in a proper place. I hope Americans elect him, he puts more pressure on dictator countries (truly ,not by playing role), reconstructs the economy and can makes up the financial crisis ...
Hope So....

UPDATE: I changed the Pic, because of respect to McCain's great personality. Maybe his reaction in the last debate was a little mistake ....

Thursday, October 16, 2008

Start a Startup in a Bad Economy ?

A very nice and new-brand article by Paul Graham. Worthwhile to read. I'm specially interested in this sentence :
" Which means that what matters is who you are, not when you do it. If you're the right sort of person, you'll win even in a bad economy ".
This is the heart of his article. That's why I told it's worthwhile to read. Briefly, he says that your success depends on your personality more. And I'm completely agree with him . I don't deny the importance of facilities and the economy a country. There is no doubt at all that nowhere else has Silicon Valley. Everything needs its atmosphere . Starting a startup in US is absolutely different from India or , god forbid, Iran ! You need some preliminary infrastructure to do a great and innovative work. BUT ..... it doesn't mean you stop to try . Interestingly , the history of human being shows that the people who grow in hard conditions , have higher capability to perform more complicate things. That's not due to being more intelligent, but , it simply is a Adaption Paradigm . Where the " Evolution" matters !!
long story short, Paul wants to say there are scarce people who are brave to do risk. That's why we have little pioneers and lots of ordinary people . Don't you think so ?

UPDATE: Here is another inspiring article that proves the idea .


Saturday, September 27, 2008

My trip to India

As I mentioned before , I had a trip to India . It was my first international trip , but seeing other country and contacting with its people was not too weird to me. Frankly, I knew India and maybe that’s why I didn’t shock when I saw its streets.

India is a very big, ancient , nice to travel country and people are calm and peaceful. Meanwhile, it is too complicated to analysis. I mean, you will never find any society in the world that its people live in such a kind of paradox conditions.

Wealth and Poverty live with each other in an absolute consent ! No one wants to be poor, but ‘most’ of them believe that it’s just their FATE !! They do believe it and this is the key to understand why they live in peace. Though, the cultural impacts due to globalization has affected them, which is completely normal, some cultural approaches like believe in concepts (like “Dharma” , “Karma”, etc.) still attend in their mindset .

In my opinion, If you don’t know India and you have decided to go there, you will be surprised when you see streets. But wait ! It is a little part of India. More and more events are waiting for you ! Just open both your minds and eyes and look at every minute thing. Concentrate on their interchanges , focus on their poverty, their wealth, their customs, their believes, their temples architecture, their behave with animals (in any specious),etc.

On my behalf, briefly, rejecting Buddha from India ( over 1500 years ago) , was maybe the biggest strategic mistake by Indians. Although relation between Buddhism and Hinduism is as strong as a massive string , there are some fundamental differences too. Investigating these differences need a separate post and I don’t want to explain it here …

Anyway , to conclude the argument, here are some pics which I took over there :

Mumbai's Airport in a raining day:










The road between Mumbai and Pune:










Pashan Lake :










Mumbai's beach :









Mumbai's beach from another viewpoint:









A nice building in Mumbai (British style):










Another Building in Mumbai (another nice British architecture):










EVERY thing is in peace :









A little temple:









Pune City from top:









Pune university :









A very nice park in Pune and the place of Gandhi's wife SAMADI :









Gandhi's personal instruments :









I bought a great coffee here :)









An indian VEG restaurant ( Oh my, so spicy!)









At Bazar :









Monkey and elephant Idols :









P.S. The captions of pics have added ...

Cheers :)