Search the web
Sign In
New User? Sign Up
TestFirstUserInterfaces
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: XP and image processing   Message List  
Reply | Forward Message #1012 of 1051 |
[CCd to testfirstuserinterfaces@yahoogroups.com ]

Baris Evrim Demiröz wrote:

> From the first time I saw XP I thought it is a very good methodology.
> But I have a questions about unit testing.
> As you may already know, in image processing most of the things work
> with a probability. Let's say you have a method that finds the
> location of faces in a given image, and this algorithm works well 98%
> of the time, and gives false trues (a location that doesn't contain
> any face). How do you test such a method?

Study the source to Cairo (part of Gtk+). It uses a system called "golden master
test". Each test case (at this level) draws a little graphic, such as one
diagonal line. Then the test case byte-compares the image to a png file.

If the test output is right and the png file is wrong, engineers replace the png
file with the new output. That's why the master files are "golden" - they are
part of your versioned source.

This system won't prove you match faces. TDD cannot test that crypto makes your
app bulletproof, or that compression absolutely minimizes your files, or that a
Turing loop will never halt.

This system should stop you if you make a change too big for its tolerances.
This frees your edits up to make whatever change you like. Get a battery of
known faces, and test that they all get recognized to within their expected
variations.

When you actually TDD, you are simply matching tests to low-level code, to check
it manipulates its bits correctly. Most of your tests should run below the level
of the faces.

--
Phlip



Sat Jun 7, 2008 3:30 am

phlipcpp
Offline Offline
Send Email Send Email

Forward
Message #1012 of 1051 |
Expand Messages Author Sort by Date

[CCd to testfirstuserinterfaces@yahoogroups.com ] ... Study the source to Cairo (part of Gtk+). It uses a system called "golden master test". Each test case...
Phlip
phlipcpp
Offline Send Email
Jun 7, 2008
3:30 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help