Python OpenCV – Image manipulation

import cv2
import numpy as np

#some common functions to manipulate image

img = cv2.imread(r'image_3_leds.jpg')

scale_percent = 10 # percent of original size
width = int(img.shape[1] * scale_percent / 100)
height = int(img.shape[0] * scale_percent / 100)
dim = (width, height)
# resize image
img = cv2.resize(img, dim, interpolation = cv2.INTER_AREA) 

imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

# the ksize(kernel size (9,9))must be odd number, its like how pixels
#combine into one. The bigger the num the more blur
imgBlur = cv2.GaussianBlur(img, (9,9), 0)

#Canny edge detection image, the higher the threshold(100,100)
#the less edge detection(less white lines)
imgCanny = cv2.Canny(img, 100,100)
imgCanny_less = cv2.Canny(img, 150,200)

cv2.imshow('Colour Image' , img)
cv2.imshow('Gray Image' , imgGray)
cv2.imshow('Blur Image' , imgBlur)
cv2.imshow('Canny Image' , imgCanny)
cv2.imshow('Canny Image Less' , imgCanny_less)


if cv2.waitKey(0) & 0xFF == ord('q'):
    cv2.destroyAllWindows()
Top: Gray, blur and Canny_less. Bottom: Original and Canny