[TFUI] Re: XP and image processing
Phlip <[email protected]> Fri, 06 Jun 2008 20:30:27 -0700
| Newsgroups | gmane.comp.programming.test-first-user-interfaces |
|---|---|
| Message-ID | <[email protected]> |
--hXv42fMqTld6AKFJiZ7kYtzluPraKXJG5KlOsHt Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit [CCd to [email protected] ] 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 --hXv42fMqTld6AKFJiZ7kYtzluPraKXJG5KlOsHt Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/htm= l4/strict.dtd"> <html> <head> </head> <body style=3D"background-color: #ffffff;"> <!--~-|**|PrettyHtmlStartT|**|-~--> <div id=3D"ygrp-mlmsg" style=3D"width:655px; position:relative;"> <div id=3D"ygrp-msg" style=3D"width: 470px; margin:0; padding:0 25px 0 0; f= loat:left; z-index:1;"> <!--~-|**|PrettyHtmlEndT|**|-~--> <div id=3D"ygrp-text"> <p>[CCd to <a href=3D"mailto:testfirstuserinterfaces%40yahoogro= ups.com">testfirstuserinterf<wbr>aces@yahoogroups<wbr>.com</a> ]<br> <br> Baris Evrim Demir=F6z wrote:<br> <br> > From the first time I saw XP I thought it is a very good methodology.<= br> > But I have a questions about unit testing.<br> > As you may already know, in image processing most of the things work<b= r> > with a probability. Let's say you have a method that finds the<br> > location of faces in a given image, and this algorithm works well 98%<= br> > of the time, and gives false trues (a location that doesn't contain<br= > > any face). How do you test such a method?<br> <br> Study the source to Cairo (part of Gtk+). It uses a system called "gol= den master <br> test". Each test case (at this level) draws a little graphic, such as = one <br> diagonal line. Then the test case byte-compares the image to a png file.<br= > <br> If the test output is right and the png file is wrong, engineers replace th= e png <br> file with the new output. That's why the master files are "golden"= ; - they are <br> part of your versioned source.<br> <br> This system won't prove you match faces. TDD cannot test that crypto makes = your <br> app bulletproof, or that compression absolutely minimizes your files, or th= at a <br> Turing loop will never halt.<br> <br> This system should stop you if you make a change too big for its tolerances= . <br> This frees your edits up to make whatever change you like. Get a battery of= <br> known faces, and test that they all get recognized to within their expected= <br> variations.<br> <br> When you actually TDD, you are simply matching tests to low-level code, to = check <br> it manipulates its bits correctly. Most of your tests should run below the = level <br> of the faces.<br> <br> -- <br> Phlip<br> </p> </div>=20=20 <!--~-|**|PrettyHtmlStart|**|-~--> <span width=3D"1" style=3D"color: white;">__._,_.___</span> <!-- Start the section with Message In topic --> <div id=3D"ygrp-actbar"> <span class=3D"left"> <a href=3D"http://groups.yahoo.com/group/TestFirstUserInterfaces/= message/1012;_ylc=3DX3oDMTM0MzU0NjkwBF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQEZ3J= wc3BJZAMxNzA1MDA3MjA3BG1zZ0lkAzEwMTIEc2VjA2Z0cgRzbGsDdnRwYwRzdGltZQMxMjEyOD= A5NDM1BHRwY0lkAzEwMTI-"> Messages in this topic </a> (<span class=3D"bld">1</sp= an>) </span> <a href=3D"http://groups.yahoo.com/group/TestFirstUserInterfaces/po= st;_ylc=3DX3oDMTJwdWJsNW1rBF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQEZ3Jwc3BJZAMxN= zA1MDA3MjA3BG1zZ0lkAzEwMTIEc2VjA2Z0cgRzbGsDcnBseQRzdGltZQMxMjEyODA5NDM1?act= =3Dreply&messageNum=3D1012"> <span class=3D"bld"> Reply </span> (via web post) </a> |=20 <a href=3D"http://groups.yahoo.com/group/TestFirstUserInterfaces/po= st;_ylc=3DX3oDMTJlbzBkNDB0BF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQEZ3Jwc3BJZAMxN= zA1MDA3MjA3BHNlYwNmdHIEc2xrA250cGMEc3RpbWUDMTIxMjgwOTQzNQ--" class=3D"bld"> Start a new topic </a> </div>=20 <!------- Start Nav Bar ------> <!-- |**|begin egp html banner|**| --> <div id=3D"ygrp-vitnav"> <a href=3D"http://groups.yahoo.com/group/TestFirstUserInter= faces/messages;_ylc=3DX3oDMTJlaDVmMHBmBF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQEZ= 3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNmdHIEc2xrA21zZ3MEc3RpbWUDMTIxMjgwOTQzNQ--">Me= ssages</a>=20=20 | <a href=3D"http://groups.yahoo.com/group/TestFirstUserInte= rfaces/files;_ylc=3DX3oDMTJmdDVjMGxtBF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQEZ3J= wc3BJZAMxNzA1MDA3MjA3BHNlYwNmdHIEc2xrA2ZpbGVzBHN0aW1lAzEyMTI4MDk0MzU-">File= s</a>=20=20 | <a href=3D"http://groups.yahoo.com/group/TestFirstUserInte= rfaces/photos;_ylc=3DX3oDMTJlMzk2anY2BF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQEZ3= Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNmdHIEc2xrA3Bob3QEc3RpbWUDMTIxMjgwOTQzNQ--">Pho= tos</a>=20=20 | <a href=3D"http://groups.yahoo.com/group/TestFirstUserInte= rfaces/links;_ylc=3DX3oDMTJmbWpic2FnBF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQEZ3J= wc3BJZAMxNzA1MDA3MjA3BHNlYwNmdHIEc2xrA2xpbmtzBHN0aW1lAzEyMTI4MDk0MzU-">Link= s</a>=20=20 | <a href=3D"http://groups.yahoo.com/group/TestFirstUserInte= rfaces/database;_ylc=3DX3oDMTJjNTZsNWRrBF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQE= Z3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNmdHIEc2xrA2RiBHN0aW1lAzEyMTI4MDk0MzU-">Datab= ase</a>=20=20 | <a href=3D"http://groups.yahoo.com/group/TestFirstUserInte= rfaces/polls;_ylc=3DX3oDMTJmcDcwYm43BF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQEZ3J= wc3BJZAMxNzA1MDA3MjA3BHNlYwNmdHIEc2xrA3BvbGxzBHN0aW1lAzEyMTI4MDk0MzU-">Poll= s</a>=20=20 | <a href=3D"http://groups.yahoo.com/group/TestFirstUserInte= rfaces/members;_ylc=3DX3oDMTJlMHIyOTNyBF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQEZ= 3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNmdHIEc2xrA21icnMEc3RpbWUDMTIxMjgwOTQzNQ--">Me= mbers</a>=20=20 | <a href=3D"http://groups.yahoo.com/group/TestFirstUserInte= rfaces/calendar;_ylc=3DX3oDMTJkYTE5NTdrBF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQE= Z3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNmdHIEc2xrA2NhbARzdGltZQMxMjEyODA5NDM1">Calen= dar</a>=20=20 </div>=20=20 <!-- |**|end egp html banner|**| --> <div id=3D"ygrp-grft"> =20=20=20=20=20=20=20=20=20=20 </div> =20=20=20=20=20=20 <div id=3D"ygrp-mkp"> <div id=3D"hd">MARKETPLACE</div> <div id=3D"ads"> <div class=3D"ad"> <a href=3D"http://us.ard.yahoo.com/SIG=3D13rqsboqi/M=3D624381.1= 2730922.13032918.10835568/D=3Dgroups/S=3D1705007207:MKP1/Y=3DYAHOO/EXP=3D12= 12816635/L=3D/B=3DQYoRAdFJq10-/J=3D1212809435566555/A=3D5368227/R=3D0/SIG= =3D14evd63no/*http://media.adrevolver.com/adrevolver/href?banner=3D189158&p= lace=3D26143&url_=3Dhttp://tc.deals.yahoo.com/tc/blockbuster/display.com?ci= d=3Dbbi00027">Blockbuster is giving away a free trial of Blockbuster Total = Access to smart movie lovers like you.</a> <!--AdRevolver code begin--> <script type=3D"text/javascript"> <!-- var title =3D 'TITLE'; try { if (title =3D=3D unescape('%u0054%u0049%u0054%u004C%u0045') && document.tit= le) title =3D document.title; var https =3D false; try {https =3D document.location.href.indexOf('https')= =3D=3D0}catch(e){} document.write('<img width=3D"0" height=3D"0" border=3D"0" src=3D"http' + (= https ? 's' : '') + '://media.adrevolver.com/adrevolver/trace?adpath=3D1195= 9&title=3D' + escape(title) + '&ref=3D' + escape(document.referrer) + '&rnd= =3D' + Math.round(Math.random() * 10000000) + '">'); } catch(e){} //--> </script> <noscript> <img width=3D"0" height=3D"0" border=3D"0" src=3D"https://media.adrevolver.= com/adrevolver/trace?adpath=3D11959"> </noscript> <!--AdRevolver code end--> </div> </div> </div> =20=20=20=20=20=20 <!-- yahoo logo --> <!-- |**|begin egp html banner|**| --> <div id=3D"ygrp-ft"> <a href=3D"http://groups.yahoo.com/;_ylc=3DX3oDMTJkY212cTA4BF9TAzk3Mz= U5NzE0BGdycElkAzg3NDQ3MDQEZ3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNmdHIEc2xrA2dmcARzd= GltZQMxMjEyODA5NDM1"> <img src=3D"http://us.i1.yimg.com/us.yimg.com/i/yg/img/logo/ma_grp_16= 0.gif" height=3D"15" width=3D"106" border=3D"0" alt=3D"Yahoo! Groups"></a> = <br> <a href=3D"http://groups.yahoo.com/group/TestFirstUserInterfaces/join= ;_ylc=3DX3oDMTJmZTMyNjBlBF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQEZ3Jwc3BJZAMxNzA= 1MDA3MjA3BHNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzEyMTI4MDk0MzU-">Change settings = via the Web</a> (Yahoo! ID required) <br> Change settings via email: <a href=3D"mailto:TestFirstUserInterfaces-= [email protected]?subject=3DEmail Delivery: Digest">Switch delivery to= Daily Digest</a> | <a href =3D "mailto:TestFirstUserInterfaces-traditional= @yahoogroups.com?subject=3DChange Delivery Format: Traditional">Switch form= at to Traditional</a> <br> <a href=3D"http://groups.yahoo.com/group/TestFirstUserInterfaces;_ylc= =3DX3oDMTJkaWU1dDVjBF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQEZ3Jwc3BJZAMxNzA1MDA3= MjA3BHNlYwNmdHIEc2xrA2hwZgRzdGltZQMxMjEyODA5NDM1"> Visit Your Group=20 </a> | <a href=3D"http://docs.yahoo.com/info/terms/"> Yahoo! Groups Terms of Use </a> | <a href=3D"mailto:TestFirstUserInterfaces-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org= ?subject=3D"> Unsubscribe </a>=20 </div> <!-- |**|end egp html banner|**| --> </div> <!-- ygrp-msg --> =20=20 <!-- Sponsor --> <!-- |**|begin egp html banner|**| --> <div id=3D"ygrp-sponsor" style=3D"width:160px; float:right; clear:none; m= argin:0 0 25px 0; background:white;"> <!-- Network content --> =20=20=20=20 <!-- Start Recommendations --> <div id=3D"ygrp-reco"> </div> <!-- End Recommendations --> <!-- Start vitality --> <div id=3D"ygrp-vital"> <div id=3D"vithd">Recent Activity</div> <ul style=3D"list-style-type:none; padding: 0; margin: 2px 0;"> <li style=3D"clear: both;"> <div class=3D"ct" style=3D"float: right;"><span style=3D"display:none= "> </span>1</div> <div class=3D"cat"><a href=3D"http://groups.yahoo.com/group/TestFirst= UserInterfaces/members;_ylc=3DX3oDMTJmYjF0cm9rBF9TAzk3MzU5NzE0BGdycElkAzg3N= DQ3MDQEZ3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwN2dGwEc2xrA3ZtYnJzBHN0aW1lAzEyMTI4MDk0= MzU-">New Members</a></div> </li> =20=20 =09=09=20=20=20=20 =09=09=20=20=20=20 =09=09=20=20=20=20 =09=09=20=20=20=20 =09=09=20=20=20=20 </ul> <a href=3D"http://groups.yahoo.com/group/TestFirstUserInterfa= ces;_ylc=3DX3oDMTJldHUwNXE1BF9TAzk3MzU5NzE0BGdycElkAzg3NDQ3MDQEZ3Jwc3BJZAMx= NzA1MDA3MjA3BHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTIxMjgwOTQzNQ--"> Visit Your Group </a> </div>=20 =09=20=20=20=20=09=20=20=20=20=09=20=20=20=20=20=20 <!-- Network content --> <div id=3D"nc"> <div class=3D"ad"> <div id=3D"hd1">Yahoo! Finance</div>=20 <p><a href=3D"http://us.ard.yahoo.com/SIG=3D13ol7vt9j/M=3D493064.12016257.1= 2445664.8674578/D=3Dgroups/S=3D1705007207:NC/Y=3DYAHOO/EXP=3D1212816635/L= =3D/B=3DQooRAdFJq10-/J=3D1212809435566555/A=3D4507179/R=3D0/SIG=3D12de4rskk= /*http://us.rd.yahoo.com/evt=3D50284/*http://finance.yahoo.com/personal-fin= ance">It's Now Personal</a></p>=20 <p>Guides, news,</p>=20 <p>advice & more.</p> </div> <div class=3D"ad"> <div id=3D"hd1">Special K Group</div>=20 <p><a href=3D"http://us.ard.yahoo.com/SIG=3D13p26u6ro/M=3D493064.12016300.1= 2445692.11323196/D=3Dgroups/S=3D1705007207:NC/Y=3DYAHOO/EXP=3D1212816635/L= =3D/B=3DQ4oRAdFJq10-/J=3D1212809435566555/A=3D5170416/R=3D0/SIG=3D11b5gu1oe= /*http://new.groups.yahoo.com/specialKgroup">on Yahoo! Groups</a></p>=20 <p>Learn how others</p>=20 <p>are losing pounds.</p> </div> <div class=3D"ad"> <div id=3D"hd1">New business?</div>=20 <p><a href=3D"http://us.ard.yahoo.com/SIG=3D13oggl9fn/M=3D493064.12016308.1= 2445700.8674578/D=3Dgroups/S=3D1705007207:NC/Y=3DYAHOO/EXP=3D1212816635/L= =3D/B=3DRIoRAdFJq10-/J=3D1212809435566555/A=3D3848640/R=3D0/SIG=3D131an6mds= /*http://searchmarketing.yahoo.com/arp/srchv2.php?o=3DUS2002&cmp=3DYahoo&ct= v=3DGroups1&s=3DY&s2=3D&s3=3D&b=3D50">Get new customers.</a></p>=20 <p>List your web site</p>=20 <p>in Yahoo! Search.</p> </div> </div> =09=20=20=20=20 </div> <!-- |**|end egp html banner|**| --> <div style=3D"clear:both; color: #FFF; font-size:1px;">.</div> </div> <img src=3D"http://geo.yahoo.com/serv?s=3D97359714/grpId=3D8744= 704/grpspId=3D1705007207/msgId=3D1012/stime=3D1212809435/nc1=3D4507179/nc2= =3D5170416/nc3=3D3848640" width=3D"1" height=3D"1"> <br> =09 <span style=3D"color: white;">__,_._,___</span> <!--~-|**|PrettyHtmlEnd|**|-~--> </body> <!--~-|**|PrettyHtmlStart|**|-~--> <head> <style type=3D"text/css"> <!-- #ygrp-mkp{ border: 1px solid #d8d8d8; font-family: Arial; margin: 14px 0px; padding: 0px 14px; } #ygrp-mkp hr{ border: 1px solid #d8d8d8; } #ygrp-mkp #hd{ color: #628c2a; font-size: 85%; font-weight: bold; line-height: 122%; margin: 10px 0px; } #ygrp-mkp #ads{ margin-bottom: 10px; } #ygrp-mkp .ad{ padding: 0 0; } #ygrp-mkp .ad a{ color: #0000ff; text-decoration: none; } --> </style> </head> <head> <style type=3D"text/css"> <!-- #ygrp-sponsor #ygrp-lc{ font-family: Arial; } #ygrp-sponsor #ygrp-lc #hd{ margin: 10px 0px; font-weight: bold; font-size: 78%; line-height: 122%; } #ygrp-sponsor #ygrp-lc .ad{ margin-bottom: 10px; padding: 0 0; } --> </style> </head> <head> <style type=3D"text/css"> <!-- #ygrp-mlmsg {font-size:13px; font-family: arial,helvetica,clean,sans-serif= ;*font-size:small;*font:x-small;} #ygrp-mlmsg table {font-size:inherit;font:100%;} #ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-s= erif;} #ygrp-mlmsg pre, code {font:115% monospace;*font-size:100%;} #ygrp-mlmsg * {line-height:1.22em;} #ygrp-text{ font-family: Georgia;=09 } #ygrp-text p{ margin: 0 0 1em 0; } #ygrp-tpmsgs{ font-family: Arial;=09 clear: both; } #ygrp-vitnav{ padding-top: 10px; font-family: Verdana; font-size: 77%; margin: 0; } #ygrp-vitnav a{ padding: 0 1px; } #ygrp-actbar{ clear: both; margin: 25px 0; white-space:nowrap; color: #666; text-align: right; } #ygrp-actbar .left{ float: left; white-space:nowrap; } .bld{font-weight:bold;} #ygrp-grft{ font-family: Verdana; font-size: 77%; padding: 15px 0; } #ygrp-ft{ font-family: verdana; font-size: 77%; border-top: 1px solid #666;=20 padding: 5px 0;=20 } #ygrp-mlmsg #logo{ padding-bottom: 10px; } #ygrp-reco { margin-bottom: 20px; padding: 0px; } #ygrp-reco #reco-head { font-weight: bold; color: #ff7900; } #reco-grpname{ font-weight: bold; margin-top: 10px; } #reco-category{ font-size: 77%; } #reco-desc{ font-size: 77%; } #ygrp-vital{ background-color: #e0ecee; margin-bottom: 20px; padding: 2px 0 8px 8px; } #ygrp-vital #vithd{ font-size: 77%; font-family: Verdana; font-weight: bold; color: #333; text-transform: uppercase; } #ygrp-vital ul{ padding: 0; margin: 2px 0; } #ygrp-vital ul li{ list-style-type: none; clear: both; border: 1px solid #e0ecee;=20=20 } #ygrp-vital ul li .ct{ font-weight: bold; color: #ff7900; float: right; width: 2em; text-align:right; padding-right: .5em; } #ygrp-vital ul li .cat{ font-weight: bold; } #ygrp-vital a{ text-decoration: none; } #ygrp-vital a:hover{ text-decoration: underline; } #ygrp-sponsor #hd{ color: #999; font-size: 77%; } #ygrp-sponsor #ov{ padding: 6px 13px; background-color: #e0ecee; margin-bottom: 20px; } #ygrp-sponsor #ov ul{ padding: 0 0 0 8px; margin: 0; } #ygrp-sponsor #ov li{ list-style-type: square; padding: 6px 0; font-size: 77%; } #ygrp-sponsor #ov li a{ text-decoration: none; font-size: 130%; } #ygrp-sponsor #nc{ background-color: #eee; margin-bottom: 20px; padding: 0 8px; } #ygrp-sponsor .ad{ padding: 8px 0; } #ygrp-sponsor .ad #hd1{ font-family: Arial; font-weight: bold; color: #628c2a; font-size: 100%; line-height: 122%; } #ygrp-sponsor .ad a{ text-decoration: none; } #ygrp-sponsor .ad a:hover{ text-decoration: underline; } #ygrp-sponsor .ad p{ margin: 0; } o{font-size: 0; } .MsoNormal{ margin: 0 0 0 0; } #ygrp-text tt{ font-size: 120%; } blockquote{margin: 0 0 0 4px;} .replbq{margin:4} --> </style> </head> <!--~-|**|PrettyHtmlEnd|**|-~--> </html><!--End group email --> --hXv42fMqTld6AKFJiZ7kYtzluPraKXJG5KlOsHt--