Difference between cv::Mat::t () and cv::transpose()

空扰寡人 提交于 2019-12-22 08:36:10

问题


What is the difference in opencv between these two transposes?

Using cv::Mat::t():

cv::Mat a;
a = a.t();

Using cv::transpose():

cv::Mat a;
cv::transpose(a,a);

I'm interested in particular about efficiency.


回答1:


There's no difference. Here's the code for cv::Mat::t() from opencv/modules/core/src/matop.cpp:

MatExpr MatExpr::t() const
{
    MatExpr e;
    op->transpose(*this, e);
    return e;
}

So cv::Mat::t() just calls cv::transpose().



来源:https://stackoverflow.com/questions/43310433/difference-between-cvmatt-and-cvtranspose

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!