Updated by Andrey Kamaev almost 13 years ago
I think it make sense that when @scale scale != 1@ we also 1 to multiply the calibration matrix by @scale@. scale. In the code the images are resized according to scale but then the calibration matrix @M1@ M1 and @M2@ M2 are not transformed accordingly.
So in my version I just added the following
<pre><code class="cpp">
@ if( scale != 1.f )
{
M1 = scale * M1;
M2 = scale * M2;
}
</code></pre>
}@
at around line 193 (anyway after the matrices are read from the calibration file).
With that I get smoother results that are more similar to the case @scale scale = 1.0@. 1.0.
I don't know the details of the dense stereo matching algorithms but this make sense in theory: if u are using, eg, a downsample image then also the calibration matrix is affected.
Hope it helps.
Simone
So in my version I just added the following
<pre><code class="cpp">
@ if( scale != 1.f )
{
M1 = scale * M1;
M2 = scale * M2;
}
</code></pre>
}@
at around line 193 (anyway after the matrices are read from the calibration file).
With that I get smoother results that are more similar to the case @scale scale = 1.0@. 1.0.
I don't know the details of the dense stereo matching algorithms but this make sense in theory: if u are using, eg, a downsample image then also the calibration matrix is affected.
Hope it helps.
Simone