title: How to get Longitude and Latitude for each pixel in an image using Matlab
body: <p>I need to locate the areas in the satellite image based on its color. I can cluster the areas based on color using Matlab, but I'm not able to identify the spatial location. Please assist me how to identify the longitude latitude of those areas using Matlab</p>
  
  <pre><code>&lt;i&gt;
  veg= imread('vegimg3.png');
  imshow(veg), title('Vegitation in Kolleru');
          cform = makecform('srgb2lab');
      newveg = applycform(veg,cform);
      ab = double(newveg(:,:,2:3));
      nrows = size(ab,1);
      ncols = size(ab,2);
      disp(nrows);
      disp(ncols);
      ab = reshape(ab,nrows*ncols,2);
      nColors = 6;
      % repeat the clustering 3 times to avoid local minima
      [cluster_idx cluster_center] = kmeans(ab,nColors,'distance','sqEuclidean','replicates',3);
      pixel_labels = reshape(cluster_idx,nrows,ncols);
      %figure, imshow(pixel_labels,[]), title('image labeled by cluster index');
      segmented_images = cell(1,3);
      rgb_label = repmat(pixel_labels,[1 1 3]);
  
      for k = 1:nColors
          color = he;
          color(rgb_label ~= k) = 0;
          segmented_images{k} = color;
          imtool(segmented_images{k}), title('objects in cluster'+k);
      end
  &lt;/i&gt;
  </code></pre>
  
  <p>$ here i can able to cluster the image by color But i need longitude latitude info of each pixel</p>