1 | initial version |
If your image is more or less black and white, getting the peaks is fairly easy. Write an algorithm that follows the sine wave and you get its pixel positions. Computing the peaks is then simply done by comparing the positions if the x or y value (column/row) starts decreasing instead of increasing and vice versa.
I don't how how thick your wave is, but by skeletonization, you can get a one pixel wide line which would be easier to check for deformities and stuff.
I don't have much time atm, so can't offer you any code, but I hope that I could have been of help.