SlideShare a Scribd company logo
Name: Prajwal Deshmukh
Roll no: 237
Div: B
PRN: 0120200484
Practical Assignment 3: Design and develop the program to implement any
four Image transformation (Affine transformation) and deploy on cloud.
1) Image Transformation Algorithms: Implement the four affine transformation
algorithms, which include translation, rotation, scaling, and shearing. You can use
Python and OpenCV to perform these transformations. Here's a brief overview of
each:
a. Translation: translation_matrix = np.float32([[1, 0, tx], [0, 1, ty]]) # tx and ty are
translation values translated_image = cv2.warpAffine(image, translation_matrix,
(width, height))
b. Rotation: rotation_matrix = cv2.getRotationMatrix2D((width / 2, height / 2),
angle, scale) rotated_image = cv2.warpAffine(image, rotation_matrix, (width,
height))
c. Scaling: scaling_matrix = np.float32([[sx, 0, 0], [0, sy, 0]]) # sx and sy are scaling
factors scaled_image = cv2.warpAffine(image, scaling_matrix, (width, height))
d. Shearing: shearing_matrix = np.float32([[1, shx, 0], [shy, 1, 0]) # shx and shy are
shearing values sheared_image = cv2.warpAffine(image, shearing_matrix, (width,
height))
2) Overall Model Design model:
import streamlit as st
import cv2
import numpy as np
# Streamlit setup
#st.title("Image Transformations with Affine Transformations")
st.markdown(
"""
<style>
body {
background-image: linear-gradient(rgba(255, 165, 0, 0.5), rgba(0, 0, 128, 0.5));
}
</style>
""",
unsafe_allow_html=True
)
st.title("Image Transformations with Affine Transformations")
st.write("Name: Prajwal Deshmukh")
st.write("PRN: 0120200484")
# Upload an image
st.header("Upload an image")
uploaded_image = st.file_uploader("Choose an image...", type=["jpg", "png",
"jpeg"])
if uploaded_image is not None:
image = cv2.imdecode(np.fromstring(uploaded_image.read(), np.uint8), 1)
# Display the original image
st.image(image, caption="Original Image", use_column_width=True)
# Transformation selection
st.header("Select Transformation")
transformation_type = st.selectbox(
"Choose a transformation:",
["Translation", "Rotation", "Scaling", "Shearing"]
)
if transformation_type == "Translation":
st.subheader("Translation Parameters")
tx = st.slider("X-axis Translation", -200, 200, 0)
ty = st.slider("Y-axis Translation", -200, 200, 0)
# Apply the translation transformation
translation_matrix = np.float32([[1, 0, tx], [0, 1, ty]])
transformed_image = cv2.warpAffine(image, translation_matrix,
(image.shape[1], image.shape[0]))
st.image(transformed_image, caption="Transformed Image",
use_column_width=True)
elif transformation_type == "Rotation":
st.subheader("Rotation Parameters")
angle = st.slider("Angle (degrees)", -180, 180, 0)
# Apply the rotation transformation
rotation_matrix = cv2.getRotationMatrix2D((image.shape[1] / 2,
image.shape[0] / 2), angle, 1)
transformed_image = cv2.warpAffine(image, rotation_matrix,
(image.shape[1], image.shape[0]))
st.image(transformed_image, caption="Transformed Image",
use_column_width=True)
elif transformation_type == "Scaling":
st.subheader("Scaling Parameters")
scale_factor = st.slider("Scale Factor", 0.1, 2.0, 1.0)
# Apply the scaling transformation
transformed_image = cv2.resize(image, None, fx=scale_factor, fy=scale_factor)
st.image(transformed_image, caption="Transformed Image",
use_column_width=True)
elif transformation_type == "Shearing":
st.subheader("Shearing Parameters")
shear_x = st.slider("X-axis Shear", -2, 2, 0)
shear_y = st.slider("Y-axis Shear", -2, 2, 0)
# Apply the shearing transformation
shear_matrix = np.float32([[1, shear_x, 0], [shear_y, 1, 0]])
transformed_image = cv2.warpAffine(image, shear_matrix, (image.shape[1],
image.shape[0]))
st.image(transformed_image, caption="Transformed Image",
use_column_width=True)
Output:
1. Uploading of image:
2. Translation:
3. Rotation:
4. Scaling:
5. Shearing:
3) Deployment link:
https://imagetransformationalgorithms-
prajwaldeshmukh.streamlit.app/

More Related Content

Similar to Computer vision image enhancement ppt prajwal deshmukh

AIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfAIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdf
ssuserb4d806
 
Intro to Python (High School) Unit #3
Intro to Python (High School) Unit #3Intro to Python (High School) Unit #3
Intro to Python (High School) Unit #3
Jay Coskey
 
Dip iit workshop
Dip iit workshopDip iit workshop
Writeup advanced lane_lines_project
Writeup advanced lane_lines_projectWriteup advanced lane_lines_project
Writeup advanced lane_lines_project
Manish Jauhari
 
