title: Create an array from Image
body: <p>I have an image (taken from my cell phone camera or maybe drawn in paint on my pc) in which I have white background and drawn lines inside a rectangular figure. I am only considered about the stuff inside the rectangle including it's boundary.</p>
  
  <p>Now I want to create an array out of this such that for all the lines the array should have value 1 and for all the free space array should have 0.</p>
  
  <p>I am working on ubuntu and once the array's been created, I use it further in my C program.</p>
  
  <p>Any leads on what software can I use for this? I heard about imagemagick, will that be helpful?</p>
  
  <p>Kindly help. 
  Thanks.</p>