Ask Your Question

vimgg's profile - activity

2020-09-28 13:04:58 -0600 received badge  Student (source)
2017-04-13 01:53:07 -0600 commented answer want to get area from MSER operator

In opencv 3.X, It can not return bboxes values Instead of request bboxes param?

2017-04-13 01:17:04 -0600 commented answer want to get area from MSER operator

Result is :

detectRegions(...)
detectRegions(image, bboxes) -> msers

Actually I don't care about it. I only want to crop area from each hulls? Any suggestions? THX

2017-04-13 00:47:00 -0600 commented answer want to get area from MSER operator

Hey, It has error in :

contours, boxes = mser.detectRegions(imgThreshCopy)
Error:
TypeError: Required argument 'bboxes' (pos 2) not found

I actually want to crop areas from Origin Image which are surrounded by each hulls. In my question I had some mistake:

for i in hulls:
    cv2.imshow("hulls",i);
2017-04-12 23:39:30 -0600 asked a question want to get area from MSER operator

Now I have some problem :

mser = cv2.MSER_create()
contours = mser.detectRegions(imgThreshCopy,None)
hulls = [cv2.convexHull(p.reshape(-1, 1, 2)) for p in contours]
height, width = imgThresh.shape
imgContours = np.zeros((height, width, 3), np.uint8)
cv2.polylines(imgContours, hulls, 1, (255, 0, 0))

I want to get the area in hulls surrounding, but when I call:

cv2.imshow("hulls",hulls);

Error happen:TypeError: mat is not a numpy array, neither a scalar I am new in opencv. Anyone can give me some advice? Thanks.

2017-04-10 06:23:50 -0600 received badge  Scholar (source)
2017-04-10 06:23:47 -0600 commented answer want to know MSER example

Thanks.I get it : )

2017-04-10 05:19:19 -0600 asked a question want to know MSER example

I have some question about using opencv in python. I don't know how to use MSER. I only know is that : mser = cv2.MSER_create() regions = mser.detectRegions(imgGrayscaleScene, None)

what is the second param in detectRegions? Why none? can I add other things? I had search on goolge but can not find some API doc about this function in python. Anyone can help?