Skip to content

How to apply Blur filter? #24

Answered by Tushar7-coder
H1manshu21 asked this question in Q&A
Discussion options

You must be logged in to vote

Pseudocode for Blur Filter

--> Make a temporary copy of the original picture to work with.
--> For a certain pixel:- (If it's not in the edge of the picture)-:
• Find the average of the 3x3 matrix with the pixel in question at the centre for R, G and B
• Store the three averages of R, G, B in the corresponding pixel of the temporary copy image.
:- If it's on the top edge (except corner pixels):
• Find the average of the 2x3 matrix with the pixel in question at the position (1,2) for R, G and B.
• Store the three averages of R, G, B in the corresponding pixel of the temporary copy image.
:- If it's on the bottom edge (except corner pixels):
• Find the average of the 2x3 matrix with the pix…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Tushar7-coder
Comment options

Comment options

You must be logged in to vote
1 reply
@chandrakant100
Comment options

Answer selected by chandrakant100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested Important
4 participants