[Solved] CS 6810/7810: Wavelets and Wavelet Algorithms Assignment 7

$25

File Name: CS_6810_7810__Wavelets_and_Wavelet_Algorithms_Assignment_7.zip
File Size: 546.36 KB

SKU: [Solved] CS 6810/7810: Wavelets and Wavelet Algorithms Assignment 7 Category: Tag:
5/5 - (1 vote)

Learning Objectives1. 2D Ordered Inverse HWTIntroductionThis will be the last assignment on 2D HWT. You will implement the 2D Ordered Inverse HWT.ProblemExtend your class TwoDHWT.java from Assignment 6 with the following static method that applies the 2D Ordered InverseHWT to the 2D Haar Wavelet Transform of some 2D signal sig_hwt. The second argument num_inv_iters speci esthe number of inverse iterations we will apply to sig_hwt. The third argument num_fwd_iter speci es the number offorward iterations of the 2D Ordered HWT to the original signal. The four argument dbg_flag is the argument I use toturn on or o various debugging messages.TwoDHWT.ordInvDWTForNumIters(sig_hwt, num_inv_iters, num_fwd_iters, dbg_flag) {}You can implement the following test method:static void test_ordFwdInvHWT2(double[][] sig, int num_fwd_iters, int num_inv_iters, boolean dbg_flag) {TwoDHWT.ordFwdDWTForNumIters(sig, num_fwd_iters, dbg_flag);if ( dbg_flag ) {System.out.println(================);System.out.println(Forward HWT Transform);display2DArray(sig, sig.length, sig[0].length);}TwoDHWT.ordInvDWTForNumIters(sig, num_inv_iters, num_fwd_iters, dbg_flag);if ( dbg_flag ) {System.out.println(Inverse HWT Transform);display2DArray(sig, sig.length, sig[0].length);}}Create the class WaveletAlgos_S17_HW07.java with several 2D signals, as de ned below. You can use these signals fordebugging your implementation of the 2D Ordered Inverse HWT. Note that the method TwoDHWT.ordFwdDWTForNumItershas a third boolean argument set to false.public class WaveletAlgos_S17_HW07 {static double[][] signal_4x4 = {{9,7,6,2},{5,3,4,4},{8,2,4,0},{6,0,2,2}};1static double[][] signal_8x8 = {{8, 5, 4, 8, 6, 8, 10, 8},{8, 10, 10, 4, 10, 4, 8, 2},{6, 10, 2, 4, 2, 6, 1, 6},{0, 8, 0, 10, 10, 6, 6, 10},{8, 8, 8, 0, 4, 8, 6, 2},{10, 6, 2, 2, 6, 6, 6, 8},{2, 4, 10, 10, 10, 4, 6, 10},{10, 6, 10, 6, 6, 4, 4, 4}};public static double[][] img_sample_16x16_01 = {{255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255}};public static double[][] img_sample_16x16_02 = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};}Let us run a few tests. Here is the rst test with its output right below it.public static void main(String[] args) {test_ordFwdInvHWT2(signal_4x4, 2, 1, true);}================Forward HWT Transform4.0 1.0 1.0 1.01.0 0.0 3.0 1.02.0 0.0 0.0 1.01.0 0.0 0.0 1.0Inverse HWT Transform6.0 1.0 4.0 1.022.0 0.0 0.0 1.04.0 3.0 2.0 1.01.0 0.0 0.0 1.0Here is the second test with its output right below it.public static void main(String[] args) {test_ordFwdInvHWT2(signal_4x4, 2, 2, true);}================Forward HWT Transform4.0 1.0 1.0 1.01.0 0.0 3.0 1.02.0 0.0 0.0 1.01.0 0.0 0.0 1.0Inverse HWT Transform9.0 7.0 6.0 2.05.0 3.0 4.0 4.08.0 2.0 4.0 0.06.0 0.0 2.0 2.0You can also test your implementation of the 2D Ordered Inverse HWT on the images from the previous assignment.What To SubmitSubmit your WaveletAlgos_S17_HW07.java and TwoDHWT.java with your implementation of ordInvDWTForNumIters()or their Py equivalents via Canvas.Happy Hacking!3

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS 6810/7810: Wavelets and Wavelet Algorithms Assignment 7[Solved] CS 6810/7810: Wavelets and Wavelet Algorithms Assignment 7
$25