An Optical Method for Determining Opening-Mode and Edge Sliding-Mode Stress-Intensity Factors