Hi all,

I need help developing an application which detects if 2 images show the same person or not.... something as retina scan, which compares webcam captured image with one stored on the system.....

Thanks.....

Dani AI

Generated

Following 's goal (compare a webcam capture with a stored photo) and echoing 's point about learning the similarity theory first, the shortest reliable path is: capture → detect/align → embed → compare. The notes below give a practical, implementation-ready roadmap for an ASP.NET prototype plus pitfalls and choices to consider.

A compact workflow:

  • Client: capture a still from the browser webcam (getUserMedia), convert to a blob/base64 and POST to the server.
  • Server: run face detection, crop and align by landmarks, produce a numeric face embedding (FaceNet/ArcFace-style model), then compare embeddings with a distance or cosine-similarity threshold.
  • Storage: keep per-person embeddings (one or several vectors), not just raw images, and compare new embeddings to stored ones for verification.

Example capture snippet (browser):

const video = document.querySelector('video');
navigator.mediaDevices.getUserMedia({ video: true })
  .then(stream => video.srcObject = stream);

function captureDataUrl() {
  const c = document.createElement('canvas');
  c.width = video.videoWidth; c.height = video.videoHeight;
  c.getContext('2d').drawImage(video,0,0);
  return c.toDataURL('image/jpeg'); // send to server
}

Server-side choices and a tiny compare helper:

  • Fast prototype: cloud face APIs (have .NET SDKs) — simplest but sends biometric data off-site.
  • Local: OpenCV wrappers for .NET (EmguCV/OpenCvSharp), DlibDotNet, or host a small Python service (dlib/face_recognition) and call it from ASP.NET.
  • Comparison uses embeddings; example cosine function:
    static double CosineSimilarity(float[] a, float[] b) {
    double dot=0, na=0, nb=0;
    for(int i=0;i<a.Length;i++) { dot += a[i]*b[i]; na += a[i]*a[i]; nb += b[i]*b[i]; }
    return dot / (Math.Sqrt(na)*Math.Sqrt(nb));
    }

    Thresholds depend on the model and dataset and must be calibrated with validation images.

Troubleshooting & cautions: illumination, pose, occlusion and low resolution kill accuracy — align faces by eyes/landmarks, normalize size, and use multiple enrollment images per person. Store embeddings (not plain photos) and log false accepts/rejects to refine thresholds. Remember legal/privacy implications when storing/transmitting biometric data. Study classical methods (Eigenfaces/LBPH) to understand tradeoffs before moving to deep embeddings, as suggested.

Recommended Answers

All 8 Replies

What exactly do you need help with?

I need to compare pictures and detect if they are of the same person or not. This wud basically involve matching some of the basic facial fetaures like eyes, nose, lips, etc.... So, I need help as to how to start making such an asp.net application.....

I think you'll need to research HOW to determine similarity first (the theory behind it). You'll need to be able to detect and compare facial features. If you understand how that works then worry about ASP.NET.

Thanks for the reply, will definitely look for the it. Do let me know if you come across any relevant articles.... Thanks once again....

Thanks a lot...

Can anyone please help me further with this article?

Thanks....

What do you need help with? Can you be more specific?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.