Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

not an answer, but it's easily reproducable (local is unfortunately, what it says ):

void my(OutputArrayOfArrays oaa)
{
    std::vector<cv::Mat> local;
    oaa.getMatVector(local);
    local.push_back(Mat::ones(3,3,0));
    local.push_back(Mat::ones(3,3,0));
    local.push_back(Mat::ones(3,3,0));
    local.push_back(Mat::ones(3,3,0));
    cerr << "local: " << local.size() << endl;;
}


int main()
{   
    std::vector<cv::Mat> vm;
    my(vm);
    cerr << "vm:    " << vm.size() << endl;;
    return 2;
}

local: 4
vm:    0

not an answer, but it's easily reproducable in 3.0 (local is unfortunately, what it says ):

void my(OutputArrayOfArrays oaa)
{
    std::vector<cv::Mat> local;
    oaa.getMatVector(local);
    local.push_back(Mat::ones(3,3,0));
    local.push_back(Mat::ones(3,3,0));
    local.push_back(Mat::ones(3,3,0));
    local.push_back(Mat::ones(3,3,0));
    cerr << "local: " << local.size() << endl;;
}


int main()
{   
    std::vector<cv::Mat> vm;
    my(vm);
    cerr << "vm:    " << vm.size() << endl;;
    return 2;
}

local: 4
vm:    0

not an answer, but it's easily reproducable in 3.0 (local is unfortunately, what it says ):

void my(OutputArrayOfArrays oaa)
{
    std::vector<cv::Mat> local;
    oaa.getMatVector(local);
    local.push_back(Mat::ones(3,3,0));
    local.push_back(Mat::ones(3,3,0));
    local.push_back(Mat::ones(3,3,0));
    local.push_back(Mat::ones(3,3,0));
local.resize(4);
    cerr << "local: " << local.size() << endl;;
}


int main()
{   
    std::vector<cv::Mat> vm;
    my(vm);
    cerr << "vm:    " << vm.size() << endl;;
    return 2;
}

local: 4
vm:    0

not an answer, but it's easily reproducable reproducable in 3.0 (local is unfortunately, what it says ):

void my(OutputArrayOfArrays oaa)
{
    std::vector<cv::Mat> local;
    oaa.getMatVector(local);
    local.resize(4);
    cerr << "local: " << local.size() << endl;;
}


int main()
{   
    std::vector<cv::Mat> vm;
    my(vm);
    cerr << "vm:    " << vm.size() << endl;;
    return 2;
}

local: 4
vm:    0