SlideShare uma empresa Scribd logo
1 de 1
Baixar para ler offline
Plz help me make a code for this using python
it must pass the above tests. Thank you
The discrete cosine transform is a powerful technique for expressing data as a sum of cosine
waves, and has many applications in audio and image compression. We will use the "chunking"
technique discussed in the lab activity here to compress a whole image. Given a 512512 image,
stored in the variable image, you will break the image into smaller 88 chunks. Then for each
chunk, you will convert to the DCT basis, drop the frequencies with relatively small
contribution, then convert back to the standard basis and clip the resulting pixel values so that
they lie between 0 and 255 . This image is given in gray scale, where each pixel varies from 0 to
255. To gauge which frequencies have a small contribution, use a tolerance of 10% of the largest
absolute value in each particular chunk after converting it into the DCT basis.
The setup code provides the helper function create_dct_basis (n), which creates an nn matrix
whose columns make up the n-dimensional DCT basis. To construct your solution, write a code
snippet that: - defines the function compress_chunk(chunk) that takes as argument a "chunk" of
the image, with dimension 88, and returns the compressed "chunk". - make sure your
compressed chunk returned from compress_chunk () contains only values between 0 an 255 , as
in the original image. You may find the function numpy . clip () useful. - use your function to
construct the variable compressed, which contains the compressed image. The setup code gives
the following variable: Your code snippet should define the following variable:
Score: 0/3 (0%) Cest Results [0/2] compress_chunk() Max points: 2 Earned points: 0 Message
Your code was supposed to supply a function or callable, but the variable you supplied was not
[0/1] compressed image Max points: 1 Earned points: 0 Message

Mais conteúdo relacionado

Semelhante a Plz help me make a code for this using pythonit must pass the abov.pdf

Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Joel P
 
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...VLSICS Design
 
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...VLSICS Design
 
Low Light Image Enhancement Using Zero-DCE algorithm
Low Light Image Enhancement Using Zero-DCE algorithmLow Light Image Enhancement Using Zero-DCE algorithm
Low Light Image Enhancement Using Zero-DCE algorithmIRJET Journal
 
A New hybrid method in watermarking using DCT and AES
A New hybrid method in watermarking using DCT and AESA New hybrid method in watermarking using DCT and AES
A New hybrid method in watermarking using DCT and AESIJERD Editor
 
FAST AND EFFICIENT IMAGE COMPRESSION BASED ON PARALLEL COMPUTING USING MATLAB
FAST AND EFFICIENT IMAGE COMPRESSION BASED ON PARALLEL COMPUTING USING MATLABFAST AND EFFICIENT IMAGE COMPRESSION BASED ON PARALLEL COMPUTING USING MATLAB
FAST AND EFFICIENT IMAGE COMPRESSION BASED ON PARALLEL COMPUTING USING MATLABJournal For Research
 
Modified approximate 8-point multiplier less DCT like transform
Modified approximate 8-point multiplier less DCT like transformModified approximate 8-point multiplier less DCT like transform
Modified approximate 8-point multiplier less DCT like transformIJERA Editor
 
IIIRJET-Implementation of Image Compression Algorithm on FPGA
IIIRJET-Implementation of Image Compression Algorithm on FPGAIIIRJET-Implementation of Image Compression Algorithm on FPGA
IIIRJET-Implementation of Image Compression Algorithm on FPGAIRJET Journal
 
Intelligent Parallel Processing and Compound Image Compression
Intelligent Parallel Processing and Compound Image CompressionIntelligent Parallel Processing and Compound Image Compression
Intelligent Parallel Processing and Compound Image CompressionDR.P.S.JAGADEESH KUMAR
 
Image_Processing_LECTURE_c#_programming.ppt
Image_Processing_LECTURE_c#_programming.pptImage_Processing_LECTURE_c#_programming.ppt
Image_Processing_LECTURE_c#_programming.pptLOUISSEVERINOROMANO
 
IJEST12-04-09-150
IJEST12-04-09-150IJEST12-04-09-150
IJEST12-04-09-150Jigar Jain
 
Lossless Huffman coding image compression implementation in spatial domain by...
Lossless Huffman coding image compression implementation in spatial domain by...Lossless Huffman coding image compression implementation in spatial domain by...
Lossless Huffman coding image compression implementation in spatial domain by...IRJET Journal
 
