Spaces:
Sleeping
Sleeping
Update pages/7_Unstructured_data.py
Browse files308 unmodified lines309310311312313314308 unmodified lines- Red channel is taken and kept at depth of 3 --> depth always represents color- The combination of 3 chnnels give 3D array where depth represents color and it is always constant''')308 unmodified lines309310311312313314315316317318319320321322323324325326327328329330331332333334335308 unmodified lines- Red channel is taken and kept at depth of 3 --> depth always represents color- The combination of 3 chnnels give 3D array where depth represents color and it is always constant''')st.subheader("**Color Space Conversion with `cv2.cvtColor()`**")st.markdown("""- OpenCV provides the `cv2.cvtColor()` function to converts one colorspace to any colospace.**Example: Displaying the Grayscale Image**```pythonimport cv2img = cv2.imread('image path')gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)cv2.imwrite('gray_image.jpg', gray_img)```- The grayscale image is saved to a file gray_image.jpg.""")st.subheader("**Types of Color Space Conversions**")st.markdown("""- **RGB to Grayscale**: `cv2.COLOR_RGB2GRAY` converts a color image to grayscale- **Grayscale to RGB**: `cv2.COLOR_GRAY2RGB` converts a grayscale image back to a 3-channel RGB image""")
pages/7_Unstructured_data.py+21