I want to develop API documentation for my OpenCV project.
But when I ran pydoc - w command on my module, it only created documentation for those function which are declared with the def key word.
Pydoc ignores OpenCV functions like cv2.videocaputure(). They are not included in the documentation.
def initState(A, B, C, D, E, P1, P2, P3, P4, P5):
"""if all blocks are there and good recognized, if not shows message.
:param: The number of objects
:type: int
:putText()
:return: intial state top or initial state reconized with all objects,
show text on window Sorry , objects not recognized(Text)
"""
if (A == 1 and B == 1 and C == 1 and D == 1 and E == 1 and P1 == 1 and P2 == 1 and P3 == 1 and P4 == 1 and P5 == 1):
cv2.putText(frame, "initial state top",
(100, 100), font, 1, (0, 0, 255))
else:
cv2.putText(frame, "Sorry, not recognized",
(100, 100), font, 1, (0, 0, 255))
# knowing if final state is completed, must be recognized in the moment, if not recognized nothing will be shown
def finalState(A, B, C, D, E, P1, P2, P3, P4, P5):
"""knowing if final state is completed, must be recognized in the moment, if not recognized nothing will be shown.
:param: The number of objects
:type: int
:putText()
:return: Final state reconized with all objects(Text),
"""
if (A == 1 and B == 1 and C == 1 and D == 1 and E == 1 and P1 == 1 and P2 == 1 and P3 == 1 and P4 == 1 and P5 == 1):
cv2.putText(frame, "final state top", (100, 100), font, 1, (0, 0, 255))
return 1
# capturing video, if want to change file or do it with a web cam just change the value
cap = cv2.VideoCapture('exp11111.mp4')
"""
This will simply create the object
for the camera and using this object we can control the
video capturing and other functions related to the web cam.
:param: can be either the device index or the name of a video file
"""
# starting while loop to recognize every frame.
while True:
ret, frame = cap.read()
if(
ret == False):
break
"""
Capture frame-by-frame
:return: bool (True,False)
"""
