Skip to content
Snippets Groups Projects
Commit 136b3817 authored by niklasBr's avatar niklasBr
Browse files

Added comments

parent 21ad18a2
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,7 @@ class Image: ...@@ -86,7 +86,7 @@ class Image:
def trim_lines(lines): def trim_lines(lines):
for i in range(len(lines)): for i in range(len(lines)):
lines[i] = lines[i].removesuffix('\n') lines[i] = lines[i].removesuffix('\n')
return lines return lines
@staticmethod @staticmethod
def check_for_magic_number(lines): def check_for_magic_number(lines):
......
...@@ -14,6 +14,7 @@ class Kernel: ...@@ -14,6 +14,7 @@ class Kernel:
sub_matrix = border_behavior.get_submatrix_list([height, width], matrix) sub_matrix = border_behavior.get_submatrix_list([height, width], matrix)
result = 0 result = 0
for a, b in zip(self.filter_list, sub_matrix): for a, b in zip(self.filter_list, sub_matrix):
if type(b) == type("string"): if type(b) == type("string"):
b = int(b) b = int(b)
......
...@@ -37,6 +37,8 @@ def aufgabe2(): ...@@ -37,6 +37,8 @@ def aufgabe2():
e.convolve(boxfilter_27, zero_p_bb, "./images/Ergebnis2-27.pgm") e.convolve(boxfilter_27, zero_p_bb, "./images/Ergebnis2-27.pgm")
#bekannte Bugs: Beide Prewitt-Filter erzeugen links auf mittlerer Höhe ein Quadrat an weißen Pixeln, die schwarz bleiben sollten
# Boxfilter verdunkelt das Bild
if __name__ == "__main__": if __name__ == "__main__":
aufgabe1() aufgabe1()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment