Ask Your Question

marcob88's profile - activity

2019-10-25 11:03:52 -0600 received badge  Famous Question (source)
2019-02-06 00:17:43 -0600 received badge  Notable Question (source)
2018-08-29 08:24:13 -0600 received badge  Popular Question (source)
2017-08-17 04:04:08 -0600 received badge  Supporter (source)
2017-08-17 04:03:56 -0600 received badge  Scholar (source)
2017-08-17 04:01:18 -0600 asked a question Difference between same image different compression quality

Hi, i've a questio (and if it is possible). I trying to check the difference between two compressed image of different quality. I try to check with

        for(int i=0; i < decompress_image_prev.rows; i++)
        {
            for(int j=0; j < decompress_image_prev.cols; j++)
            {
                if(image_to_send.at<uchar>(i,j) != decompress_image.at<uchar>(i,j) ||                   decompress_image.at<uchar>(i,j) != decompress_image_prev.at<uchar>(i,j))
                {
                    image_to_send.at<uchar>(i,j) = decompress_image.at<uchar>(i,j);
                    count++;                    
                }               
            }
        }

where decompress_image and decompress_image_prev are respect the actual and previous decompress image. But the final result is different from the last decompress image (quality = 100) and i've only the left part of image equal. Where is the problem?

2017-07-26 04:55:18 -0600 asked a question Change build directory in cmake for opencv compiling

Hi all,

i have a question (i suppose that it's stupid but i've difficult). I'm try to compile with cmake (not cmake-gui!!!) opencv. The problem is that i need to change the build folder. I give you an example:

I have the source code and the cmakelist on directory /home/xxx/opencv/

I would like to execute cmake and put the build into /home/yyy/lib_opencv/ and subsequently call make install....

With cmake-gui i don't have a problem. But i have to use the cmake command shell.

Can you help me? I hope that i have explained clearly the problem

Thanks

2017-04-10 06:31:01 -0600 commented question Error runtime imread

the problem is in Mat src = cv::imread(path, 0). I have a violation access memory for vcruntime140.dll lib

2017-04-10 05:46:26 -0600 asked a question Error runtime imread

Hi,

i have a problem with opencv compiled for Visual Studio 2017.

I have a problem with this code

    for (String path : files)
    {
        Mat src = cv::imread(path, 0);

        if (!src.data)
        {
            cout << "Error" << endl;
            cout << "Path: " + path_considered << endl;
        }
     }

The errors is a violation access memory with vcruntime140.dll

Can you help me?

Thanks a lot

2016-12-20 15:31:57 -0600 commented answer SVM Training Data with Bag-of-Word

But if every mat have different size? For example i have a mat with 7 rows (number frame of video) and 10 cols ( number of words) but another mat can have different size...how can train in this situation? is possible?

2016-12-18 14:08:14 -0600 asked a question SVM Training Data with Bag-of-Word

Hi, I've a question with training an SVM multiclass with bag of word model. I have 50 video of training and each video is represented by a matrix of words.

Now i have a vector<mat> that contains all training data. How can training svm with this data structure?

I think to use pca but i'm not sure if is the exactly way.

Thanks

2016-05-24 17:02:30 -0600 asked a question HOG People Detector on image

I'm try to use HOG People Detector for obtain Region of Interest. I have this depth image image description and the istruction is:

    HOGDescriptor hog;
hog.setSVMDetector(HOGDescriptor::getDefaultPeopleDetector());


vector<Rect> found, found_filtered;
hog.detectMultiScale(falseColorsMap, found, 0, Size(16, 16), Size(32, 32), 1.05, 2);
size_t i, j;
for (i = 0; i<found.size(); i++)
{
    Rect r = found[i];
    for (j = 0; j<found.size(); j++)
        if (j != i && (r & found[j]) == r)
            break;
    if (j == found.size())
        found_filtered.push_back(r);
}

for (i = 0; i<found_filtered.size(); i++)
{
    Rect r = found_filtered[i];
    r.x += cvRound(r.width*0.1);
    r.width = cvRound(r.width*0.8);
    r.y += cvRound(r.height*0.07);
    r.height = cvRound(r.height*0.8);
    rectangle(img, r.tl(), r.br(), Scalar(0, 255, 0), 3);
}

namedWindow("Display window", WINDOW_AUTOSIZE);// Create a window for display.
imshow("Display window", falseColorsMap);                   // Show our image inside it.

