diff --git a/projet/ReadMe.md b/projet/ReadMe.md index b1c9bc24cdaf2d60f7eff840fd0b932d187469cc..8a7ffd592a55df5d2222854e0d253ce3a78f5919 100644 --- a/projet/ReadMe.md +++ b/projet/ReadMe.md @@ -10,3 +10,6 @@ #### **20/03/24 :** - Work on Block.py and Decouper_Image.py + +#### **27/03/24 :** +- I remade functions decouper, added functions list_col and is_col_close. Made functions average_color, divide_blocks to class Block using the functions previously made. diff --git a/projet/codes/Block.py b/projet/codes/Block.py index 35e9dc1d6eaf2036dd30a51b519430724484d8c4..71ce2572f32c4297b6fe64c2808b0c8c60a978d7 100644 --- a/projet/codes/Block.py +++ b/projet/codes/Block.py @@ -5,7 +5,8 @@ """ from PIL import Image, ImageDraw -from color import * +from Color import * +from Decouper_Image import * class Block: def __init__(self, image): diff --git a/projet/codes/color.py b/projet/codes/Color.py similarity index 96% rename from projet/codes/color.py rename to projet/codes/Color.py index 7856c9cd04ba039ebf4fbf3d3c2a036a9957ee4f..ea1d5ccd115a52127a6b4ec9a107b18b664fff3b 100644 --- a/projet/codes/color.py +++ b/projet/codes/Color.py @@ -1,5 +1,8 @@ -# KINADINOVA Dariya -# Images récursives +""" +:author: dariya kinadinova +:date: 03/2024 + +""" from PIL import Image, ImageDraw diff --git a/projet/codes/Decouper_Image.py b/projet/codes/Decouper_Image.py index d2b834b62a9a4799da9cd7de751f362031ab457f..ed35a02ffe585abf45aca9a2c0c379704dbf4739 100644 --- a/projet/codes/Decouper_Image.py +++ b/projet/codes/Decouper_Image.py @@ -1,3 +1,9 @@ +""" +:author: dariya kinadinova +:date: 03/2024 + +""" + from PIL import Image, ImageDraw diff --git a/projet/codes/Image_Recursive.py b/projet/codes/Image_Recursive.py new file mode 100644 index 0000000000000000000000000000000000000000..bf5db5796d5db53f07df70d137cfb0b85f6a81c7 --- /dev/null +++ b/projet/codes/Image_Recursive.py @@ -0,0 +1,38 @@ +""" +:author: dariya kinadinova +:date: 03/2024 + +""" +import sys +from PIL import Image, ImageDraw +from Color import * +from Decouper_Image import * +from Block import * + +def Image_Recursive(image: Image, order: int): + """à_remplacer_par_ce_que_fait_la_fonction + + Précondition : + Exemple(s) : + $$$ + + """ + im = image.convert('RGB') + b = Block(im) + if order != 0: + allblocks = b.divide_blocks() + allb = [Image_Recursive(b1.image, order -1) for b1 in allblocks] + if all(b1.is_uniform) + + + +def main(): + """à_remplacer_par_ce_que_fait_la_fonction + + Précondition : + Exemple(s) : + $$$ + + """ + + \ No newline at end of file diff --git a/projet/calbuth.png b/projet/codes/calbuth.png similarity index 100% rename from projet/calbuth.png rename to projet/codes/calbuth.png