A Review on Image Compression using DCT and DWT
A Review on Image Compression using DCT and DWTA Review on Image Compression using DCT and DWT
A Review on Image Compression using DCT and DWTIJSRD
 
D0325016021
D0325016021D0325016021
D0325016021theijes
 

Semelhante a Plz help me make a code for this using pythonit must pass the abov.pdf (20)

Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)
 
Image compression Algorithms
Image compression AlgorithmsImage compression Algorithms
Image compression Algorithms
 
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
 
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
 
Low Light Image Enhancement Using Zero-DCE algorithm
Low Light Image Enhancement Using Zero-DCE algorithmLow Light Image Enhancement Using Zero-DCE algorithm
Low Light Image Enhancement Using Zero-DCE algorithm
 
A New hybrid method in watermarking using DCT and AES
A New hybrid method in watermarking using DCT and AESA New hybrid method in watermarking using DCT and AES
A New hybrid method in watermarking using DCT and AES
 
FAST AND EFFICIENT IMAGE COMPRESSION BASED ON PARALLEL COMPUTING USING MATLAB
FAST AND EFFICIENT IMAGE COMPRESSION BASED ON PARALLEL COMPUTING USING MATLABFAST AND EFFICIENT IMAGE COMPRESSION BASED ON PARALLEL COMPUTING USING MATLAB
FAST AND EFFICIENT IMAGE COMPRESSION BASED ON PARALLEL COMPUTING USING MATLAB
 
Modified approximate 8-point multiplier less DCT like transform
Modified approximate 8-point multiplier less DCT like transformModified approximate 8-point multiplier less DCT like transform
Modified approximate 8-point multiplier less DCT like transform
 
IIIRJET-Implementation of Image Compression Algorithm on FPGA
IIIRJET-Implementation of Image Compression Algorithm on FPGAIIIRJET-Implementation of Image Compression Algorithm on FPGA
IIIRJET-Implementation of Image Compression Algorithm on FPGA
 
Intelligent Parallel Processing and Compound Image Compression
Intelligent Parallel Processing and Compound Image CompressionIntelligent Parallel Processing and Compound Image Compression
Intelligent Parallel Processing and Compound Image Compression
 
B070306010
B070306010B070306010
B070306010
 
Ch7 031102
Ch7 031102Ch7 031102
Ch7 031102
 
Image_Processing_LECTURE_c#_programming.ppt
Image_Processing_LECTURE_c#_programming.pptImage_Processing_LECTURE_c#_programming.ppt
Image_Processing_LECTURE_c#_programming.ppt
 
IJEST12-04-09-150
IJEST12-04-09-150IJEST12-04-09-150
IJEST12-04-09-150
 
Image Compression
Image CompressionImage Compression
Image Compression
 
Lossless Huffman coding image compression implementation in spatial domain by...
Lossless Huffman coding image compression implementation in spatial domain by...Lossless Huffman coding image compression implementation in spatial domain by...
Lossless Huffman coding image compression implementation in spatial domain by...
 
A Review on Image Compression using DCT and DWT
A Review on Image Compression using DCT and DWTA Review on Image Compression using DCT and DWT
A Review on Image Compression using DCT and DWT
 
D0325016021
D0325016021D0325016021
D0325016021
 
Source coding
Source codingSource coding
Source coding
 
Jv2517361741
Jv2517361741Jv2517361741
Jv2517361741
 

Mais de agmobiles

Question 1 (25 marks) The most recently audited Statement of Financi.pdf
Question 1 (25 marks) The most recently audited Statement of Financi.pdfQuestion 1 (25 marks) The most recently audited Statement of Financi.pdf
Question 1 (25 marks) The most recently audited Statement of Financi.pdfagmobiles
 
Question Please provide the links or the references where the info.pdf
Question  Please provide the links or the references where the info.pdfQuestion  Please provide the links or the references where the info.pdf
Question Please provide the links or the references where the info.pdfagmobiles
 
QN. 3A sample of 111 mortgages approved during the current year sh.pdf
QN. 3A sample of 111 mortgages approved during the current year sh.pdfQN. 3A sample of 111 mortgages approved during the current year sh.pdf
QN. 3A sample of 111 mortgages approved during the current year sh.pdfagmobiles
 
