只有肿瘤是白色的,而另一部分是黑色的。如何计算肿瘤面积?我使用Windows作为操作系统和python3。如何计算大脑面积?
#Active Countour
image = cv2.imread(args["brain.png"])
shifted = cv2.pyrMeanShiftFiltering(image, 21, 51)
cv2.imshow("Input", image)
gray = cv2.cvtColor(shifted, cv2.COLOR_BGR2GRAY)
thresh = cv2.threshold(gray, 0, 255,
cv2.THRESH_BINARY | cv2.THRESH_OTSU)[1]
cv2.imshow("Thresh", thresh)
its show:
File "F:/Semesters/Thesis/New folder (2)/brine.py", line 157, in <module>
image = cv2.imread(args["brain.png"])
NameError: name 'args' is not defined