title: Image conversion in OpenCV C#
body: <pre><code>Image&lt;bgr,byte&gt; WeightedImg;
  .
  .
  
  double color;
  
  for (int i = 0; i &lt; dataArray.Length; i++){
      color = dataArray[i, 2];
      WeightedImg.Bitmap.SetPixel(x, y,Color.FromArgb((int)Math.Ceiling(color * R), (int)Math.Ceiling(color * G),(int)Math.Ceiling(color * B)));
  }
  </code></pre>
  
  <p>this line:</p>
  
  <pre><code>WeightedImg.Bitmap.SetPixel(x, y,Color.FromArgb((int)Math.Ceiling(color * R),
     (int)Math.Ceiling(color * G),(int)Math.Ceiling(color * B)));
  </code></pre>
  
  <p>makes the program crash .. I want to set a pixel in a <code>WeightedImg</code> according to a <code>double</code>value .. Is that possible?</p>
  
  <p>or Can I convert from <code>Image&lt;bgr,byte&gt;</code> to <code>Bitmap</code> or <code>double[,]</code> ?</p>