potential edges are thinned down to curves with width of pixel and hysteresis based thresholding is used to label all points above specific high threshold as edges and then recursively use the low threshold value to label points above the low threshold as edges connected to any of the previously labeled points the following code applied the canny edge detector to our sample images in [ ]from skimage feature import canny cat_edges canny(cgssigma= dog_edges canny(dgssigma= fig plt figure(figsize ( , )ax fig add_subplot( , ax imshow(cat_edgescmap='binary'ax fig add_subplot( , ax imshow(dog_edgescmap='binary'figure - canny edge detection to extract edge based features the image plots based on the edge feature arrays depicted in figure - clearly show the prominent edges of our cat and dog you can use these edge feature arrays (cat_edges and dog_edgesby flattening themextracting pixel values and positions pertaining to the edges (non-zero values)or even by aggregating them like finding out the total number of pixels making edgesmean valueand so on object detection another interesting technique in the world of computer vision is object detection where features useful in highlighting specific objects in the image are detected and extracted the histogram of oriented gradientsalso known as hogis one of the techniques that' extensively used in object detection going into the details of this technique would not be possible in the current scope but for the process of feature engineeringyou need to remember that the hog algorithm works by following sequence of steps similar to edge detection the image is normalized and denoised to remove excess illumination effects first order image gradients are computed to capture image attributes like contourtextureand so on gradient histograms are built on top of these gradients based on specific windows called cells finally these cells are normalized and flattened feature descriptor is obtainedwhich can be used as feature vector for our models the following code shows the hog object detection technique on our sample images in [ ]from skimage feature import hog from skimage import exposure