Added code for C-Ridge extraction