From f0044c29c9eeee77458a5f907b74be03761265b5 Mon Sep 17 00:00:00 2001 From: Mohd Afzal Khan <79896602+AFZL210@users.noreply.github.com> Date: Tue, 4 Oct 2022 20:20:28 +0530 Subject: [PATCH 1/7] Create main.py --- scripts/OpenCV GrayImage/main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 scripts/OpenCV GrayImage/main.py diff --git a/scripts/OpenCV GrayImage/main.py b/scripts/OpenCV GrayImage/main.py new file mode 100644 index 0000000..352e56b --- /dev/null +++ b/scripts/OpenCV GrayImage/main.py @@ -0,0 +1,10 @@ +import cv2 + +cap = cv2.VideoCapture(0) + +while True: + success, img = cap.read() + grayImg = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) + cv2.imshow("Grayimage", grayImg) + cv2.imshow("image",img) + cv2.waitKey(10) From 2386b980b5b82dc32e46aaa02866b4000441fbec Mon Sep 17 00:00:00 2001 From: Mohd Afzal Khan <79896602+AFZL210@users.noreply.github.com> Date: Tue, 4 Oct 2022 20:22:57 +0530 Subject: [PATCH 2/7] Create readme.md --- scripts/OpenCV GrayImage/readme.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 scripts/OpenCV GrayImage/readme.md diff --git a/scripts/OpenCV GrayImage/readme.md b/scripts/OpenCV GrayImage/readme.md new file mode 100644 index 0000000..01facf9 --- /dev/null +++ b/scripts/OpenCV GrayImage/readme.md @@ -0,0 +1,17 @@ + +## Run Locally + +Clone the project + +Install dependencies + +```bash + pip install opencv-python +``` + +Run the main.py file + +```bash + python main.py +``` + From a3ee5241566d1f011e1b9edc158a4ad489f6ffb8 Mon Sep 17 00:00:00 2001 From: lordvader501 <60027612+lordvader501@users.noreply.github.com> Date: Wed, 5 Oct 2022 10:40:16 +0530 Subject: [PATCH 3/7] code to resize images --- scripts/Image_resizer/readme.md | 21 +++++++++++++++++++++ scripts/Image_resizer/resize.py | 11 +++++++++++ 2 files changed, 32 insertions(+) create mode 100644 scripts/Image_resizer/readme.md create mode 100644 scripts/Image_resizer/resize.py diff --git a/scripts/Image_resizer/readme.md b/scripts/Image_resizer/readme.md new file mode 100644 index 0000000..b9d6920 --- /dev/null +++ b/scripts/Image_resizer/readme.md @@ -0,0 +1,21 @@ +# IMAGE RESIZER +### Resize image to partiular dimensions. + +This python code takes image that needs to be resised and it uses Pillow module to resize the image by given dimensions entered by user and saves the resized image. + +#### Requirements: +* Install Pillow module. +* run `pip install pillow` + +### Usage +* Clone the repo +* open the `Image-resizer` folder +* copy the image that you want to resize to this folder +* open cmd in `image-resizer` folder +##### for windows +* run `python resize.py` +##### for linux +* run `python3 resize.py` +* after that type the name of the image file in images folder (ex: img.jpg, pic.png...) +* enter the dimensions in the format(eg 1024x720 , 600x300...) +* now your resized image is saved in folder. diff --git a/scripts/Image_resizer/resize.py b/scripts/Image_resizer/resize.py new file mode 100644 index 0000000..16b38a4 --- /dev/null +++ b/scripts/Image_resizer/resize.py @@ -0,0 +1,11 @@ +from PIL import Image as img +import os + +file_name = input("Enter anpe of file: ") +name , ext = file_name.split('.') +pic = img.open((os.path.join(os.path.dirname(os.path.abspath(__file__)),file_name))) + +ht, wt= input("Enter dimenstions(eg: 1024x720): ").split('x') +dim = int(ht), int(wt) +img_resize = pic.resize(dim) +img_resize.save((os.path.join(os.path.dirname(os.path.abspath(__file__)),f'{name}_resized.{ext}'))) \ No newline at end of file From 30c4e3790fe6982f9ee6c3e07c7c1e532b418d4e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 05:34:51 +0000 Subject: [PATCH 4/7] docs(contributor): contrib-readme-action has updated readme --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7c6f6ef..4c794a2 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,13 @@ Thanks a lot for spending your time helping! Keep rocking 🍻 Aswin Shailajan + + + lordvader501 +
+ Null +
+ noobyysauraj @@ -208,15 +215,15 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Aarya Chopkar
- + + akashJainAJ11
Akash Jain
- - + donheshanthaka @@ -251,13 +258,6 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Null
- - - - lordvader501 -
- Null -
From eaa1b39b8072d728db5366e097e7966f02ac5ad3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 05:39:35 +0000 Subject: [PATCH 5/7] docs(contributor): contrib-readme-action has updated readme --- README.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4c794a2..0e235df 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,13 @@ Thanks a lot for spending your time helping! Keep rocking 🍻 Prajwol Shrestha + + + AFZL210 +
+ Mohd Afzal Khan +
+ avyayjain @@ -165,15 +172,15 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Vedant Jolly
- + + Dishant10
Dishant Nagpal
- - + SiddheshKukade @@ -208,15 +215,15 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Srinjoy Pati
- + + accodes21
Aarya Chopkar
- - + akashJainAJ11 @@ -251,15 +258,15 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Nafis Adnan Mondal
- + + devtayade
Null
- - + yashbrid03 @@ -294,7 +301,8 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Sameer Sahu
- + + NishantPacharne From 616f7812d69f349396583fabcc917d61c3edcec9 Mon Sep 17 00:00:00 2001 From: Mohd Afzal Khan <79896602+AFZL210@users.noreply.github.com> Date: Wed, 5 Oct 2022 11:12:20 +0530 Subject: [PATCH 6/7] Update main.py --- scripts/OpenCV GrayImage/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/OpenCV GrayImage/main.py b/scripts/OpenCV GrayImage/main.py index 352e56b..7ee97e3 100644 --- a/scripts/OpenCV GrayImage/main.py +++ b/scripts/OpenCV GrayImage/main.py @@ -4,7 +4,10 @@ cap = cv2.VideoCapture(0) while True: success, img = cap.read() + + blurImage = cv.GaussianBlur(img,(5,5),0) grayImg = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) cv2.imshow("Grayimage", grayImg) + cv2.imshow("Blur", blurImage) cv2.imshow("image",img) cv2.waitKey(10) From 2fc7c23b89e5062df24bbd3b7abfc5292896d20d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 05:42:31 +0000 Subject: [PATCH 7/7] docs(contributor): contrib-readme-action has updated readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0e235df..6b042ff 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,13 @@ Thanks a lot for spending your time helping! Keep rocking 🍻 + + + AFZL210 +
+ Mohd Afzal Khan +
+ kriptonian1 @@ -145,13 +152,6 @@ Thanks a lot for spending your time helping! Keep rocking 🍻 Prajwol Shrestha - - - AFZL210 -
- Mohd Afzal Khan -
- avyayjain