I am working with OpenCV to find the area of ββan image outline using cvFindContours (). Then, I would like to draw this outline with different coordinates (and different pixels) ...
So, I get all the points of the contour elements using cvGetSeqElem () and convert the pixel match and create a custom cvSeq and load each element into a custom cvSeq. However, when I try to draw an outline with cvSeq configured, there are no answers in the image.
For this work, I would like to use an outline to mask the image.
The code is as follows:
CvMemStorage *memStorage = cvCreateMemStorage(0); CvSeq* seq = cvCreateSeq(0, sizeof(CvSeq), sizeof(CvPoint), memStorage); void SetMaskingPoints(CvPoint point) { cvSeqPush(seq, ®ionPoint); } void DrawMaskingPoints() { cvDrawContours(maskingImage, seq, cvScalar(255,255,255), cvScalar(0,0,0), 0, 1, 8); }
My code starts by getting the outline element and loading into SetMaskingPoints () as sequentially, then Draw the outline DrawMasingPoints ().
I also tried to print and found that cvSeq is made up of dot values ββbut cannot be drawn.
source share