title: OpenCV-Python createMergeDebevec returns an array of Inf
body: <p>I am trying to get some HDR related functions working with OpenCV-Python: specifically I'm trying to reproduce the <a href="http://docs.opencv.org/master/d3/db7/tutorial_hdr_imaging.html" rel="nofollow noreferrer">OpenCV C++ HDR tutorial</a>. Unfortunately, the resulting hdr image/array comes out completely white (all values are Inf). Here is an <a href="https://stackoverflow.com/help/mcve">MCVE</a>. 1.jpg, 2.jpg, 3.jpg are all 870 × 580 RGB (Internal RGB KODAK sRGB Display) JPG images with exposure times of 1/3200, 1/800, and 1/200 respectively. I've tested this with 2 other JPG image sets now, one of which is available on <a href="https://commons.wikimedia.org/wiki/File%3AStLouisArchMultExpEV%2B1.51.JPG" rel="nofollow noreferrer">Wikimedia</a>.</p>
  
  <pre><code>&gt;&gt;&gt; import cv2
  &gt;&gt;&gt; import numpy as np
  &gt;&gt;&gt;
  &gt;&gt;&gt; img = cv2.imread("1.jpg")
  &gt;&gt;&gt; img2 = cv2.imread("2.jpg")
  &gt;&gt;&gt; img3 = cv2.imread("3.jpg")
  &gt;&gt;&gt;
  &gt;&gt;&gt; images = np.array([img, img2, img3])
  &gt;&gt;&gt; times = np.array([1.0/3200,1.0/800,1.0/200])
  &gt;&gt;&gt;
  &gt;&gt;&gt; merger = cv2.createMergeDebevec()
  &gt;&gt;&gt; hdr = merger.process(images, times)
  &gt;&gt;&gt; hdr
  array([[[ inf,  inf,  inf],
          [ inf,  inf,  inf],
          [ inf,  inf,  inf],
          ...,
          [ inf,  inf,  inf],
          [ inf,  inf,  inf],
          [ inf,  inf,  inf]],
  
         [[ inf,  inf,  inf],
          [ inf,  inf,  inf],
          [ inf,  inf,  inf],
          ...,
          [ inf,  inf,  inf],
          [ inf,  inf,  inf],
          [ inf,  inf,  inf]],
  
         [[ inf,  inf,  inf],
          [ inf,  inf,  inf],
          [ inf,  inf,  inf],
          ...,
          [ inf,  inf,  inf],
          [ inf,  inf,  inf],
          [ inf,  inf,  inf]],
  
         ...,
         [[ inf,  inf,  inf],
          [ inf,  inf,  inf],
          [ inf,  inf,  inf],
          ...,
          [ inf,  inf,  inf],
          [ inf,  inf,  inf],
          [ inf,  inf,  inf]],
  
         [[ inf,  inf,  inf],
          [ inf,  inf,  inf],
          [ inf,  inf,  inf],
          ...,
          [ inf,  inf,  inf],
          [ inf,  inf,  inf],
          [ inf,  inf,  inf]],
  
         [[ inf,  inf,  inf],
          [ inf,  inf,  inf],
          [ inf,  inf,  inf],
          ...,
          [ inf,  inf,  inf],
          [ inf,  inf,  inf],
          [ inf,  inf,  inf]]], dtype=float32)
  </code></pre>
  
  <p>An interesting thing to note is that the "times" array is modified after the merger.process call</p>
  
  <pre><code>&gt;&gt;&gt; times
  array([-8.07090609, -6.68461173, -5.29831737])
  </code></pre>
  
  <p>I am using OpenCV version:</p>
  
  <pre><code>&gt;&gt;&gt; cv2.__version__
  '3.0.0'
  </code></pre>
  
  <p>The merger.process call has a signature as follows:</p>
  
  <pre><code>&gt;&gt;&gt; import inspect
  &gt;&gt;&gt; inspect.getdoc(merger.process)
  'process(src, times, response[, dst]) -&gt; dst  or  process(src, times[, dst]) -&gt; dst'
  </code></pre>