Computer Graphics in Java and Scala - Part 1b
Computer Graphics in Java and Scala - Part 1bComputer Graphics in Java and Scala - Part 1b
Computer Graphics in Java and Scala - Part 1b
Philip Schwarz
 
Maps
MapsMaps
Intro to computer vision in .net
Intro to computer vision in .netIntro to computer vision in .net
Intro to computer vision in .net
Stephen Lorello
 
Open Cv Tutorial Ii
Open Cv Tutorial IiOpen Cv Tutorial Ii
Open Cv Tutorial Ii
Waris Songtantarak
 
Open Cv Tutorial Ii
Open Cv Tutorial IiOpen Cv Tutorial Ii
Open Cv Tutorial Ii
Waris Songtantarak
 
circ.db.dbcircleserver(1).py#!usrlocalbinpython3im.docx
circ.db.dbcircleserver(1).py#!usrlocalbinpython3im.docxcirc.db.dbcircleserver(1).py#!usrlocalbinpython3im.docx
circ.db.dbcircleserver(1).py#!usrlocalbinpython3im.docx
christinemaritza
 
Image Processing Using MATLAB
Image Processing Using MATLABImage Processing Using MATLAB
Image Processing Using MATLAB
Amarjeetsingh Thakur
 
Image processing in MATLAB
Image processing in MATLABImage processing in MATLAB
Image processing in MATLAB
Amarjeetsingh Thakur
 
matlab.docx
matlab.docxmatlab.docx
What is the UML Class diagram for accident detection using CNN- i have.pdf
What is the UML Class diagram for accident detection using CNN- i have.pdfWhat is the UML Class diagram for accident detection using CNN- i have.pdf
What is the UML Class diagram for accident detection using CNN- i have.pdf
anilagarwal8880432
 
Particle Filter Tracking in Python
Particle Filter Tracking in PythonParticle Filter Tracking in Python
Particle Filter Tracking in Python
Kohta Ishikawa
 
Image classification using cnn
Image classification using cnnImage classification using cnn
Image classification using cnn
Debarko De
 
How to implement react native animations using animated api
How to implement react native animations using animated apiHow to implement react native animations using animated api
How to implement react native animations using animated api
Katy Slemon
 
HTML5 Canvas
HTML5 CanvasHTML5 Canvas
HTML5 Canvas
Robyn Overstreet
 
Intro to Game Programming
Intro to Game ProgrammingIntro to Game Programming
Intro to Game Programming
Richard Jones
 
openFrameworks 007 - graphics
openFrameworks 007 - graphicsopenFrameworks 007 - graphics
openFrameworks 007 - graphics
roxlu
 

Similar to Computer vision image enhancement ppt prajwal deshmukh (20)

AIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfAIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdf
 
Intro to Python (High School) Unit #3
Intro to Python (High School) Unit #3Intro to Python (High School) Unit #3
Intro to Python (High School) Unit #3
 
Dip iit workshop
Dip iit workshopDip iit workshop
Dip iit workshop
 
Writeup advanced lane_lines_project
Writeup advanced lane_lines_projectWriteup advanced lane_lines_project
Writeup advanced lane_lines_project
 
Computer Graphics in Java and Scala - Part 1b
Computer Graphics in Java and Scala - Part 1bComputer Graphics in Java and Scala - Part 1b
Computer Graphics in Java and Scala - Part 1b
 
Maps
MapsMaps
Maps
 
Intro to computer vision in .net
Intro to computer vision in .netIntro to computer vision in .net
Intro to computer vision in .net
 
Open Cv Tutorial Ii
Open Cv Tutorial IiOpen Cv Tutorial Ii
Open Cv Tutorial Ii
 
Open Cv Tutorial Ii
Open Cv Tutorial IiOpen Cv Tutorial Ii
Open Cv Tutorial Ii
 
circ.db.dbcircleserver(1).py#!usrlocalbinpython3im.docx
circ.db.dbcircleserver(1).py#!usrlocalbinpython3im.docxcirc.db.dbcircleserver(1).py#!usrlocalbinpython3im.docx
circ.db.dbcircleserver(1).py#!usrlocalbinpython3im.docx
 
Image Processing Using MATLAB
Image Processing Using MATLABImage Processing Using MATLAB
Image Processing Using MATLAB
 
Image processing in MATLAB
Image processing in MATLABImage processing in MATLAB
Image processing in MATLAB
 
matlab.docx
matlab.docxmatlab.docx
matlab.docx
 
What is the UML Class diagram for accident detection using CNN- i have.pdf
What is the UML Class diagram for accident detection using CNN- i have.pdfWhat is the UML Class diagram for accident detection using CNN- i have.pdf
What is the UML Class diagram for accident detection using CNN- i have.pdf
 
Particle Filter Tracking in Python
Particle Filter Tracking in PythonParticle Filter Tracking in Python
Particle Filter Tracking in Python
 
