Thursday, October 24, 2013

Nitin Gupta's answer to: Currencies: What is the economics behind printing of currency?

Copied from Quora

Awesome answer by Nitin Gupta

Original Link



Nitin GuptaHuman | Thinker | Knowledge Aficionado Suggest Bio
Take any currency note and have a look at it. You will find wordings similar to this.
“I promise to pay the bearer a sum of….” 
So what does this mean? It means that the reserve bank of the country  (in other words the Government) promises that the person who possesses  the currency note (i.e the bearer) will be eligible to be paid goods  worth the amount mentioned on that currency note.
But what will the bank get in return for assuring and making that payment? To answer this we have to go back a bit in history, to the origin of the currency notes as we see them today.
Of course in US dollars, it would be “This note is a legal tender for all debts…”. 
The ” Will pay to bearer on demand ” which was present in US dollars earlier vanished from it in 1934 and was replaced by “This note is a legal tender for all debts…” !!!
A 1918 US dollar note. 
In other words, the dollar note is just a legal tender, meaning all  US banks will accept it, but other than that, nothing is promised by the  US Federal Reserves about its value. In fact Federal Reserve is NOT Federal i.e it is NOT owned by the US federal government , nor does it have any independent reserves. It is just a group of private banks working with the US treasury department.


It all started…
In ancient times precious metals like Gold and Silver acted as the  currency. Which is why we see that the ancient coins were made of  precious metals. And there was no need for anybody to make a promise  about the value of a Gold coin because the coin in itself contained  precious Gold, unlike today’s paper currency.

I promise to pay…
And then came the promissory notes, which were the ancestors of  today’s currency notes. Here, people used to deposit the precious metals  they had with a trustee who in turn used to issue them a promissory  note mentioning in it the worth of the Gold it represented. Then anybody  who gave this note to the trustee would get back Gold worth the value  mentioned in that promissory note. The trustee in turn would charge a  small amount to the people for safeguarding their Gold assets.
Slowly instead of using actual Gold to purchase goods people started  using these promissory notes instead. Different denominations of these  notes came into existence. These were the initial days of currency  notes, which is why even today you see on our notes a promise by the  reserve bank (today’s trustee) about the value of that currency note.  But then today these notes are NOT supported by Gold or any other  precious metal. How is that possible? Read on…
The promissory notes became popular because it meant carrying a  simple piece of paper instead of heavy metals. It not only reduced the  carrying burden, but also protected people from thieves who could  otherwise easily detect that you were carrying Gold/Silver.
Over a period of time the trustees observed that most of the people  who had deposited the Gold with them were not coming back to take back  the Gold, and instead simply kept circulating the promissory notes, much  like today’s currency notes. So the trustees thought why not issue more  promissory notes than the amount of the Gold reserves they had? And  thus was born the concept of modern currencies and the banking system.


Deposited money exits through back-doors

Banks in those days simply issued more promissory notes than the  amount of Gold they had, based on a simple faith that all their  depositors wont come and demand their Gold back all at the same time!  Imagine a bank which had 100 kg Gold in deposits and which had issued  promissory notes for 200 kg of Gold. If all its customers came at the  same time demanding their Gold back, then the bank would go bankrupt!  But that doesn’t happen unless and until the bank loses the faith of its  customers. So based on the faith that the overall amount of Gold  withdrawn would always be little compared to the overall amount of Gold  deposited, Banks started overstating their Gold deposits.
What the banks did with those extra promissory notes was to lend  loans and earn interest. This is how the banking systems as we know  today came into existence. And this is what is practiced by banks today  in the name of fractional reserve banking . In other  words, the banks today keep only a fraction of the customer deposits in  reserves, and lend out all remaining money as loans to earn interest.  The interest on the loans would be more than the interest paid by the  banks for your deposits and thats how banks make profit. Your deposits  are nothing but loan offered by you to bank for which bank pays a small  interest, and in turn lends that money to others for a higher interst  rate.
So if the borrowers don’t pay back the loan amount, then your money  is gone! And that is what is exactly happening in US today in the name  of Sub-prime crisis. Borrowers have defaulted, banks have gone bankrupt  and so have the investors! Lehman brothers was just an example, and AIG  was bailed out by the US Government because it was too big to be allowed  to go bankrupt! The current US sub-prime crisis threatening the global  economy is nothing but Banks being unable to recover the billions of  dollars of depositors’ money which it had given out in the form of Bad  loans.
And how does the US Government bail out big bankruptcies? Simply by printing more dollars !In fact Billions of it!
The question is why can’t other countries simply print more of their  currencies and be rich? Because there will be no takers for mere paper.  Currency being a piece of paper has to be supported by something which  is really valuable, like the earlier Gold system. So what is supporting  the US dollar then? Read on…


