function [h,ind,population,m,mi]=initiate_autotlbo(I,k,np)
ima=double(I);
copy=ima;         % make a copy
ima=ima(:);       % vectorize ima
mi=min(ima);      % deal with negative 
ima=ima-mi+1;     % and zero values
s=length(ima);

% create image histogram

m=max(ima)+1;
h=zeros(1,m);
hc=zeros(1,m);

for i=1:s
  if(ima(i)>0) h(ima(i))=h(ima(i))+1;end;
end
ind=find(h);
hl=length(ind);

% initiate centroids

%mu=(1:k)*m/(k+1);
population=zeros(np,k+k);
population(:,1:k)=rand(np,k);
%seedselection;
for i=1:np
    %population(i,k+1:k+k)=c;
    for cc=1:k
        population(i,k+cc)=mi+rand(1)*(m-mi);
    end
end