By: Iliya Yordanov on: Thu 12 of Oct, 2006 [19:18 UTC] (18534 reads)
|
Contest 10: Fingerprints scanner
Difficulty: Advanced
Time frame: 12 Oct - 16 Nov 2006
Status: Open
|
|
(6910 bytes)
|
|
 |
Contest 10: Fingerprints scanner
Difficulty: Advanced
Time Frame: 12 Oct -16 Nov - 2006
Status: Finished...awaiting results.
Managed by: Iliya Yordanov
Participants - 5 |
Problem
Hello everyone!
This time, the contest will be advanced...for the gurus!
What you will have to do is a basic 'fingerprint' comparison. Among several tests, you will be given a pair of fingerprints, and your function will have to decide whether the two provided fingerprints are equal or not.
Of course, creating a sophisticated program to do real fingerprint comparison is difficult, so, for our contest, you will be given something much simpiler than a real fingerprint.
Here are few examples that will go into the tests:
pic1

pic2

Another example of two equal fingerprints, this time, one of them has some missing dots (bad ink when taking them...):


Example of very complex fingerprint:

All given 'fingerprints' will look similar to that. Some of them- more complex, others- less complex, and some- the same complexity.
This time, the testing criteria will be quite different. Here's how it will work...
For each test (for a single test, you can consider one invokation of your function, giving it 2 fingerprints to compare), your function shall return an integer in the range 0 to 100. This return integer will represent percentage (%) of certainty that the two fingerprints are equal. Please, pay attention here- not % showing the equallity of the pictures, but % showing how certain your function is, that the two fingerprints are equal. Take pic1 and pic2 for example. These two are equal fingerprints. Equal means they belong to the same person. But if you look at it graphically, then they are not equal...there are some differences in them...pic1 has thiner lines than pic2. This is because in pic2 the person pushed his finger harder to the paper (when giving his fingerprint), so, the lines got thicker. Now, if we suppose that your function works 100% accurately, it should return 100, which means it is absolutely sure that the two fingerprints belong to the same person (i.e. they are equal). If your function is absolutely sure two fingerprints are not equal, it should return 0. Any interger between 0 and 100 is allowed as a return. Anything beyond this range (0-100) is not allowed!
Now, let me explain how you will collect points, based on your results:
The neutral answer is 50 (50% means that you are equally sure or unsure). If your function returns 50, no matter whether the fingerprints are equal or not, you will not be given, nor taken any points. So, your function returning 50 would be just like skipping this particular test case.
Now, there are only two cases left: if your function returns more than 50 and less than 50. If it returns more than 50 and the fingerprints are equal, then your score will be the result multiplied by 'k', where 'k' starts with 1 and increases with 0.3 with every next test case (since every next test case will have higher complexity). If your function returns more than 50 and the fingerprints are not equal, then the result multiplied by 'k' will be substracted from your total score. If your function returns less than 50 and the two fingerprints are equal, then (100 - Your_Result)*k will be substracted from your score. If your function returns less than 50 and the two fingerprints are not equal, then (100 - Your_Result)*k will be added to your score.
So generally speaking, results above 50 means equal, and results below 50 means not equal.
Who will win? Simple- the one with higher score and at leas 1 correct answer. Correct answer is considered when your function returns more or less than 50 and it is correct. In case there are two or more people with equal score, the winning one will be the one that had less execution time on the tests.
Few notes:
- The background will always be white (RGB: 255,255,255)
- The fingerprints themselves may vary slightly in color...from gray to black.
- The fingerprints will not be rotated.
- The image format will always be .bmp
- The image size will always be w:240 h:243, 71dpi (just like the given example images), 24-bit depth
Discuss Contest 10 in the forums
Submission information:
Optimize for: correct results and speed
Function prototype (you must have that function!): public static int Contest10(String picApath, String picBpath);
Send only the function (and all helper functions, if any), to:admin@csharp-home.com
Write this as subject in your e-mail: Contest 10 Solution
End date: 16 Nov 2005 , 19:00h GMT Time
If you have any questions and/or comments, please, send them to admin@csharp-home.com