Assignment #3
• Description : You need to implement a program to detect edges in an input image using
LoG (Laplacian of Gaussian) method.
o Input : The following five values from keyboard.
Input image file name (square size, and .ppm format (P6)).
mask size (i.e., 1(3×3), 2(5×5), 3(7×7), or 4(9×9)).
s value for mask function (integer).
k value for mask function (integer).
threshold value for edge detection (integer).
o You can use the following mask function.
int mask(int k, int s, int x, int y)
{
double temp, ans;
temp = (double)(x * x + y * y) / (double)(s * s);
ans = (double)k * (2.0 – temp) * exp(-temp / 2.0);
return(nearest_int(ans));
}
o Your program needs to do the following basically:
Get input value (image file name) above.
Perform ‘ReadPPM’ for input image.
Perform ‘CreatPPM’ for output image.
Initialize all pixel values of output image as white (255).
Generate mask (i.e., array) using input mask size, k, s, and mask function.
Convolute input image with the mask and save the results as an array,
Apply an input threshold value to the above array from the convolution
horizontally to find edges, and apply an input threshold value to the above
array from the convolution vertically to find edges.
If it satisfies the given threshold, put a black pixel into the output image
created by ‘CreatPPM’ above using ‘PutRPixel, PutGPixel, and PutBPixel’.
Perform ‘WritePPM’ for output image.
o Output : an image file (.ppm format, i.e., LoG.ppm) as edge detection result, in which
edge lines are black pixels, and all others are white pixels.
o Testing : Some images will be provided in Canvas for your testing.
• Programming Language : You need to use C and the related files provided ONLY.
• Submission :
o You only need to submit C file that you implement. If your first name is ‘abcde’ and
your last name is ‘fghij’, then the C file name should be abcfgh3.c, which is the first 3
letters of your first name and the first 3 letters of your last name combined with the
number 3.
o In the beginning of your C file, you need to provide Assignment #, your name, good
working values of mask size, s value for mask function, k value for mask function,
threshold value for edge detection for your program, which compiler (i.e., Tiny C, or
Visual Studio) used, and other comments using /* … */.
• Grading :
o No resubmission is allowed in any case after the due date, or after the grading.
o If your C file is not compiled by either Tiny C or Visual Studio, then 50% will be taken
off. We will not compile your program using any other compiler except Tiny C or
Visual Studio.
o If your program is not providing corresponding edge detection results, then 40% will
be taken off.
o If your C file is 50 % or more similar with other submitted C files, the scores of all
submissions will be ZERO %.
o If your C file is 50 % or more similar with any copies in the internet, the score of your
submissions will be ZERO %.
o If you do not use the provided modules (files in test.zip) in your program, then 50%
will be taken off for fairness purpose even if your C file is compiled and generates
correct outputs.
NRS-427V-RS Community Teaching Work Plan Proposal
NRS-427V-RS Community Teaching Work Plan Proposal Community Teaching Work Plan Proposal Directions: Develop an educational series proposal for your community using one of the following four topics: 1) Bioterrorism/Disaster 2) Environmental Issues 3) Primary Prevention/Health Promotion 4) Secondary Prevention/Screenings for a Vulnerable Population Planning Before Teaching: Name and Credentials of Teacher: Estimated Time Teaching Will […]