Ask Your Question

Lucas Amparo Barbosa's profile - activity

2019-04-11 12:37:31 -0600 asked a question Pre-stitching data

Pre-stitching data Hi, folks. I need to access the data from the stitching algorithm "seconds" before the blending... S

2018-11-27 06:26:45 -0600 commented question Wrong rank in Fundamental Matrix

computed by numpy.linalg.matrix_rank function

2018-11-27 06:26:32 -0600 commented question Wrong rank in Fundamental Matrix

[[ 1.95163442e-08 1.34608880e-07 -3.20936720e-04] [ 4.76676164e-08 5.75973164e-07 -1.02011608e-03] [-5.95314437e-05

2018-11-27 06:26:16 -0600 commented question Wrong rank in Fundamental Matrix

[[-2.29390496e-08 8.55007340e-07 -1.07108724e-03] [ 2.87605686e-08 -2.30601171e-06 2.86179300e-03] [ 2.94004722e

2018-11-27 06:26:04 -0600 commented question Wrong rank in Fundamental Matrix

[[-2.29390496e-08 8.55007340e-07 -1.07108724e-03] [ 2.87605686e-08 -2.30601171e-06 2.86179300e-03] [ 2.94004722e-05

2018-11-27 06:25:55 -0600 commented question Wrong rank in Fundamental Matrix

[[-2.29390496e-08 8.55007340e-07 -1.07108724e-03] [ 2.87605686e-08 -2.30601171e-06 2.86179300e-03] [ 2.94004722e-05

2018-11-26 11:04:12 -0600 asked a question Wrong rank in Fundamental Matrix

Wrong rank in Fundamental Matrix Hi guys, I'm using the OpenCV for Python3 and, based on the Mastering OpenCV Book, try

2018-04-06 04:19:55 -0600 commented answer Rank N for OpenCV Face Recognition

i think this code willl works for me. Thanks berak.

2018-04-06 04:08:24 -0600 marked best answer Rank N for OpenCV Face Recognition

Hi everyone,

Someone already does a Rank N for the algorithms from OpenCV faces?

Have some way to take only the feature set from the eigen/fisher/lbph processing to build my onw matching process?

Thanks guys.

2018-04-05 11:59:53 -0600 commented question Problems with FaceRecognition

I've solved that. Thanks everyone.

2018-04-05 11:58:42 -0600 asked a question Rank N for OpenCV Face Recognition

Rank N for OpenCV Face Recognition Hi everyone, Someone already does a Rank N for the algorithms from OpenCV faces? Ha

2018-01-19 07:39:51 -0600 received badge  Enthusiast
2018-01-18 14:00:16 -0600 answered a question calculating angle between two lines

Angle between two lines: Give two lines, s and r, when ms and mr are the angular coeff for the lines. So, the angle a is

2018-01-18 13:41:12 -0600 asked a question Tensorflow Import Assert

Tensorflow Import Assert Guys, I'm trying to import a tensorflow model (protobuffer file) but the opencv returns Ass

2018-01-15 12:14:48 -0600 commented question Problems with FaceRecognition

I added the flag -lopencv_face, and the error turns to: OpenCV Error: Bad argument (Wrong shapes for given matrices. Wa

2018-01-15 12:14:08 -0600 commented answer Problems with FaceRecognition

No, man... I've declared the namespace before. But thanks...

2018-01-15 12:09:50 -0600 edited question Problems with FaceRecognition

Problems with FaceRecognition - URGENT Hello everyone, I'm try to follow the tutorial from docs (here) , but when I try

2018-01-15 12:06:51 -0600 asked a question Problems with FaceRecognition

Problems with FaceRecognition - URGENT Hello everyone, I'm try to follow the tutorial from docs (here) , but when I try

2016-06-07 08:11:58 -0600 received badge  Editor (source)
2016-06-06 11:33:17 -0600 asked a question Trouble with Knn

I've build a knn model for regression, but isn't work.

When I call for a prediction, with a set of numbers, the answer always be the same value, like this >>

In = 0.742781 || Out = 0.917355 In = 0.557086 || Out = 0.917355 In = 0.19518 || Out = 0.917355 In = 0.9759 || Out = 0.917355 In = 0.09759 || Out = 0.917355

the model is setted to regression (setIsClassifier(false)) and the Algorithm Type is Brute Force (The KdTree isn't work too, showing a error).

Please, guys. I need so much this help.

@berak , the code

//Loading the model, early trained.
Ptr<KNearest> knn = Algorithm::load<KNearest>(str.str());

//Loading the value for regression
sampleMat.at<float>(0,0) = cloud_normals->points[i/3].normal_x;
knns[i]->findNearest(sampleMat, 5, response);
//Saving the regression
tmp.x = response.at<float>(0,0);

Visual Results. After the train, i've tested the model. Results from the train. The first cloud, the regression. The second, the target

OpenCV v2 (2.4), Ubuntu 14.04

2016-05-25 09:08:34 -0600 asked a question Sugestion of Machine Learning

Hello everyone,

I have a dataset assembled by pairs formed by two float numbers, like (-87.884599 , 45.453324).

I need to build a regression model to predict the second value for a single input.

Can someone help me with this?

Thanks

2016-05-16 07:55:10 -0600 commented question Whats the problem with my ANN_MLP?

@berak still not working... Change the multiple call

for(int j = 0; j < 12; j++){
        for(int i = 0; i < matTrainFeatures.rows; i++){
            lr->train(matTrainFeatures.row(i),ROW_SAMPLE,matTrainLabels.row(i));   
        }  
    }

To

lr->train(matTrainFeatures,ROW_SAMPLE,matTrainLabels);

Now, the output is

matSample: [53.028278; 19.925919; 40.105942; 81.438507]

matResults: [52.965919; 48.013771; 51.669022; 51.085236]

When the correct answer would be [84.443771; 3.7859535; 72.47551; 55.815529;]

2016-05-12 13:50:28 -0600 asked a question Whats the problem with my ANN_MLP?

Guys... I'm using the ANN_MLP to predict values like a simple regression.

But, don't know why, isn't working.

My code >> http://pastebin.com/nrczCHxW The output from this code >> http://pastebin.com/BWCY9ZFp

It's should work like this: Train with random numbers and random labels, like ordened pairs (x,y). Test with the first fours elements on the training set. The output should be the first fours elements from the label set...

Someone can help me??

#include <opencv2/highgui.hpp>
#include <opencv2/ml.hpp>

using namespace cv;
using namespace cv::ml;
using namespace std;

int main( int argc, char** argv ){
    Mat matTrainFeatures(100,1,CV_32F);
    randu(matTrainFeatures,0,100);

    Mat matTrainLabels(100,1,CV_32F);
    randu(matTrainLabels,0,100);

    Mat matSample(4,1,CV_32F);
    //randu(matSample,0,100);
    matSample.at<float>(0,0) = matTrainFeatures.at<float>(0,0);
    matSample.at<float>(1,0) = matTrainFeatures.at<float>(1,0);
    matSample.at<float>(2,0) = matTrainFeatures.at<float>(2,0);
    matSample.at<float>(3,0) = matTrainFeatures.at<float>(3,0);

    Mat matSampleLabels(1,1,CV_32F);

    Mat matResults(4,1,CV_32F);
    //Mat matResults(5,1,CV_32F);

    Ptr<TrainData> trainingData;
    trainingData=TrainData::create(matTrainFeatures,ROW_SAMPLE,matTrainLabels);

    Ptr<ANN_MLP> lr = ANN_MLP::create();
    Mat layers(3,1,CV_32FC1);
    layers.row(0) = 1;
    layers.row(1) = 100;
    layers.row(2) = 1;
    lr->setBackpropMomentumScale(0.05f);
    lr->setLayerSizes(layers);
    lr->setBackpropWeightScale(0.05f);
    lr->setActivationFunction(ANN_MLP::SIGMOID_SYM, 1, 1);
    lr->setTrainMethod(ANN_MLP::BACKPROP, 0.001);
    lr->setTermCriteria(TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 300, FLT_EPSILON));

    //lr->train(trainingData);
    for(int j = 0; j < 12; j++){
        for(int i = 0; i < matTrainFeatures.rows; i++){
            lr->train(matTrainFeatures.row(i),ROW_SAMPLE,matTrainLabels.row(i));   
        }  
    }  
    lr->predict(matSample,matResults);

    //Just checking the settings
    cout<<"Training data: "<<endl
        <<"getNSample\t"<<trainingData->getNSamples()<<endl
        <<"getSamples\n"<<trainingData->getSamples()<<endl
        <<"getResponses\n"<<trainingData->getTrainResponses()<<endl
        <<endl;

    //confirming sample order
    cout<<"matSample: "<<endl
        <<matSample<<endl
        <<endl;

    //displaying the results
    cout<<"matResults: "<<endl
        <<matResults<<endl
        <<endl;

    return 0;

    }