Hercule 6: Work but wrong result...
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
from PIL import Image
|
||||
import sys
|
||||
|
||||
sys.setrecursionlimit(10**5)
|
||||
|
||||
img = Image.open("laketour2.png")
|
||||
img = Image.open("laketour2_fju.png")
|
||||
@@ -80,6 +83,7 @@ def fill(x, y, pixels_to_match, pixel_to_fill, remplir_countour=False):
|
||||
for x in range(width):
|
||||
for y in range(height):
|
||||
if img.getpixel((x, y)) == noir:
|
||||
print((x,y))
|
||||
pixels, contour = fill(x, y, [noir,], vert) # on passe en vert les zones noires et on liste les points du contour
|
||||
contour_colors = list({img.getpixel((p[0], p[1])) for p in contour if p != None})
|
||||
# print(pixels, contour, contour_colors)
|
||||
|
||||
BIN
laketour2_fju.png
Normal file
BIN
laketour2_fju.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 22 KiB |
Reference in New Issue
Block a user