Error in "Lucas-Kanade Optical Flow in OpenCV" documentation (Bug #3646)
Description
these lines
mask = cv2.line(mask, (a,b),(c,d), color[i].tolist(), 2)
frame = cv2.circle(frame,(a,b),5,color[i].tolist(),-1)
should be
cv2.line(mask, (a,b),(c,d), color[i].tolist(), 2)
cv2.circle(frame,(a,b),5,color[i].tolist(),-1)
History
Updated by Yash Vadalia almost 11 years ago
As far as I know this is not a bug. It is supposed to be this way as per the OpenCV 3.x python api. The drawing functions return the input image after they are done drawing.
Updated by Andrew Senin almost 11 years ago
Andrey, could you please confirm the line is correct?
- Status changed from New to Open
- Affected version changed from 2.4.8 (latest release) to branch 'master' (3.0-dev)
- Assignee set to Andrey Pavlenko
- Priority changed from Normal to Low
- Category set to python bindings
- Target version set to 3.0
Updated by abid rahman almost 11 years ago
Those lines are correct as per docs of cv2.line and cv2.circle. It is OpenCV 3.x API.
http://docs.opencv.org/trunk/modules/core/doc/drawing_functions.html#cv2.circle
cv2.circle(img, center, radius, color[, thickness[, lineType[, shift]]]) → img
http://docs.opencv.org/trunk/modules/core/doc/drawing_functions.html#cv2.line
cv2.line(img, pt1, pt2, color[, thickness[, lineType[, shift]]]) → img
Updated by Maksim Shabunin almost 10 years ago
According to previous statements, this is not a bug.
- Status changed from Open to Cancelled
- Category changed from python bindings to documentation