Problem running main components

1

Hello, I'm running an algorithm for classifying objects in an image. At the moment I need to determine the obejto the center coordinates to calculate the diameter and apply compactness.

The part of the code that does this is:

cv::Point encontraCentros(const vector<Point> contornos, const vector<Point> &centros)
{

    //Faz um buffer usado pela PCA
    int tam = static_cast<int>(contornos.size());
    Mat dados_contornos = Mat(tam, 2, CV_64FC1);

    for (int i = 0; i < dados_contornos.rows; ++i)
    {
        dados_contornos.at<double>(i, 0) = contornos[i].x;
        dados_contornos.at<double>(i, 1) = contornos[i].y;
    }

    //Executa PCA
    PCA pca_analysis(dados_contornos, Mat(), PCA::DATA_AS_ROW);

    //Armazena o centro do objeto
    Point centros = Point(static_cast<int>(pca_analysis.mean.at<double>(0, 0)),
                          static_cast<int>(pca_analysis.mean.at<double>(0, 1)));

    return centros;
}

But codeBlocks gives the following error:

  

declaration of 'cv :: Point centers' shadows the parameter

Does anyone have any idea what this might be?

    
asked by anonymous 21.06.2018 / 20:48

0 answers