diff --git a/images/Aquarius-Star-Trek-Starfleet-logo-magnet-small.jpeg b/images/Aquarius-Star-Trek-Starfleet-logo-magnet-small.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..b7aa8f07133846c20878d24aa19a530a98ae81f5 Binary files /dev/null and b/images/Aquarius-Star-Trek-Starfleet-logo-magnet-small.jpeg differ diff --git a/images/Example/Saturn/Box.jpeg b/images/Example/Saturn/Box.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..bb0e72df4443d676c8b8aa77a7f1bbd64696dd9a Binary files /dev/null and b/images/Example/Saturn/Box.jpeg differ diff --git "a/images/Example/Saturn/Gau\303\237.jpeg" "b/images/Example/Saturn/Gau\303\237.jpeg" new file mode 100644 index 0000000000000000000000000000000000000000..9f07ade15885e7bd9111ebbcaf3ebabca1060f9f Binary files /dev/null and "b/images/Example/Saturn/Gau\303\237.jpeg" differ diff --git a/images/Example/Saturn/Laplace.jpeg b/images/Example/Saturn/Laplace.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..c30837ec804dba6aafc46e00bf83cccebeda7906 Binary files /dev/null and b/images/Example/Saturn/Laplace.jpeg differ diff --git a/images/Example/Saturn/Laplace_Edge_Extraction.jpeg b/images/Example/Saturn/Laplace_Edge_Extraction.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..2b7c1ffa20928e605b5400dff4d3c2a436324f7a Binary files /dev/null and b/images/Example/Saturn/Laplace_Edge_Extraction.jpeg differ diff --git a/images/Example/Saturn/Max.jpeg b/images/Example/Saturn/Max.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0b2c21dc0c6969490f172dcb86362f4bedb5277a Binary files /dev/null and b/images/Example/Saturn/Max.jpeg differ diff --git a/images/Example/Saturn/Median.jpeg b/images/Example/Saturn/Median.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..e887536e90f75a2feffd7a886de37778fd4c53a4 Binary files /dev/null and b/images/Example/Saturn/Median.jpeg differ diff --git a/images/Example/Saturn/Min.jpeg b/images/Example/Saturn/Min.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..8089c2f4ddf0f7bf3c1e8807faeef67c65580dfc Binary files /dev/null and b/images/Example/Saturn/Min.jpeg differ diff --git a/images/Example/Saturn/Modiefied_Laplace_Edge_Extraction.jpeg b/images/Example/Saturn/Modiefied_Laplace_Edge_Extraction.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..2203cf40e8aca24e9491eb4d75b519d12570a60b Binary files /dev/null and b/images/Example/Saturn/Modiefied_Laplace_Edge_Extraction.jpeg differ diff --git a/images/Example/Saturn/Modified_Laplace.jpeg b/images/Example/Saturn/Modified_Laplace.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..af515666ae8ba07aaeddc25594c60a194e08d9f2 Binary files /dev/null and b/images/Example/Saturn/Modified_Laplace.jpeg differ diff --git a/images/Example/White_Plain_In_White_Sky/Laplacian.py b/images/Example/White_Plain_In_White_Sky/Laplacian.py new file mode 100644 index 0000000000000000000000000000000000000000..aa4b7cefcd6febec7150b2e9cc73e59abcbee2c2 --- /dev/null +++ b/images/Example/White_Plain_In_White_Sky/Laplacian.py @@ -0,0 +1,40 @@ +from tokenize import String + +from skimage import io + +from pixel import * + + +class Editor(object): + + def __init__(self, origin_path: String, edit_path: String): + """ + This class is the editor which edits a given image and stores a new one. + + :param origin_path: The original image which should be edited. + :param edit_path: The edited image which should be stored. + """ + self.image_path = origin_path + self.edit_path = edit_path + + def do_convolution_with(self, option: String) -> None: + """ + This method iterates over the image and changes each pixel by a given method. + Notice, that the image must be a RGB-image (MxNx3). + + :param option: The options defined in FILTER. + :return: None + """ + image = io.imread(fname=self.image_path) + height, width, _ = image.shape # len(image), len(image[0, 0:, 0:]) wont work for .png-images. + edited_image = np.zeros((height, width, 3), dtype=np.float64) + edited_pixels = 0 + for v in range(height): + for u in range(width): + pixel = Pixel(image, v, u) + edited_image[v, u] = pixel.filter_with(option) + edited_pixels += 1 + if edited_pixels % 10000 == 0: + print('Finished with: ' + str(edited_pixels) + ' of ' + str(width * height)) + + io.imsave(arr=edited_image, fname=self.edit_path)