Spaces:
Sleeping
Sleeping
Update pages/7_Unstructured_data.py
Browse files- pages/7_Unstructured_data.py +17 -0
pages/7_Unstructured_data.py
CHANGED
|
@@ -596,6 +596,23 @@ if file_type == "IMAGE":
|
|
| 596 |
cv2.waitKey()
|
| 597 |
cv2.destroyAllWindows()
|
| 598 |
''')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 599 |
|
| 600 |
|
| 601 |
|
|
|
|
| 596 |
cv2.waitKey()
|
| 597 |
cv2.destroyAllWindows()
|
| 598 |
''')
|
| 599 |
+
|
| 600 |
+
st.subheader('**Cropping**')
|
| 601 |
+
st.markdown('''
|
| 602 |
+
- Cropping is a affine transformation matrix used to crop the image in size using indexing
|
| 603 |
+
''')
|
| 604 |
+
st.code('''
|
| 605 |
+
import cv2
|
| 606 |
+
## loads the image
|
| 607 |
+
img = cv2.imread(r"C:\Users\Harika\OneDrive\Pictures\Camera Roll 1\20201119_145554.png")
|
| 608 |
+
## by indexing crop the image
|
| 609 |
+
c_m = img[98:408,390:565]
|
| 610 |
+
## save and display the image
|
| 611 |
+
cv2.imshow("org_img",img)
|
| 612 |
+
cv2.imshow("crop_img",c_m)
|
| 613 |
+
cv2.waitKey()
|
| 614 |
+
cv2.destroyAllWindows()
|
| 615 |
+
''')
|
| 616 |
|
| 617 |
|
| 618 |
|