Add code for edge extraction and comparison