Live data from Hacker News

Xerox scanners and photocopiers randomly alter numbers in scanned documents

dkriesel.com

61–70 of 118 posts

Re: Xerox scanners and photocopiers randomly alter numbers in scanned documents

#61
post #23

Earlier quoted context omitted.

It's amazing to me the engineers who refuse to update their worldviews about normal people's mental models for "sending data" that still get amazed by this. The size of the files or the number of them are totally irrelevant.

Normal people seem to get that it's considerably harder to ship a barn than a letter, and that if you want to move a barn you use a specialty service rather than the post office. The size and number of files are and should be totally relevant even to "normal" people. When someone asks for something in e-mail, it's perfectly reasonable to say "no, it's much too big" and expect them to understand.

But we're not dealing with barns or letters or any physical object, we're dealing with abstract systems where the physics are much more flexible and changeable. It's important to change our computer systems to work for us, rather than attempting to change people to adapt to the computer systems. We should discard those systems that can not adapt to humanity, as they are of little worth in the long run.

When somebody says, "can you email it to me" they mean, grant access to the data via their centralized messaging system, their email. There are many ways to make that happen, one of which is an attachment, another of which is linking to the content, but the key is to make sure that it's low friction and takes very little time or clicks to get access from the email.

Re: Xerox scanners and photocopiers randomly alter numbers in scanned documents

#62
post #25

That's what you get when you use lossy compression, and it's hardly a problem unique to Xerox scanners. Maybe important documents should be scanned to a higher resolution so you don't have problems like this.

I doubt Xerox would be arrogant enough to try shifting responsibility to the victim like that. Do you reverse engineer every product you use just to confirm that the designer didn't cut corners to make it work differently from every other example of a familiar class of product?

It's particularly absurd in this case since it's clearly not easy to learn that lossy compression is being applied or how one would disable it if they wanted their Xerox to work like every other copier/fax they've used.

Re: Xerox scanners and photocopiers randomly alter numbers in scanned documents

#63
Minor correction: The article says that the JBIG2 patch size might be the size of the scanned text. JBIG2 actually has the capability to detect regions of text and compress them using a specialized technique that operates on individual symbols.

I suspect Xerox is using this option and their implementation is getting confused (perhaps by the low resolution). Unless I'm greatly mistaken, the patch size for normal compression shouldn't figure here.

Re: Xerox scanners and photocopiers randomly alter numbers in scanned documents

#64

Earlier quoted context omitted.

Normal people seem to get that it's considerably harder to ship a barn than a letter, and that if you want to move a barn you use a specialty service rather than the post office. The size and number of files are and should be totally relevant even to "normal" people. When someone asks for something in e-mail, it's perfectly reasonable to say "no, it's much too big" and expect them to understand.

But we're not dealing with barns or letters or any physical object, we're dealing with abstract systems where the physics are much more flexible and changeable. It's important to change our computer systems to work for us, rather than attempting to change people to adapt to the computer systems. We should discard those systems that can not adapt to humanity, as they are of little worth in the long run. When somebody…

There are some pieces of content for which it's entirely impractical to "grant access via e-mail". On occasion people ask to be e-mailed extremely large blocks of data, where it would literally be faster to burn it to a pile of DVDs and then FedEx them than to upload-and-then-download the data. Depending on the size of the medical images mentioned in a previous post, that might actually be the case in that circumstance.

It's a failure of technology when it's difficult to send ordinary-sized files like a few photos or a couple pages of documents. But it's a failure of people when they don't recognize the possibility that some types of data (video, large numbers of images, scientific research data, whole databases) simply can't be sent quickly, yet they fail to plan ahead to gain access. (I've also entirely skirted the issue of "some data should have its access restricted physically"...)

Re: Xerox scanners and photocopiers randomly alter numbers in scanned documents

#65
post #14

This class of error is called (by me, at least) a "contoot" because, long ago, when I was writing the JBIG2 compressor for Google Books PDFs, the first example was on the contents page of book. The title, "Contents", was set in very heavy type which happened to be an unexpected edge case in the classifier and it matched the "o" with the "e" and "n" and output "Contoots". The classifier was adjusted and these errors m…

How would one handle the case with the tiny boxes? It seems to me that these ought to be treated more like line drawings and not unify them as symbols at all if you can't properly decompose them into lines of Latin alphabet glyphs. JBIG2 of course cleverly doesn't tell you how to do the "smart" segmentation...

Re: Xerox scanners and photocopiers randomly alter numbers in scanned documents

#66
post #5

Earlier quoted context omitted.

That's quite possible. http://www.cs.columbia.edu/CAVE/projects/face_replace/ I can imagine someone turning the technique into a novel form of image compression, maybe for surveillance databases or something.

A very tech savvy friend bought a camera in Japan and after about a week or started delving into settings. He thought all the faces looked wrong. He found a setting that made the eyes bigger and rounder. It was subtle, but quite funny at the same time.

