Dual slope edge detection for a phototransistor
One thing you could do (if I am not mistaken) is swap the inputs of the opamp above, then you get a rising edge detector. Then AND the two outputs togehter. Or use a circuit like the one below. (or if you need a different detection level then modify the input's of the comparators below like your circuit)

Here is a circuit that will do rising, falling or zero detection.


Source: https://www.edaboard.com/showthread.php?270878-i-need-to-detect-rising-edge-of-pulse