Spaces:
Sleeping
Sleeping
Update pages/Data Collection.py
Browse files- pages/Data Collection.py +4 -21
pages/Data Collection.py
CHANGED
|
@@ -389,30 +389,13 @@ elif st.session_state.current_page == "explore_images_video":
|
|
| 389 |
st.subheader("What is Black and White Color Space?")
|
| 390 |
st.write("""
|
| 391 |
Black and White color space, also known as binary color space, represents an image using only two colors:
|
| 392 |
-
**black** and **white**.
|
|
|
|
|
|
|
| 393 |
Black and White color space eliminates all color information, focusing entirely on light intensity.
|
| 394 |
""")
|
| 395 |
-
|
| 396 |
-
# Optional: Add an example visualization for Black and White color space
|
| 397 |
-
import numpy as np
|
| 398 |
-
import matplotlib.pyplot as plt
|
| 399 |
-
|
| 400 |
-
st.write("**Example of Black and White Color Space:**")
|
| 401 |
-
# Generate a sample black and white grid
|
| 402 |
-
bw_grid = np.random.choice([0, 1], size=(10, 10)) # Binary grid (0 for black, 1 for white)
|
| 403 |
-
|
| 404 |
-
# Create a plot to display
|
| 405 |
-
fig, ax = plt.subplots()
|
| 406 |
-
ax.imshow(bw_grid, cmap='gray', interpolation='nearest') # Use 'gray' colormap
|
| 407 |
-
ax.set_title("Black and White Grid Example")
|
| 408 |
-
ax.set_xticks([]) # Remove x-axis ticks
|
| 409 |
-
ax.set_yticks([]) # Remove y-axis ticks
|
| 410 |
-
|
| 411 |
-
# Display the plot in Streamlit
|
| 412 |
-
st.pyplot(fig)
|
| 413 |
-
|
| 414 |
-
|
| 415 |
|
|
|
|
| 416 |
# Go Back Button
|
| 417 |
if st.button("Go Back"):
|
| 418 |
navigate_to("main")
|
|
|
|
| 389 |
st.subheader("What is Black and White Color Space?")
|
| 390 |
st.write("""
|
| 391 |
Black and White color space, also known as binary color space, represents an image using only two colors:
|
| 392 |
+
**black** and **white**.
|
| 393 |
+
|
| 394 |
+
Each pixel in this color space is either completely black (value: 0) or completely white (value: 1 or 255, depending on the representation).
|
| 395 |
Black and White color space eliminates all color information, focusing entirely on light intensity.
|
| 396 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 397 |
|
| 398 |
+
|
| 399 |
# Go Back Button
|
| 400 |
if st.button("Go Back"):
|
| 401 |
navigate_to("main")
|