cvWarpAffine can not deal COIs (Feature #1088)


Added by Mario Bellino almost 14 years ago. Updated almost 13 years ago.


Status:Cancelled Start date:
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:imgproc, video
Target version:2.4.1
Difficulty: Pull request:

Description

If the source image, or the destination one, or both have a roi/coi, then the function crashes unexpectively.

The documentation do not highlight this particular behavior.

Moreover, if you want to apply a different transformation for each planes of a RGB image, then it is required that :
- copy R channel into a "grey" buffer
- perform the warp where the destination is another "grey" image
- copy back the destination into the R channel of the destination image
- repeat for G and B channels

Thus, could be nice to correct the documentation with that limitation. Or better : use roi/coi in the cvWarpAffine function.

I also expect that "WarpPerspective()" has the same limitation.

Regards


Associated revisions

Revision 894b30b3
Added by Roman Donchenko over 11 years ago

Merge pull request #1088 from apacha:brisk_noDescriptors_fix

History

Updated by Vadim Pisarevsky almost 14 years ago

COI is indeed not supported. Setting a ROI should not cause a crash; is it possible to provide a sample code that reproduces the problem?

Updated by Mario Bellino almost 14 years ago

Right !

I have always tested ROIs with COI set.

Do you think it is difficult to make COI usable?
I imagine that to use COI on planned channels is easy, as the grey version of the warp function exists. However, I don't know how much work would it be to do so on packed channels (the OpenCV default).

Updated by Vadim Pisarevsky almost 14 years ago

yes, it would require quite a bit of coding. Since the function does not crash but reports an error via normal exception mechanism (which can be handled by try-catch statement), I change the type of the ticket from defect to enhancement

Updated by Vadim Pisarevsky almost 13 years ago

ok, since we are moving completely to C++ interface, in which COI is not supported directly (you have to use mixChannels() to extract one), I'm closing this ticket, since it will not be implemented. Use mixChannels() + warpAffine().

  • Status changed from Open to Cancelled

Updated by Andrey Kamaev almost 13 years ago

  • Target version set to 2.4.1

Also available in: Atom PDF