QS 13-7 Contabilizaci�n de peque�os dividendos en acciones LO P2 A c.pdf
QS 13-7 Contabilizaci�n de peque�os dividendos en acciones LO P2 A c.pdfQS 13-7 Contabilizaci�n de peque�os dividendos en acciones LO P2 A c.pdf
QS 13-7 Contabilizaci�n de peque�os dividendos en acciones LO P2 A c.pdfagmobiles
 
q60. u anda isiz olan iki kiiyi d��n�n. Tim �almak istiyor ama i a.pdf
q60. u anda isiz olan iki kiiyi d��n�n. Tim �almak istiyor ama i a.pdfq60. u anda isiz olan iki kiiyi d��n�n. Tim �almak istiyor ama i a.pdf
q60. u anda isiz olan iki kiiyi d��n�n. Tim �almak istiyor ama i a.pdfagmobiles
 
Q4 (Excel spreadsheet is available). From the data given in the fo.pdf
Q4 (Excel spreadsheet is available). From the data given in the fo.pdfQ4 (Excel spreadsheet is available). From the data given in the fo.pdf
Q4 (Excel spreadsheet is available). From the data given in the fo.pdfagmobiles
 
Q1 Feasibility of applying audit data analytics 1) Name a situation.pdf
Q1 Feasibility of applying audit data analytics 1) Name a situation.pdfQ1 Feasibility of applying audit data analytics 1) Name a situation.pdf
Q1 Feasibility of applying audit data analytics 1) Name a situation.pdfagmobiles
 
Python, fill in code are marked with #FillInStart and #FillInEndim.pdf
Python, fill in code are marked with #FillInStart and #FillInEndim.pdfPython, fill in code are marked with #FillInStart and #FillInEndim.pdf
Python, fill in code are marked with #FillInStart and #FillInEndim.pdfagmobiles
 
Put this in APA format Add information if needed.CONSTRUCTION.pdf
Put this in APA format Add information if needed.CONSTRUCTION.pdfPut this in APA format Add information if needed.CONSTRUCTION.pdf
Put this in APA format Add information if needed.CONSTRUCTION.pdfagmobiles
 
Proyecto EH! requiere una inversi�n inicial de $50 000 y tiene un va.pdf
Proyecto EH! requiere una inversi�n inicial de $50 000 y tiene un va.pdfProyecto EH! requiere una inversi�n inicial de $50 000 y tiene un va.pdf
Proyecto EH! requiere una inversi�n inicial de $50 000 y tiene un va.pdfagmobiles
 
Provide logical case studies where the application of the following .pdf
Provide logical case studies where the application of the following .pdfProvide logical case studies where the application of the following .pdf
Provide logical case studies where the application of the following .pdfagmobiles
 
