I'm trying to programmatically analyze visual data that looks like this:

An algorithm/method/filter to detect any "corner" (green squares drawn on plot) is what I'm after.
The black dashed lines (specifically finding the slope of them) is the data I'm interested in, and for this example my current method works fine using scipy.signal find_peaks after applying a gaussian filter to smooth out the data and find the "start" and "stop" points of the black dashed lines.
g_filt_voltage = gaussian_filter1d(voltage, 100)
maxes, _ = find_peaks(g_filt_voltage, prominence=10)
mins, _ = find_peaks(g_filt_voltage, prominence=10)
corner_times = time[np.sort(np.concatenate((maxes, mins)))]
Once I have the corner_times I can easily work with the data to get what I need, but the find_peaks method has proven to be insufficient - sometimes the data starts high, and sometimes it starts low (when it starts low, no corner is detected because there is no peak change). I know there must be another way.
Is there a better mathematical concept or alternative Python function I can apply to this to more easily and accurately find these "corner" points?
Edit: I've tried using a gradient (on the raw data and on gaussian filtered data) as suggested by @AKX, but it isn't sufficient either, it only gives some of the corners:

Edit 2: I also tried 2nd derivative, but there is a problematic inflection point that makes this option not work:
Sorry for the color change, working at night
Edit 3: Rasterizing the canvas to png and then using the opencv harris corner detection gives pretty good results, but not exactly what I need. It marks interior and exterior corners, and after getting this data I don't know how to take it back after the rasterization and get the data. Still on the search for math to do this. 
