I am trying to find the time from the start of a video file when the object is detected. The object is the sharp light flash, what I want to know is if we could find the time when the light flash is visible in video file?
If I try to extract time of event in video file in Open cv, it provides 3D data as given below. Can someone please Explain what does the data mean, and how exactly I can find the time of event(conotour)?
Number of contour found = 8
Hierarchy: [[[ 1 -1 -1 -1][ 2 0 -1 -1][ 3 1 -1 -1][ 4 2 -1 -1][ 5 3 -1 -1][-1 4 -1 -1]]]
The code that produce the result was:
contours, hierarchy = cv2.findContours(mask, mode=cv2.RETR_TREE,method=cv2.CHAIN_APPROX_NONE)
print("Hierarchy: ",hierarchy)
print("Number of contour found = ",len(contours))
I also tried following to find the time of event, but it didn't help
event = cap.get(cv2.CAP_PROP_POS_MSEC)