import cv2;
import numpy as np;
from matplotlib import pyplot as plt;

def detect_edges(image_file):
    img = cv2.imread(image_file, 0);
    edges = cv2.Canny(img, 100, 200);

    plt.subplot(121);
    plt.title('Original Image');
    plt.imshow(img);

    plt.subplot(122);
    plt.title('Edge Image');
    plt.imshow(edges);

    plt.show();


detect_edges('animal_pics/tiger.jpg')

d59c341994339b23695fe3f088b97873079dcd63
<mask token>

<mask token>


def detect_edges(image_file):
    img = cv2.imread(image_file, 0)
    edges = cv2.Canny(img, 100, 200)
    plt.subplot(121)
    plt.title('Original Image')
    plt.imshow(img)
    plt.subplot(122)
    plt.title('Edge Image')
    plt.imshow(edges)
    plt.show()


<mask token>

<mask token>


def detect_edges(image_file):
    img = cv2.imread(image_file, 0)
    edges = cv2.Canny(img, 100, 200)
    plt.subplot(121)
    plt.title('Original Image')
    plt.imshow(img)
    plt.subplot(122)
    plt.title('Edge Image')
    plt.imshow(edges)
    plt.show()


detect_edges('animal_pics/tiger.jpg')

import cv2
import numpy as np
from matplotlib import pyplot as plt


def detect_edges(image_file):
    img = cv2.imread(image_file, 0)
    edges = cv2.Canny(img, 100, 200)
    plt.subplot(121)
    plt.title('Original Image')
    plt.imshow(img)
    plt.subplot(122)
    plt.title('Edge Image')
    plt.imshow(edges)
    plt.show()


detect_edges('animal_pics/tiger.jpg')

import cv2;
import numpy as np;
from matplotlib import pyplot as plt;

def detect_edges(image_file):
    img = cv2.imread(image_file, 0);
    edges = cv2.Canny(img, 100, 200);

    plt.subplot(121);
    plt.title('Original Image');
    plt.imshow(img);

    plt.subplot(122);
    plt.title('Edge Image');
    plt.imshow(edges);

    plt.show();


detect_edges('animal_pics/tiger.jpg')