Post World War II – US Strategy

After the second world war most of the world economy was devastated.  Most of the world’s Gold reserves had ended up in US as all countries  required US help to rebuild themselves, the same way they needed US  weapons prior to that. It should be noted that US mainland was not at  all affected by the second world war and there have been conspiracy  theories about Pearl Harbor, the same way there have been conspiracy  theories about 9/11 .  UK had been the world leader till then, but now was desperate for help  after the devastating world war. It had enough of its own business to  mind and hence declared independence to countries like India which were  becoming unmanageable and which had already been looted to its core by  the British. The empire on which the Sun never set had started shrinking  to see its Sun setting. Britain’s prominent industries had been  destroyed by the war and it badly needed aid. It wasn’t able to import  more than half of its food and all raw materials, probably except Coal.
At the same time US had the ambition to replace UK as the world  economic power. At the end of second world war there was already great  inflation in US and there were strikes in all major US industries like  automobiles, steel etc. So US desparately wanted unhindered access to  markets across the world to get cheap stuff to fuel its own economy. US  agreed to give a loan worth 3.8$ dollar to UK provided it entered into a  new trade agreement with US. And thus was born theBretton Woods agreement which  paved way for the creation of IMF, World Bank and laid foundation for  the world domination of the US dollar. Prior to this agreement US and UK  combined controlled over half of the world’s trade, and this agreement  ensured that US entered UK markets. It should be noted that if not for  the devastating effects of world war II on british economy, the british  pound would have been today’s dominant currency. It was infact a  dominant currency in the world prior to world war II.


Bretton Woods Agreement

US entered into this Bretton Woods agreement with UK and rest of the  world nations after the world war in 1945. According to this agreement  all member countries had to trade their currencies against US dollar  instead of against Gold or other currencies, and US dollar itself was  promised to have a fixed value in terms of Gold. In other words, by this  agreement US dollars became the new promissory notes of the world  economy! So a country need not worry if it didn’t have enough Gold to  support its currency, all it had to do was to buy US dollars, because US  promised its dollars to be supported by Gold!
Now, what would a country do when it had a currency deficit? Well, it  can take loans from the newly formed IMF and World bank(then known as  IBRD), which would obviously be in terms of US dollars. In return for  this loan IMF (on behalf of US) would set up rules and regulations on  that country’s economy, so as to favor the US (in the disguise of  helping that country overcome its crisis) and would put that country’s  economy under IMF surveillance. The US owned one-third of all IMF  quotas, more than enough to impose its rules and to veto any change it  disliked in the IMF.
To pay back the IMF loans (in US dollars) a country had to export its  goods and services to US so as to earn US dollars. Even otherwise,  countries wanted to earn US dollars since it was the default global  currency for international trade in the non-communist (non-soviet)  block. So all countries started selling their products to US for cheap  prices, since they had competition amongst themselves. This ensured that  US got best of the world products for lowest prices. And in the process  US economy and consumerism boomed because they got cheap goods of great  quality from all across the world! Pegging of world currencies to US  dollar ensured that the value of US currency remained stable and hence  there was no inflation in US and things became available for throw away  prices. That’s how US consumerism was fuelled and continues to be  fuelled even today.
While in the third world countries people think a thousand times  before throwing out something, in US it is the world’s largest amount of  garbage produced everyday, simply because in US its cheaper to buy than  to reuse. Things are(were) cheap in US at the cost of the rest of the world because  rest of the world compete(d)s to sell their goods to US, just to earn  US dollars, since it was supported by Gold. In other words US dollars  had the greatest purchasing power, thanks to the Bretton Woods system.  In return for making this agreement happen, US gifted its european  friends with its Marshall Plan , where in the european countries received aid in terms of grants instead of loans to  rebuild their economies. US offered a similar Marshall plan to the  communist states led by USSR but was rejected by the Soviets who were  well aware of US ambitions to dominate the world economy.


