Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion 1/3_avg_neigh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Image processing

<br><br>
1. Image blur operation

2. Histogram Equalisation for contrast

3. Feature (Edge) detection

4. Noise creation