Harika22 commited on
Commit
3518a32
·
verified ·
1 Parent(s): 9f0e3ea

Update pages/7_Unstructured_data.py

Browse files
Files changed (1) hide show
  1. pages/7_Unstructured_data.py +14 -1
pages/7_Unstructured_data.py CHANGED
@@ -441,7 +441,7 @@ if file_type == "IMAGE":
441
  $$
442
  ''', unsafe_allow_html=True)
443
 
444
- st.subheader("Affine Transformation Workflow")
445
  st.markdown("""
446
  The general steps for performing affine transformation in OpenCV:
447
  1. Load the Image
@@ -503,6 +503,9 @@ if file_type == "IMAGE":
503
  x' = x \cdot \cos(θ) - y \cdot \sin(θ) \\
504
  y' = x \cdot \sin(θ) + y \cdot \cos(θ)
505
  $$
 
 
 
506
  - θ is angle between image pixel and x-axis
507
  - always rotation is in anti-clockwise direction when angle is +ve
508
  - always rotation is in clockwise direction when angle is -ve
@@ -520,6 +523,16 @@ if file_type == "IMAGE":
520
  cv2.waitKey()
521
  cv2.destroyAllWindows()
522
  ''')
 
 
 
 
 
 
 
 
 
 
523
 
524
 
525
 
 
441
  $$
442
  ''', unsafe_allow_html=True)
443
 
444
+ st.header("Affine Transformation Workflow")
445
  st.markdown("""
446
  The general steps for performing affine transformation in OpenCV:
447
  1. Load the Image
 
503
  x' = x \cdot \cos(θ) - y \cdot \sin(θ) \\
504
  y' = x \cdot \sin(θ) + y \cdot \cos(θ)
505
  $$
506
+ - **Rotation matrix:**
507
+ - [cos(θ) sin(θ) Tx=0
508
+ sin(θ) cos(θ) Ty=0 ]
509
  - θ is angle between image pixel and x-axis
510
  - always rotation is in anti-clockwise direction when angle is +ve
511
  - always rotation is in clockwise direction when angle is -ve
 
523
  cv2.waitKey()
524
  cv2.destroyAllWindows()
525
  ''')
526
+
527
+ st.subheader('**Scaling**')
528
+ st.markdown('''
529
+ - Scaling is a affine transformation matrix used for zoom-in and zoom-out which is **(compression and expansion)**
530
+ - Formula:
531
+ $$
532
+ I(x,y) \cdot Scaling matrix = I'(x',y')
533
+ $$
534
+
535
+ ''')
536
 
537
 
538