Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
6628 Discussions

ippiWarpPerspective returning ippStsRectErr


I have an application which uses ippiWarpPerspective to apply a perspective warp to an image. The parameters of the perspective warp depend on the input parameters to the application. In certain situations, the dstRoi I want is actually a single row of pixels. Unfortunately ippiWarpPerspective returns ippStsRectErr in this case (as stated in the documentation).

More often than not, when this happens it turns out that I actually don't need a full perspective warp but only a copy or a translation and/or rotation. I can detect these circumstances and use alternative functions (which also gives me a speed improvement). However, in some cases I also need the non-uniform sample spacing of an actual perspective transform.

Does anyone have any neat suggestions for how to solve my problem?


0 Kudos
2 Replies


thanks for your report.  For your problem, Does it happen only when the dstRoi is a single row?   



I haven't tried it and it wouldn't ever really occur in my application but the documentation suggests it would probably also happen if dstRoi was a single column. So yes, in my application I've only seen it occur when dstRoi is a single row.

Curiously, despite what the documentation says, even when dstRoi is a single row I don't necessarily get this error. It seems to depend on the coefficients. In particular, if c20 and c21 are both zero then I get this error but if c21 is non-zero then I get no error.

In my case c20 is always zero anyway so the best solution I've come up with so far is to test c21 and if it is non-zero I use ippiWarpPerspective (even if dstRoi is a single row) and if it is zero then I use ippiWarpAffine instead. My concern is that this is relying on behaviour which appears to be contrary to the documentation and that there could be cases where it won't work (or it may stop working in a future version of IPP).