Harika22 commited on
Commit
9fa532e
·
verified ·
1 Parent(s): 5be21f1

Update pages/7_Unstructured_data.py

Browse files
Files changed (1) hide show
  1. pages/7_Unstructured_data.py +18 -7
pages/7_Unstructured_data.py CHANGED
@@ -133,18 +133,29 @@ if file_type == "IMAGE":
133
  st.markdown("""
134
  - OpenCV allows users to perform basic operations like reading, displaying, and saving images.
135
  - Along with that it also performs resizing, cropping, and filtering of images based on requirements.
136
- - **Key Functions:** `imread()`, `imshow()`, `imwrite()`")
137
  - **`imread()`**: Reads an image from the disk, storing it as an array.
138
  - **`imshow()`**: Displays the image in a window, allowing for easy visualization.
139
  - **`imwrite()`**: Saves the image to a specified location on your storage.
140
  ```python
141
  # Example Usage of OpenCV Functions
142
- image = cv2.imread('path') # Reads an image - it always converts to 3D array which uses RGB color space
143
- 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
144
- cv2.waitKey() # It adds a delay --> for how many milliseconds the pop-up window should be active in screen
145
- cv2.destroyAllWindows() # To remove from RAM --> automatically removes from RAM
146
- cv2.imwrite('output.jpg', image) # Saves the image to a file
147
- cv2.resize(image) # Resizes an image to a given dimension.
 
 
 
 
 
 
 
 
 
 
 
148
  """, unsafe_allow_html=True)
149
 
150
 
 
133
  st.markdown("""
134
  - OpenCV allows users to perform basic operations like reading, displaying, and saving images.
135
  - Along with that it also performs resizing, cropping, and filtering of images based on requirements.
136
+ - **Key Functions:** `imread()`, `imshow()`, `imwrite()`
137
  - **`imread()`**: Reads an image from the disk, storing it as an array.
138
  - **`imshow()`**: Displays the image in a window, allowing for easy visualization.
139
  - **`imwrite()`**: Saves the image to a specified location on your storage.
140
  ```python
141
  # Example Usage of OpenCV Functions
142
+ image = cv2.imread('path')
143
+ # Reads an image - it always converts to 3D array which uses RGB color space
144
+
145
+ cv2.imshow('Image', array)
146
+ # Displays the image - Creates a pop-up window --> give any name in string format - and then take the array and display
147
+
148
+ cv2.waitKey()
149
+ # It adds a delay --> for how many milliseconds the pop-up window should be active in screen
150
+
151
+ cv2.destroyAllWindows()
152
+ # To remove from RAM --> automatically removes from RAM
153
+
154
+ cv2.imwrite('output.jpg', image)
155
+ # Saves the image to a file
156
+
157
+ cv2.resize(image)
158
+ # Resizes an image to a given dimension.
159
  """, unsafe_allow_html=True)
160
 
161