Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For your last assignment, you are to write a program that will read in a set of

ID: 3579381 • Letter: F

Question

For your last assignment, you are to write a program that will read in a set of family relationships, create a relationship graph, and then answer queries about the relationships. A relationship graph will be a graph where each vertex is marked with the name of person (uniquely), and the edges are marked with the name of family relationship between the two people designated by the endpoints. The input will consist of a set of lines, one line per relationship. The line will contain three comma separated fields (name of person1, relationship between person1 and person2, name of person2). The names may contain spaces; the relationships won't contain spaces. For example if the line is "Samuel,husband,Goldie" that would mean that Samuel is Goldie's husband. The program should prompt the user for the name of a file containing the relationships, and then read the information from that file. The program should read until the end of input. The program should print to standard output. The relationships in the input are: "husband," "wife," "spouse," "son," "daughter," "child," "parent," "brother," "sister," and "sibling." Assume that names are unique, but that each person may have multiple relationships. Once the information has been read in, and the graph constructed, the program should then prompt the user for queries. The program will ask for two names, find the shortest path between those two people, and print out that path. The program should print out both the names of the people on the path and the relationships between them. For example (George -> husband -> Mary -> daughter -> Bill) would mean that George is Mary's husband and Mary is the daughter of Bill, and that is the closest relationship between George and Bill. The program should print out the most specific relationship it can deduce, e.g., brother is preferable to sibling, if that is known or can be deduced. Note that relationships are not symmetric, and the input may list a relationship in two directions: (John,brother,Sarah) and (Sarah,sister,John). Gender is important. If the program has that (John,brother,Mary) and (Susan,parent,John), and the program is given the query John,Susan, the answer should be John,son,Susan, and not John,child,Susan.

Explanation / Answer

function menutiaeTable=Finger_Print(originalImg)


img=imread(originalImg);

segImage=Segmentation(img);
normImage=Normalization(segImage);
enhancedImg=removeNoise(normImage);
binaryImg=binnary(enhancedImg,17 ,2.24 , 0.85 );%Binarization(enhancedImg);
thinningImg=bwmorph(1-binaryImg,'thin',Inf);
[menutiaeImg, menutiaeTable]=menutieaExtraction(thinningImg);


figure
imshow(enhancedImg),title('Image once take away Noise');
figure
imshow(binaryImg),title('Image once Binarization');
figure
imshow(1-thinningImg),title('Image once Thinning(Skelton)');
figure;
imshow(menutiaeImg),title('Image Ridges White(ending)-Blue(Bifiraction)');

lable='Image once take away Noise and Ridges';
margeImg(enhancedImg, menutiaeTable, lable)

lable='Image once Binarization and Ridges';
margeImg( binaryImg, menutiaeTable, lable)

lable='Thinning(Skelton) Image and Ridges';
margeImg( 1-thinningImg, menutiaeTable, lable)
function reducedResImg=reduceReselution(img)

[W,H]=size(img) ;

for i=1:1:floor(W/2) ;
for j=1:1:floor(H/2) ;
reducedResImg(i,j)=img(i*2,j*2) ;
end
end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote