LakshmiHarika commited on
Commit
1368cce
·
verified ·
1 Parent(s): 1fd8ddc

Update pages/Data Collection.py

Browse files
Files changed (1) hide show
  1. pages/Data Collection.py +30 -3
pages/Data Collection.py CHANGED
@@ -890,7 +890,7 @@ elif st.session_state.current_page == "image_operations":
890
 
891
  # Heading for cv2.cvtColor() function
892
  st.markdown("""
893
- <h3 style="color: #e25822;">Converting Color Spaces with cv2.cvtColor()</h3>
894
  """, unsafe_allow_html=True)
895
 
896
  # About cv2.cvtColor() function
@@ -902,11 +902,38 @@ elif st.session_state.current_page == "image_operations":
902
  # Syntax example for cv2.cvtColor()
903
  st.code("""
904
  # Converting an RGB image to Grayscale
905
- gray_image = cv2.cvtColor(rgb_image, cv2.COLOR_BGR2GRAY) # Convert from BGR to Grayscale
906
 
907
  # Converting a Grayscale image to RGB
908
- rgb_image = cv2.cvtColor(gray_image, cv2.COLOR_GRAY2BGR) # Convert from Grayscale to BGR
909
  """, language="python")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
910
 
911
 
912
 
 
890
 
891
  # Heading for cv2.cvtColor() function
892
  st.markdown("""
893
+ <h3 style="color: #9400d3;">Converting Color Spaces</h3>
894
  """, unsafe_allow_html=True)
895
 
896
  # About cv2.cvtColor() function
 
902
  # Syntax example for cv2.cvtColor()
903
  st.code("""
904
  # Converting an RGB image to Grayscale
905
+ gray_img = cv2.cvtColor(rgb_image, cv2.COLOR_BGR2GRAY) # Convert from BGR to Grayscale
906
 
907
  # Converting a Grayscale image to RGB
908
+ rgb_img = cv2.cvtColor(gray_image, cv2.COLOR_GRAY2BGR) # Convert from Grayscale to BGR
909
  """, language="python")
910
+
911
+ st.write("""
912
+ In the next section, we will dive into **video processing using OpenCV**. We will explore how to:
913
+ - Use various OpenCV functions for handling video data.
914
+ - Play videos using OpenCV.
915
+ - Capture images from live video streams.
916
+
917
+ Stay tuned for an exciting exploration of video handling!
918
+ """)
919
+
920
+ col1, col2, col3 = st.columns(3)
921
+
922
+ # Column 1 - Button to go to the Image Creation page
923
+ with col1:
924
+ if st.button("⬅️ Image Creation and Manipulation"):
925
+ navigate_to("image_operations") # Image Creation and Manipulation page
926
+
927
+ # Column 2 - Button for the main page (Images & Videos)
928
+ with col2:
929
+ if st.button("📸 Images & Videos"):
930
+ navigate_to("explore_images_video") # Main page: Images & Videos
931
+
932
+ # Column 3 - Button to go to the Videos page
933
+ with col3:
934
+ if st.button("➡️ Video Processing with OpenCV"):
935
+ navigate_to("video_processing") # Videos page
936
+
937
 
938
 
939