Question
1. Create a java program that will print out the following statistics about an image (gray-level image of one channel). A color image must be
1. Create a java program that will print out the following statistics about an image (gray-level image of one channel). A color image must be converted to gray level using the utility functions provided to you. a. Overall mean of the image b. Overall variance of the image c. The dynamic range of the image
2. As an application of the mean, you will also create a function that will take an image, a top-left corner coordinate, a block size and a sub-block size and return an image that has the passed block blurred (by blurring the subblocks within it) a. For example, you would specify the block at I,J of a given block size (for example 32). You will then identify the block and break it into sub-blocks (for example of size 4). For each subblock, you will then compute the mean and replace all the pixels in the subblock by their mean. b. The subblocks will be blurred because you replaced every pixel with its mean. c. You can access the subblocks with a double loop that starts at I,J and increment by the subblock size
for( i
for(int j=J; j { Identify subblock Calculate mean Replace each pixel by the mean with proper cast and clipping }
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