Project On Opencv New
Project On Opencv New
Project On Opencv New
Awais Amjad
Project :
Open cv
import cv2
img = cv2.imread("pic.jpg")
cv2.imshow("BC",img)
Output:
Detect Edges of objects in an image:
Code:
t_upper = 150
cv2.imshow('edge', edge)
Code:
Detect Contours in an image:
Code:
cv2.imshow('Contours', img)
Output:
Blending Images:
Code:
mountain = cv2.imread('mountain1.jpg')
# Read image2
dog = cv2.imread("mountain5.jpg")
cv2.imshow("BLend",img)
img = cv2.imread("mountain1.jpg")
Output:
img = cv2.imread("mountain1.jpg")
b, g, r = cv2.split(img)
Output:
Draw Histogram of an image:
Code:
plt.plot(histr)
plt.show()
Output:
import numpy as np
Output:
import numpy as np
cv2.waitKey(0)
cv2.distroyAllWindows()
Output: