Spaces:
Runtime error
Runtime error
Commit
·
e8bec2b
1
Parent(s):
b42839f
Update optic1.py
Browse files
optic1.py
CHANGED
@@ -41,16 +41,16 @@ def optic1(ans_txt,pathImage, save_images= True):
|
|
41 |
rectCon = functions.rectContour(contours)
|
42 |
biggestContour = functions.getCornerPoints(rectCon[0])
|
43 |
secondContour = functions.getCornerPoints(rectCon[1])
|
44 |
-
thirdContour = functions.getCornerPoints(rectCon[2])
|
45 |
-
fourthContour = functions.getCornerPoints(rectCon[3])
|
46 |
|
47 |
#main
|
48 |
if biggestContour.size != 0 and secondContour.size != 0:
|
49 |
|
50 |
cv2.drawContours(imgBiggestContour, biggestContour,-1,(0,255,0),20)
|
51 |
cv2.drawContours(imgBiggestContour, secondContour,-1,(255,0,0),20) #sondk' kalinlik ortada renk
|
52 |
-
|
53 |
-
|
54 |
|
55 |
biggestContour=functions.reorder(biggestContour)
|
56 |
#cevap siklari icin -************************************************************
|
|
|
41 |
rectCon = functions.rectContour(contours)
|
42 |
biggestContour = functions.getCornerPoints(rectCon[0])
|
43 |
secondContour = functions.getCornerPoints(rectCon[1])
|
44 |
+
#thirdContour = functions.getCornerPoints(rectCon[2])
|
45 |
+
#fourthContour = functions.getCornerPoints(rectCon[3])
|
46 |
|
47 |
#main
|
48 |
if biggestContour.size != 0 and secondContour.size != 0:
|
49 |
|
50 |
cv2.drawContours(imgBiggestContour, biggestContour,-1,(0,255,0),20)
|
51 |
cv2.drawContours(imgBiggestContour, secondContour,-1,(255,0,0),20) #sondk' kalinlik ortada renk
|
52 |
+
# cv2.drawContours(imgBiggestContour, thirdContour,-1,(0,0,255),20) #sondk' kalinlik ortada renk
|
53 |
+
# cv2.drawContours(imgBiggestContour, fourthContour,-1,(0,0,20),20) #sondk' kalinlik ortada renk
|
54 |
|
55 |
biggestContour=functions.reorder(biggestContour)
|
56 |
#cevap siklari icin -************************************************************
|