First time here? Check out the FAQ!

Ask Your Question
1

cvflip function

asked Jun 24 '13

lty52 gravatar image

updated Nov 17 '0

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

Preview: (hide)

2 answers

Sort by » oldest newest most voted
3

answered Jun 24 '13

HD_Mouse gravatar image

updated Jun 24 '13

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.

Preview: (hide)

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 (Jun 25 '13)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 (Jun 25 '13)edit

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

lty52 gravatar imagelty52 (Jun 25 '13)edit

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

SR gravatar imageSR (Jun 30 '13)edit
0

answered Jun 24 '13

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.

Preview: (hide)

Question Tools

Stats

Asked: Jun 24 '13

Seen: 5,715 times

Last updated: Jun 24 '13