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) diff --git a/README.md b/README.md new file mode 100644 index 0000000..72540cb --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Image processing + +

+1. Image blur operation + +2. Histogram Equalisation for contrast + +3. Feature (Edge) detection + +4. Noise creation