0

I'm trying to compare an uploaded image with the image stored in my project's root file. I found many related work which is useful to compare images. This link (https://www.c-sharpcorner.com/uploadfile/krishnasarala/compare-two-images-in-Asp-Net/) describe how to compare images.

I just want to compare with specific part. For example, I have an image in my root directory, the image is about government authorization stamp and signature and I want to check whether the uploaded image has same signature and stamp portion or not.

I value the help.

2 Answers 2

0

Mohammad.

You can use Bitmap to crop an image to your preferences. If you cannot access Bitmap with using System.Drawing dependency, follow this answer from another StackOverflow post.

Then you can crop using this algorithm:

int cropWidth, cropHeight;
Bitmap croppedImage = new Bitmap(Image.FromFile("uploaded.jpg"), cropWidth, cropHeight);

Note that crop will not scale the image in any way.

After this, you can use several comparison algorithms that are good, depending on what you find better for your application. I found this post interesting:

Algorithm to compare two images in C#

Sign up to request clarification or add additional context in comments.

Comments

0

I suggest you follow this tutorial which uses opencv library to match the shapes. This will help you to find the solution for your requirement. https://www.youtube.com/watch?v=tNMDWRXwHjo

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.