SlideShare a Scribd company logo
1 of 2
Distortion: Write code to perform barrel distortion on an image.
Starter code available in directory Tranform/
Transform/distortion.py: Edit the function distortion to implement this part.
Correction Naive: Write code to perform correction on the input distorted image, by appying the
inverse distortion function.
Starter code available in directory Tranform/
Transform/distortion.py: Edit the function correction_naive to implement this part.
(35 pts.) Correction with interpolation: Write code to perform correction on the input distorted
image, and using nearest neighbor and bilinear interpolation.
Starter code available in directory Tranform/
Transform/distortion.py: Edit the function correction to implement this part.
Transform/interpolation.py: Write code for linear and bilinear interpolation in there respective
function definitions, you are welcome to write new functions and call them from these functions
The assignment can be run using dip_hw1_rotate.py (there is no need to edit this file)
Usage: python dip_hw1_distortion.py -i image-name -k parameter_k -m method
image-name: name of the image
k: Parameter k (eg. 0.005)
method: "nearest_neightbor" or "bilinear"
Please make sure your code runs when you run the above command from prompt/Terminal
Any output images or files must be saved to "output/" folder
One images is provided for testing: kenny.jpg
Notes:
Files not to be changed: requirements.txt, dip.py, and Jenkinsfile
the code has to run using one of the following commands
Usage: ./dip_hw1_distortion.py -i image-name -t parameter_k -m methodExample:
./dip_hw1_distortion.py -i kenny.jpg -k 0.0005 -m bilinear
Usage: python dip_hw1_distortion.py -i image-name -t parameter_k -m methodExample: python
dip_hw1_distortion.py -i kenny.jpg -k 0.0005 -m bilinear
Any output file or image should be written to output/ folder
The code has to run on jenkins CI/CD
Note: We are restricted from importing cv2, numpy, stats and other third party libraries, with the
only exception of math, importing math library is allowed (import math).
While you can import it for testing purposes, the final submission should not contain the
following statements.
import cv2
import numpy
import numpy as np
import stats
etc...
The essential functions for the assignment are available in dip module one can import using the
following statement
The following functions are available

More Related Content

Similar to Distortion- Write code to perform barrel distortion on an image- Start.docx

67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdfRajb54
 
The Basics of programming
The Basics of programmingThe Basics of programming
The Basics of programming692sfrobotics
 
How to add system calls to OS/161
How to add system calls to OS/161How to add system calls to OS/161
How to add system calls to OS/161Xiao Qin
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointJavaTpoint.Com
 
Data structure week 1
Data structure week 1Data structure week 1
Data structure week 1karmuhtam
 
Boost.Python: C++ and Python Integration
Boost.Python: C++ and Python IntegrationBoost.Python: C++ and Python Integration
Boost.Python: C++ and Python IntegrationGlobalLogic Ukraine
 
fileop report
fileop reportfileop report
fileop reportJason Lu
 
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxJLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxvrickens
 
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...Puppet
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxAASTHA76
 
Fundamental of programming Fundamental of programming
Fundamental of programming Fundamental of programmingFundamental of programming Fundamental of programming
Fundamental of programming Fundamental of programmingLidetAdmassu
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C ProgrammingShuvongkor Barman
 
Tutorial_Python1.pdf
Tutorial_Python1.pdfTutorial_Python1.pdf
Tutorial_Python1.pdfMuzamilFaiz
 
Functions2.pdf
Functions2.pdfFunctions2.pdf
Functions2.pdfDaddy84
 

Similar to Distortion- Write code to perform barrel distortion on an image- Start.docx (20)

67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf
 
The Basics of programming
The Basics of programmingThe Basics of programming
The Basics of programming
 
Lab (1) installation of python
Lab (1) installation of pythonLab (1) installation of python
Lab (1) installation of python
 
Deep Learning in theano
Deep Learning in theanoDeep Learning in theano
Deep Learning in theano
 
How to add system calls to OS/161
How to add system calls to OS/161How to add system calls to OS/161
How to add system calls to OS/161
 
Embedded C.pptx
Embedded C.pptxEmbedded C.pptx
Embedded C.pptx
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpoint
 
Data structure week 1
Data structure week 1Data structure week 1
Data structure week 1
 
Ex1
Ex1Ex1
Ex1
 
Boost.Python: C++ and Python Integration
Boost.Python: C++ and Python IntegrationBoost.Python: C++ and Python Integration
Boost.Python: C++ and Python Integration
 
fileop report
fileop reportfileop report
fileop report
 
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxJLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
 
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
 
arrays.ppt
arrays.pptarrays.ppt
arrays.ppt
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
 