Nixon Shock

All this went fine till one day the flaw in the system came out. US  had created a Pax Americana system in the world, where every developing  economy had this goal of exporting its goods and services to US to earn  more dollars. US continued to print dollars left and right and kept  distributing it to all countries to fuel its hungry consumers. But then  according to the agreement the dollar was being supported by a promised  denomination of Gold. But printing more dollars is not same as mining  more Gold! And hence insufficient supply of Gold broke the system.
While US dollar had a fixed value against Gold which was artificially  set just to enable US to print more dollars, the price of the Gold in  the open market was much higher than the Gold supported by an US dollar!  In other words, if Gold of amount x was available for a dollar, the  same Gold x cost 3 dollars in the open market!
This meant countries could now use their piled up US dollars to get  back cheap Gold from US government (since US had promised fixed amount  of Gold to its dollar according to the Bretton Woods agreement), and  then sell it in the open markets for higher prices! Just imagine all the  countries that had kept piling up US dollars, now opting to give it  back all, in return for the promised Gold. Well, this happened on March  17 1968 (along with violent protests in London the same day against US  involvement in the Vietman war) and US looked blank! Where is so much  Gold? US had Gold reserves to support only 22% of the dollars it had  printed so far! What about the rest, and obviously US cant give away all  its Gold and go bankrupt on its own either. 
Thus came the Nixon Shock in 1971 on 15th of August  when the then US President Nixon simply refused to pay Gold for US  dollars anymore! He didnt even consult IMF before announcing his  decision. In other words, entire world economies collapsed since their  millions of dollar reserves were worth nothing more than a bundle of  paper! If any other country had done this to US, then US would have  nuked it out of existence, but since it was the great military power of  the world that had defaulted, all other countries had to keep quiet.
Once the US refused to pay Gold for its dollars, the world entered a  floating exchange rate system, where the markets decided the exchange  rates based on demand and supply principle for currencies. While the US  dollar was supported by Gold, other currencies were held weak in respect  to US dollars so as to facilitate cheap imports to US. Now that the US  refused to pay Gold for its dollars, its economy came down as other  countries stopped buying its dollars since it was no more than a piece  of paper now. So to boost US economy, US had to now export goods instead  of importing them. Gone were the days when US could buy anything and  everything just by printing more dollars. So, Nixon heavily devalued US  dollar to allow US exports to other countries, so that US economy could  get a boost. He even imposed 10% import duties so as to discourage  cheaper imports which would harm local industries.


Enter Petrodollar

