Hi All,
I am trying to implement an algorithm for the detection of the document presence in C# ( with .NET Framework 4.6.2). There is a document holder where the document is inserted. The document holder background is red. In front of the document holder there is a camera that takes a photo and the document presence must be detected from the image of this photo. I implemented an algorithm that calculate mean and variance of the pixels of the grayscale image bitmap. So if they are within a certain threshold, the algorithm detects the document presence. There can be several problems that cause me to return an incorrect result:
Do you have any better ideas?
Many thanks.
I am trying to implement an algorithm for the detection of the document presence in C# ( with .NET Framework 4.6.2). There is a document holder where the document is inserted. The document holder background is red. In front of the document holder there is a camera that takes a photo and the document presence must be detected from the image of this photo. I implemented an algorithm that calculate mean and variance of the pixels of the grayscale image bitmap. So if they are within a certain threshold, the algorithm detects the document presence. There can be several problems that cause me to return an incorrect result:
- possible light reflection;
- the document holder can be worn out;
- the camera may not be positioned correctly so the white or black edges cause a wrong result.
Do you have any better ideas?
Many thanks.