Image processing - blur an image- write a program to


PROJECT ASSIGNMENT: Image Processing - Blur an Image

Write a program to simulate image processing An image file is simulated by a 2D array of ints. Shell code is provided in HW5_image_shell.cpp. The program includes the following functions:

• Open an image file (input a 2D array of ints from a text file). The first two numbers from the file are the dimension of the image (2D array), the first number is height (# of rows) and the second number is width (# of columns). Next comes the 2D array stored in row order (row 0, row1, ...). There should be (# of rows) × (# of columns) integers. Sometimes an image file has been corrupted (not invalid dimension or not enough numbers in the file). You need to test and report such a file.

• Process an image file (blur the image).

• Print out blurred image on screen.

You need to add code to ADD #1-3:

• ADD #1: declaration of function blur
• ADD #2: implementation of function openOneImage. Your function should work as specified in the given declaration (pre, post conditions).
• ADD #3: implementation of function blur

Your .cpp file should also contain:

• Algorithms (pseudo code) for functions openOneImage and blur. Add them as block comments at the beginning of the source code file. If you choose to draw flowchart, include it in your HW document instead.

• Pre- and Post- condition comments for each function.

• /*IN*/, /*OUT*/, /*INOUT*/ comments to function parameters

You're not supposed to modify the given code in other unspecified manners.

Test your program with the four testing cases (four image?.txt files in HW5.zip) and provide screenshots of your running program. Explain how each testing case is different.

Save a copy of your regular project work before attempting the extra credit work. When completed, you need to submit two separate programs, one for the regular project and the other with the extra credit work.

Input image file:

Approach 2: pixels without certain neighbors are processed based on available neighbors

Blurred result:

Test your program with the four testing cases again and provide screenshots of your running program.

Write a paragraph or two explaining the changes you made to your project to implement approach 2.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Image processing - blur an image- write a program to
Reference No:- TGS02684903

Expected delivery within 24 Hours