Ask Your Question

muha.ko's profile - activity

2021-06-15 22:21:51 -0600 received badge  Notable Question (source)
2020-01-08 12:49:44 -0600 received badge  Popular Question (source)
2018-12-05 12:19:16 -0600 received badge  Popular Question (source)
2017-11-17 10:25:18 -0600 received badge  Student (source)
2016-01-17 03:20:08 -0600 commented answer How to record the time of stay by detected people in a video?

@Pedro Batista: Would you please give us more details what you mean by "using overlap of bounding box over frames"?

2016-01-01 04:46:42 -0600 asked a question How to apply simple Kalman filter on HOG detection?

Hello everybody,

I want to apply a simple Kalman filter on HOG to track the detected person with OpenCV.

  • Which parameters of HOG I need to give as input for Kalman filter?
  • In which way I have to initialize Kalman at the beginning?

Looking forward for your responses! Thanks in advance!

2015-12-27 07:05:57 -0600 commented answer How to record the time of stay by detected people in a video?

Hello Harsha, Thank you very much for your quick response. Now I understood how to calculate the "timeOfStay" and how to handle with the frames. But what I dont understand is Kalman filter by itself tracking already persons? I think Kalman filter would be just an additional feature to remove noises, right? Do you maybe have an initial code which I could use as a basic concept?

I am looking forward for your further hints. Thanks in advance!

2015-12-24 16:42:31 -0600 received badge  Editor (source)
2015-12-24 10:51:34 -0600 asked a question How to record the time of stay by detected people in a video?

Hello everybody, Imagine a very easy scenario: Two people staying in a video without any intersection/overlap. I want to record the time of their stay in the video seperately. Would you recommend to do it with "background subtraction"? In which way I could solve this problem? I really need any hints and advices. Does anybody would help me please?

Thank you very much!

2015-07-09 14:40:49 -0600 received badge  Enthusiast
2015-07-08 14:07:08 -0600 commented answer Assertion failed (axes.width >= 0 && axes.height...)line 1772

its working now :) even the first version above which I posted here. The error was because of the wrong config in Visiual Studio. @sturkmen thank you very much either!!! (@sturkmen ben size sonra projem hakkinda bi email atmak istiyorum, sizin icin uygun mudur? tekrardan yardiminiz icin cok tesekkür ederim!)

2015-07-07 03:32:33 -0600 received badge  Supporter (source)
2015-07-07 03:25:57 -0600 commented answer Assertion failed (axes.width >= 0 && axes.height...)line 1772

@sturmen thank you very much for your support! Can you please give me some advice how I have to do the configuration in Visiual Studio?

2015-07-06 16:29:36 -0600 commented answer Assertion failed (axes.width >= 0 && axes.height...)line 1772

i am using opencv 3.0 and haarcascade_frontalface_alt2.xml is in the same directory You maybe made a special configuration in Visiual Studio?

2015-07-06 14:02:15 -0600 asked a question Assertion failed (axes.width >= 0 && axes.height...)line 1772

Hello everybody,

In following code I read in my webcam and want to detect face. Unfortunately it does not work. I commented some parts of the end out and I have NO problems only reading in the cam. But the whole code gives the error like below.

Here is the code:

#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"

#include <iostream>
#include <stdio.h>

using namespace std;
using namespace cv;

Mat detectFace(Mat src);

int main()
{
    VideoCapture cap(0);
    namedWindow("window1", 1);

    while (1)
    {
        Mat frame;
        cap >> frame;
        frame = detectFace(frame);

        imshow("window1", frame);
        // Press 'c' to escape
        if (waitKey(1) == 'c') break;
    }

    waitKey(0);
    return 0;
}

Mat detectFace(Mat image)
{
    // Load Face cascade (.xml file)
    CascadeClassifier face_cascade("haarcascade_frontalface_alt2.xml");

    // Detect faces
    std::vector<Rect> faces;
    face_cascade.detectMultiScale(image, faces, 1.1, 2, 0 | CV_HAAR_SCALE_IMAGE, Size(30, 30));

    ////// Draw circles on the detected faces
    for (int i = 0; i < faces.size(); i++)
    {
        Point center(faces[i].x + faces[i].width*0.5, faces[i].y + faces[i].height*0.5);
        ellipse(image, center, Size(faces[i].width*0.5, faces[i].height*0.5), 0, 0, 360, Scalar(255, 0, 255), 4, 8, 0);
    }
    return image;
}

This is the error message:

 OpenCV Error: Assertion failed (axes.width >= 0 && axes.height >= 0 && thickness <= 255 && 0 <= shift && shift <= XY_SHIFT) in cv::ellipse, file C:\builds\master_PackSlave-win32
-vc12-shared\opencv\modules\imgproc\src\drawing.cpp, line 1772

I am looking forward for your support and help. Thank you!

2015-07-05 00:26:08 -0600 asked a question Assertion failed (...) in circle

Hello everybody,

I am using opencv 3.0

I got following error message: OpenCV Error: Assertion failed (radius >= 0 && thickness <= 255 && 0 <= shift && shift <= XY_SHIFT) in cv::circle, file C:\builds\master_PackSlave-win32-vc12-shared\opencv\modul es\imgproc\src\drawing.cpp, line 1744

This is the code:

#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
#include <stdio.h>
#include <opencv/cv.h>
#include <opencv/cxcore.h>
#include <opencv/highgui.h>

using namespace std;
using namespace cv;


int main(int argc, char** argv)
{
    IplImage* img = cvLoadImage("lena.JPG");
    cvNamedWindow("Example1", CV_WINDOW_AUTOSIZE);
    cvShowImage("Example1", img);

    Mat image = cvarrToMat(img);
    CascadeClassifier face_cascade;
    face_cascade.load("C:/Users/Muha/Documents/visual studio 2015/Projects/Test_Einrichtung_opencv/Test_Einrichtung_opencv/haarcascade_frontalface_alt2.xml");
    String face_cascade_name = "haarcascade_frontalface_alt2.xml";
    if (!face_cascade.load(face_cascade_name)) { printf("--(!)Error loading\n"); return -1; };
    std::vector<Rect> faces;
    face_cascade.detectMultiScale(image, faces, 1.1, 2, 0 | CV_HAAR_SCALE_IMAGE, Size(30, 30));

    //// Draw circles on detected faces
    for (int i = 0; i < faces.size(); i++)
    {
        Point center = Point(faces[i].x + faces[i].width*0.5, faces[i].y + faces[i].height*0.5);
        circle(image, center, faces[i].width*0.5, Scalar(255, 0, 255), 4, 8, 0);
    }


    imshow("Detected Face", image);


    waitKey(0);
    return 0;
}

Need your help. Thanks in advance!