Thank you for the suggestion. The reason is that I want to get the specific area from the image below. But sometimes the image will vary so I think of edge detection first to detect the area I want to crop and then crop the image. Pls see the attached photo below.