First time here? Check out the FAQ!

Ask Your Question
1

gpu::flip problem when src == dst

asked Apr 30 '13

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.

Preview: (hide)

1 answer

Sort by » oldest newest most voted
3

answered Apr 30 '13

Vladislav Vinogradov gravatar image

updated Apr 30 '13

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.

Preview: (hide)

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 (Apr 30 '13)edit

Question Tools

Stats

Asked: Apr 30 '13

Seen: 420 times

Last updated: Apr 30 '13