This is a VERY simple object detection program developed in pure CSharp with no external libraries as a proof of concept and as a guide for people who want to learn the basic ideas of object detection.
There are detailed comments on the code which would guide you along the way, please go through them, especially the 'ImageProcessor.cs' and 'Detection.cs' files.
The methods employed in this project are far from 'optimized' and shall not be used to do anything other than learning about how object detection works, in short: "THIS IS NOT THE BEST WAY (NOR IS IT A VERY GOOD WAY)" to detect objects in images.
The methods used in this project are purely for people who are new to object detection and wants to learn how it works, if you are looking for some good frameworks to use for a project or task, I would recommend that you go with something like OpenCV or TensorFlow or CNTK, they have tonnes on guides and tutorials and have all the hard-work done for you and are a lot better than this in terms of accuracy and perfomance.
The 'UBitmap' class used in this project comes from SaxxonPike's answer here: C# - Faster Alternatives to SetPixel and GetPixel for Bitmaps for Windows Forms App
Have a nice day, Dani