title: How do I replicate this code (Python) in Objective C++?
body: <p>I'm developing this Swift project that uses OpenCV's Harris Corner. Because of the different languages, I'm using Objective C++ as the intermediary language. I'm following this tutorial, however now I am having trouble replicating a line of code (Python) in Objective C++.</p>
  
  <pre><code>filename = 'chessboard.jpg'
  img = cv2.imread(filename)
  gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
  
  gray = np.float32(gray)
  dst = cv2.cornerHarris(gray,2,3,0.04)
  
  #result is dilated for marking the corners, not important
  dst = cv2.dilate(dst,None)
  
  # Threshold for an optimal value, it may vary depending on the image.
  **img[dst&gt;0.01*dst.max()]=[0,0,255]** //This is the line I don't know how to write in Objective C++
  </code></pre>
  
  <p>At the moment, I have this code, all except the last line:</p>
  
  <pre><code>+ (NSArray&lt;NSArray&lt;NSNumber *&gt; *&gt; *)harrisonCorners:(UIImage *)image {
      cv::Mat mat;
      [image convertToMat: &amp;mat];
  
      cv::Mat gray, corner, dst;
      if (mat.channels() &gt; 1) {
          cv::cvtColor(mat, gray, CV_RGB2GRAY);
      } else {
          mat.copyTo(gray);
      }
  
      cv::cornerHarris(gray, corner, 2, 3, 0.04);
  
      //The line of code should be here
  
      return nil;//Return a 2D array with the corners
  }
  </code></pre>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thank you</p>