Update app.py
Browse files
app.py
CHANGED
|
@@ -405,10 +405,10 @@ def allLevelsofColor(BlackmaskDetected,img,levelonly, invertedmask,color,finalCo
|
|
| 405 |
cnt=component[0]
|
| 406 |
hier=component[1]
|
| 407 |
area1 = cv2.contourArea(cnt)
|
| 408 |
-
if (area1 >
|
| 409 |
if hier[3]> -1:
|
| 410 |
cv2.drawContours(Blackmask,[cnt],0,(255,255,255), -1)
|
| 411 |
-
cv2.drawContours(Blackmask,[cnt],0,(0,0,0),
|
| 412 |
cv2.drawContours(BlackmaskDetected,[cnt],0,(255,255,255), -1)
|
| 413 |
|
| 414 |
firstLevel=cv2.bitwise_and(invertedmask,invertedmask,mask=Blackmask)
|
|
|
|
| 405 |
cnt=component[0]
|
| 406 |
hier=component[1]
|
| 407 |
area1 = cv2.contourArea(cnt)
|
| 408 |
+
if (area1 > 500 ):
|
| 409 |
if hier[3]> -1:
|
| 410 |
cv2.drawContours(Blackmask,[cnt],0,(255,255,255), -1)
|
| 411 |
+
cv2.drawContours(Blackmask,[cnt],0,(0,0,0), 25)
|
| 412 |
cv2.drawContours(BlackmaskDetected,[cnt],0,(255,255,255), -1)
|
| 413 |
|
| 414 |
firstLevel=cv2.bitwise_and(invertedmask,invertedmask,mask=Blackmask)
|