Ask Your Question

Michael Vance's profile - activity

2018-09-06 10:01:12 -0600 received badge  Student (source)
2017-12-04 08:16:38 -0600 received badge  Popular Question (source)
2016-09-12 11:54:00 -0600 received badge  Famous Question (source)
2016-09-12 11:54:00 -0600 received badge  Notable Question (source)
2016-09-12 11:54:00 -0600 received badge  Popular Question (source)
2016-02-06 21:22:37 -0600 received badge  Famous Question (source)
2014-11-27 19:34:19 -0600 received badge  Notable Question (source)
2014-04-24 23:32:06 -0600 received badge  Popular Question (source)
2013-10-24 11:43:01 -0600 asked a question How to do multiple detect using CamShift in OpenCv?

I am working on a project it is actually originated from the camshift demo and i really wanted to track in a multiple manner. It is done by color matching. I also modified the demo, i added sounding an alarm and a allowable motion for the tracked object. here is the a part of the code that i added to the demo:

`

Rect brect= trackBox.boundingRect();

            if(brect.height<20&&brect.width<20||(brect.x + brect.width)>pt1.x||(brect.height+brect.y)>pt1.y||brect.x<pt2.x||brect.y<pt2.y)
            {

            printf("A L E R T !\n");
            paused = !paused;
            PlaySound(TEXT("ALARM.wav"), NULL, SND_FILENAME|SND_LOOP);
            }
            rectangle(image,brect,Scalar(0,0,255),3,8,0);

What i wanted to happen is to trigger the alarm when another object that is of the same color is present, but i dont know how. Can anyone help how to do multi detect?

2013-10-21 10:08:47 -0600 asked a question Changing ellipse to rectangle in Camshift demo

How do i change the ellipse to rectangle in camshift demo? is there any sites that shows how? please im a newby on this one. we dont have it tought in school. please help

2013-09-09 19:45:56 -0600 commented question Can't load other xml's rather than haarcascade_frontalface_alt.xml

@StevenPuttermans ; I am using a haartrained xml. i found this program that only marks the object of interest by loading all the pictures (ex. 1000 pictures) on this site http://nayakamitarup.blogspot.com/2011/07/how-to-make-your-own-haar-trained-xml.html. I can't make my system running until I am able to identify what's wrong on it. Please, I really need help on this.

2013-09-09 02:09:53 -0600 asked a question Can't load other xml's rather than haarcascade_frontalface_alt.xml

Can any one tell me whats the difference between the other xml from the haarcascade_frontalface_alt.xml? i tried to use the haarcascade_eye_tree_eyeglasses.xml but it cant be loaded... only the frontalface_alt xml.. can somebody explain why this happens..

2013-09-02 00:42:56 -0600 asked a question Where to find Camshift + Kalman Filter samples?

I am to design and develop a system with camshift and kalman filter on it. I would like to know where I can find links that leads to camshift with kalman filter tutorials or examples that might give a hint to creating my own.

Please help.

2013-08-29 05:35:51 -0600 commented answer Error loading xml file.

@Siegfried, I have executed the example on the link you gave, but this time the error is stating "Native' has exited with code -1 (0xffffffff)". This is the error upon running the example. The problem is similar but this time, the error message did not show up instead it automatically terminates the project. Also when I execute the .exe it runs and produces output similar to the links example.

2013-08-28 21:38:24 -0600 commented answer Error loading xml file.

I have actually placed or stored all the necessary files in the the folder where the project is created. The xml is placed together within the projects folder. I have followed a certain tutorial I found in the internet and somehow i can't identify the problem. I even tested the xml's that came pre-installed in the opencv, but still it can't load the xml. If you could share some links on how to fix this or other examples where I can test it, please let me know.

2013-08-28 01:23:14 -0600 asked a question Error loading xml file.

An xml file could not be loaded when running the project on Visual Studio but the .exe of the project runs perfectly.

const char *cascade_name="output.xml";
int lastX = -1;
int lastY = -1;
void detect_and_draw( IplImage* img )
{

    // Create memory for calculations
    static CvMemStorage* storage = 0;
    // Create a new Haar classifier
    static CvHaarClassifierCascade* cascade = 0;
    // Sets the scale with which the rectangle is drawn with
    int scale = 1;
    // Create two points to represent the hand locations
    //CvPoint pt1, pt2;
    // Looping variable
   // int i;
    // Load the HaarClassifierCascade
    cascade = (CvHaarClassifierCascade*)cvLoad(cascade_name,0,0,0);
    // Check whether the cascade has loaded successfully. Else report and error and quit  

    // Allocate the memory storage
    storage = cvCreateMemStorage(0);
    // Create a new named window with title: result
    cvNamedWindow( "result", 1 );
    // Clear the memory storage which was used before
    cvClearMemStorage( storage );
    if(!cascade)
    {
        fprintf( stderr, "ERROR: Could not load classifier cascade\n" );
        return;
    }
    if( cascade )
    {

        // There can be more than one hand in an image. So create a growable sequence of hands.
        // Detect the objects and store them in the sequence
        CvSeq* hands = cvHaarDetectObjects( img, cascade, storage,
                                            1.1, 2, CV_HAAR_DO_CANNY_PRUNING,
                                            cvSize(40, 40) );

        // Loop the number of hands found.
        for( i = 0; i < (hands ? hands->total : 0); i++ )
        {
           // Create a new rectangle for drawing the hand
            CvRect* r = (CvRect*)cvGetSeqElem( hands, i );

            // Find the dimensions of the hand,and scale it if necessary
            pt1.x = r->x*scale;
            pt2.x = (r->x+r->width)*scale;
            pt1.y = r->y*scale;
            pt2.y = (r->y+r->height)*scale;

            // Draw the rectangle in the input image
            cvRectangle( img, pt1, pt2, CV_RGB(230,20,232), 3, 8, 0 );
        }
    }

    // Show the image in the window named "result"
    cvShowImage( "result", img );

}

can somebody tell me what went wrong?

2013-08-22 21:06:08 -0600 asked a question How to use CvMoments?

can somebody explain? i will be using it for tracking..

2013-08-21 22:46:30 -0600 asked a question How to merge the classifier and canshift?

Our study is on Object Motion Detection and Tracking.

The Camshift algo is the one to be used for tracking.
here is the code on the classifier i finished making

include <opencv cv.h="">

include <opencv highgui.h="">

include <stdio.h>

include <stdlib.h>

include <string.h>

include <assert.h>

include <math.h>

include <float.h>

include <limits.h>

include <time.h>

include <ctype.h>

include <d:\opencv\include\camshifting.h>

const char *cascade_name="output.xml";

void detect_and_draw( IplImage* img ) {

// Create memory for calculations
static CvMemStorage* storage = 0;

// Create a new Haar classifier
static CvHaarClassifierCascade* cascade = 0;

// Sets the scale with which the rectangle is drawn with
int scale = 1;

// Create two points to represent the hand locations
CvPoint pt1, pt2;

// Looping variable
int i;

// Load the HaarClassifierCascade
cascade = (CvHaarClassifierCascade*)cvLoad( cascade_name, 0, 0, 0 );

// Check whether the cascade has loaded successfully. Else report and error and quit
if( !cascade )
{
    fprintf( stderr, "ERROR: Could not load classifier cascade\n" );
    return;
}

// Allocate the memory storage
storage = cvCreateMemStorage(0);

// Create a new named window with title: result
cvNamedWindow( "result", 1 );

// Clear the memory storage which was used before
cvClearMemStorage( storage );

// Find whether the cascade is loaded, to find the hands. If yes, then:
if( cascade )
{

    // There can be more than one hand in an image. So create a growable sequence of hands.
    // Detect the objects and store them in the sequence
    CvSeq* hands = cvHaarDetectObjects( img, cascade, storage,
                                        1.1, 2, CV_HAAR_DO_CANNY_PRUNING,
                                        cvSize(40, 40) );

    // Loop the number of hands found.
    for( i = 0; i < (hands ? hands->total : 0); i++ )
    {
       // Create a new rectangle for drawing the hand
        CvRect* r = (CvRect*)cvGetSeqElem( hands, i );

        // Find the dimensions of the hand,and scale it if necessary
        pt1.x = r->x*scale;
        pt2.x = (r->x+r->width)*scale;
        pt1.y = r->y*scale;
        pt2.y = (r->y+r->height)*scale;

        // Draw the rectangle in the input image
        cvRectangle( img, pt1, pt2, CV_RGB(230,20,232), 3, 8, 0 );
    }
}



// Show the image in the window named "result"
cvShowImage( "result", img );

}

int main() {

// Gets the input video stream from camera CvCapture* capture = cvCaptureFromCAM( 0 );

// Checks if the input stream is obtained if( !capture ) { fprintf( stderr, "ERROR: capture is NULL \n" ); getchar(); return -1; }

// Show the image captured from the camera in the window and repeat while( 1 ) {

// Get one frame
IplImage* frame = cvQueryFrame( capture );

// Cecks if a frame is obtained
if( !frame )
{
  fprintf( stderr, "ERROR: frame is null...\n" );
  getchar();
  break;
}

// Flips the frame into mirror image
cvFlip(frame,frame,1);

// Call the function to detect and draw the hand positions
detect_and_draw(frame);

//If ESC key pressed exit

if( (cvWaitKey(10) & 255) == 27 ) break; }

// Release the capture device housekeeping cvReleaseCapture( &capture );

return 0; }

The above code is the one to tell if the object is present or not.


Below is the code for camshift i found:

include <opencv2 gpu="" device="" utility.hpp="">

include "opencv2/video/tracking.hpp"

include <d:\opencv\build\include\opencv2\imgproc\imgproc.hpp>

include "opencv2/highgui/highgui.hpp"

include <iostream>

include <ctype.h ...

(more)
2013-08-21 22:27:52 -0600 asked a question How to Track the object from a trained classifier?

I have a code already for the classifier training. what i wanted to happen is that, i want to track the object of interest in my trained classifier.

How do I do that? Where do I start? Can you show some links where I can find sample codes on tracking object from classifier?

2013-08-14 22:36:51 -0600 asked a question OpenCV haartraining tutorials fails with nullpointer exception

This is the message returned inside the dialog box:

Null Pointer (Null Object Pointer) in function cvSave, D:\User\VP\opencv\cxcore\src\cxpersistence.cpp(5097)

Does anyone have an idea what this error is about?

I got the program code from this tutorial on HAAR classifier training using positive and negative images, which creates an object xml model. However when creating the xml model the above error appears.

The tutorial has instructions on how to do it. But by following the code, it did not work.

If anyone encountered the error I just received, and has an idea on how to fix it, the please comment or answer this question.

2013-08-13 21:00:10 -0600 asked a question How to use the files in haar_training and traincascade folder in openCV 2.4.6?

Does anyone have an idea how to use the files in there? If I have to build it, how do I do it? What is the proper procedure or usage of the files?

Please help, if possible, I prefer a Windows based approach, since our product is to be deployed in Windows.

2013-08-13 01:37:09 -0600 answered a question haartraining.exe and createsamples.exe missing

you can only say a yes or no to that.. if you really cAn help... thanks but i already did it before and nobody reponded. thanks for nothing.

2013-07-24 21:52:27 -0600 commented question Where to find opencv_createsamples utility?

can anyone answer this? i really need to start my thesis.

2013-07-08 02:48:17 -0600 asked a question how to add a .c/.cpp file on the project?

it appears to be that most part of the tutorialHow to build applications with OpenCV inside the Microsoft Visual Studio is in complete. or in accurate. this is the problem that i encounter. i dont have the c/c++ group which is needed in the next tutorial.

if anyone knows how. please answer. i really need your help about this issue.!

this is what appears when i click the properties. it does not have the c/c++ group on DEBUG PROPERTY PAGES

2013-06-25 19:02:34 -0600 asked a question Where to find opencv_createsamples utility?

i dont know what is opencv_createsamples utility means but i found an opencv_createsample.exe on bin after creating it on Cmake. i dont know if this is the utility they mean which represents as the CMD of creating samples.

2013-06-25 06:46:51 -0600 commented answer How to install opencv 2.4.5 on windows 7 x 64?

have a question. which command line utility to use when creating a sample. the -vec command, where should i type it. its not on cmd on windows right?

2013-06-20 21:32:38 -0600 commented answer How to install opencv 2.4.5 on windows 7 x 64?

the page loads. on a different network. there could be maybe a security issue detected. i am connecting to our schools network that is why it does not load...it worked before.. i dont know why.but thanks.

2013-06-20 04:13:30 -0600 commented answer How to install opencv 2.4.5 on windows 7 x 64?

Oops! Google Chrome could not connect to docs.opencv.org Try reloading: docs.­opencv.­org/­doc/­tutorials/­introduction/­windows_install/­windows_install.­html Additional suggestions: Access a cached copy of docs.­opencv.­org/­doc/­tutorials/­introduction/­windows_install/­windows_install.­html

this is what shows on my browser. cant open the link.

2013-06-20 04:07:29 -0600 commented question How to install opencv 2.4.5 on windows 7 x 64?

can anyone give a link on how to create samples(opencv_createsamples) on opencv windows based tutorial. tnx

2013-06-20 03:56:20 -0600 received badge  Editor (source)
2013-06-20 03:53:09 -0600 asked a question How to install opencv 2.4.5 on windows 7 x 64?

i cant find the installation for opencv 2.4.5 on windows 7 and the configuration of it to Microsoft Visual Studio 2010. can anyone show me how to.? im trying to make a thesis project using this one and i dont know how to install and configure it. please help.