Ask Your Question

albeh95's profile - activity

2020-07-08 11:39:10 -0600 commented question Loading a .yml file in a SVM

I've just noticed I have a lot of values like these: uncompressed_sv_total: 246 uncompressed_support_vectors:

2020-07-08 10:34:30 -0600 commented question Loading a .yml file in a SVM

I used one_class because i just need to classificate one object class (the goal is to classified pictures as tree pictur

2020-07-08 10:34:03 -0600 commented question Loading a .yml file in a SVM

I used one_class because i just need to classificate one object class

2020-07-08 10:21:12 -0600 commented question Loading a .yml file in a SVM

Sure, it starts like this: opencv_ml_svm: format: 3 svmType: ONE_CLASS kernel: type: LINEAR nu: 5.00000

2020-07-08 10:20:59 -0600 commented question Loading a .yml file in a SVM

Sure, it starts like this: opencv_ml_svm: format: 3 svmType: ONE_CLASS kernel: type: LINEAR nu: 5.0000

2020-07-08 10:06:20 -0600 asked a question Loading a .yml file in a SVM

Loading a .yml file in a SVM Hi everyone, I trained an SVM and saved the result in a .yml file thanks to svm->save(fi

2020-07-06 06:02:17 -0600 commented question How to check if an image is total black

Thanks! Had just found it :)

2020-07-06 05:35:59 -0600 edited question How to check if an image is total black

How to check if an image is total black Hi everyone, I'm trying to check if a threshold is empty (and so, if the result

2020-07-06 05:25:05 -0600 asked a question How to check if an image is total black

How to check if an image is total black Hi everyone, I'm trying to check if a threshold is empty (and so, if the result

2020-07-04 09:14:28 -0600 commented question Isolate object to better detect it

I managed to get only the trees in the treshold, however I only get non-trees labels on every test pic... don't get why

2020-07-04 04:59:17 -0600 commented question Isolate object to better detect it

Another strategy I'm trying is to delete the grass part in the image treshold (maybe by selecting only "dense" white par

2020-07-04 04:59:05 -0600 commented question Isolate object to better detect it

Another strategy I'm trying is to delete tre grass part in the image treshold (maybe by selecting only "dense" white par

2020-07-04 04:45:41 -0600 asked a question Isolate object to better detect it

Isolate object to better detect it Hello everyone, it's me again: i'm trying to detect dome trees in a pictures and I tr

2020-07-01 05:07:49 -0600 commented question Detection after classification

well after 3 weeks that i'm stuck on this project i chose to ask for help. is it wrong?

2020-07-01 04:39:38 -0600 asked a question Detection after classification

Detection after classification Hi everyone, I have implemented a bag of word strategy to classify images containig trees

2020-06-26 16:15:39 -0600 commented answer Training SVM Error - Assertion failed

I'm thinking about the fact that, to make the dictionary, I've used 2 images among the 63 of the training set that actua

2020-06-26 16:11:54 -0600 commented answer Training SVM Error - Assertion failed

I posted the full code, can't find the mismatch! I swear berak I'll put your name in my thesys credits when I'll graduat

2020-06-26 16:11:00 -0600 edited question Training SVM Error - Assertion failed

Training SVM Error - Assertion failed Hello everyone, basically I have this code: #include <opencv2/imgcodecs.hpp>

2020-06-26 15:19:23 -0600 commented answer Training SVM Error - Assertion failed

Trining is 400x31 while labels is 1x32 mmm

2020-06-26 14:31:43 -0600 commented answer Training SVM Error - Assertion failed

Thank you again! So basically I only wrote Mat labels() without parameters and set the push_back() cast into int (sorry

2020-06-26 14:29:38 -0600 commented answer Training SVM Error - Assertion failed

Thank you again! So basically I only wrote Mat labels() without paameters and set the push_back() cast into int (sorry I

2020-06-26 14:29:08 -0600 commented answer Training SVM Error - Assertion failed

Thank you again! So basically I only wrote Mat labels() without paameters and set the push_back() cast into int (sorry I

2020-06-26 14:27:07 -0600 commented answer Training SVM Error - Assertion failed

Thank you again! So basically I only wrote Mat labels() without paameters and set the push_back() cast into int (sorry I

2020-06-26 12:33:03 -0600 commented question Cluster(Mat) function taking too long

It has finished one half hour later I posted the question here, luckly it's a process that I'm suppose to do only one ti

2020-06-26 12:29:15 -0600 edited question Training SVM Error - Assertion failed

Training SVM Error - Assertion failed Hello everyone, basically I have this code: Mat labels(0, 1, CV_32S); int dictSiz

2020-06-26 12:27:26 -0600 commented answer Training SVM Error - Assertion failed

Thank you berak, I've edited my code following your suggestion but still I get the same error. Should I do something on

2020-06-26 10:06:25 -0600 asked a question Training SVM Error - Assertion failed

Training SVM Error - Assertion failed Hello everyone, basically I have this code: cout << "extracting histograms

2020-06-26 09:16:00 -0600 asked a question Cluster(Mat) function taking too long

Cluster(Mat) function taking too long Hello everyone, I'm trying to make a dictionary using BOWKMeansTrainer class: i

2020-06-25 07:49:03 -0600 commented question Bad argument on classification problem

Alright so basically I deleted the line int label[1] = {1}, and just defined Mat labels(0, 1, CV_32S); but still I get t

2020-06-25 07:43:44 -0600 commented question Bad argument on classification problem

Alright so basically I deleted the line int label[1] = {1}, and just defined Mat labels(0, 1, CV_32S); but still I get t

2020-06-25 07:43:09 -0600 commented question Bad argument on classification problem

Alright so basically I deleted the line int label[1] = {1}, and just defined Mat labels(0, 1, CV_32S); but still I get t

2020-06-25 07:41:57 -0600 edited question Bad argument on classification problem

Bad argument on classification problem Hello guys, I'm trying to compile this code having ONLY 1 LABEL fro object classi

2020-06-25 07:40:34 -0600 edited question Bad argument on classification problem

Bad argument on classification problem Hello guys, I'm trying to compile this code having ONLY 1 LABEL fro object classi

2020-06-25 06:08:32 -0600 commented question Bad argument on classification problem

Mmm i don't get it, I've already used int label[1] = {1}; which in actually an int

2020-06-25 05:48:51 -0600 edited question Bad argument on classification problem

Bad argument on classification problem Hello guys, I'm trying to compile this code having ONLY 1 LABEL fro object classi

2020-06-25 05:32:03 -0600 asked a question Bad argument on classification problem

Bad argument on classification problem Hello guys, I'm trying to compile this code having ONLY 1 LABEL fro object classi

2020-06-22 10:29:40 -0600 commented question Tree detection c++

I know, actually I don't need a perfect result: I'm not even allowed to use ml tecniques, but just opencv methods. If it

2020-06-22 10:27:41 -0600 edited question Tree detection c++

Tree detection c++ Goodmorning everyone, I'm tryin to write a c++ code for detecting trees in a image (i have a dataset

2020-06-22 09:26:36 -0600 commented question Tree detection c++

Hello berak, my dataset is actually made of 9 pics: all the trees are from a whole image including other natural element

2020-06-22 04:48:04 -0600 asked a question Tree detection c++

Tree detection c++ Goodmorning everyone, I'm tryin to write a c++ code for detecting trees in a image (i have a dataset

2020-05-30 04:12:02 -0600 received badge  Enthusiast
2020-05-29 09:40:02 -0600 edited question How to estimate translation and rotation of objects using the optical flow of the related points

How to estimate translation and rotation of objects using the optical flow of the related points Hello everyone, I'm wri

2020-05-29 09:39:20 -0600 asked a question How to estimate translation and rotation of objects using the optical flow of the related points

How to estimate translation and rotation of objects using the optical flow of the related points Hello everyone, I'm wri

2020-05-28 16:06:31 -0600 commented question 'type' undeclared identifier opencv traits.hpp

thanks! now it's working!

2020-05-28 15:48:11 -0600 marked best answer 'type' undeclared identifier opencv traits.hpp

Hi all, I've got this error in the function: "calcOpticalFlowPyrLK". Basically I have to track a book from a video given, do I used SIFT features to detect the book in the video and surrounding it with a square obtaining the following result: image description Then I have to track (and show) the features of the book using the pyramid Lukas-Kanade tracker, and I'm using the following code:

           for (;;) {
            //tracking

            vector<uchar> status;
            vector<float> err;
            vector<KeyPoint> next_keypoints;
            Mat result;
            if (prev_gray.empty())
            {
                gray.copyTo(prev_gray);
            }
            cap >> frame;
            cvtColor(frame, gray, COLOR_BGR2GRAY);
            calcOpticalFlowPyrLK(prev_gray, gray, keypoints_2, next_keypoints, status, err);
            drawKeypoints(prev_gray, keypoints_2, result);
            imshow("res", result);
            gray.copyTo(prev_gray);
            keypoints_2 = next_keypoints;

        }

Where "prev_gray" is an empty Mat defined at the beginning of the code (before of the SIFT obj detection), "gray" is the first frame of the video converted in gray scale and keypoints_2 is the vector<keypoint> of the first frame of the video.

At the execution of the method "calcOpticalFlowPyrLK(prev_gray, gray, keypoints_2, next_keypoints, status, err);", I'm getting the error "type: udeclared identifier (at traits.hpp)" and "type is not a member of 'cv::DataType<t>'"

What could be the problem? Thank y'all!

EDIT: Following break suggestion, I changed my code into:

                    vector<KeyPoint> next_keypoints1;
        vector<uchar> status;
        vector<float> err;
        vector<Point2f> next_keypoints;
        vector<Point2f> keypoints_frame_temp;
        vector<KeyPoint> keyponts_frame;
        for (;;) {
            //tracking

            KeyPoint::convert(keypoints_2, keypoints_frame_temp);
            Mat result;
            if (prev_gray.empty())
            {
                gray.copyTo(prev_gray);
            }
            cap >> frame;
            cvtColor(frame, gray, COLOR_BGR2GRAY);
            calcOpticalFlowPyrLK(prev_gray, gray, keypoints_frame_temp, next_keypoints, status, err);
            KeyPoint::convert(keypoints_frame_temp, keyponts_frame);
            drawKeypoints(prev_gray, keyponts_frame, result);
            imshow("res", result);
            gray.copyTo(prev_gray);
            KeyPoint::convert(next_keypoints, next_keypoints1);
            keyponts_frame = next_keypoints1;

        }

Using the KeyPoint::convert function to have the right type inside the calcOpticalFlowPyrLK(), but what I get in the "res" windows is just a blank space and I have no access to it (I can see the window, but I can't do anything on it). Is it a problem of my pc? Is it maybe not powerful enough for this?

2020-05-28 15:38:40 -0600 commented answer 'type' undeclared identifier opencv traits.hpp

Thank you berak you're always the best here! I followed your suggestion and I used the KeyPoint::convert function to hav

2020-05-28 15:38:30 -0600 commented answer 'type' undeclared identifier opencv traits.hpp

Thank you break you're always the best here! I followed your suggestion and I used the KeyPoint::convert function to hav

2020-05-28 15:37:20 -0600 edited question 'type' undeclared identifier opencv traits.hpp

'type' undeclared identifier opencv traits.hpp Hi all, I've got this error in the function: "calcOpticalFlowPyrLK". Basi

2020-05-28 15:37:10 -0600 edited question 'type' undeclared identifier opencv traits.hpp

'type' undeclared identifier opencv traits.hpp Hi all, I've got this error in the function: "calcOpticalFlowPyrLK". Basi