Post cleanup

main
Gasper Spagnolo 2022-11-06 16:58:40 +01:00
parent 9ef3629e00
commit 616ce52732
4 changed files with 12 additions and 9 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
__pycache__
.venv/

View File

@ -141,11 +141,11 @@ def excercise_two() -> None:
size where the value of pixels is determined by whether the value of the corresponding size where the value of pixels is determined by whether the value of the corresponding
pixels in the source image is greater or lower than the given threshold. pixels in the source image is greater or lower than the given threshold.
""" """
two_a() #two_a()
two_b('./images/bird.jpg', 100, 20) #two_b('./images/bird.jpg', 100, 20)
two_c('./images/bird.jpg', 20, 100) two_c('./images/bird.jpg', 20, 100)
two_d() #two_d()
two_e(uz_image.imread_gray('./images/bird.jpg', uz_image.ImageType.uint8).astype(np.uint8)) #two_e(uz_image.imread_gray('./images/bird.jpg', uz_image.ImageType.uint8).astype(np.uint8))
def two_a() -> tuple[npt.NDArray[np.float64], npt.NDArray[np.uint8]]: def two_a() -> tuple[npt.NDArray[np.float64], npt.NDArray[np.uint8]]:
@ -223,6 +223,7 @@ def two_c(image_path: str, number_of_bins_first: int, number_of_bins_second: int
image_uint8 = uz_image.imread_gray(image_path, uz_image.ImageType.uint8) image_uint8 = uz_image.imread_gray(image_path, uz_image.ImageType.uint8)
image_float64 = uz_image.imread_gray(image_path, uz_image.ImageType.float64) image_float64 = uz_image.imread_gray(image_path, uz_image.ImageType.float64)
print(image_uint8)
H01 = uz_image.get_image_bins(image_uint8, number_of_bins_first) H01 = uz_image.get_image_bins(image_uint8, number_of_bins_first)
H02 = uz_image.get_image_bins(image_uint8, number_of_bins_second) H02 = uz_image.get_image_bins(image_uint8, number_of_bins_second)
@ -294,11 +295,11 @@ def two_e(image: npt.NDArray[np.uint8]):
###################################################### ######################################################
def excercise_three() -> None: def excercise_three() -> None:
#three_a() three_a()
#mask1, _ = three_b() mask1, _ = three_b()
#three_c(uz_image.imread('./images/bird.jpg', uz_image.ImageType.float64), mask1) #three_c(uz_image.imread('./images/bird.jpg', uz_image.ImageType.float64), mask1)
#three_d() #three_d()
three_e() #three_e()
def three_a() -> None: def three_a() -> None:
@ -509,9 +510,9 @@ def three_e():
def main() -> None: def main() -> None:
excercise_one() #excercise_one()
excercise_two() excercise_two()
excercise_three() #excercise_three()
if __name__ == "__main__": if __name__ == "__main__":
main() main()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.