But how long could US be without a strong dollar? Absence of a strong  dollar meant US would have to compete with other countries on an equal  floor and dollar would no longer be a dominating world currency. This  would remove economic US advantage in the world since there would be no  demand for US dollars across the world, and if there is no demand to US  dollars then why will countries prefer exporting their products to US  only? And if that doesnt happen then how to fuel US consumerism?
It should be noted that it is the consumerism that fuels more buying  which in turn fuels innovation, provides funds for further research and  hence leads to growth of science and technology.
So between 1972 and 1974 the then US president Nixon held a series of  meetings with Saudi Arabia, the world’s largest oil exporter, and  struck a deal where in US would provide technological and miltary  assistance to Saudi, and in return Saudi had to trade its oil exports  only in terms of US dollars. Now this resulted in two major advantages  for US. One, all countries which import oil have to pile up dollars,  since only dollars are accepted by oil exporting countries. This was  because once Saudis agreed to trade oil in terms of dollars, even OPEC  (the organization of petroleum exporting countries) agreed to trade oil  only in terms of dollars. So oil importing countries again started to  trade with US and started selling their goods and services at throw away  prices just so that they could earn dollars to enable them to buy Oil.  So all oil importing countries started to build up dollar reserves, and  this boosted US consumerism, bringing back the world currency status to  US dollar, this time supported by Petroleum instead of Gold, and hence  the term Petrodollar.
The second advantage to US from the petro-dollar was it could simply  print more dollars to buy the oil it needed, and hence petroleum became  available in US at throw away prices, and this is what made owning  private cars almost one per head, cheaper in US. Without petroleum being  not just affordable, but cheaper, there was no way that a giant  automobile and airlines industry could have come up in US. Now that the  US dollar is losing its value again, the effects of increased petroleum  costs on US roads is becoming evident.
As described in earlier articles Iraq  was invaded simply because Saddam Hussein had started accepting Euros  instead of dollars to sell Iraqi Petroleum. This was a master blow to US  economy and hence Iraq was invaded. The WMD which Saddam had was none  other than Oil. After US invaded Iraq and dethroned Saddam the first  thing it did was to revert back oil exporting currency of Iraq to  dollars. Similary Iran is being threatened by US not because it has  started Uranium enrichment programme but because it has started  accepting Euros instead of dollars. Similarly Russia has started  accepting its own Roubles instead of dollars to boost its own economy.  Venezuela is also switching to Euros to export its Oil.
Iran, Venezuela and Russia account for about 25% of world oil  exports, and if they do away with dollars, then there is a serious  threat to dollar stability, and would lead to serious inflation and  recession in US. UAE central bank has said that it will convert 10% of  its dollar reserves to Euros. Even Kuwait and Qatar have hinted at the  same. Sweden has brought down its dollar reserves from 37% to 20%. If  there are no buyers for dollars, why will countries export their goods  to US, what will they do with the dollars paid to them?
Biggest threat to US economy today is China which is sitting on  world’s largest dollar reserves. If it releases those billions of  dollars it holds in its reserves, then US economy will simply collapse.  At the same time, the dollar reserves are a threat to China itself, for  if dollar value comes down due to some other reasons, then Chinese  collection of dollars would be mere paper notes. Slowly the ground below  the international dollar is shaking, and shaking violently .  It simply means US will have to go for a major war to bring back the  world economy into its hold again. The target can be Iran, North Korea,  Pakistan, anything and it has no ideological basis. It is the military  might which fuels the economic might and vice versa. When one is under  threat, use the other to recover. Its as simple as that.


What Promise?

By the way, today’s paper currencies have no inherent value in them.  Even though the Reserve Bank promises to pay the value mentioned in the  notes, consider inflation. What you get for 100 Rupees today, if you  have the same 100 Rupees three years from now its value will be less  worth than what it was when you earned that 100 Rupees. So where is the  promise? What is the promise all about?
Note that your money is not supported by any Gold or Oil. Its just a  piece of paper. The moment you earn money convert it into something  which has real value. For instance, buy Gold or invest in real estate.  Because these things have real value in them. If you just end up saving  your 10000 Rupees in a bank account, 5 years from now its value would  have reduced due to inflation and would be worth probably only 7000!  Understand the economics of money and play safe. Dont save money as  cash, other than for the minimum amount required to face any eventual  emergencies.

EDIT:

Watch this.


Also watch movie "Zeitgeist", to get more insight.

Rush Movie Review

Yesterday night, I have been to this movie "RUSH" directed by Ron Howard. The fact the Ron Howard directed "The Beautiful mind" and the imdb rating of this movie were impressive.

The movie is a true story which happened during 1976 when Formula 1 racing was gaining popularity and fame. It shows the rivalry between two F1 racing world champions James Hunt and Niki Lauda.

Niki Lauda comes from a well to do business family in Austria and want to race for his living. He does not get ant support from his family. SO he takes a huge bank loan from his life insurance policy and gets into the racing industry.

James Hunt hailing from Britain is a Casanova and a play boy who is ready to risk life in every race he is in. James Hunt and Niki Lauda were F3 racers in the beginning and get into F1. Niki Lauda signs for Ferrari and James hunt with another company.

James and Niki strive to become No 1 in every race and Niki wins most of the times. Niki s well disciplined, does not hang out in bars after the race and his policy is early to bed and early to rise. On the other side James partys all the time and goes out with girls.

