hari3485 commited on
Commit
fa40f07
·
verified ·
1 Parent(s): 607bb85

Update pages/Data Collection.py

Browse files
Files changed (1) hide show
  1. pages/Data Collection.py +23 -56
pages/Data Collection.py CHANGED
@@ -914,22 +914,17 @@ def image_details_page():
914
 
915
  # Unstructured Data - Video Page
916
  def video_details_page():
917
-
918
- st.title("Unstructured Data - Video Details")
919
-
920
 
921
  # Title
922
- st.markdown("""
923
- <h1 style='text-align: center; color: #FF0000;'>Understanding Video and Frame Rates</h1>",
924
- unsafe_allow_html=True
925
- """)
926
 
927
  # Definition of Video
928
- st.markdown("""
929
- "<h3 style='text-align: center; color: #FF0000;'>What is video?</h3>",
930
- unsafe_allow_html=True
931
- """)
932
-
933
  st.write("""
934
  A **video** is made up of a series of images called frames. These frames are shown one after another very quickly,
935
  giving the impression of continuous motion. For example, if we have a sequence of images I1, I2, I3, ..., In,
@@ -941,10 +936,7 @@ def video_details_page():
941
  The higher the number of frames per second, the smoother the video will look. Fewer frames per second can make the video appear less smooth or choppy.
942
  """)
943
 
944
- st.markdown("""
945
- "<h3 style='text-align: center; color: #FF0000;'>Understanding Video Processing with OpenCV</h3>",
946
- unsafe_allow_html=True
947
- """)
948
 
949
  st.write("""
950
  **Load the Video**
@@ -984,10 +976,8 @@ def video_details_page():
984
 
985
  # Use st.markdown to display the explanation
986
 
987
- st.markdown("""
988
- "<h3 style='text-align: center; color: #FF0000;'>Understanding `vid.read()`</h3>",
989
- unsafe_allow_html=True
990
- """)
991
 
992
  st.markdown("""
993
  - `vid.read()` is used to grab one frame (image) at a time from a video.
@@ -998,10 +988,7 @@ def video_details_page():
998
  2. **`img`**: The actual frame (image) from the video, which is in the form of a NumPy array. This image can then be processed just like any regular picture.
999
  """)
1000
 
1001
- st.markdown("""
1002
- "<h3 style='text-align: center; color: #FF0000;'>Understanding `cv2.waitkey()`</h3>",
1003
- unsafe_allow_html=True
1004
- """)
1005
 
1006
  st.markdown("""
1007
 
@@ -1025,11 +1012,7 @@ def video_details_page():
1025
  break
1026
  """,language="python")
1027
 
1028
- st.markdown("""
1029
- "<h3 style='text-align: center; color: #FF0000;'>Converting BGR Video to Grayscale
1030
- </h3>",
1031
- unsafe_allow_html=True
1032
- """)
1033
 
1034
 
1035
 
@@ -1067,12 +1050,9 @@ def video_details_page():
1067
 
1068
  cv2.destroyAllWindows() # Removing all the temporary memory (RAM)
1069
  """, language="python")
1070
-
1071
- st.markdown("""
1072
- "<h3 style='text-align: center; color: #FF0000;'>Splitting video into 3 Different channels (B,G,R)
1073
- </h3>",
1074
- unsafe_allow_html=True
1075
- """)
1076
 
1077
 
1078
  # Use st.markdown to display the explanation
@@ -1118,12 +1098,9 @@ def video_details_page():
1118
  cv2.destroyAllWindows() # Remove temporary windows
1119
  """, language="python")
1120
 
 
1121
 
1122
- st.markdown("""
1123
- "<h3 style='text-align: center; color: #ffa500;'>Live Streaming with Webcam
1124
- </h3>",
1125
- unsafe_allow_html=True
1126
- """)
1127
 
1128
  # Display the explanation in markdown
1129
  st.markdown("""
@@ -1162,11 +1139,8 @@ def video_details_page():
1162
  cv2.destroyAllWindows()
1163
  """, language="python")
1164
 
1165
- st.markdown("""
1166
- "<h3 style='text-align: center; color: #ffa500;'>Dual Webcam Stream `Color vs Grayscale Capture`
1167
- </h3>",
1168
- unsafe_allow_html=True
1169
- """)
1170
 
1171
  st.markdown("""
1172
  # Opening Two Webcams: Original and Grayscale Video
@@ -1196,12 +1170,8 @@ def video_details_page():
1196
  cv2.destroyAllWindows()
1197
  """,language = "python")
1198
 
1199
-
1200
- st.markdown("""
1201
- "<h3 style='text-align: center; color: #ffa500;'> Webcam Stream with RGB Channel Separation
1202
- </h3>",
1203
- unsafe_allow_html=True
1204
- """)
1205
 
1206
 
1207
  st.markdown("""
