将"Cartesian coordinates"转换为"polar coordinates with respect to user specified origin"
Convert "Cartesian coordinates" to "polar coordinates with respect to user specified origin"
我正在尝试将图像中的几个点转换为OpenCV中的极坐标。我遇到了一个叫做cartToPolar的函数,它会给我点的极坐标,0是我的原点。然而,我想通过将图像中的另一点视为原点来进行转换。有人能帮我这么做吗?我看到一些帖子说重新映射有助于改变原点,但我不清楚它是如何工作的。
然后您必须将参考点移动到原点:
px -= ref.x;
py -= ref.y;
现在将(px,py)传递给cartToPolar
函数
相关文章:
- "error: no matching function for call to"构造函数错误
- 调用专用模板时出错"no matching function for call to [...]"
- C++ Singleton - Prevent ::instance() to variable
- 我的项目不会像"undefined reference to `grpc::g_core_codegen_interface'"那样使用未定义的引用错误进行编译
- Visual Studio Code "undefined reference to `WinMain@16'"
- 使用 GCC 卸载的 OpenMP 卸载失败,并出现"Ptx assembly aborted due to errors"
- 如何解决"invalid conversion from 'char' to 'const char*'"
- 使用 MATLAB 编码器生成C++代码:编译错误"undefined reference to `rgb2gray_tbb_real64'"
- 尝试链接我的着色器时,我收到错误代码"error c5145 must write to gl_position"
- Python str to C++ to Python str
- 为什么创建友元类的实例会导致"undefined reference to"错误?
- System.InvalidCastException - SQL to C++ - safe_cast<float>
- 使用 cmake 的 Linux 终端上的"Conversion to non-scalar type is requested"错误
- "no matching function for call to 'Vector::Vector'"错误
- vector<vector<double>> to mxArray using memcpy
- Tensorflow c++ api undefined reference to 'tflite::D efaultErrorReporter()'
- 当覆盖存在时调用基本虚拟"binded to object"函数
- OpenGL VBO Indexing ( How to compute Index Array)
- 为什么我会" void value not ignored as it ought to be"?
- 将"Cartesian coordinates"转换为"polar coordinates with respect to user specified origin"