title: how to converting pixel coordinates x and y of an image to an image in matlab?
body: <p>I have a set of vectors x and y which contains the pixel coordinates of an image. And i need to convert those values to an image using Matlab. How can I use these values? Αnd which function is best suitable for it? The code i used is:</p>
  
  <pre><code>I = imread('D:\majorproject\image\characters\ee.jpg');
  
  imshow(I)
  
  BW =im2bw(I);
  
  BW=imcomplement(BW);
  
  imshow(BW)
  
  dim = size(BW);
  
  col = round(dim(2)/2)-90;
  
  row = find(BW(:,col), 1 );
  
  boundary = bwtraceboundary(BW,[row, col],'N');
  
  imshow(I)
  
  hold on;
  
  plot(boundary(:,2),boundary(:,1),'0','LineWidth',3);
  
  BW_filled = imfill(BW,'holes');
  
  boundaries = bwboundaries(BW_filled);
  
  for k=1:10
  
     b = boundaries{k};
  
     plot(b(:,2),b(:,1),'g','LineWidth',3);
  end
  </code></pre>
  
  <p>from which i got the coordinate values.
  Thank you.</p>