Ask Your Question

banonran's profile - activity

2013-08-05 08:04:17 -0600 commented question findContours of vector<Point>

Yes. Because I can not handle all regions at once. For example, to add all regions in one image and find contours in one image. Because some regions may overlap each other, Therefore, I can lose some information. So I need to go through each region separately.

2013-08-05 08:01:02 -0600 received badge  Editor (source)
2013-08-05 07:57:36 -0600 asked a question findContours of vector<Point>

Hello everyone,

I used MSER to get the regions of interest. The mser function in OpenCV provides the vector<vector<Point>> as output. The vector<Point> contains all points that belong to one entire region. I would like to find the contour of each region by using the function findContours(). This function requires Mat as input argument. My first attempt was to create a Mat with zero-values, than go through all points of one particular region and set the value of Mat at the corresponding coordinates to max value (255). After the points of one region were set in Mat, the findContours was run. However, the process of all regions in this way, take long time. Is there another way to find contours of each region? Smth like findContours(Mat(vector<Point>) does not work for me. Because Mat(vector<Point>) returns Mat with 2 channels. Thank you in advance.

2013-07-10 12:24:16 -0600 commented question How do I draw irregular contours of MSER regions

One mser region, what you get from opencv, contains all points that are belong to one extracted region. So mser region is not a contour of the region. You can find the outer contour by going through every pixels of one region. Find minX and maxY for every Y value that are present in one region. So the result will be an outer contour.