From 1d41ad13109fbedbaed19669342010f99c2f3531 Mon Sep 17 00:00:00 2001 From: Tejas1908 <36530921+Tejas1908@users.noreply.github.com> Date: Thu, 11 Oct 2018 13:44:59 +0530 Subject: [PATCH 1/3] Create README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c166ef0 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# image-processing + +
+1. Image blur operation +2. Histogram Equalisation for contrast +3. Feature (Edge) detection +4. Noise creation From d0283e925a316e209d6fad4f4fa69b6da38fb429 Mon Sep 17 00:00:00 2001 From: Tejas1908 <36530921+Tejas1908@users.noreply.github.com> Date: Thu, 11 Oct 2018 13:45:39 +0530 Subject: [PATCH 2/3] Update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c166ef0..72540cb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ -# image-processing +# Image processing -
+

1. Image blur operation + 2. Histogram Equalisation for contrast + 3. Feature (Edge) detection + 4. Noise creation From fae7ba0bd2a7976054d5c29bb4394223c6e7c766 Mon Sep 17 00:00:00 2001 From: Tejas1908 <36530921+Tejas1908@users.noreply.github.com> Date: Mon, 14 Oct 2019 12:32:20 +0530 Subject: [PATCH 3/3] Update 3_avg_neigh.py --- 1/3_avg_neigh.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/1/3_avg_neigh.py b/1/3_avg_neigh.py index 9ffce1b..51ee121 100644 --- a/1/3_avg_neigh.py +++ b/1/3_avg_neigh.py @@ -12,7 +12,8 @@ def blurn(n, img): start = floor(n/2) start = int(start) end = n - start - + + # for all the pixels , replace the value with the average of the values of the neighbouring pixels for j in range(start, x - start): for i in range(start, y - start): z = img[i - start:i + end, j - start:j + end] @@ -24,6 +25,7 @@ def blurn(n, img): def main(n=3): print(n) + # read the image in grayscale img = cv2.imread('img.png', cv2.IMREAD_GRAYSCALE) new = np.array(img, dtype='int') new = blurn(n, new)