Spaces:
Sleeping
Sleeping
Update pages/Data Collection.py
Browse files- pages/Data Collection.py +27 -0
pages/Data Collection.py
CHANGED
|
@@ -385,6 +385,33 @@ elif st.session_state.current_page == "explore_images_video":
|
|
| 385 |
</div>
|
| 386 |
""", unsafe_allow_html=True)
|
| 387 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 388 |
|
| 389 |
# Go Back Button
|
| 390 |
if st.button("Go Back"):
|
|
|
|
| 385 |
</div>
|
| 386 |
""", unsafe_allow_html=True)
|
| 387 |
|
| 388 |
+
# Section: What is Black and White Color Space?
|
| 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**. Each pixel in this color space is either completely black (value: 0) or completely white (value: 1 or 255, depending on the representation).
|
| 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"):
|