Question
Need help JAVA problem Take any 256x256 8 bit grayscale image. Generate an image with the following spatial resolutions: i) 128 (256/2) using 2x2 matrix
Need help JAVA problem
Take any 256x256 8 bit grayscale image.
Generate an image with the following spatial resolutions:
i) 128 (256/2) using 2x2 matrix ii) 64, using 4x4 matrix iii) 32 using 8x8 matrix iv) 16 using 16x16 matrix. The resulting image should still be 256x256. ie the image will be pixelated
to do this, read every byte of image above into a two dimension array having same dimension as image. then by iterating into 2d array as the mask is applied (mask is through each grouping of values and average of each group is calculated).
ii) Then apply quantization to image. for image above, each pixel is 256 gray level = 8 bit. reduce this to 16 gray level (4 bit) , 2 bit and 1 bit.
Here, every byte of file is read into a two dimension array with same dimension as image file. we then iterate through 2d array dividing by a divisor to scale down bit size. this is run for each pixe3l in image. the result is then output to a pgm image file.
Let me know if you have any questions
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started