How to use Tan-1 in OpenCV
I want to calculate with this formula
tan-1(Image 1 / Image2)
how to implement it in OpenCV. Thank you.
I want to calculate with this formula
tan-1(Image 1 / Image2)
how to implement it in OpenCV. Thank you.
You should use phase function
Mat xxx = (Mat_<float>(2, 2) << 1, 2, 3, 4);
Mat yyy = (Mat_<float>(2, 2) << 1, 2, 4, 5),angle;
phase(xxx,yyy,angle);
cout<<angle;
results are :
[0.78523159, 0.78523159;
0.92740309, 0.89609587]
Asked: 2017-07-03 03:16:46 -0600
Seen: 1,440 times
Last updated: Aug 01 '17
OpenCV DescriptorMatcher matches
Conversion between IplImage and MxArray
Video On Label OpenCV Qt :: hide cvNamedWindows
Problems using the math.h class with OpenCV (c++, VS2012)
How to reduce false positives for face detection
Area of a single pixel object in OpenCV
build problems for android_binary_package - Eclipse Indigo, Ubuntu 12.04
Can't compile .cu file when including opencv.hpp
Using OpenCV's stitching module, strange error when compositing images
Not sure what you're trying to achieve. Calculating atan makes sense only if the Mat objects would contain coordinate values, something like the result of meshgrid in Matlab/Octave. You can't really calculate atan of an image - there is no such thing that I would be aware of.