# Guobiao's profile - activity

2012-07-18 04:19:55 -0500 asked a question How I can draw the contour of MSER regions which I have detected ?

How I can draw the contour of MSER regions which I have detected ? //detect MSER regions,Ellipse fitting of MSER regions,draw contour of MSER region//

# include <opencv2 opencv.hpp="">

int main(int argc, char *argv[]) { Mat box = imread("box.png",1); MSER ms; vector<vector<point>> regions; ms(box, regions, Mat()); for (int i = 0; i < regions.size(); i++) { ellipse(box, fitEllipse(regions[i]), Scalar(255)); } imshow("mser", box); waitKey(0); return 0; } //Next step I try to draw irregular contour of MSER regions which have been detected by the above code. This step I write code as follow:

int main(int argc, char *argv[]) { Mat box = imread("box.png",1); MSER ms; vector<vector<point>> regions; ms(box, regions, Mat()); for (int i = 0; i < regions.size(); i++) { ellipse(box, fitEllipse(regions[i]), Scalar(255)); drawContours(box,regions,i,Scalar(0,255,255),1,8);//this was used to draw //irregular outlines of MSER regions
} imshow("mser", box); waitKey(0); return 0; } The result of above code show that the irregular interiors of MSER regions are drawn. But, I just need draw irregular contour(outline) of MSER regions, not interiors, how I need use the function of drawContours, what should I do?

a kind friend,imran,recommmend me use the function drawcontour like this: drawContours(box,regions,i,Scalar(0,255,255),1,8, vector<vec4i>(), 0, Point());//this was used to draw irregular outlines of MSER regions However,it still show that the function draws the contour(s) and all the nested contours,I just want draw contour,not nested contours,so it does not work. I do not know whether I have explain my problem clear?

2012-07-18 03:35:28 -0500 asked a question How do I upload Images which support my expression?

I encounter a problem that I need to upload images to describe what is counter of MSER regions?

2012-07-17 07:20:24 -0500 asked a question Example of fusion of images based on OpenCV

Toward to fusion of images,a friend(Michael Burdinov)who recommend me to used stitching function,but I just start to learn Opencv,as a result I would not use stitching functions,so nay friend would give me an example?

2012-07-17 04:45:58 -0500 asked a question A question about registration function in Opencv2.4.2

You know that the registration is about a pair of image was superimposed on the other image based on a perspective transformation model,or it is equivalent to the image fusion. Now I used the function of findHomography,but I don"t know what should be do next? Any friend would like to help me?

2012-07-17 04:45:54 -0500 asked a question A question about registration function in Opencv2.4.2

You know that the registration is about a pair of image was superimposed on the other image based on a perspective transformation model,or it is equivalent to the image fusion. Now I used the function of findHomography,but I don"t know what should be do next? Any friend would like to help me?

2012-07-16 05:59:57 -0500 asked a question Could Opencv2.4.2 registrate images？

And would any friend give me an example about regiatration of images? To make the work,I have do some preparation, I write code as follow:

   void main( )
{
std::vector<KeyPoint> keypointsA, keypointsB;
Mat descriptorsA, descriptorsB;
std::vector<DMatch> matches;

// DETECTION
SurfFeatureDetector detector(3000);
//DESCRIPTOR
FREAK extractor(true, true, 22, 4, std::vector<int>());
BruteForceMatcher<Hamming> matcher;
detector.detect( imgA, keypointsA );
detector.detect( imgB, keypointsB );
extractor.compute( imgA, keypointsA, descriptorsA );
extractor.compute( imgB, keypointsB, descriptorsB );
matcher.match(descriptorsA, descriptorsB, matches);


}

You know that follow the code above we could get corespondent points,the problem is that I couldn"t make registration of images.How to do the further work? I want to make fusion of images based on homography matrix .

2012-07-15 18:57:42 -0500 asked a question How do I draw irregular contours of MSER regions

How I can draw the contour of MSER regions which I have detected ? //detect MSER regions,Ellipse fitting of MSER regions,draw contour of MSER region//

int main(int argc, char *argv[]) {

Mat box = imread("box.png",1);
MSER ms;
vector<vector<Point>> regions;
ms(box, regions, Mat());
for (int i = 0; i < regions.size(); i++)
{
ellipse(box, fitEllipse(regions[i]), Scalar(255));
}
imshow("mser", box);
waitKey(0);
return 0;


}

//Next step I try to draw irregular contour of MSER regions which have been detected by the above code. This step I write code as follow://

int main(int argc, char *argv[]) {

Mat box = imread("box.png",1);
MSER ms;
vector<vector<Point>> regions;
ms(box, regions, Mat());
for (int i = 0; i < regions.size(); i++)
{
ellipse(box, fitEllipse(regions[i]), Scalar(255));
drawContours(box,regions,i,Scalar(0,255,255),1,8);//this was used to draw
//irregular  outlines of MSER regions
}
imshow("mser", box);
waitKey(0);
return 0;


}

The result of above code show that the irregular interiors of MSER regions are drawn. But, I just need draw irregular contour(outline) of MSER regions, not interiors, how I need use the function of drawContours, what should I do?

a kind friend, imran, recommmend me use the function drawcontour like this:

drawContours(box,regions,i,Scalar(0,255,255),1,8, vector<vec4i>(), 0, Point());//this was used to draw irregular outlines of MSER regions//

However,it still show that the function draws the contour(s) and all the nested contours, I just want draw contour, not nested contours,so it does not work. I do not know whether I have explain my problem clear?

2012-07-15 08:59:48 -0500 asked a question How to draw irregular outline of MSER region?

I have detected MSER regions as follows(Thanks a lot for Alexander Shishkov's help!)

#include <opencv2/opencv.hpp>
int main(int argc, char *argv[])
{
MSER ms;
vector<vector<Point>> regions;
ms(box, regions, Mat());
for (int i = 0; i < regions.size(); i++)
{
ellipse(box, fitEllipse(regions[i]), Scalar(255));
}
imshow("mser", box);
waitKey(0);
return 0;
}


Next step I try to draw irregular outlines of MSER regions which have been detected by the above code. This step I write code as follow:

int main(int argc, char *argv[])
{
MSER ms;
vector<vector<Point>> regions;
ms(box, regions, Mat());
for (int i = 0; i < regions.size(); i++)
{
ellipse(box, fitEllipse(regions[i]), Scalar(255));
drawContours(box,regions,i,Scalar(0,255,255),1,8);//this was used to draw
//irregular  outlines of MSER regions
}
imshow("mser", box);
waitKey(0);
return 0;
}


The result of above code show that the irregular interiors of MSER regions are drawn. But, I just need draw irregular outlines of MSER regions, not interiors, how I need use the function of drawContours, what should I do?