title: Different results using imread function in matlab/python for HDR imaging
body: <p>I am currently working on a python/opencv implementation to create a HDR Image out of images with different exposures.
  I found an matlab code example, which has a function, that I am not understanding.</p>
  
  <pre><code>function [ red, green, blue ] = sample( image, sampleIndices )
  
  %Takes relevant samples of the input image
  
  redChannel = image(:,:,1);
  red = redChannel(sampleIndices);
  
  greenChannel = image(:,:,2);
  green = greenChannel(sampleIndices);
  
  blueChannel = image(:,:,3);
  blue = blueChannel(sampleIndices);
  </code></pre>
  
  <p>The function sample takes an image as an argument, which is declared in another class by </p>
  
  <pre><code>image = cv2.imread(dir_name + filenames[i])
  </code></pre>
  
  <p>Now my question is, what exactly do these assignments mean:</p>
  
  <pre><code>(matlab code)
  redChannel = image(:,:,1);
  red = redChannel(sampleIndices);
  </code></pre>
  
  <p>I do get different results for redChannel in matlab and python:</p>
  
  <pre><code>(python code)
  red_channel = image[:, :, 1]
  </code></pre>
  
  <p>I really don't know, if my python code is exactly the same, as it's written above in matlab.
  And what is the syntax for writing the same in python code? Especially this line, what is happening here?:</p>
  
  <pre><code>red = redChannel(sampleIndices);
  </code></pre>
  
  <p>I am very thankful for every help, you could provide.</p>
  
  <p>Cheers,
  Busofyan</p>