Niki is known for the accident which happened in 1976 on German track. It was raining when the race is about to start and Niki calls for an emergency meeting with all F1 drivers. He proposes to cancel the race as its too dangerous to race in the rain. But James complains that Niki will have an advantage over the players in gaining points as others would also get no points for this race. Thus the race kick off and unfortunately Niki gets into an accident and will be struck in the burning car at 800 degree centigrade for about a minute. He inhales hot fumes from the flames and thus have to get his lungs cleaned up which is the most painful part of the whole treatment. His face got permanently disfigured, yet he gets back on to the track within six weeks.

Niki wins the first race immediately after his accident and gains back the rank on the score board. The final race of the season which decides who will be world champion be in 1976 is going to be help in Japan. Unfortunately it rains on that day too and after one lap, Niki gets away from the race thinking that his life will be at risk. If James can get atleast third position in the race, then James will become the World Champion and James was ready to lose his life to win this race. He drives hard through the rain and finishes third.

From Niki's point of view, James proved to the world that he can be a world champion and James retired from F1 racing. James died at 45 due to heart attack and Niki says that he was not surprised but a bit sad to know about the death of the person whom he respected personally, though people thought they both were rivals.

Niki continues to race and becomes world champion again after seven years in 1984. This movies potrays two characters, James and Niki. James, ready to risk his life, and feels more lively when life is at stake and a playboy character who takes pleasures out of the life. Niki who is more disciplined and comes back on track was patient and consistent to become world champion after seven years.

Sunday, October 6, 2013

PCL thread titled Keypoint indices

This is a discussion on PCL...

Hi Mustafa,
I was trying to do the same thing with you, in the end I ended up doing this:    (If I'm wrong please correct me!!!)
- Use the ponitCloud with the Keypoints (not with indices, with the XYZ information, just as you mention)
- Use them as input at the Feature Estimator, but I also set as *SearchSurface* the initial full pointcloud! that means that (ig I get it right) you find the keypoints, then for the XYZ location of each keypoint, it goes at the initial cloud (with the full information) and computes stuff there.

cloudVector_UNorg_PN - full pointCloud (actually vector of Pointclouds<>::Ptr), with Normals, it is unorganized, because I remove NaN points and Normals
KEYptVector_UNorg_P_ - Keypoint Pointcloluds (actually vector of Pointclouds<>::Ptr)
FEATtVector_UNorg_P_ - Feature Pointcloluds (actually vector of Pointclouds<>::Ptr)

**_PN** means Point and Normal
typedef pcl::SHOT1344  keyPointTYPE;       // float descriptor [1344]   ||   float rf [9]        
QVector< pcl::PointCloud::Ptr >  cloudVector_UNorg_PN;
QVector< pcl::PointCloud::Ptr >  KEYptVector_UNorg_P_;
QVector< pcl::PointCloud<     keyPointTYPE     >::Ptr >  FEATtVector_UNorg_P_;
(you can get away without using vectors of course, this is for my needs only)
Please have a look at the code snippet. The result that I'm getting is pretty expected.
After this stage, before finding correspondences, be sure to kick out all the Nan or Inf things at your Keypoints and Features!
If you delete a Feature, delete also the correspoding Keypoint!
There is an 1-1 relation between the Keypoint-Cloud and the Feature-Cloud

If other people have different opinion, please comment :)
If there is a way to work with indices, I would be interested too.

