Explain how you would design and implement a custom filter-related operation for image processing in C++.