Image classification using cnn
Image classification using cnnImage classification using cnn
Image classification using cnn
 
How to implement react native animations using animated api
How to implement react native animations using animated apiHow to implement react native animations using animated api
How to implement react native animations using animated api
 
HTML5 Canvas
HTML5 CanvasHTML5 Canvas
HTML5 Canvas
 
Intro to Game Programming
Intro to Game ProgrammingIntro to Game Programming
Intro to Game Programming
 
openFrameworks 007 - graphics
openFrameworks 007 - graphicsopenFrameworks 007 - graphics
openFrameworks 007 - graphics
 

Recently uploaded

বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 

Recently uploaded (20)

বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 

Computer vision image enhancement ppt prajwal deshmukh

  • 1. Name: Prajwal Deshmukh Roll no: 237 Div: B PRN: 0120200484 Practical Assignment 3: Design and develop the program to implement any four Image transformation (Affine transformation) and deploy on cloud. 1) Image Transformation Algorithms: Implement the four affine transformation algorithms, which include translation, rotation, scaling, and shearing. You can use Python and OpenCV to perform these transformations. Here's a brief overview of each: a. Translation: translation_matrix = np.float32([[1, 0, tx], [0, 1, ty]]) # tx and ty are translation values translated_image = cv2.warpAffine(image, translation_matrix, (width, height)) b. Rotation: rotation_matrix = cv2.getRotationMatrix2D((width / 2, height / 2), angle, scale) rotated_image = cv2.warpAffine(image, rotation_matrix, (width, height)) c. Scaling: scaling_matrix = np.float32([[sx, 0, 0], [0, sy, 0]]) # sx and sy are scaling factors scaled_image = cv2.warpAffine(image, scaling_matrix, (width, height)) d. Shearing: shearing_matrix = np.float32([[1, shx, 0], [shy, 1, 0]) # shx and shy are shearing values sheared_image = cv2.warpAffine(image, shearing_matrix, (width, height))
  • 2. 2) Overall Model Design model: import streamlit as st import cv2 import numpy as np # Streamlit setup #st.title("Image Transformations with Affine Transformations") st.markdown( """ <style> body { background-image: linear-gradient(rgba(255, 165, 0, 0.5), rgba(0, 0, 128, 0.5)); } </style> """, unsafe_allow_html=True ) st.title("Image Transformations with Affine Transformations") st.write("Name: Prajwal Deshmukh") st.write("PRN: 0120200484") # Upload an image st.header("Upload an image") uploaded_image = st.file_uploader("Choose an image...", type=["jpg", "png", "jpeg"])
  • 3. if uploaded_image is not None: image = cv2.imdecode(np.fromstring(uploaded_image.read(), np.uint8), 1) # Display the original image st.image(image, caption="Original Image", use_column_width=True) # Transformation selection st.header("Select Transformation") transformation_type = st.selectbox( "Choose a transformation:", ["Translation", "Rotation", "Scaling", "Shearing"] ) if transformation_type == "Translation": st.subheader("Translation Parameters") tx = st.slider("X-axis Translation", -200, 200, 0) ty = st.slider("Y-axis Translation", -200, 200, 0) # Apply the translation transformation translation_matrix = np.float32([[1, 0, tx], [0, 1, ty]]) transformed_image = cv2.warpAffine(image, translation_matrix, (image.shape[1], image.shape[0])) st.image(transformed_image, caption="Transformed Image", use_column_width=True) elif transformation_type == "Rotation": st.subheader("Rotation Parameters") angle = st.slider("Angle (degrees)", -180, 180, 0)
  • 4. # Apply the rotation transformation rotation_matrix = cv2.getRotationMatrix2D((image.shape[1] / 2, image.shape[0] / 2), angle, 1) transformed_image = cv2.warpAffine(image, rotation_matrix, (image.shape[1], image.shape[0])) st.image(transformed_image, caption="Transformed Image", use_column_width=True) elif transformation_type == "Scaling": st.subheader("Scaling Parameters") scale_factor = st.slider("Scale Factor", 0.1, 2.0, 1.0) # Apply the scaling transformation transformed_image = cv2.resize(image, None, fx=scale_factor, fy=scale_factor) st.image(transformed_image, caption="Transformed Image", use_column_width=True) elif transformation_type == "Shearing": st.subheader("Shearing Parameters") shear_x = st.slider("X-axis Shear", -2, 2, 0) shear_y = st.slider("Y-axis Shear", -2, 2, 0) # Apply the shearing transformation shear_matrix = np.float32([[1, shear_x, 0], [shear_y, 1, 0]]) transformed_image = cv2.warpAffine(image, shear_matrix, (image.shape[1], image.shape[0])) st.image(transformed_image, caption="Transformed Image", use_column_width=True)
  • 5. Output: 1. Uploading of image: 2. Translation:
  • 7. 5. Shearing: 3) Deployment link: https://imagetransformationalgorithms- prajwaldeshmukh.streamlit.app/