This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
cv2.imshow('zebra',gray) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cv2.imwrite('zebra.png',img) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plt.figure(figsize = (30,6)) | |
plt.imshow(img) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cv2.imshow('zebra',img) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
img = cv2.imread('Zebra.jpg') | |
plt.figure(figsize = (10,6)) | |
plt.imshow(img) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!pip install opencv-python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dataset=[11,10,12,14,12,15,14,13,15,102,12,14,17,19,107,10,13,12,14,12,108,12,11,14,13,15,10,15,12,10,14,13,15,10] | |
dataset=sorted(dataset) | |
q1, q3= np.percentile(dataset,[25,75]) | |
iqr = q3 - q1 | |
lower_bound = q1 -(1.5 * iqr) | |
upper_bound = q3 +(1.5 * iqr) | |
print('lower_bound={},upper_bound={}'.format(lower_bound,upper_bound)) | |
outliers_pt=[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
outliers=[] | |
dataset=[11,10,12,14,12,15,14,13,15,102,12,14,17,19,107,10,13,12,14,12,108,12,11,14,13,15,10,15,12,10,14,13,15,10] | |
def detect_outliers(data): | |
threshold=3 | |
mean=np.mean(data) | |
std=np.std(data) | |
for i in dataset: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
data =[20,25,27,75,40,67,62,75,78,71,32,82,127,140,78,67,132,82,87,66,56,52] | |
plt.boxplot(data,vert=False) | |
plt.show() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
x = [5,7,8,10,3,17,4,9,7,9,8,9,6] | |
y = [40,36,47,48,120,46,67,48,31,134,50,35,56] | |
plt.scatter(x, y) | |
plt.show() |