Ask Your Question

SergioDiaz07's profile - activity

2016-02-13 08:07:47 -0600 received badge  Famous Question (source)
2015-10-16 08:40:26 -0600 received badge  Notable Question (source)
2015-09-03 02:02:12 -0600 received badge  Popular Question (source)
2015-02-26 08:55:44 -0600 received badge  Student (source)
2014-11-06 13:27:14 -0600 asked a question [Java] How capture Webcam and show it in a Jpanel (like imshow)

Hi everyone, i'm trying to capture webcam video, filter it and show it in a Jpanel, but i don't find information about it. I can do all of this in a easy way in c++ with 'Showimage()' but in java it doesn't exist. So if you can help me with this whit any idea i would be really thankful :)

2014-10-03 19:20:54 -0600 commented answer Normalize illumination variable in a color image (real-time tracking C++)

Thanks for the advice, but I really expect to learn it since the beginning because the code that i used in relation with the histogram, gamma and gaussian methods was just copied and tested, without understand why apply it and how use it correctly. Well and also i dont know if that methods are useful to my case ><

2014-10-03 10:10:44 -0600 asked a question Normalize illumination variable in a color image (real-time tracking C++)

Hi community c: I'm doing my final university test and i'm trying to track color objects in real time, specifically blue (i'm noob in opencv). I achieved this but when i change of environment, and light obviously changes, the program doesn't track the object anymore or just track a part of it that had a similar color of the first environment. I investigate about it and i found a lot of information about histogram equalization and normalization by gamma and Gaussian Blur correction, but i didn't get the results that i expected, and to be honest i didn't get it like as i would have like, and also i'm not sure if that methods work in color images...

Doing a summary of the code that i use, i convert RGB to HSV and then threshold the frames captured to find a specific color with a specific interval. Then apply the track code that find the white pixels.

So my question is, how can I eliminate the illumination variable to detect a blue object in differents environments?

I'll appreciate a lot if you could guide me with this, i'm doing my best. thanks :)

2014-07-11 15:28:47 -0600 commented question How change image position inside a VideoCapture

About the drawing i think that I explain bad jajaja (english is my second languaje xd) i already use the drawing feature, so i want to use the coordinates to put a simple image above the original, like THIS but just move the image. And thanks for the link! i'll take a look to this :D

2014-07-11 14:54:51 -0600 commented question How change image position inside a VideoCapture

Thanks berak, i filled the idea :)

2014-07-11 14:54:15 -0600 received badge  Editor (source)
2014-07-10 20:37:29 -0600 asked a question How change image position inside a VideoCapture

Hi everyone, im starting on opencv C++. Im working with object tracking and I want to put an image above the detected object in the Videocapture, but i don't find how to do it. First...it is posible? and if so, how can I do it? i hope you can guide me with anything, I'll appreciate this :D

EDIT: Well my tracking works like:

  1. Create a Videocapture object, read the frames in a loop and store them in a Mat.
  2. Convert the frames to HSV.
  3. Threshold each frame with inRange to show only my interest object using:
    inRange(HSV,Scalar(0,203,130),Scalar(256,256,256),threshold);
  4. Send the thresholded image to the Tracking function:
 void trackObject(Mat threshold, Mat &dst)
    {
       Mat temp;
       Int x,y;
       threshold.copyTo(temp);
       vector< vector<point> > contours;
       vector<vec4i> hierarchy;
       findContours(temp,contours,hierarchy,CV_RETR_CCOMP,CV_CHAIN_APPROX_SIMPLE );
       if (hierarchy.size() > 0) {
           for (int index = 0; index >= 0; index = hierarchy[index][0]) {
              Moments moment = moments((cv::Mat)contours[index]);
              double area = moment.m00;
                  x = moment.m10/área;
                  y = moment.m01/area;
               }//end for
       }//end if
    }

(I deleted some code to simply te explanation)

In resume, I look for the contours, (I rely in a tutorial code, so I don't yet understand the hierarchy part), then i get the white points of the image whit 'Moments' and store the info in 'area'. And finally I get the x,y coordinates of the object calculating the centroid:

     x = moment.m10/área;
     y = moment.m01/area;

So my idea is instead of put a simply draw shape to indicate where is the tracked object, I want to use these coordinates to put above an image, like augmented reality.