Most of the consumer compact cameras have a "purikura" setting or a "beauty" setting with special treatment for the skin, whiter eyes and whiter teeths, and eventually bigger eyes and smaller mouth (yes, that's a thing).

It may be on by default for the cameras targeted at a female audience (in a rapidly shrinking market, female bloggers for instance are a big target), otherwise it won't even be available in more specialized or "hardcore" markets, like DSLR or mirrorless (4/3rds, Nikon 1, EOS M etc) for instance. For the anecdote, I bought a shockproof/waterproof compact camera last year and there's nothing so fancy on it.

Re: Xerox scanners and photocopiers randomly alter numbers in scanned documents

#67

This should be on the computer risks digest. There is virtually no reason whatsoever for this problem to exist. This is the domain of "making a problem more risky and complicated than it needs to be" and royally screwing people in the process. Might as well throw the paperwork in a bin and set fire to it.

Sufficiently advanced bugs are indistinguishable from sabotage.

And the converse: sufficiently clever sabotage is indistinguishable from a bug, as evidenced by the "Xerox copier randomly prints penises" prank: https://news.ycombinator.com/item?id=6157422

Re: Xerox scanners and photocopiers randomly alter numbers in scanned documents

#68
post #5
post #4

Truly surprising. I would never have imagined this to be in the domain of possible problems one would expect to encounter scanning or photocopying a document. It is like taking a picture of my wife with a digital camera and her face being replaced with that of some other person.

That's quite possible. http://www.cs.columbia.edu/CAVE/projects/face_replace/ I can imagine someone turning the technique into a novel form of image compression, maybe for surveillance databases or something.

Eigenfaces

http://en.wikipedia.org/wiki/Eigenface

Re: Xerox scanners and photocopiers randomly alter numbers in scanned documents

#69
post #57
post #39

This was predictable. JBIG2 is in no way secure for document processing, archiving or whatsoever. The image is sliced into small areas and a probabilistic matcher finds other areas that are similar. This way similar areas only have to be stored once. Yeah right, you get it, don't you? They are similar, not equal. Whenever there's a probability less than 1, there's a complementary event with a probability larger than…

This will make lawsuits a lot of fun in the future. Given the way the algorithm works, it would seem to me that "fine print" would be the most vulnerable to the bug (well not really a bug, it's the behavior of JBIG2). I wonder if there will be a clear dividing line, e.g. "smaller than 10pt type is subject to reasonable doubt if a Xerox copier was used"

The trouble is, there is no reasonable in doubt anymore. Copying and digital archiving both rely on the premise that there is no manipulation. Lossy compression always seemed to be OK because the image quality was reduced without changing the integrity and structure of the image. This will essentially destroy credibility of digital records. Every shyster and hack lawyer will pull this as defense in court.

Also it's not like there is a reference implementation for encoding JBIG2 everyone uses. We're talking about proprietary libraries which do the compression. These libraries are compared using performance indicators like speed, memory usage, etc. This gives sloppy crap implementations an advantage, because (and I'd bet on that) when the implementation was chosen, the deciders didn't even have the idea that a compression could actually manipulate the document content. Automated testing of compression algorithms is hard, because by design there can never be 100% proof, as the output image is different from the input image. If the comparison is broken, the test will fail to identify errors.

The critical failure in the design was thinking that some sort of algorithm performs equally or better than the human brain at recognizing text in low quality. This is - up to now - not the case.

Text won't be a big issue as mistakes are kinda easy to spot. Also it's less probable to have image fragments that seem similar but really aren't. The Algorithm isn't really smart, it's mostly just pattern matching due to performance constraints. Thanks to kerning (variation in distance between individual Characters), I doubt that swapping of Words or sentences will occur a lot, unless the threshold for reaching significance in the comparing algorithm is higher than the guy was while designing it.

The real trouble starts when looking at numbers. Numbers are usually typeset monospaced, right aligned and/or in tables. The possible variations are pretty low, each digit represents 10 different possible meanings. Text documents are usually scanned at a pretty low resolution, because for a human it's still possible to distinguish between characters and numbers, even when a lot of information is lost. As already mentioned, algorithms cannot do this.

The next problem is: We can spot mistakes in text because there are syntactic and semantic rules which we more or less understand. While reading, our subconscience validates the input, obvious errors will pop out. When it comes to numbers, there is no such thing. A number cannot be validated without additional knowledge. And as document processing is one of the labour intensive tasks, mostly executed by minimum wage clerks, there is no way in hell a mistake would be spotted before the documents are archived for all eternity.

Let's put on the tinfoil hat for a moment: If someone wanted to really fuck up a company, they could just flash the printer/scanner/copier firmware, changing parameters of the compression.

Re: Xerox scanners and photocopiers randomly alter numbers in scanned documents

#70
I don't think it's necessarily an issue of inexcusable incompetence: it seems like one of those faults which is obvious in retrospect but very difficult to predict. Why shouldn't Xerox use a standard compression algorithm in their scanner/copiers? That would seem to be a safer choice than writing a lossy compression algorithm from scratch. QA testing probably was on the order of 'picture looks right'; after all, why bother testing that the semantics of the copied content match the original when what you're building is a bitmap duplicator? (Of course, the OCR stuff would be tested more rigorously, but this explicitly bypasses that piece). It's not hard to see the chain of individually reasonable decisions that could lead to something like this.

The real failure is probably something more cultural: there was nobody with the discipline, experience, and power to write an engineering policy prohibiting the use of lossy compression in duplication equipment. I have no idea about Xerox's corporate history, but the evisceration of engineering departments in US giants and the concomitant decline in what one might call 'standards' or 'rigor' is an established concept.

Post reply on HN