Subtract displaced mask using OpenCV

Posted by dario_ramos on Stack Overflow See other posts from Stack Overflow or by dario_ramos
Published on 2012-03-20T17:26:21Z Indexed on 2012/03/20 17:29 UTC
Read the original article Hit count: 210

Filed under:
|
|
|

I want to do:

masked = image - mask

But I want to "displace" mask. That is, move it vertically and horizontally (as long as the intersection between it and image is not empty, this would be valid).

I have some hand-coded assembly (which uses MMX instructions) which does this, embedded in a C++ program, but it's unstable when doing vertical displacemente, so I thought of using OpenCV instead. Would it be possible to do this calling only one OpenCV function?

Performance is critical; using OpenCV, time should be at least in the same order of magnitude as the assembly code.

© Stack Overflow or respective owner

Related posts about c++

Related posts about Windows