What is the best algorithm or library i can use for detecting specific shapes of lines?, e.g ekg lines, i want to detect very specific patterns, I havent been able to build my f