First pass at weighted median filtering section.