Best,
dimitris


                            std::cout << "//// KEYpoints" << std::endl;
                            {
                                // Fill in the model cloud
                                // Compute model_resolution
                                pcl::ISSKeypoint3D< pcl::PointXYZRGBNormal, pcl::PointXYZRGBNormal> keyPointDetector;
                                pcl::search::KdTree::Ptr tree (new pcl::search::KdTree );
                                model_resolution_Target = static_cast(  computeCloudResolution( cloudVector_UNorg_PN[iii] )  );
                                keyPointDetector.setSearchMethod(    tree);
                                keyPointDetector.setSalientRadius(   PARAM_KEYP_coeffSalientRadius * model_resolution_Target);
                                keyPointDetector.setNonMaxRadius(    PARAM_KEYP_coeffNonMaxRadiuss * model_resolution_Target);
                                keyPointDetector.setThreshold21(     0.975);
                                keyPointDetector.setThreshold32(     0.975);
                                keyPointDetector.setMinNeighbors(    5);
                                keyPointDetector.setNumberOfThreads( 4);

                                pcl::PointCloud::Ptr TMPPP_keyPt_UNorg_P_(new pcl::PointCloud);

                                keyPointDetector.setInputCloud(  cloudVector_UNorg_PN[iii] );
                                keyPointDetector.compute(       *TMPPP_keyPt_UNorg_P_ );
                                KEYptVector_UNorg_P_.append(     TMPPP_keyPt_UNorg_P_ );
                            }


                            std::cout << "//// Feature Estimation" << std::endl;
                            {
                                    pcl::search::KdTree::Ptr tree (new pcl::search::KdTree);
                                    pcl::SHOTColorEstimationOMP< pcl::PointXYZRGBNormal,pcl::PointXYZRGBNormal,keyPointTYPE > featureDescriptor;
                                    featureDescriptor.setSearchSurface( cloudVector_UNorg_PN[iii] );
                                    featureDescriptor.setInputNormals(  cloudVector_UNorg_PN[iii] );
                                    featureDescriptor.setInputCloud(    KEYptVector_UNorg_P_[iii] );     // --->> Comupte Features ONLY @ Keypoints !!!!!!!!!!!!!!!!!
                                    featureDescriptor.setSearchMethod(  tree );
                                    featureDescriptor.setRadiusSearch(  PARAM_FEAT_coeffRadiusSearch * model_resolution_Target ); 
                                    featureDescriptor.compute(         *TMPPP_featt_UNorg_P_ );
                                    FEATtVector_UNorg_P_.append(        TMPPP_featt_UNorg_P_ );
                            }

Dimitris Tzionas


On Sun, Oct 6, 2013 at 11:20 PM, Mustafa Mohamad <mustafa.mohamad@gmail.com> wrote:
Hi, 

I am trying to get the indices of the detected keypoints using the ISS keypoint detector.  The compute method of the ISS detector returns a cloud of the actual keypoint values.  However, I need the indices so that I can calculate local shape descriptors for those points in the original cloud.

There must be something very basic I am missing.

Mustafa

Saturday, October 5, 2013

Books Read

1. The Alchemist by Paulo Coelho (5 / 5)



2. The Fountainhead by Ayn Rand (4.5 / 5)

Ayn Rand was a great writer. This book cannot be read in few sittings. I must say that she makes her point so well in a profound and convincing manner. I must say that this is a must read book for any young minds.



3. Turning Points by APJ Abdul Kalam (ongoing)



4. What do you care others think by Richard Feynnman (on going, may be 4 / 5)

Here he makes a point "What "



5. The Last Lecture by Randy Pausch (4.75 / 5)

Great and inspiring. It was really a last lecture of a professor's life where he was asked to potray what he wanted to say into an hour lecture. It was last lecture of his life as he was suffering from terminating cancer. One can find the video in youtube and book has almost the same content of the video.


6. An Autobiography of a Yogi by Paramahamsa Yogananda (5 / 5)


7. The Kite Runner by Khaled Hosseini (4.5 / 5)

Tuesday, October 1, 2013

Discussions on FAST Corner Detection...Part 2

source:
http://fastcorner.wordpress.com/2010/09/09/fast-faq/
http://www.edwardrosten.com/work/fast.html


Great many thanks to Edward Rosten for creating a forum to ask questions and promptly answering them.

The below paragraphs are copied from the forum which I thought are helpful :)


