Convert c++ opencv IplImage imageData and widthStep to android opencv Mat
<p>I'm developing an android app using opencv.
I have an algorithm written in C++ which uses opencv and I am porting it to java.
The original code uses 'IplImage' but now I'm forced to use 'Mat'. I managed to convert most of the code but I'm facing a problem with the following instructions:</p>

<pre><code>IplImage *src;
src-&gt;imageData;
src-&gt;widthStep;
</code></pre>

<p>Can I use</p>

<pre><code>[JAVA - Mat]src.dataAddr()  as an equivalent for [C++ - IplImage]src -&gt;imageData
</code></pre>

<p><strong>and</strong></p>

<pre><code>[JAVA - Mat]src.step1(0) as an equivalent for [C++ - IplImage]src-&gt;widthStep ?
</code></pre>

<p>The only link I found inherent to this topic is <a href="http://answers.opencv.org/question/8893/imagedata-and-depth-from-a-mat-object/" rel="nofollow">this one</a> which explains how to convert 'IplImage' to 'Mat' but still in C++. I can't use javacv.</p>

<p>Thanks</p>