Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Subject: Numerical Methods Materials: Finite Difference Method Please build a program using python for detecting the edge of objects in the black and white image.

image text in transcribed

image text in transcribed

Subject: Numerical Methods Materials: Finite Difference Method Please build a program using python for detecting the edge of objects in the black and white image. The edge detection uses gradient calculation. [The problem is, I am not allowed to use OpenCV like my code below, I must make my own algorithm. But I don't know how, could you give me an example using two pictures below?] import cv2 //importing opency import numpy as np //importing numpx from matplotlib import pyplot as plt //importing matplot library img = cv2.imread('89.png',0) I/reading the input image edges = cv2.Canny(img, 100,200) // Applying Canny algorithm with arguments // this part is for ploting the image on the screen plt.subplot(121),plt.imshow(img.cmap = 'gray') plt.title('Original Image"), plt.xticks([]), plt.yticks([]) plt.subplot(122),plt.imshowledges.cmap = 'gray') plt.title('Edge Image"), plt.xticks([]), plt.yticks([]) plt.show() Notes: Please give me the code & the results, as well as a detailed explanation of the code and detailed explanations of the result of edge detecting, so I could have understanding of the materials, thank you very much. Picture: I googled this picture below by writing "black and white picture cate" and "black and white fruit still life

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

Body mass index (BMI) is a reliable measure of obesity.

Answered: 1 week ago