Kang-Kook Kong says:
Hi, I am interested in FAST-ER
I run ‘./configure && make’ in fast-er-1.4, but I got the error message:
checking libCVD… yes
checking for dgetri_ in -lcvd… no
configure: error: libCVD must be compiled with lapack support.
Can you help me?
  • edrosten says:
    Do you have the LAPACK development libraries installed on your machine? If so, libCVD should pick them out automatically. Try the following:
    1. Check the configure output from libcvd. If it doesn’t find LAPACK, then install the LAPACK development libraries.
    2. Check the built libcvd using ldd /usr/local/lib/libcvd.so and see if it has a reference to lapack. If it’s not there, then there libCVD has failed to pick up lapack properly. If 1 is OK and 2 isn’t, then let me know.
    3. As a workaround, run export LDFLAGS=-llapack before running ./configure to get LAPACK manually.
    1. Vinny says:
      Hey
      I just wanted to tell you that you are my life saver. I just used your code for my final year project and it works like a charm. Actually I was on the verge of failing my project and was very worried about it until I saw your code. Thanks a lot. :’)
      But the thing is, I do not understand the program at all. At least, could you give me the gist of what the code actually does? Because I have to explain it in my report and also to my professor.
      Your help is greatly appreciated! :)
      Vinny
      • edrosten says:
        I’m glad it was so helpful.
        The code is almost impossible to read because it is machine generated.
        What it does is tell you if there is a contiguous arc of 9 or more pixels which are either all much brighter or all much darker than the centre pixel.
        Instead of looking at pixels in the circle in sequence, the program uses a decision tree in order to reject non-corners as quickly as possible.

      1. Perikles Rammos says:
        Hi, and thanks for this very nice algorithm.
        My questions are mainly on the construction of the decision tree from the training images.
        1. The minimization of the entropy function is used only for creating the decision tree?
        2. Does the training set needs to be annotated? (I guess not, since all 16 pixels are checked)
        3. I assume that with very few training samples (corners), a very simple decision tree will be created. When new corners are trained, how is the tree expanded? (maybe the answer is in the paper, I haven’t been able to figure it out yet)
        Thanks.
        • edrosten says:
          To answer your questions:
          1. yes
          2. The training set does need to be annotated. There are two ways of doing this.
            1. Classify points in an image using a slow, simple algorithm that checks all 16 pixels
            2. Generate all possible corners and non corners. Since each pixel can have 3 states, there are 3^16 ~= 46 million possible corners and non corners.
            I actually use a combination of both methods. I generate all possible corners to get a complete coverage of the data. I then extract corners and non corners from a number of images, so that the pixel statistics are represented in the detector.
            Bear in mind that when it gets as far as training, the pixels are either b (brighter), d (darker) or s (similar) relative to the centre, so corner candidates can be thought of as a list of 16 elements likebsdbbddbsdbsbdsb
            There is program in the FAST-ER distribution to generate exactly one of each type of corner and non-corner, along with the classification.
          3. Yes, if you have too few training samples, then the tree will not be representative of the segment test criterion. The tree is never expanded, because the tree is not trained incrementally. I collect examples of corners first, then train the tree, then emit source code and then use the tree. In principle incremental training could be done however, but I’m not sure how useful that would be.

Discussions on FAST Corner Detection...Part 1

source:
http://fastcorner.wordpress.com/2010/09/09/fast-faq/
http://www.edwardrosten.com/work/fast.html


Great many thanks to Edward Rosten for creating a forum to ask questions and promptly answering them.

The below paragraphs are copied from the forum which I thought are helpful :)

MAN says:
In your code(ex. fast_9.cpp), the decision tree has already been conerted into C-code. It is a very long string of nested if-then-else statements. How can I make it?? What’s the machine learning?? Please explain the process to me.
  • edrosten says:
    It depends if you want to create code from a tree, or make a whole new tree.
    Either way, you will want the FAST-ER source code.
    Pre-made trees which are not yet converted into code are available. Look for the file “FAST_trees.tar.bz2″ and untar it. The raw (unconverted) trees have the suffix .ftree. They contain trees in a language neutral format which should be easy to convert into source code using your language of choice. I’ve used shell scripts to perform the conversion. See fast_tree_to_CXX as an example.
    If you want to make your own trees from scratch, then you need to use the learn_fast_tree program. That takes as input a list of extracted features. You can generate all features for fast-N using fast_N_featuresto ensure your tree is exact. I have a program to extract fast-N features from images, but it isn’t currently in the distribution. Let me know if you need it and I will add it.
    Let me know if you need any more information.


    Vivek Anand says:
    You consider points which are approximately 3 pixels away from the point being tested to find out if its a feature or not. Will the radius of 3pixels work for all image sizes or we need to change it based on the image size.
    • edrosten says:
      The radius you need depends on the scale of the features, rather than the size of the image. If the features are very blurry, then you will need a bigger ring. The easiest and most efficient way to do this is to subsample the image, e.g. by taking 2×2 squares, and averaging the pixels inside to make a single output pixel.