Boost your Grades with us today!

Image Processing – Pointers, Class & Dynamic Data

This file should interface with the supplied windows GUI interface to allow images to be resampled to smaller sizes and be tinted.Please read the included Project Specification for more detailed descriptions of the project.In this assignment, we will be laying the foundation for a larger photo-mosiac project.We will be finding the average color in a larger block of pixels (aka re-sampling).This technique is often used to generate smaller versions of big images. (think of a thumbnail of the original image)In this assignment we will be writing a program that can:1.)Allow simple loading and saving of images.2.)Break a loaded image up into blocks of a given width and height and find the average color in that block.3.)Create a new image from the process in 2 that will consist of 1 pixel per every block analyzed in the first image.4.)Apply a red, green, or blue tint to an image by increasing the appropriate RGB values to every pixel in the image.5.)Invert the individual RGB color components of an image.The functions in this file should be completed as follows:bool loadImageFromFile(string filename)INPUTS: a string containing a path to a file to open. This value is returned from theuser’s selection in the open file dialog.OUTPUTS: a boolean indicating whether or not the image could be opened correctly.void saveImageToFile(string filename)INPUTS: a string containing a path to save the current image out to.OUTPUTS: NONEimage* displayImage()INPUTS: NONEOUTPUTS: This function should return a pointer to the image object that is currently being viewed on the screen.If a user has loaded an image correctly, you should return a pointer to an image object containing the base image.If a user has used the shrink button (aka averageRegions function) or performed any of the red/green/blue filters,you should of course return a pointer to an image object that reflects these changes.void averageRegions(int blockWidth, int blockHeight)INPUTS: Integers indicating the width and height of the blocks?to be averagedOUTPUTS: NONEWhen this function is called, you should create a new image that will consist of 1 pixel for every block of sizeblockWidth by blockHeight pixels in the original image, with each pixel being the average color of the pixels in thatregion in the original image.Please note that it may be easier if you split this into 2 functions and call your helper function from within this one.The second function could then just calculate the average value of a block of pixels given to it, and return thatto the original function to be used. However, this implementation is up to you! Complete it as you see fit.void increaseRedValues(int value)INPUTS: An integer indicating the amount to increase the red component of each pixel.OUTPUTS: NONEWhen this function is called, you should take the current image and increase the red component of eachpixel in the image by the amount specified. Please note that an RGB value has a maximum of 255 and a minimum of 0.void increaseGreenValues(int value)INPUTS: An integer indicating the amount to increase the green component of each pixel.OUTPUTS: NONEWhen this function is called, you should take the current image and increase the green component of each pixelin the image by the amount specified. Please note that an RGB value has a maximum of 255 and a minimum of 0.void increaseBlueValues(int value)INPUTS: An integer indicating the amount to increase the blue component of each pixel.OUTPUTS: NONEWhen this function is called, you should take the current image and increase the blue component of each pixelin the image by the amount specified. Please note that an RGB value has a maximum of 255 and a minimum of 0.void grayImage( )INPUTS: NONEOUTPUTS: NONEWhen this function is called you should convert the current image to gray image.For each pixel, you calculate the average of aver = (R+G+B)/3, then replace thepixel value using (aver,aver,aver) for R, G, B values.void addNoise()INPUTS: NONEOUTPUTS: NONEWhen this function is called you should randomly replace 10% of the pixels with noises in the current image. To createthe noise, you should also randomly generate the R,G,B values for the noise pixel.Bonuse function (30 points)void deNoise()INPUTS: NONEOUTPUTS: NONEWhen this function is called you should denoise the image to remove the noise.In order to remove the noise, you need to travel every single pixel. For every pixel,you calculate the average pixel from its neighbor (you can use a n*n block for itsneighbor, n can be changed). Then replace the pixel by average neighbor pixel.*/

Looking for a Similar Assignment? Our Experts can help. Use the coupon code SAVE30 to get your first order at 30% off!