I have used Magick.NET to detect all the edges using Canny Edge Detection which basically converts an image to a binary version where the edges are in white and the rest of the image black However I have failed in using the library HoughLine method to detect rectangles or squares on the image. The image however has a very perfect square on it and would like to know which library or algorithm I can use to detect the rectangle on that image, Thank You. Below is my code
//add reference to image magick
using ImageMagick;
//this code is inside a method
//create a new instance of Magick Image
MagickImage image = new MagickImage("image1.jpg");
//detect that the edges on the image
image.CannyEdge();
//Save the image with edges
image.Write("output.jpg");
//how can I use this library or any other library to detect the rectangle on the image