Ask Your Question
1

cvflip function

asked 2013-06-24 12:42:08 -0600

lty52 gravatar image

updated 2020-11-17 04:18:30 -0600

Dear all,

I have a question for cvFlip function in C. I tried to find that function in source code. I cannot find that function. I found similar function flip and cvFlip which is using cv::flip. Flip function is coming from c++. And, I don't understand what cv::flip is.

Could any one explain this function?

Sincerely, Taiyoon Lee

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
3

answered 2013-06-24 13:12:26 -0600

HD_Mouse gravatar image

updated 2013-06-24 13:14:08 -0600

Flip takes a 2D array and flips it around a vertical and/or horizontal axis. cvFlip and cv::flip are defined in copy.cpp located under modules/core/src/copy.cpp in the source files. Internally, cvFlip just calls cv::flip. Thie image below is demonstrating the different flips.

image description

Edit: flip() and cv::flip() are the same function, as flip() exists in the "cv" namespace.

edit flag offensive delete link more

Comments

Another question, I implemented the flip function. But, problem is that the speed is slower than open cv dll files. Is there a specific reason? or Am I wrong implementation?

lty52 gravatar imagelty52 ( 2013-06-24 18:15:07 -0600 )edit

That depends on your implementation. Did you implement it using random access functions, like the at() function? Or with pointers directly?

HD_Mouse gravatar imageHD_Mouse ( 2013-06-25 12:31:03 -0600 )edit

I bring the cvFlip algorithm and implement it directly. I did not use function call.

lty52 gravatar imagelty52 ( 2013-06-25 12:34:44 -0600 )edit

You are using Matlab... Do you have Matlab bindings for OpenCV?

SR gravatar imageSR ( 2013-06-30 16:29:01 -0600 )edit
0

answered 2013-06-24 13:11:04 -0600

Notas gravatar image

flip is simply the C++ version of the old cvflip. It takes an InputArray (like Mat or vector<mat>) and puts its result in the OutputArray.

The cvflip method (and the other methods relating to flip) is in the core module, copy.cpp.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-06-24 12:42:08 -0600

Seen: 5,434 times

Last updated: Jun 24 '13