Spaces:
Sleeping
Sleeping
Update pages/7_Unstructured_data.py
Browse files132 unmodified lines133134135136137138139140141142143144145136137138139140141142143144145146147148149150151152132 unmodified lines st.markdown(""" - OpenCV allows users to perform basic operations like reading, displaying, and saving images. - Along with that it also performs resizing, cropping, and filtering of images based on requirements. - **Key Functions:** <ul class="icon-bullet"> <li>imread() </li> <li>imshow() </li> <li>imwrite() </li> </ul> - **imread()**: Reads an image from the disk, storing it as an array. - **imshow()**: Displays the image in a window, allowing for easy visualization. - **imwrite()**: Saves the image to a specified location on your storage. - **Key Functions:** `imread()`, `imshow()`, `imwrite()`") - **`imread()`**: Reads an image from the disk, storing it as an array. - **`imshow()`**: Displays the image in a window, allowing for easy visualization. - **`imwrite()`**: Saves the image to a specified location on your storage. ```python # Example Usage of OpenCV Functions image = cv2.imread('path') # Reads an image - it always converts to 3D array which uses RGB color space cv2.imshow('Image', array) # Displays the image - Creates a pop-up window --> give any name in string format - and then take the array and display cv2.waitKey() # It adds a delay --> for how many milliseconds the pop-up window should be active in screen cv2.destroyAllWindows() # To remove from RAM --> automatically removes from RAM cv2.imwrite('output.jpg', image) # Saves the image to a file cv2.resize(image) # Resizes an image to a given dimension. """, unsafe_allow_html=True)
elif data_type1 == "Color Space":pages/7_Unstructured_data.py+13-10