These fields are all optional and need only
be supplied if you would like a direct reply.
Subject
Your email address
Your real name
You must answer this!
If you don't, my spam filtering will
ensure that I never see your email.
What's 8 plus five (in digits only)?
Please make your changes here and then
Editing tips and layout rules.
File: TesseractTeaser ''' <link rel="alternate" type="application/rss+xml" ''' href="/rss.xml" title="RSS Feed"> ********> width="25%" |>> ''' <a title="Subscribe to my feed" ''' rel="alternate" ''' href="https://www.solipsys.co.uk/rss.xml"> ''' <img style="border-width: 0px;" ''' src="https://www.feedburner.com/fb/images/pub/feed-icon32x32.png" ''' align="middle" ''' alt="" />Subscribe!</a> _ ''' <a href="https://twitter.com/ColinTheMathmo"> ''' <img src="https://www.solipsys.co.uk/new/images/TwitterButton.png" ''' title="By: TwitterButtons.net" ''' width="212" height="69" ''' alt="@ColinTheMathmo" ''' /></a> <<| ---- My latest posts can be found here: * ColinsBlog ---- Previous blog posts: * MoreMentalModelMissteps * AnOddityInVIM * DoubleDoubleDivisionAlgorithm * ContinuityConcerns * CountingCarbonCalories * TheParityOfZero * WhenTheTextAndHtmlDisagree * RecursionRevisited * VerticesRequiredForCycles * ReflexActions * TheBalladOfBunter * InfiniteRamseyTheorem * SignalReflection * AnalogiesNotConsideredHarmful * TwitterReplyVsQuoteTweet * ProofsToMakeYouGoWOW * LaptopPurchaseAdviceReceived * BlowUpYourAbilityBalloon * AFactletForAll * AnatomyOfAHit * SellYourselfSellYourWork * AllTheLetters * BeingSlowToCriticise * StateMachineInRealLife * CoxeterOnceNerdSnipedConway * NotAlwaysYourFault * RememberingConway * PerceptionOfSpace * ParallelogramPuzzle * BackOfTheEnvelopeCOVID19 * APointAgainstTheAxiomOfChoice * InDefenseOfTheAxiomOfChoice * JourneyingHomeThroughStormDennis * EarthRadiusRefined * VolumeOfASphere * BigOhAndRelations * MathematicalRelations * IntroducingBigOh * ConstantDifferences * AlgorithmsAndSizesOfInstances * IntroducingTimeComplexity * TheLinearFrog * SeventyVersusOneHundredRevisited * HowTheFarragoWorks * SeventyVersusOneHundred * PowersOfTwoInLexOrder * EmergingEExpanded * RageInducingSystemImplementation * TheBookIsNotAlwaysRight * EmergingE * ImpossibleToTranslate * WaitingInVain * NonRepeatingDecimals * RationalRepeats * WhyIsItLovely * CompilingCryptoConnections * ExploringConnectionsBetweenCryptoSystems * ElwynBerlekampHasLeftUs * RootCauseAnalysisAndThePhotocopierQuestion * TheUpDownTides * TheForeAftTide * TheSidewaysTide * WrappingUpWrappingUpTheEarth * TheOtherWrappingTheEarthProblem * WrappingTheEarth * TheRingOfSteel * RoundingUpTheRopes * OtherOtherOtherRopeAroundTheEarth * RopeAroundTheEarthRefined * TheOtherRopeAroundTheEarth * ElementaryEstimates * LatitudeCorrection * JustGiveMeTheAnswer * MoreMusingOnPollardRho * IdleThoughtsAboutPollardRho * WhenOptimisingCodeMeasure * ADogCalledMixture * AnotherPayPalScam * WhyTopPostingHasWon * UnexpectedInteractionOfFeatures * ArchimedesHatBoxTheorem * ConsideringASphere * ToLinkOrNotToLink * GenericAdviceForWritingAThesis * JustTeachMyChildTheMaths * NotASpectatorSport * LeftTruncatablePrime * TheDoctorAndTheLawyer * FourPointsTwoDistancesProof * MeetingRonGraham * NapkinRingVersusSphericalCap * TheFourPointsPuzzle * RadiusOfTheEarthPartTwo * GrepTimingAnomaly * TheRadiusOfTheEarth * ThisWorksToCureMyHiccoughs * PerhapsWeSavedOne * ThinkingAboutMastodon * DisappearingTrainsOnVirgin * TheIndependenceGame * OneOfMyFavouritePuzzles * ThinkingAboutRecursion * MemorisingTheTube * SpikeySpheres * SurprisinglyQuick * AnUnexpectedFraction * YouHaveToAdmireTheirOptimism * RepresentativesMatter * PythagorasByIncircle * APuzzleAboutPuzzles * HowNotToDoTwitter * Calculating52FactorialByHand * SmallThingsMightNotBeSoSmall * NotIfYouHurry * FactoringViaGraphThreeColouring * AnotherProofOfTheDoodleTheorem * WhenObviousIsNotObvious * GraphThreeColouring * TheDoodleTheorem * BeCarefulWhatYouSay * TheMutilatedChessboardRevisited * AMirrorCopied * TheOtherOtherRopeAroundTheEarth * PhotocopyAMirror * ThePointOfTheBanachTarskiTheorem * SieveOfEratosthenesInPython * FastPerrinTest * RussianPeasantMultiplication * FindingPerrinPseudoPrimes_Part2 * FindingPerrinPseudoPrimes_Part1 * TheUnwiseUpdate * MilesPerGallon * TrackingAnItemOnHackerNews * HackerNewsUserAges * PokingTheDustyCorners * ThereIsNoTimeForThis * PublicallySharingLinks * LearningTimesTables * GracefulDegradation * DiagrammingMathsTopics * OnTheRack * SquareRootByLongDivision * BeyondTheBoundary * FillInTheGaps * SoftwareChecklist * NASASpaceCrews * TheBirthdayParadox * TheTrapeziumConundrum * RevisitingTheAnt * TheAntAndTheRubberBand * IrrationalsExist * MultipleChoiceProbabilityPuzzle * RandomEratosthenes * WrappingUpSquareDissection * DissectingASquarePart2 * DissectingACircle * DissectingASquare * AnOddityInTennis * DecisionTreeForTennis * DecisionTreesInGames * AMatterOfConvention * DoYouNourishOrTarnish * BinarySearchReconsidered * TwoEqualsFour * TheLostPropertyOffice * TheForgivingUserInterface * SettingUpRSS * WithdrawingFromHackerNews ---- Additionally, some earlier writings: * RandomWritings. * ColinsBlog2010 * ColinsBlog2009 * ColinsBlog2008 * ColinsBlog2007 * ColinsBlogBefore2007 ******** Not the four-dimensional cube sort of Tesseract, this is the Optical Character Recognition (OCR) "Tesseract", software that takes an image of some lettering and produces a plain text file containing the text. Or not. It's well-known that this is "Actually Quite Hard(tm)" and Tesseract does a pretty good job "Out of the Box" with very little messing about. But the other day I ran across something that has me utterly baffled. Let me share my bebafflement with you. [[[> https://www.solipsys.co.uk/images/Tesseract_0.png ---- |>> Original <<| ]]] Here's an image that I want to convert to plain text. To the eye it's looks pretty straight-forward, and I have quite a few examples that, to the eye, look almost identical, and which tesseract handles without a problem. This one, however, produces this result: |>> [[[ {{{ TUE 03/04/2018 BBC TWO rFsE10 0h30m (DR) }}} ]]] <<| OK, it's not so bad for three of the lines, but the third line? Where does that come from? How does it get that? (Hah! One commenter has said that on the third line if you screw up your eyes and squint you /might/ be able to see "rFsE10" in the background, in the "black", not in the foreground. Maybe, just maybe, that explains where "rFsE10" comes from.) Well, I'm accustomed to this, and I played with the settings for a bit, and I played with the image for a bit, but if the settings were right for this image, they turned out to be wrong for another, and I have a lot of these that I need to convert as a batch, so I need settings that will work for them all. [[[> https://www.solipsys.co.uk/images/Tesseract_1.png ---- |>> Processed <<| ]]] So I read the "man page" for tesseract, and discovered the "get.images" option. This will dump to a file the image it ends up using. So I did that, and I got the result you see here. It's clean, it's binary, and it's clearly legible. So why is it getting the answer so wrong? Then I thought - "Aha! Let's feed that image into tesseract!" And that's when I got my first surprise. Feeding this image, the one tesseract created, back into tesseract, the answer was this: |>> [[[ {{{ TUE 03/04/2018 BBC TWO 18:30 Oh30m (DR) }}} ]]] <<| How can that be different ?!? The image is the one tesseract output, which we can only assume is the one it's using for the character recognition, and yet it gives a different (and beautifully correct!) answer! I'm ... well ... stunned! And stumped. Why should this be so? [[[>60 OK, a number of people have been in touch to say that they don't follow my reasoning. My guess is that most people won't care, so I'm reluctant to extend this page, but if you are confused as to why I am so confused then please, /please/ let me know and I'll write up a more detailed description. To me this just defies common sense, and to paraphrase Niels Bohr: "If this behaviour of tesseract hasn't profoundly shocked you, you haven't understand it yet." ]]] And in case you're wondering, if you repeat this process and feed the processed image into tesseract and ask for a dump, you get back exactly the same image. So that really is the one it's using second time round, but even though it outputs it first time round, it's not the one it's using. Does that make sense to you? It doesn't make sense to me. ---- |>> | |>> <<<< Prev <<<< ---- MoreMentalModelMissteps <<| | : | |>> >>>> Next >>>> ---- Pending ... <<| | ---- ********> ''' <a href="https://mathstodon.xyz/@ColinTheMathmo"> ''' <img src="https://www.solipsys.co.uk/images/Mastodon_Mascot.png" ''' width="256" height="280" ''' alt="https://mathstodon.xyz/@ColinTheMathmo" ''' /></a> ******** ''' <a href="https://mathstodon.xyz/@ColinTheMathmo/">You can follow me on Mathstodon.</a> _ _ _ _ [[[> ''' <a href="https://twitter.com/ColinTheMathmo">Of course, you can also<br>follow me on twitter:</a> ''' <a href="https://twitter.com/ColinTheMathmo"> ''' <img src="https://www.solipsys.co.uk/new/images/TwitterButton.png" ''' title="By: TwitterButtons.net" ''' width="212" height="69" ''' alt="@ColinTheMathmo" ''' /></a> ''' <img src="/cgi-bin/CountHits.py?TesseractTeaser" alt="" /> ]]] ********< ---- !! Send us a comment ... ''' <form action="https://www.solipsys.co.uk/cgi-bin/FormMail.pl" method=post> ''' <input type=hidden name="recipient" value="colinsblogcomment@solipsys.co.uk" > ''' <input type=hidden name="subject" value="Blog comment : TesseractTeaser" > ''' <input type=hidden name="redirect" value="https://www.solipsys.co.uk/new/ThankYouForYourComment.html" > ''' <input type=hidden name="missing_fields_redirect" value="https://www.solipsys.co.uk/RequestError.html"> ''' <input type=hidden name="env_report" value="REMOTE_HOST, REMOTE_ADDR, HTTP_USER_AGENT" > ''' <input type=hidden name="print_blank_fields" value="1" > ********> width="47%" You can send us a message here. It doesn't get published, it just sends us an email, and is an easy way to ask any questions, or make any comments, without having to send a separate email. So just fill in the boxes and then ''' <font size="+4"><INPUT TYPE="submit" VALUE="CLICK HERE TO SEND"></font> ******** width="53%" ********< ''' <table cellpadding="5"> ''' <tr> ''' <td valign="top">Your name </td> <td valign="top">:</td> ''' <td> <input type=text name="realname" size="48"> </td> ''' <tr> ''' <td valign="top">Email </td> <td valign="top">:</td> ''' <td> <input type=text name="email" size="48"> </td> ''' </tr> ''' <tr> ''' <td valign="top">Message </td> <td valign="top">:</td> ''' <td> <TEXTAREA NAME="Message" ROWS=10 COLS=64></TEXTAREA> </td> ''' </tr> ''' </table> ''' <center> ''' <font size="+4"> ''' <INPUT TYPE="submit" VALUE="CLICK HERE TO SEND"> ''' </font> ''' </center> ''' </form> ********<