If instead of getting all edges, I only want edges that make 45 degree angles. What is a method to detect these? 

Would it be possible to detect all edges, then somehow run a constrained hough transform to detect which edges form 45 degrees?