Ask Your Question
1

gpu::flip problem when src == dst

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

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
3

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

Vladislav Vinogradov gravatar image

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

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

Comments

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 -0600 )edit

Question Tools

Stats

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

Seen: 412 times

Last updated: Apr 30 '13