Top Tutors
The team is composed solely of exceptionally skilled graduate writers, each possessing specialized knowledge in specific subject areas and extensive expertise in academic writing.
Click to fill the order details form in a few minute.
Posted: October 14th, 2022
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.
We prioritize delivering top quality work sought by students.
The team is composed solely of exceptionally skilled graduate writers, each possessing specialized knowledge in specific subject areas and extensive expertise in academic writing.
Our writing services uphold the utmost quality standards while remaining budget-friendly for students. Our pricing is not only equitable but also competitive in comparison to other writing services available.
Guaranteed Plagiarism-Free Content: We assure you that every product you receive is entirely free from plagiarism. Prior to delivery, we meticulously scan each final draft to ensure its originality and authenticity for our valued customers.
When you decide to place an order with Dissertation Help, here is what happens:
Place an order in 3 easy steps. Takes less than 5 mins.