The math part is language independent.
There are books about image manipulation out there, many highly theoretical.
Lowpass and highpass filters work essentially the same as in electronics, so filter theory books for that should work as well.
Start out writing a simple filter, and work your way up

Essentially a basic filter takes a pixel and based on its value and a mathematical formula performs some operation on pixels surrounding it.
For example, a very simple filter indeed would just decrease that value by a set amount:
---------------
| -1 | -1 | -1 |
| -1 | 0 | -1 |
| -1 | -1 | -1 |
---------------
If you consider a pixel to be a single value (greyscale) for now, putting this matrix over a pixel would decrease (darken) all pixels surrounding it slightly.
That's the easiest example. Once you get something like this working, more complex filters are possible to do things like edge detection and working on larger areas.
But the math involved quickly gets rather complex. Now I don't mind complex math (it used to be a hobby of mine as well as part of my study) but I'm no expert at this and my knowledge is rather rusty.