waitKey(0);                                          // Wait for a keystroke in the window
return 0;

how i can detect roi?

2016-05-24 15:15:25 -0600 received badge  Enthusiast
2016-05-22 14:39:09 -0600 asked a question How can extract ROI from depth image?

I can detect ROI in depth image on opencv 3.1? Can you help?

2016-05-21 11:25:08 -0600 asked a question How choose best parameter for SVM?

Hi, i try to develop a multiclass (n>2) classifier with svm. I saw that opencv implement one vs all for this problem. But i have a some problem with the parameter? How can choose best parameter for my classifier?

2016-05-18 17:17:57 -0600 asked a question ML: weight on classifier SVM

I develop a classifier fusion project, i use two SVM classifier then classify the same image and i need to develop a majority weighted voting process. How i can calculate weight from result of both classifier?

Hi, I have a problem with CamShift Tracking, At each iteration the region grows, reaching quickly the image size, and thus losing the person who is tracking. Where is the problem? This is my code

int main()
{
    string Directory = "C:\\Users\\Marco\\Desktop\\Scenario_1"; //directory dei file
    string StartFile = "gray-%06d.jpg";
    VideoCapture cap(Directory+"\\"+StartFile);
    int frameRef = 122;
    int countFrame = 1;
    Rect first(316, 94, 179, 380);
    Mat frame; Mat hsv;
    Mat mask, hue, roi_hist;
    float hranges[] = { 0, 180 };
    float sranges[] = { 0, 256 };
    const float* phranges = hranges;
    int hsize = 16;
    int hbins = 30, sbins = 32;
    //int histSize[] = { hbins, sbins };
    int histSize[] = { 180 };
    const float* ranges[] = { hranges };
    int channels[] = {1};
    TermCriteria term_crit(TermCriteria::EPS | TermCriteria::COUNT, 10, 1);
    Mat sec;
    Mat dest;
    bool isFirst = false;
    for (;;)
    {
        cap >> frame;

        if (frame.empty()) break;

        if (countFrame == frameRef)
        { 
            Mat firstFrame=frame(first);
            cvtColor(firstFrame, hsv, COLOR_BGR2HSV);
            inRange(hsv, Scalar(0, 60., 32.),Scalar(180., 255., 255.), mask);
            calcHist(&hsv, 1, channels, mask, roi_hist, 1, histSize, &phranges);
            //calcHist(&hsv, 1, channels, mask, roi_hist,2, histSize,ranges,true,false);
            //normalize(roi_hist, roi_hist, 0, 255, NORM_MINMAX);
            isFirst = true;
        }
        else if (isFirst)
        {
            cvtColor(frame, hsv, COLOR_BGR2HSV);
            calcBackProject(&hsv,1, channels, roi_hist,dest, &phranges);

            //calcBackProject(hsv, channels, roi_hist, dest, &phranges, 1.0);
            RotatedRect r=CamShift(dest, first, term_crit);


            //ellipse(frame, r, Scalar(0, 255, 0),3,LINE_AA);
            rectangle(frame, first, Scalar(0, 255, 0));
            namedWindow("ORIGINAL", WINDOW_AUTOSIZE);
            imshow("ORIGINAL", frame);

        }

        waitKey(2);
        countFrame++;
    }

}

Hi, I have a dataset where is a depth and rgb images taken by Kinect. And i have the information about bounding box on Rgb image, but not for depth, and this two sensor are not calibrate. I have also the intrinsic parameter, now there is a technique to obtain depth values of bounding box (x,y,width, height) from the information that I have?

Hi, i'm try to compress with webp codec but when i try to modify all image's pixel, the image will be changed only for left part. But with JPEG or other codec my program works well. Anyone have had this problem?

2016-04-13 16:16:28 -0600 asked a question Error assertion roi failed

