title: Converting Color Correction opencv module example from C++ to python
body: <p>I tried to convert color correction module example in <a href="https://docs.opencv.org/master/d1/dc1/tutorial_ccm_color_correction_model.html" rel="nofollow noreferrer">https://docs.opencv.org/master/d1/dc1/tutorial_ccm_color_correction_model.html</a>
  but I faced some difficulty because I do not know c++,</p>
  <pre><code>    //compte color correction matrix
      ColorCorrectionModel model1(src, COLORCHECKER_Vinyl);
      model1.run();
      Mat ccm = model1.getCCM();
      std::cout&lt;&lt;&quot;ccm &quot;&lt;&lt;ccm&lt;&lt;std::endl;
      double loss = model1.getLoss();
      std::cout&lt;&lt;&quot;loss &quot;&lt;&lt;loss&lt;&lt;std::endl;
  </code></pre>
  <p>I wrote in python as</p>
  <pre><code>   colorCorrectionModel = cv2.ccm_ColorCorrectionModel(src, cv2.ccm.COLORCHECKER_Macbeth)
  
     colorCorrectionModel.run()
  
     ccmat = colorCorrectionModel.getCCM()
     print(ccmat)
     weigths = colorCorrectionModel.getWeights()
     print(weigths)
  </code></pre>
  <p>but give me this error</p>
  <p>colorCorrectionModel.run()</p>
  <p>cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-sljz46fi\opencv\modules\core\src\arithm.cpp:234: error: (-209:Sizes of input arguments do not match) The operation is neither 'array op array' (where arrays have the same size and type), nor 'array op scalar', nor 'scalar op array' in function 'cv::binary_op'</p>
  <p>How I could correct this error</p>