I am new to C# and I’m trying to detect basic geometric shapes (squares, circles, triangles, and rectangles) in a bitmap image without using external libraries like Emgu CV. I want the detection to work dynamically, meaning it should not be affected by the rotation or size of the shapes.
So far, I have tried migrating and implementing Python OpenCV methods in C#, but I haven’t had any success. Could someone provide guidance or examples on how to approach this problem using only C#’s built-in functionalities?
Here is what I have so far:
Loading the bitmap image.
Converting the image to grayscale.
Applying edge detection (e.g., using the Canny algorithm).
Attempting to find and classify shapes.
Specific issues:
How to accurately detect edges and corners of shapes.
How to classify the detected shapes based on their geometric properties.
Any advice or examples would be greatly appreciated.
RashidKandah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1