Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Difference between thresholding function

$
0
0
Hi Guys I have two set of codes for thresholding > Code 1 import cv2 import numpy as np Image = cv2.imread('blue.jpg') Threshold = np.zeros(Image.shape, np.uint8) cv2.threshold(Image, 121, 255, cv2.THRESH_BINARY, Threshold) cv2.imshow("WindowName", Threshold ) cv2.waitKey(0) cv2.destroyAllWindows() and > Code 2 import cv2 import numpy as np Image = cv2.imread('blue.jpg') ret, thresh = cv2.threshold(Image, 121, 255, cv2.THRESH_BINARY) cv2.imshow("WindowName", thresh ) cv2.waitKey(0) cv2.destroyAllWindows() What is the difference between these two thresh functions

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>