Fundamental of programming Fundamental of programming
Fundamental of programming Fundamental of programmingFundamental of programming Fundamental of programming
Fundamental of programming Fundamental of programming
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
 
Tutorial_Python1.pdf
Tutorial_Python1.pdfTutorial_Python1.pdf
Tutorial_Python1.pdf
 
Functions2.pdf
Functions2.pdfFunctions2.pdf
Functions2.pdf
 
C tutorials
C tutorialsC tutorials
C tutorials
 

More from rtodd4

E) (4 Points) Consider a simple C program that consists of a function.docx
E) (4 Points) Consider a simple C program that consists of a function.docxE) (4 Points) Consider a simple C program that consists of a function.docx
E) (4 Points) Consider a simple C program that consists of a function.docxrtodd4
 
During the past decade- hundreds of hospitals have closed- merged- or.docx
During the past decade- hundreds of hospitals have closed- merged- or.docxDuring the past decade- hundreds of hospitals have closed- merged- or.docx
During the past decade- hundreds of hospitals have closed- merged- or.docxrtodd4
 
During the most recent recession- some economists argued that the chan.docx
During the most recent recession- some economists argued that the chan.docxDuring the most recent recession- some economists argued that the chan.docx
During the most recent recession- some economists argued that the chan.docxrtodd4
 
During the last year- John has made timely payments on three of his cr.docx
During the last year- John has made timely payments on three of his cr.docxDuring the last year- John has made timely payments on three of his cr.docx
During the last year- John has made timely payments on three of his cr.docxrtodd4
 
During the 1990 s- Canada suffered a net loss of skilled workers to th.docx
During the 1990 s- Canada suffered a net loss of skilled workers to th.docxDuring the 1990 s- Canada suffered a net loss of skilled workers to th.docx
During the 1990 s- Canada suffered a net loss of skilled workers to th.docxrtodd4
 
During January- its first month of operations- Keys Company accumulate.docx
During January- its first month of operations- Keys Company accumulate.docxDuring January- its first month of operations- Keys Company accumulate.docx
During January- its first month of operations- Keys Company accumulate.docxrtodd4
 
Dumpy wings (dp) and brown eyes (bw) are both recessive alleles of Dro.docx
Dumpy wings (dp) and brown eyes (bw) are both recessive alleles of Dro.docxDumpy wings (dp) and brown eyes (bw) are both recessive alleles of Dro.docx
Dumpy wings (dp) and brown eyes (bw) are both recessive alleles of Dro.docxrtodd4
 
Drosophila have X and Y chromosomes and determine sex in a manner that (1).docx
Drosophila have X and Y chromosomes and determine sex in a manner that (1).docxDrosophila have X and Y chromosomes and determine sex in a manner that (1).docx
Drosophila have X and Y chromosomes and determine sex in a manner that (1).docxrtodd4
 
Draw your version of the slide below- It's a cross section of the trac.docx
Draw your version of the slide below- It's a cross section of the trac.docxDraw your version of the slide below- It's a cross section of the trac.docx
Draw your version of the slide below- It's a cross section of the trac.docxrtodd4
 
Draw the relationships between the structure and components and how do.docx
Draw the relationships between the structure and components and how do.docxDraw the relationships between the structure and components and how do.docx
Draw the relationships between the structure and components and how do.docxrtodd4
 
Draw the diagrams yourself- Do not copy-paste from other sources- Ques.docx
Draw the diagrams yourself- Do not copy-paste from other sources- Ques.docxDraw the diagrams yourself- Do not copy-paste from other sources- Ques.docx
Draw the diagrams yourself- Do not copy-paste from other sources- Ques.docxrtodd4
 
Draw an ellipse and label earth on the elliptical orbit- sun at a focu.docx
Draw an ellipse and label earth on the elliptical orbit- sun at a focu.docxDraw an ellipse and label earth on the elliptical orbit- sun at a focu.docx
Draw an ellipse and label earth on the elliptical orbit- sun at a focu.docxrtodd4
 
Draw an ER-EER data model for the following scenario- You want to buil.docx
Draw an ER-EER data model for the following scenario- You want to buil.docxDraw an ER-EER data model for the following scenario- You want to buil.docx
Draw an ER-EER data model for the following scenario- You want to buil.docxrtodd4
 
Draw a truth table for AB(A+B).docx
Draw a truth table for AB(A+B).docxDraw a truth table for AB(A+B).docx
Draw a truth table for AB(A+B).docxrtodd4
 
Draw a flow chart to illustrate the cycle that a grain of sand goes th.docx
Draw a flow chart to illustrate the cycle that a grain of sand goes th.docxDraw a flow chart to illustrate the cycle that a grain of sand goes th.docx
Draw a flow chart to illustrate the cycle that a grain of sand goes th.docxrtodd4
 