I have an image 640x480 and i need to extract a submatrix with this roi: x="216" y="107" width="423" height="255". I try to this:

    Mat frame = imread(path + fileName);
        vector<KeyPoint> keyPoint = vector<KeyPoint>();
        if (!frame.empty())
        {
            //prendo il punto del frame dell'evento interessato
            int width = itc->width;
            int height = itc->height;
            int x = itc->x;
            int y = itc->y;

            Mat bbox = Mat(frame,Rect(itc->x, itc->y, itc->x + itc->width, itc->y + itc->height));

but i have this exception :

Assertion Failed: 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows

where is the error? can you help me?

2016-03-28 11:19:16 -0600 commented question ALL_BUILD compiles error into opencv project

thanks, with this version i resolved the problem!!!

2016-03-28 05:06:23 -0600 asked a question ALL_BUILD compiles error into opencv project

I try to install opencv 3.0 on Windows 10 with Visual Studio 2015 and i need of contrib library (in specific xfeatures2d). I have been following the step in this post:

[http://audhootchavancv.blogspot.it/20...]

but when i compile the OPENCV project (in specific ALL_BUILD) i have this errors:

Errore  C2382   'std::tuple<cv::Size,perf::`anonymous-namespace'::MatDepth>::operator =': ridefinizione. Specifiche di eccezione differenti. (compilazione del file di origine ..\..\..\modules\core\perf\opencl\perf_channels.cpp) opencv_perf_core    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple    463
Errore  LNK1104 impossibile aprire il file '..\..\lib\Debug\opencv_xfeatures2d300d.lib' opencv_stitching    C:\opencv\build\modules\stitching\LINK  1
Errore  LNK1104 impossibile aprire il file '..\..\lib\Debug\opencv_stitching300d.lib'   opencv_perf_stitching   C:\opencv\build\modules\stitching\LINK  1
Errore  LNK1104 impossibile aprire il file '..\..\lib\Debug\opencv_xfeatures2d300d.lib' opencv_perf_xfeatures2d C:\opencv\build\modules\xfeatures2d\LINK    1
Errore  LNK1104 impossibile aprire il file '..\..\lib\Debug\opencv_stitching300d.lib'   opencv_test_stitching   C:\opencv\build\modules\stitching\LINK  1
Errore  LNK1104 impossibile aprire il file '..\..\lib\Debug\opencv_xfeatures2d300d.lib' opencv_test_xfeatures2d C:\opencv\build\modules\xfeatures2d\LINK    1
Errore  C3861   '.?AV?$Matx@N$01$01@cv@@': identificatore non trovato (compilazione del file di origine ..\..\..\modules\core\test\test_mat.cpp)    opencv_test_core    C:\opencv\modules\core\include\opencv2\core\mat.inl.hpp 1597
Errore  C2672   'cv::Mat::operator cv::Matx<double,2,2>': non sono state trovate funzioni in overload corrispondenti (compilazione del file di origine ..\..\..\modules\core\test\test_mat.cpp) opencv_test_core    C:\opencv\modules\core\include\opencv2\core\mat.inl.hpp 1597
Errore  C2264   'std::tuple<cv::Size,perf::`anonymous-namespace'::MatDepth>::tuple': errore nella definizione o dichiarazione di funzione. Funzione non chiamata.   opencv_perf_core    C:\opencv\modules\core\perf\opencl\perf_channels.cpp    165
Errore  C1903   impossibile recuperare l'errore o gli errori precedenti. Interruzione della compilazione    opencv_perf_core    C:\opencv\modules\core\perf\opencl\perf_channels.cpp    165
Errore  C1083   Non è possibile aprire il file inclusione: 'opencv2/core/hal/hal.hpp': No such file or directory    opencv_xfeatures2d  C:\opencv\modules\xfeatures2d\src\sift.cpp  108
Errore  C2610   'std::tuple<cv::Size,perf::`anonymous-namespace'::MatDepth>::tuple(const std::tuple<cv::Size,perf::`anonymous-namespace'::MatDepth> &)': non è una funzione membro speciale da poter impostare come predefinita (compilazione del file di origine ..\..\..\modules\core\perf\opencl\perf_channels.cpp)  opencv_perf_core    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple    328
Errore  C2610   'std::tuple<cv::Size,perf::`anonymous-namespace'::MatDepth>::tuple(std::tuple<cv::Size,perf::`anonymous-namespace'::MatDepth> &&)': non è una funzione membro speciale da poter impostare come predefinita (compilazione del file di origine ..\..\..\modules\core\perf\opencl\perf_channels.cpp)   opencv_perf_core    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple    329
Errore  C2535   'std::tuple<cv::Size,perf::`anonymous-namespace'::MatDepth> &std::tuple<cv::Size,perf::`anonymous-namespace'::MatDepth>::operator =(const std::tuple<cv::Size,perf::`anonymous-namespace'::MatDepth> &)': funzione membro già definita o dichiarata (compilazione del file di origine ..\..\..\modules\core\perf\opencl\perf_channels.cpp)  opencv_perf_core    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple    463

can you ... (more)