public class AVLTreeT extends ComparableT extends BSTT { p.pdf
public class AVLTreeT extends ComparableT extends BSTT {   p.pdfpublic class AVLTreeT extends ComparableT extends BSTT {   p.pdf
public class AVLTreeT extends ComparableT extends BSTT { p.pdfagmobiles
 
Provide excel work, spider-plot, and tornado diagram. Opportunit.pdf
Provide excel work, spider-plot, and tornado diagram. Opportunit.pdfProvide excel work, spider-plot, and tornado diagram. Opportunit.pdf
Provide excel work, spider-plot, and tornado diagram. Opportunit.pdfagmobiles
 
Prove (i.e. give a derivation for) each of the following. You can us.pdf
Prove (i.e. give a derivation for) each of the following. You can us.pdfProve (i.e. give a derivation for) each of the following. You can us.pdf
Prove (i.e. give a derivation for) each of the following. You can us.pdfagmobiles
 
Project Bird speciesThe OrdwayBirds data frame is a historical re.pdf
Project Bird speciesThe OrdwayBirds data frame is a historical re.pdfProject Bird speciesThe OrdwayBirds data frame is a historical re.pdf
Project Bird speciesThe OrdwayBirds data frame is a historical re.pdfagmobiles
 
Productos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdf
Productos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdfProductos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdf
Productos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdfagmobiles
 
Process Cost SystemsWhat type of product or business would use a p.pdf
Process Cost SystemsWhat type of product or business would use a p.pdfProcess Cost SystemsWhat type of product or business would use a p.pdf
Process Cost SystemsWhat type of product or business would use a p.pdfagmobiles
 
programming assignment 2Preprocessing Before building the language.pdf
programming assignment 2Preprocessing Before building the language.pdfprogramming assignment 2Preprocessing Before building the language.pdf
programming assignment 2Preprocessing Before building the language.pdfagmobiles
 
Problema 4 Un monopolio se enfrenta a la demanda del mercado QD =.pdf
Problema 4 Un monopolio se enfrenta a la demanda del mercado QD =.pdfProblema 4 Un monopolio se enfrenta a la demanda del mercado QD =.pdf
Problema 4 Un monopolio se enfrenta a la demanda del mercado QD =.pdfagmobiles
 
Preguntas para el ejercicio 34Instrucciones Para cada uno de los .pdf
Preguntas para el ejercicio 34Instrucciones Para cada uno de los .pdfPreguntas para el ejercicio 34Instrucciones Para cada uno de los .pdf
Preguntas para el ejercicio 34Instrucciones Para cada uno de los .pdfagmobiles
 

Mais de agmobiles (20)

Question 1 (25 marks) The most recently audited Statement of Financi.pdf
Question 1 (25 marks) The most recently audited Statement of Financi.pdfQuestion 1 (25 marks) The most recently audited Statement of Financi.pdf
Question 1 (25 marks) The most recently audited Statement of Financi.pdf
 
Question Please provide the links or the references where the info.pdf
Question  Please provide the links or the references where the info.pdfQuestion  Please provide the links or the references where the info.pdf
Question Please provide the links or the references where the info.pdf
 
QN. 3A sample of 111 mortgages approved during the current year sh.pdf
QN. 3A sample of 111 mortgages approved during the current year sh.pdfQN. 3A sample of 111 mortgages approved during the current year sh.pdf
QN. 3A sample of 111 mortgages approved during the current year sh.pdf
 
QS 13-7 Contabilizaci�n de peque�os dividendos en acciones LO P2 A c.pdf
QS 13-7 Contabilizaci�n de peque�os dividendos en acciones LO P2 A c.pdfQS 13-7 Contabilizaci�n de peque�os dividendos en acciones LO P2 A c.pdf
QS 13-7 Contabilizaci�n de peque�os dividendos en acciones LO P2 A c.pdf
 
q60. u anda isiz olan iki kiiyi d��n�n. Tim �almak istiyor ama i a.pdf
q60. u anda isiz olan iki kiiyi d��n�n. Tim �almak istiyor ama i a.pdfq60. u anda isiz olan iki kiiyi d��n�n. Tim �almak istiyor ama i a.pdf
q60. u anda isiz olan iki kiiyi d��n�n. Tim �almak istiyor ama i a.pdf
 
Q4 (Excel spreadsheet is available). From the data given in the fo.pdf
Q4 (Excel spreadsheet is available). From the data given in the fo.pdfQ4 (Excel spreadsheet is available). From the data given in the fo.pdf
Q4 (Excel spreadsheet is available). From the data given in the fo.pdf
 
Q1 Feasibility of applying audit data analytics 1) Name a situation.pdf
Q1 Feasibility of applying audit data analytics 1) Name a situation.pdfQ1 Feasibility of applying audit data analytics 1) Name a situation.pdf
Q1 Feasibility of applying audit data analytics 1) Name a situation.pdf
 
Python, fill in code are marked with #FillInStart and #FillInEndim.pdf
Python, fill in code are marked with #FillInStart and #FillInEndim.pdfPython, fill in code are marked with #FillInStart and #FillInEndim.pdf
Python, fill in code are marked with #FillInStart and #FillInEndim.pdf
 
Put this in APA format Add information if needed.CONSTRUCTION.pdf
Put this in APA format Add information if needed.CONSTRUCTION.pdfPut this in APA format Add information if needed.CONSTRUCTION.pdf
Put this in APA format Add information if needed.CONSTRUCTION.pdf
 
Proyecto EH! requiere una inversi�n inicial de $50 000 y tiene un va.pdf
Proyecto EH! requiere una inversi�n inicial de $50 000 y tiene un va.pdfProyecto EH! requiere una inversi�n inicial de $50 000 y tiene un va.pdf
Proyecto EH! requiere una inversi�n inicial de $50 000 y tiene un va.pdf
 