Draw a cartoon of Meiosis that depicts the following (9) stages- Inter.docx
Draw a cartoon of Meiosis that depicts the following (9) stages- Inter.docxDraw a cartoon of Meiosis that depicts the following (9) stages- Inter.docx
Draw a cartoon of Meiosis that depicts the following (9) stages- Inter.docxrtodd4
 
Draw a compartment model- state the differential equation- and solve t.docx
Draw a compartment model- state the differential equation- and solve t.docxDraw a compartment model- state the differential equation- and solve t.docx
Draw a compartment model- state the differential equation- and solve t.docxrtodd4
 
Drag and drop the best description for the segments of the map indicat.docx
Drag and drop the best description for the segments of the map indicat.docxDrag and drop the best description for the segments of the map indicat.docx
Drag and drop the best description for the segments of the map indicat.docxrtodd4
 
Drag the items below into the appropriate purple box Discontinuation o.docx
Drag the items below into the appropriate purple box Discontinuation o.docxDrag the items below into the appropriate purple box Discontinuation o.docx
Drag the items below into the appropriate purple box Discontinuation o.docxrtodd4
 
Dr- Amanda Favata opened a medical practice specialzing in physical th.docx
Dr- Amanda Favata opened a medical practice specialzing in physical th.docxDr- Amanda Favata opened a medical practice specialzing in physical th.docx
Dr- Amanda Favata opened a medical practice specialzing in physical th.docxrtodd4
 

More from rtodd4 (20)

E) (4 Points) Consider a simple C program that consists of a function.docx
E) (4 Points) Consider a simple C program that consists of a function.docxE) (4 Points) Consider a simple C program that consists of a function.docx
E) (4 Points) Consider a simple C program that consists of a function.docx
 
During the past decade- hundreds of hospitals have closed- merged- or.docx
During the past decade- hundreds of hospitals have closed- merged- or.docxDuring the past decade- hundreds of hospitals have closed- merged- or.docx
During the past decade- hundreds of hospitals have closed- merged- or.docx
 
During the most recent recession- some economists argued that the chan.docx
During the most recent recession- some economists argued that the chan.docxDuring the most recent recession- some economists argued that the chan.docx
During the most recent recession- some economists argued that the chan.docx
 
During the last year- John has made timely payments on three of his cr.docx
During the last year- John has made timely payments on three of his cr.docxDuring the last year- John has made timely payments on three of his cr.docx
During the last year- John has made timely payments on three of his cr.docx
 
During the 1990 s- Canada suffered a net loss of skilled workers to th.docx
During the 1990 s- Canada suffered a net loss of skilled workers to th.docxDuring the 1990 s- Canada suffered a net loss of skilled workers to th.docx
During the 1990 s- Canada suffered a net loss of skilled workers to th.docx
 
During January- its first month of operations- Keys Company accumulate.docx
During January- its first month of operations- Keys Company accumulate.docxDuring January- its first month of operations- Keys Company accumulate.docx
During January- its first month of operations- Keys Company accumulate.docx
 
Dumpy wings (dp) and brown eyes (bw) are both recessive alleles of Dro.docx
Dumpy wings (dp) and brown eyes (bw) are both recessive alleles of Dro.docxDumpy wings (dp) and brown eyes (bw) are both recessive alleles of Dro.docx
Dumpy wings (dp) and brown eyes (bw) are both recessive alleles of Dro.docx
 
Drosophila have X and Y chromosomes and determine sex in a manner that (1).docx
Drosophila have X and Y chromosomes and determine sex in a manner that (1).docxDrosophila have X and Y chromosomes and determine sex in a manner that (1).docx
Drosophila have X and Y chromosomes and determine sex in a manner that (1).docx
 
Draw your version of the slide below- It's a cross section of the trac.docx
Draw your version of the slide below- It's a cross section of the trac.docxDraw your version of the slide below- It's a cross section of the trac.docx
Draw your version of the slide below- It's a cross section of the trac.docx
 
Draw the relationships between the structure and components and how do.docx
Draw the relationships between the structure and components and how do.docxDraw the relationships between the structure and components and how do.docx
Draw the relationships between the structure and components and how do.docx
 
Draw the diagrams yourself- Do not copy-paste from other sources- Ques.docx
Draw the diagrams yourself- Do not copy-paste from other sources- Ques.docxDraw the diagrams yourself- Do not copy-paste from other sources- Ques.docx
Draw the diagrams yourself- Do not copy-paste from other sources- Ques.docx
 
