View denoising2.py
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") | |
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) | |
denoised = cv2.fastNlMeansDenoisingColored(img, denoised, 15, 10, 50) | |
plt.imshow(denoised) |
View denoising.py
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("frag.png") | |
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) | |
denoised = cv2.fastNlMeansDenoising(img, denoised, 15, 10, 50) | |
plt.imshow(denoised) |
View rescaling1.py
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") | |
#print(img.shape) | |
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) | |
large = cv2.resize(img, (800, 500)) | |
plt.imshow(large) |
View rescaling.py
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") | |
#print(img.shape) | |
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) | |
half = cv2.resize(img, (0,0), fx = 0.5, fy = 0.5) | |
plt.imshow(half) |
View bi_lat_filter.py
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") | |
bi_lat = cv2.bilateralFilter(img,9,75,75) | |
cv2.imshow('Bi_lateral',bi_lat) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
View gaussian_blur.py
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") | |
gblur = cv2.GaussianBlur(img,(5,5),0) | |
cv2.imshow('Gaussian',gblur) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
View median_blur.py
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") | |
median = cv2.medianBlur(img,5) | |
cv2.imshow('median',median) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
View avg.py
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") | |
blur = cv2.blur(img,(5,5)) | |
cv2.imshow('blur',blur) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
View otsu.py
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
ret, thresh9 = cv2.threshold(img1,100 , 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU) | |
cv2.imshow('otsu',thresh8) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
View guassian_adaptive.py
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
thresh8 = cv2.adaptiveThreshold(img1, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 33,15) | |
cv2.imshow('text',thresh8) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
NewerOlder