title: Simplest way to save array variables as images C++
body: <pre><code>#include &quot;Readvid.h&quot;
  #include &lt;opencv2\opencv.hpp&gt;
  #include &lt;atlstr.h&gt;
  
  
  //skeleton data
  SLR_ST_Sn sn = myReadVideo.vSknData[i];
          //RGB image
  IplImage* color = myReadVideo.vColorData[i];
  </code></pre>
  <p>I'm a beginner in C++ and I need to save values of sn and color array variables as images. Is there an easy way to do it like in python where we only need to import cv2 and write cv2.imwrite?</p>