Draw an ellipse and label earth on the elliptical orbit- sun at a focu.docx
Draw an ellipse and label earth on the elliptical orbit- sun at a focu.docxDraw an ellipse and label earth on the elliptical orbit- sun at a focu.docx
Draw an ellipse and label earth on the elliptical orbit- sun at a focu.docx
 
Draw an ER-EER data model for the following scenario- You want to buil.docx
Draw an ER-EER data model for the following scenario- You want to buil.docxDraw an ER-EER data model for the following scenario- You want to buil.docx
Draw an ER-EER data model for the following scenario- You want to buil.docx
 
Draw a truth table for AB(A+B).docx
Draw a truth table for AB(A+B).docxDraw a truth table for AB(A+B).docx
Draw a truth table for AB(A+B).docx
 
Draw a flow chart to illustrate the cycle that a grain of sand goes th.docx
Draw a flow chart to illustrate the cycle that a grain of sand goes th.docxDraw a flow chart to illustrate the cycle that a grain of sand goes th.docx
Draw a flow chart to illustrate the cycle that a grain of sand goes th.docx
 
Draw a cartoon of Meiosis that depicts the following (9) stages- Inter.docx
Draw a cartoon of Meiosis that depicts the following (9) stages- Inter.docxDraw a cartoon of Meiosis that depicts the following (9) stages- Inter.docx
Draw a cartoon of Meiosis that depicts the following (9) stages- Inter.docx
 
Draw a compartment model- state the differential equation- and solve t.docx
Draw a compartment model- state the differential equation- and solve t.docxDraw a compartment model- state the differential equation- and solve t.docx
Draw a compartment model- state the differential equation- and solve t.docx
 
Drag and drop the best description for the segments of the map indicat.docx
Drag and drop the best description for the segments of the map indicat.docxDrag and drop the best description for the segments of the map indicat.docx
Drag and drop the best description for the segments of the map indicat.docx
 
Drag the items below into the appropriate purple box Discontinuation o.docx
Drag the items below into the appropriate purple box Discontinuation o.docxDrag the items below into the appropriate purple box Discontinuation o.docx
Drag the items below into the appropriate purple box Discontinuation o.docx
 
Dr- Amanda Favata opened a medical practice specialzing in physical th.docx
Dr- Amanda Favata opened a medical practice specialzing in physical th.docxDr- Amanda Favata opened a medical practice specialzing in physical th.docx
Dr- Amanda Favata opened a medical practice specialzing in physical th.docx
 

Recently uploaded

How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17Celine George
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxCeline George
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111GangaMaiya1
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonhttgc7rh9c
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 

Recently uploaded (20)

How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 

Distortion- Write code to perform barrel distortion on an image- Start.docx

  • 1. Distortion: Write code to perform barrel distortion on an image. Starter code available in directory Tranform/ Transform/distortion.py: Edit the function distortion to implement this part. Correction Naive: Write code to perform correction on the input distorted image, by appying the inverse distortion function. Starter code available in directory Tranform/ Transform/distortion.py: Edit the function correction_naive to implement this part. (35 pts.) Correction with interpolation: Write code to perform correction on the input distorted image, and using nearest neighbor and bilinear interpolation. Starter code available in directory Tranform/ Transform/distortion.py: Edit the function correction to implement this part. Transform/interpolation.py: Write code for linear and bilinear interpolation in there respective function definitions, you are welcome to write new functions and call them from these functions The assignment can be run using dip_hw1_rotate.py (there is no need to edit this file) Usage: python dip_hw1_distortion.py -i image-name -k parameter_k -m method image-name: name of the image k: Parameter k (eg. 0.005) method: "nearest_neightbor" or "bilinear" Please make sure your code runs when you run the above command from prompt/Terminal Any output images or files must be saved to "output/" folder One images is provided for testing: kenny.jpg Notes: Files not to be changed: requirements.txt, dip.py, and Jenkinsfile the code has to run using one of the following commands
  • 2. Usage: ./dip_hw1_distortion.py -i image-name -t parameter_k -m methodExample: ./dip_hw1_distortion.py -i kenny.jpg -k 0.0005 -m bilinear Usage: python dip_hw1_distortion.py -i image-name -t parameter_k -m methodExample: python dip_hw1_distortion.py -i kenny.jpg -k 0.0005 -m bilinear Any output file or image should be written to output/ folder The code has to run on jenkins CI/CD Note: We are restricted from importing cv2, numpy, stats and other third party libraries, with the only exception of math, importing math library is allowed (import math). While you can import it for testing purposes, the final submission should not contain the following statements. import cv2 import numpy import numpy as np import stats etc... The essential functions for the assignment are available in dip module one can import using the following statement The following functions are available