LakshmiHarika commited on
Commit
65691d4
·
verified ·
1 Parent(s): 9072ee7

Update pages/Data Collection.py

Browse files
Files changed (1) hide show
  1. pages/Data Collection.py +6 -4
pages/Data Collection.py CHANGED
@@ -846,6 +846,8 @@ elif st.session_state.current_page == "image_operations":
846
  cv2.waitKey(0)
847
  cv2.destroyAllWindows()""", language="python")
848
 
 
 
849
  # Allow user to upload an image
850
  uploaded_file = st.file_uploader("Upload an image", type=["jpg", "png", "jpeg"])
851
 
@@ -866,15 +868,15 @@ elif st.session_state.current_page == "image_operations":
866
  red_channel = cv2.merge([zeros, zeros, r])
867
 
868
  # Display the images with captions
869
- st.image(blue_channel, caption="Blue Channel", channels="BGR", use_column_width=True)
870
- st.image(green_channel, caption="Green Channel", channels="BGR", use_column_width=True)
871
- st.image(red_channel, caption="Red Channel", channels="BGR", use_column_width=True)
872
 
873
  # Merge the channels back together for the original image
874
  original_img = cv2.merge([b, g, r])
875
 
876
  # Display the original image
877
- st.image(original_img, caption="Original Image", channels="BGR", use_column_width=True)
878
 
879
  # Optionally, provide a download link for the processed image
880
  st.download_button(
 
846
  cv2.waitKey(0)
847
  cv2.destroyAllWindows()""", language="python")
848
 
849
+ st.write("Once you upload an image, it will be split into its color channels (Blue, Green, and Red), with each channel displayed separately. You can then download the processed image.")
850
+
851
  # Allow user to upload an image
852
  uploaded_file = st.file_uploader("Upload an image", type=["jpg", "png", "jpeg"])
853
 
 
868
  red_channel = cv2.merge([zeros, zeros, r])
869
 
870
  # Display the images with captions
871
+ st.image(blue_channel, caption="Blue Channel", channels="BGR", use_container_width=True)
872
+ st.image(green_channel, caption="Green Channel", channels="BGR", use_container_width=True)
873
+ st.image(red_channel, caption="Red Channel", channels="BGR", use_container_width=True)
874
 
875
  # Merge the channels back together for the original image
876
  original_img = cv2.merge([b, g, r])
877
 
878
  # Display the original image
879
+ st.image(original_img, caption="Original Image", channels="BGR", use_container_width=True)
880
 
881
  # Optionally, provide a download link for the processed image
882
  st.download_button(