Provide logical case studies where the application of the following .pdf
Provide logical case studies where the application of the following .pdfProvide logical case studies where the application of the following .pdf
Provide logical case studies where the application of the following .pdf
 
public class AVLTreeT extends ComparableT extends BSTT { p.pdf
public class AVLTreeT extends ComparableT extends BSTT {   p.pdfpublic class AVLTreeT extends ComparableT extends BSTT {   p.pdf
public class AVLTreeT extends ComparableT extends BSTT { p.pdf
 
Provide excel work, spider-plot, and tornado diagram. Opportunit.pdf
Provide excel work, spider-plot, and tornado diagram. Opportunit.pdfProvide excel work, spider-plot, and tornado diagram. Opportunit.pdf
Provide excel work, spider-plot, and tornado diagram. Opportunit.pdf
 
Prove (i.e. give a derivation for) each of the following. You can us.pdf
Prove (i.e. give a derivation for) each of the following. You can us.pdfProve (i.e. give a derivation for) each of the following. You can us.pdf
Prove (i.e. give a derivation for) each of the following. You can us.pdf
 
Project Bird speciesThe OrdwayBirds data frame is a historical re.pdf
Project Bird speciesThe OrdwayBirds data frame is a historical re.pdfProject Bird speciesThe OrdwayBirds data frame is a historical re.pdf
Project Bird speciesThe OrdwayBirds data frame is a historical re.pdf
 
Productos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdf
Productos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdfProductos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdf
Productos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdf
 
Process Cost SystemsWhat type of product or business would use a p.pdf
Process Cost SystemsWhat type of product or business would use a p.pdfProcess Cost SystemsWhat type of product or business would use a p.pdf
Process Cost SystemsWhat type of product or business would use a p.pdf
 
programming assignment 2Preprocessing Before building the language.pdf
programming assignment 2Preprocessing Before building the language.pdfprogramming assignment 2Preprocessing Before building the language.pdf
programming assignment 2Preprocessing Before building the language.pdf
 
Problema 4 Un monopolio se enfrenta a la demanda del mercado QD =.pdf
Problema 4 Un monopolio se enfrenta a la demanda del mercado QD =.pdfProblema 4 Un monopolio se enfrenta a la demanda del mercado QD =.pdf
Problema 4 Un monopolio se enfrenta a la demanda del mercado QD =.pdf
 
Preguntas para el ejercicio 34Instrucciones Para cada uno de los .pdf
Preguntas para el ejercicio 34Instrucciones Para cada uno de los .pdfPreguntas para el ejercicio 34Instrucciones Para cada uno de los .pdf
Preguntas para el ejercicio 34Instrucciones Para cada uno de los .pdf
 

Último

fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Último (20)

fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Plz help me make a code for this using pythonit must pass the abov.pdf

  • 1. Plz help me make a code for this using python it must pass the above tests. Thank you The discrete cosine transform is a powerful technique for expressing data as a sum of cosine waves, and has many applications in audio and image compression. We will use the "chunking" technique discussed in the lab activity here to compress a whole image. Given a 512512 image, stored in the variable image, you will break the image into smaller 88 chunks. Then for each chunk, you will convert to the DCT basis, drop the frequencies with relatively small contribution, then convert back to the standard basis and clip the resulting pixel values so that they lie between 0 and 255 . This image is given in gray scale, where each pixel varies from 0 to 255. To gauge which frequencies have a small contribution, use a tolerance of 10% of the largest absolute value in each particular chunk after converting it into the DCT basis. The setup code provides the helper function create_dct_basis (n), which creates an nn matrix whose columns make up the n-dimensional DCT basis. To construct your solution, write a code snippet that: - defines the function compress_chunk(chunk) that takes as argument a "chunk" of the image, with dimension 88, and returns the compressed "chunk". - make sure your compressed chunk returned from compress_chunk () contains only values between 0 an 255 , as in the original image. You may find the function numpy . clip () useful. - use your function to construct the variable compressed, which contains the compressed image. The setup code gives the following variable: Your code snippet should define the following variable: Score: 0/3 (0%) Cest Results [0/2] compress_chunk() Max points: 2 Earned points: 0 Message Your code was supposed to supply a function or callable, but the variable you supplied was not [0/1] compressed image Max points: 1 Earned points: 0 Message