<pre>
sgx.copyTo(srx32, smask);
sgy.copyTo(sry32, smask);
</pre>
is much readable and faster.