@@ -1241,11 +1211,8 @@ def video_details_page():
1241
 
1242
  """,language="python")
1243
 
1244
- st.markdown("""
1245
- "<h3 style='text-align: center; color: #ffa500;'>Webcam Frame Capture and Save
1246
- </h3>",
1247
- unsafe_allow_html=True
1248
- """)
1249
 
1250
 
1251
  st.markdown("""
 
914
 
915
  # Unstructured Data - Video Page
916
  def video_details_page():
917
+
918
+ st.markdown("<h1 style='color: blue;'>Unstructured Data - Video Details</h1>", unsafe_allow_html=True)
 
919
 
920
  # Title
921
+ st.markdown("<h3 style='text-align: center; color: #FF0000;'>Understanding Video and Frame Rates</h3>", unsafe_allow_html=True)
922
+
 
 
923
 
924
  # Definition of Video
925
+ st.markdown("<h3 style='text-align: center; color: #FF0000;'>What is video?</h3>", unsafe_allow_html=True)
926
+
927
+
 
 
928
  st.write("""
929
  A **video** is made up of a series of images called frames. These frames are shown one after another very quickly,
930
  giving the impression of continuous motion. For example, if we have a sequence of images I1, I2, I3, ..., In,
 
936
  The higher the number of frames per second, the smoother the video will look. Fewer frames per second can make the video appear less smooth or choppy.
937
  """)
938
 
939
+ st.markdown("<h3 style='text-align: center; color: #FF0000;'>Understanding Video Processing with OpenCV</h3>", unsafe_allow_html=True)
 
 
 
940
 
941
  st.write("""
942
  **Load the Video**
 
976
 
977
  # Use st.markdown to display the explanation
978
 
979
+ st.markdown("<h3 style='text-align: center; color: #FF0000;'>Understanding `vid.read()`</h3>", unsafe_allow_html=True)
980
+
 
 
981
 
982
  st.markdown("""
983
  - `vid.read()` is used to grab one frame (image) at a time from a video.
 
988
  2. **`img`**: The actual frame (image) from the video, which is in the form of a NumPy array. This image can then be processed just like any regular picture.
989
  """)
990
 
991
+ st.markdown("<h3 style='text-align: center; color: #FF0000;'>Understanding `cv2.waitkey()`</h3>", unsafe_allow_html=True)
 
 
 
992
 
993
  st.markdown("""
994
 
 
1012
  break
1013
  """,language="python")
1014
 
1015
+ st.markdown("<h3 style='text-align: center; color: #FF0000;'>Converting BGR Video to Grayscale</h3>", unsafe_allow_html=True)
 
 
 
 
1016
 
1017
 
1018
 
 
1050
 
1051
  cv2.destroyAllWindows() # Removing all the temporary memory (RAM)
1052
  """, language="python")
1053
+
1054
+ st.markdown("<h3 style='text-align: center; color: #FF0000;'>Splitting video into 3 Different channels (B,G,R)</h3>", unsafe_allow_html=True)
1055
+
 
 
 
1056
 
1057
 
1058
  # Use st.markdown to display the explanation
 
1098
  cv2.destroyAllWindows() # Remove temporary windows
1099
  """, language="python")
1100
 
1101
+ st.markdown("<h3 style='text-align: center; color: #ffa500;'>Live Streaming with Webcam</h3>", unsafe_allow_html=True)
1102
 
1103
+
 
 
 
 
1104
 
1105
  # Display the explanation in markdown
1106
  st.markdown("""
 
1139
  cv2.destroyAllWindows()
1140
  """, language="python")
1141
 
1142
+
1143
+ st.markdown("<h3 style='text-align: center; color: #ffa500;'>Dual Webcam Stream `Color vs Grayscale Capture`</h3>", unsafe_allow_html=True)
 
 
 
1144
 
1145
  st.markdown("""
1146
  # Opening Two Webcams: Original and Grayscale Video
 
1170
  cv2.destroyAllWindows()
1171
  """,language = "python")
1172
 
1173
+ st.markdown("<h3 style='text-align: center; color: #ffa500;'> Webcam Stream with RGB Channel Separation</h3>", unsafe_allow_html=True)
1174
+
 
 
 
 
1175
 
1176
 
1177
  st.markdown("""
 
1211
 
1212
  """,language="python")
1213
 
1214
+ st.markdown("<h3 style='text-align: center; color: #ffa500;'>Webcam Frame Capture and Save</h3>", unsafe_allow_html=True)
1215
+
 
 
 
1216
 
1217
 
1218
  st.markdown("""