Ask Your Question

gpu::flip problem when src == dst

asked 2013-04-29 20:38:19 -0500

JeremyG gravatar image

Reporting an issue (bug?) with the gpu::flip function in OpenCV 2.4.4. When I call gpu::flip (a, a, 0), the image is flipped but pixels appear corrupted. However when I call gpu::flip (a, b, 0) it works fine. I have not tried 2.4.5 because I have a workaround which is just declare a second matrix to store the result. Reporting it here in case others are having problems with it in the future.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-04-30 00:32:11 -0500

Vladislav Vinogradov gravatar image

updated 2013-04-30 00:34:08 -0500

gpu::flip doesn't work in-place, you have to store result in other matrix.

Most of gpu functions doesn't work in-place. Only simple per-pixel operations (add, subtract, treshold, etc) can store result to the same matrix.

edit flag offensive delete link more


Thanks, that make sense. Would be good to add an assertion anyway though to check if src==dst for functions that don't work in place, could save people a lot of trouble.

JeremyG gravatar imageJeremyG ( 2013-04-30 15:14:06 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-04-29 20:38:19 -0500

Seen: 165 times

Last updated: Apr 30 '13