1. A method for automatic localization of objects in a mask, comprising the steps of: building a dictionary of atoms, wherein each atom models the presence of one object at one location; iteratively selecting a most correlated atom of said dictionary of atoms with a multi-silhouette vector for each possible location; iteratively updating a remainder of said multi-silhouette vector taking out the contribution of said most correlated atom; and repeating the steps of selecting and updating until meeting ending criteria, wherein said most correlated atom corresponds to a maximal statistic; further comprising: a. acquiring a multi-silhouette vector y; b. defining an upper-bound on the number of the objects W H (x)≦k; c. defining a regularization factor λ; d. defining a dictionary D; e. creating an output support set {circumflex over (Λ)}; f. initializing 
 {circumflex over (Λ)}={ }, U={ }, R y, y^ 0, e W H ( y ), t 1; g. performing a preprocessing step for reducing the search space to a set U⊂{1, 2,. .. , N}; h. computing the sequence of statistics according to the formula λ ⁢ W H ⁡ ( d j ′ ⋀ R ) W H ⁡ ( d j ′ ) + ( 1 - λ ) ⁢ W H ⁡ ( d j ′ ⋀ R ) W H ⁡ ( R ) ⁢ ⁢ j ′ ∈ U wherein d i′ , are said atoms, R is said remainder, is bitwise AND operator, W H (.) is the Hamming weight of a Boolean vector and X is a regularization factor; i. repeating the step h. for each point between the number of points on the search space; l. finding the argmax of said sequence of statistics; m. updating said output support set according to the formula Λ^ Λ^∪{j}; n. updating said recovered multi-silhouette vector according to the formula y^ y^ d j′ , where d j′ is the atom corresponding to said argmax of said sequence of statistics; o. updating said remainder according to the formula R R ( y^) wherein is the bitwise NOT operator; p. updating an error according to the formula e (y^⊕y), wherein ⊕ is the bitwise XOR operation between vectors; q. updating a counter according to the formula t t+1; and r. repeating steps h. to q. until t≦k.