diff --git a/Answers_Bianca/Task1.png b/Answers_Bianca/Task1.png new file mode 100644 index 0000000..1d3522c Binary files /dev/null and b/Answers_Bianca/Task1.png differ diff --git a/Answers_Bianca/Task2.png b/Answers_Bianca/Task2.png new file mode 100644 index 0000000..949ff99 Binary files /dev/null and b/Answers_Bianca/Task2.png differ diff --git a/Answers_Bianca/details.md b/Answers_Bianca/details.md new file mode 100644 index 0000000..adb5c47 --- /dev/null +++ b/Answers_Bianca/details.md @@ -0,0 +1,4 @@ +Name: Bianca Sawant +Registration no: 241071067 +Branch: Computer Engineering +Email ID: basawant_b24@ce.vjti.ac.in \ No newline at end of file diff --git a/Answers_Bianca/task1_Bianca.py b/Answers_Bianca/task1_Bianca.py new file mode 100644 index 0000000..5dec4db --- /dev/null +++ b/Answers_Bianca/task1_Bianca.py @@ -0,0 +1,15 @@ +import cv2 + +img= cv2.imread('Task1.png') + +no=0 + +for y in range(img.shape[0]): + for x in range(img.shape[1]): + pixel=img[y,x] + if (pixel != [255, 255, 255]).all(): + print(pixel) + print(f"Coordinates are: y-coordinate:{y} x-coordinate:{x}") + no+=1 + +print(f"Number of non white pixels is: {no}" ) \ No newline at end of file diff --git a/Answers_Bianca/task2_Bianca.py b/Answers_Bianca/task2_Bianca.py new file mode 100644 index 0000000..61bfb63 --- /dev/null +++ b/Answers_Bianca/task2_Bianca.py @@ -0,0 +1,18 @@ +import cv2 + +img= cv2.imread('Task2.png') + +morse="" + +for y in range(img.shape[0]): + for x in range(img.shape[1]): + pixel=img[y,x] + if (pixel == [255, 255, 255]).all(): + morse+="." + elif (pixel == [0, 0, 0]).all(): + morse+="-" + else: + morse+=" " + +print(morse) + \ No newline at end of file