Ask Your Question

benzun's profile - activity

2017-12-03 10:12:37 -0600 received badge  Notable Question (source)
2017-01-16 07:14:01 -0600 received badge  Popular Question (source)
2015-09-09 05:05:41 -0600 received badge  Taxonomist
2013-07-30 08:53:33 -0600 received badge  Nice Answer (source)
2013-02-20 17:16:29 -0600 received badge  Critic (source)
2013-02-18 23:48:44 -0600 answered a question Return RGB values of the the current Pixel ?
void mouseEvent(int evt, int x, int y, int flags, void* param)
{
    IplImage* rgb = (IplImage*) param;
    if(evt==CV_EVENT_MOUSEMOVE)
    {
          char* data = rgb->imageData + rgb->widthStep * y + x * 3;
          printf("Current Position: x= %d y= %d B=%d G=%d R=%d\n",x,y,data[0],data[1],data[2]);
    }
}


void main()
{
    IplImage *image;
.... load image....
     cvSetMouseCallback(name, my_mouse_callback, (void*) image);
}
2013-02-18 23:42:25 -0600 commented answer Return RGB values of the the current Pixel ?

you can type cast IplImage as void and pass it to the function, That way you dont need to have it as global

2013-02-18 14:41:59 -0600 received badge  Teacher (source)
2013-02-18 12:10:45 -0600 answered a question Cascade Classifier example not working

String face_cascade_name = "haarcascade_frontalface_alt.xml"; String eyes_cascade_name = "haarcascade_eye_tree_eyeglasses.xml";

you need to replace these strings with the actual location of the cascades they will mostly be in the location where you installed opencv. Or copy them to your directory. If you dont point to the correct address for the cascade it wont work!

2013-02-18 12:08:10 -0600 answered a question Return RGB values of the the current Pixel ?

You need to pass your image as a parameter to the callback and read it from the image. Please read the tutorials on docs.opencv where a clear explanation about accessing pixel values is described!

2013-02-18 12:05:25 -0600 commented answer Norm function for Point2f and Point3f

Thanks for verifying it berak. I will mostly upgrade to newer version but now I will use my own function.

2013-02-18 12:04:35 -0600 received badge  Scholar (source)
2013-02-18 12:02:26 -0600 commented answer how to desgin a Harrcascade/HarrTraining for object in room?

you should not spam the answers.opencv with your question!

2013-02-18 12:01:25 -0600 answered a question HOW TO CREATE TRAINCASCADE/WHERE TO WRITE/WHICH C/CPP?

When you compile opencv you will get opencv_createsamples and opencv_traincascade as a part of the application. This are binaries automatically created. If you installed opencv in /usr/bin they should be available in your terminal.

2013-02-09 10:48:28 -0600 answered a question how to desgin a Harrcascade/HarrTraining for object in room?

So far this is the most detailed and the best tutorial I have found on it http://note.sonots.com/SciSoftware/haartraining.html

2013-02-09 10:46:11 -0600 answered a question Image Convolution returns black or strange images

What do you mean by a strange image? can you please post it?

2013-02-09 10:40:49 -0600 received badge  Editor (source)
2013-02-09 10:39:09 -0600 asked a question Norm function for Point2f and Point3f

When i try to use the norm function for the classes of the template Point_ and Point3_ I get an error that says that there is no known conversion from Point_ to InputArray. Is this a bug? Please tell me how to resolve this. I can write my own norm function but that does not solve the problem.

Also norm seems to do ok with Point but not Point2f.

I am using opencv 2.3.1 do i need to upgrade?

2012-11-20 11:46:46 -0600 commented answer How to build OpenCV with TBB support?

If you dont want to build tbb from source and are using linux you can pull the library using apt-get. libtbb2 and libtbb-dev are the libraries you need to install

2012-11-20 11:39:30 -0600 received badge  Supporter (source)
2012-11-20 11:38:43 -0600 commented answer Multiple cameras

@Adi usually the first camera that you plug in gets assigned as 0 and every camera you add is ennumerated+1 from there in ;inux

2012-11-20 11:34:46 -0600 answered a question VIDIOC_QUERYMENU: Invalid argument

Even i get the same error but my camera still loads

I think this error occurs because the v4l library is not able to access all the properties of your camera

2012-11-20 11:31:06 -0600 answered a question Detect square using opencv2.4

Check if there is too much noise in your image. Also check if you setting thresholds for canny properly.

2012-11-20 10:37:38 -0600 asked a question build3dmodel.cpp sample data

Hi.

Does anyone where i can get a sample model and intrinsic parameters so I can test the example.

Thanks, Benzun