Spaces:
Sleeping
Sleeping
Update pages/7_Unstructured_data.py
Browse files- pages/7_Unstructured_data.py +26 -26
pages/7_Unstructured_data.py
CHANGED
|
@@ -637,33 +637,33 @@ if file_type == "VIDEO🎥":
|
|
| 637 |
''')
|
| 638 |
|
| 639 |
st.subheader("**Key Methods in Video Capturing**")
|
| 640 |
-
|
| 641 |
-
|
| 642 |
-
|
| 643 |
-
|
| 644 |
-
|
| 645 |
-
|
| 646 |
-
|
| 647 |
-
|
| 648 |
-
|
| 649 |
-
|
| 650 |
|
| 651 |
-
|
| 652 |
-
|
| 653 |
-
|
| 654 |
-
|
| 655 |
|
| 656 |
-
|
| 657 |
-
|
| 658 |
-
|
| 659 |
-
|
| 660 |
-
|
| 661 |
-
|
| 662 |
-
|
| 663 |
-
|
| 664 |
-
|
| 665 |
-
|
| 666 |
-
|
| 667 |
-
|
| 668 |
|
| 669 |
|
|
|
|
| 637 |
''')
|
| 638 |
|
| 639 |
st.subheader("**Key Methods in Video Capturing**")
|
| 640 |
+
st.markdown("""
|
| 641 |
+
Here are some key methods used in video capturing with OpenCV:
|
| 642 |
+
- **`cv2.VideoCapture()`**: Opens the video source, either a camera (index 0 for default webcam) or a video file path.
|
| 643 |
+
- **`read()`**: Reads frames from the video stream. It returns a boolean value and the frame (`frame`).
|
| 644 |
+
- **`release()`**: Releases the video capture object and closes the video stream.
|
| 645 |
+
- **`cv2.namedWindow()`**:It actually creates a pop-up window and all the features of pop-up window will be created
|
| 646 |
+
- **`cv2.imshow()`**: As it is not creating pop-up window ,it internally calls the namedWindow() where we can create our own pop-up window
|
| 647 |
+
- **`cv2.waitKey()`**: It internally creates a po-up window and for that window it is going to add delay
|
| 648 |
+
|
| 649 |
+
- Waits for a key event for a specified amount of time (in milliseconds). It returns the ASCII value of the key pressed.
|
| 650 |
|
| 651 |
+
-If 0 is passed, it waits indefinitely until a key is pressed.
|
| 652 |
+
- **`cv2.destroyAllWindows()`**: Closes all OpenCV windows that were opened during the program's execution.
|
| 653 |
+
- **`cv2.MouseCallBack()`**: It is a technique where we can make lot of things automated
|
| 654 |
+
- **`cv2.SetMouseCallBack()`**:It will be automatically activated when we hover the mouse inside pop-up window.
|
| 655 |
|
| 656 |
+
-It is going to call user-defined function which tracks the events of mouse
|
| 657 |
+
- It contains 5 parameters
|
| 658 |
+
- **5 parameters:**
|
| 659 |
+
- def fun(event,x,yflags,param):
|
| 660 |
+
- **Event**: It is going to track all windows what event has performed inside pop-up window
|
| 661 |
+
- **x,y**: x,y are rows and columns
|
| 662 |
+
- **flags**: It is used to track an event where we can include additional features
|
| 663 |
+
- **param**: It is used to add additional functions
|
| 664 |
+
|
| 665 |
+
These methods are useful in forming the foundation of real-time video processing in OpenCV,
|
| 666 |
+
and also essential for handling the display and closing of images in OpenCV applications.
|
| 667 |
+
""")
|
| 668 |
|
| 669 |
|