altered peaks algorithm to no longer ignore pixels next to pixels of the same value