tezvyn:

Removing salt-and-pepper noise

Source: interviewintermediate

WHAT IT TESTS: filter choice for impulse noise. OUTLINE: use a median filter; it replaces a pixel with the neighborhood median so extreme outliers are discarded. RED FLAG: choosing Gaussian blur, which averages outliers in and smears edges.

WHAT IT TESTS: whether you match filter type to noise type. ANSWER OUTLINE: salt-and-pepper noise sets random pixels to pure black or white extremes; a median filter replaces each pixel with the median of its neighborhood, so isolated extreme values are simply ignored because they fall at the ends of the sorted window. A Gaussian blur is a weighted average, so it folds outliers into the result and blurs edges. RED FLAG: picking a linear averaging filter or claiming blur removes impulses cleanly.

Read the original → interview

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

Removing salt-and-pepper noise · Tezvyn