Slashdot videos: Now with more Slashdot!

View

Discuss

Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

An anonymous reader writes "Scientists at HP have developed a technique to detect creases in photographs using standard, unmodified flatbed scanners. Once correctly scanned into a computer, software can determine where the photograph's defect is, and artificially correct it to remove any trace of a crease or fold. The result is a spotless JPEG scan from a creased photo, with absolutely no modified hardware and no technical know-how required on the part of the user." They're using multiple light sources to do this, in a way that reminds me of last year's description of 3D image creation using an ordinary digital camera.

Actually, no, it won't. Since the method uses different light sources to build a partial 3D model of the actual shape of the crease, your mere photographic creases won't be detected. You can breathe a sigh of relief.

Now Malzbender's team has achieved the same effect using an off-the-shelf flatbed scanner. They rely on the fact that modern scanners use two separate light bulbs. This feature was added to scanners to improve colour quality, but it also lets you capture the image from two different angles. Re-scanning the object after rotating it 90 degrees provides a total of four different angles, more than enough to deduce 3D information about the object - mathematically, you only need three.

Most flatbed scanners use two separate light bulbs to accurately capture all the colour in a photo. By controlling these independently of each other, two slightly different images (each taken from different directions as the bulbs move under the photo) can be captured of the same photograph. From these, rudimentary 3D information can be generated.

I was hoping they were using that 3D information to do something interesting to actually restore the image. They're not.

They're basically using rudimentary 3D information that they can get out of the scanner to determine that a crease exists. They then remove it with a simple infill algorithm, which is as basic as it gets (although it often works ok), and which you can find in most image editing software. It's no coincidence that the example image they use has a crease going over mostly similarly colored and low-detail areas.

So what they're doing is not an improvement to restoration, it's just an improvement to defect detection. Basically, it saves you having to tell the software where the defect to be fixed is, the fixing is the same quality as it's always been.

Could still save some people a lot of money. I did some consulting a while back for a company that, among other things, digitises archives. Libraries send them books and they scan them then manually open each file, draw a line along the curve of the page, and then let the machine deform the image to remove the curve along the line of the text. This step takes several times longer than the scanning phase to do well. If a machine can recognise the creases then they can get rid of the humans in this proces

So what they're doing is not an improvement to restoration, it's just an improvement to defect detection.

That's still helpful, isn't it? It seems to me that part of the problem with any algorithm to automatically fix photos is that you have to make sure the software knows the difference between a defect and a detail. If it detects what it thinks is a crease or a scratch, but it's really part of the image, it might edit out something you don't want it to.

Strictly speaking that's true, although some really smart software could restore the original image with high probability, given that almost all real-world images contain certain predictable elements such as faces, grass, clouds, etc.
If I give you a picture of the President's face with a little bit torn out, there are many other images where you can find most of the information that was almost certainly there. Now is it possible something novel was actually happening at that point on his face at the time?

- Flattening a scan of a book (by the spine)- Focusing an area that's raised (products like Focus magic [focusmagic.com] assume a section is all out of focus at the same level, whereas a map of the amount of lost focus is possible here).- Using the above, scanning non-flat items.- Scanning nearly-flat 3d surfaces.

Add a lens that can vary focus (based on the light differential) and you'd have a good 3D scanner for one side of a mostly-flat item, and a flatbed scanner that wouldn't lose focus on slightly-raised papers.

Atiz makes consumer (simple, cheap) and professional (more options, expensive) software to do this, and they also sell the hardware (though you can just use a scanner or camera+tripod).

It actually works pretty well. The only caveat is that you must frame the photos to meet their specifications (e.g. need a solid background border around the book being photographed). It is also pretty slow to process several hundred pages...

Applied Science Fiction was the first company to successfully market this as a 'dust and scratches' solution. Same idea, taken to a new level. Now, I hope HP's management is smart enough to get out of the way and bring this to market. It should definitely sell a few more scanners.

Quoting a certain Francis Ford Coppola flick -- "I love the smell of (lawsuits) in the morning. You know, one time we had a (HP sued), (logging untold number of billable hours.) When it was all over, I (finally looked) up (the pate

Multiple light sources offer some interesting options. A few years ago, someone modified a digital camera (I think a Canon PowerShot) to have four flash sources instead of the usual one. The camera would take four pictures in quick succession, one with each flash. This allowed better edge detection.

It was useful for applications like taking a picture of complex, dirty machinery (as under a car hood) and locating the edges, even where everything was roughly the same shade. It also helped when photographing very shiny objects, where the reflection from the flash was a problem. With each reflection from each flash unit in a different place, all reflections could be removed.

It was too specialized to become mainstream, though. That seems to be the fate of 3D from 2D systems. Good ones have been built [canoma.com], but most have been either discontinued or turned into very expensive products for specialized use.

There will soon be much less need for 3D from 2D hacks, because there's a new technology coming that produces 3D pictures directly: Time-of-flight cameras [wikipedia.org]. Today they are really expensive but they're going to become much cheaper very soon. This is what XBox's Project Natal is based on.

The original work on using multiple flashes for edge detection was done at MIT although I don't recall who it was actually done by. Not long after the paper came out I worked on an implementation of it for an undergrad research project with one of my professors (Chris Brown [rochester.edu]). We definitely used a canon powershot and built a rig to support the external flashes and microcontroller needed to control the process.

Our particular aim was automating detection and classification of small bombs in natural scenes. Th

I don't have any creased photos that I need to restore, but I've got boxes of matte finish prints that are a pain to scan. I wonder if a similar technique couldn't be used to automatically remove the scanning artifacts (little regularly-spaced crescent moon shapes) from those.

Do you suppose HP will be nice consumer-friendly guys and update their PrecisionScan software for previous scanner models? Nope: they'll roll this feature into software that'll only work with new scanners they wanna sell you. So, even though it doesn't REQUIRE new hardware, you can bet they'll figure out how to restrict it so that you still have to buy new hardware in order to use it.

Were you not paying attention? It isn't "part of a product line". It isn't tied to specific hardware at all. It's applicable to virtually any/every scanner. How exactly do you conclude that it's "part of a product line"? I never said nor even implied that HP should give it away: people would gladly pay to buy software with this new technology FOR THEIR EXISTING SCANNERS. Those people would include me.

I used the word "restrict" because I conclude that's exactly what HP is going to do with it. HP won't

PNG is lossless but compressed, whereas JPG is lossy and compressed. Apparently these devices arn't already using RAW, PSD, or DNG but rather opting for JPG. If you're going to use a more "common" format like that, it should at least be something that's not nearly so shitty.

So is TIFF, plus it has more features than PNG. So, why would I use PNG over TIFF?

If you're going to use a more "common" format like that, it should at least be something that's not nearly so shitty.

What do you mean by "these devices"? A scanner doesn't deliver a JPEG to the computer - it delivers raw data. It's up to the software to save the file in whatever format it supports. And I don't believe I've ever come across scanning software that doesn't support formats other than JPEG, they usually support TIFF and BMP at the very least.

Anyway, JPEG isn't so bad. The compression ratio is excellent, and at higher quality sett

Scientists invented the wheel too but I don't want to see it posted on Slashdot. Seriously, isn't this really old news? Removing creases in photos was one of the first things I remember everybody doing when scanners went mainstream sometime in the 80'.s

No, a scientist is someone who applies the scientific method. The scientific method had not been invented before the wheel was. Do you even know what science is? By your definition, I'm a scientist because I know the name of my next-door neighbor.

This does nothing to restore creased photographs. What it does is scan the photograph, manipulate the digital image obtained, so that you can print out the image onto another piece of paper. This is not restoring the photograph. The photograph still has a crease in it.As a practitioner of traditional photography, I'm annoyed to no end by people who talk as if the concepts of "photograph" and "image" were one and the same. Photographs are unique physical objects that have mass. Speaking as if photographs are

As a practitioner of traditional photography, I'm annoyed to no end by people who talk as if the concepts of "photograph" and "image" were one and the same. Photographs are unique physical objects that have mass. Speaking as if photographs are digital images is like speaking as if symphonies are.mp3 files.

That's stupid. A traditional print is made from a negative or slide, so by your purist philosophy, restoring the print isn't actually restoring "the photograph." Digital images are photographs and vice versa. What matters is the image, not the medium it is presented on.

Your idea of the photograph would be considered silly and outdated by the photographers of 50 years ago.

I'm amazed at the confusion over the semantic difference between a photograph and an image, but I point it out in this case because TFS cleary implies that they are restoring creased photographs, when what they are really doing is copying an image of the photograph and manipulating the image. That is noble if you want to save the image; to some people the image is all that matters. But you are not restoring the photograph, and to some people the photograph itself matters.""A traditional print is made from a

...if an object itself carries an image that was literally drawn with light, that object is a photograph.

But why does a photograph have to be an object? Where in the definition and practical use of the term is this specified?

Furthermore, why does an object have to be physical? There is such a thing as a digital object.

Digital images are not photographs any more than drawings or paintings or reflections in mirrors or many other kinds of images are photographs.

Nonsense. An image in a mirror or a telescope is not a photograph, because it is not fixed, or recorded. A digital photograph is a photograph, because it is a fixed or recorded image. Put a digital sensor on that telescope, and you can make a photograph.

The GP has a point; in a technical discussion, it makes sense to draw a distinction between the image and the medium it's recorded on.

That's why we use the terms "print" and "negative" for the medium it is carried on. The term "photograph" refers to any image that is the result of a photographic process. It does not refer to the medium used to view it.

The article talks about 'restoring' the image of a creased photo, not restoring a creased photo.

Substitute the word "print" for "photo" and you have a correct answer.

I probably shouldn't have used the term "purist philosophy" to describe your attitude towards photography in my previous post. Because it is neither pure or philosophy. A more apt description would be "nostalgic shortsightedness" or "ludditism."

The word "photography" at its root, means painting, drawing or writing with light. And "light" is really the key theme, the other root of the word describing "capturing" the light more than anything else. A digital image displayed on a screen that is never printe

I have no illusions of granduer nor do I feel that photographic processes are better at imaging than digital processes; I'm sorry if you got that idea somewhere. You seem to have your panties in a bunch over the fact that I understand the difference between an image and a photograph. Digital imaging is superior to photographic imaging in countless ways that I shouldn't have to mention; that's why photography is obsolete and digital is taking over everything commercially. Doesn't change the fact that a digit

Digital imaging is superior to photographic imaging in countless ways that I shouldn't have to mention; that's why photography is obsolete and digital is taking over everything commercially.

Photography is obsolete? Since when? Digital imaging is photography. Photography is more relevant than ever.

Doesn't change the fact that a digital image is not a photograph. You can print a digital image out photographically and obtain a photograph, but that doesn't make the digital image a photograph.

Where the hell do you get this idea from that a photograph has to be printed on paper? Digital imaging is a photographic process. Nothing about the definition requires the light-sensitive medium to be chemical.

You can can take a lens and some light-sensitive material and obtain a photograph of the Grand Canyon photographically; that does not make the Grand Canyon a "photograph".

What the hell? When did anyone ever say that taking a photograph of an object makes the object itself a photograph?

Your assertion that photographs and images are the same thing is groundless and nonsensical.

No, your assertion that a digital image is not a photograph is groundless and n

There is no tool to cut out an image of an item from the background automatically. It is needed for the e-commerce, because an item should be "flying in the air".

There are several tools, but they are using technique of analyzing colors and by this detecting borders on an item. It does not work with every image, more correctly it does not work with almost every image. It sometimes work if an item is, say, of even dark color on a white background.

...but Quick Mask is your friend. I used to muck about with the path tool (no end of frustration there), but being able to paint/erase the quick mask and switch back to selection has changed all of that. Use an automated selection tool to get your selection 90% of the way there, use quick mask to get the rest of the way...

From the examples shown in the.PDF [hp.com] it seems that it is once again a case of a quick fix that only works on low-res and low detail photos, preferably in single color.

And for it to work at all, you would need a 2-lamp scanner.Which are standard, but in high-quality print studios and other places that would do this kind of retouching by hand anyway in order to preserve or achieve better quality of the final product.

From the examples shown in the.PDF [hp.com] it seems that it is once again a case of a quick fix that only works on low-res and low detail photos, preferably in single color.

That doesn't seem like a terribly bad thing to me. If you were a professional looking for extremely high-quality results, then yes, you're going to want to spend a lot of time screwing around with things manually on each photo. Even if it's a largely automatic procedure, you'll probably still want to tweak the parameters a little for each photo, including things like brightness, contrast, and hue.

However, there's another real-world application for this sort of thing: someone like my grandmother scanning lots of old pictures that may have been folded, crumpled, or otherwise damaged. Even if it's not giving the highest quality results, if the results are at all better than not processing the photo, then it's probably fine. Without automatic quick fixes, people might either scan it and leave the damage, or decide not to scan it at all. Giving even barely passable results is an improvement.

However, there's another real-world application for this sort of thing: someone like my grandmother scanning lots of old pictures that may have been folded, crumpled, or otherwise damaged. Even if it's not giving the highest quality results, if the results are at all better than not processing the photo, then it's probably fine. Without automatic quick fixes, people might either scan it and leave the damage, or decide not to scan it at all. Giving even barely passable results is an improvement.

First off, I would NEVER advise senior citizens and other people born decades before the invention of the term DTP and/or computers becoming a common household item, to do ANYTHING with photos other than store them in albums.Unless they have at least some elementary professional experience in dealing with photography I would most certainly advise them to contact a professional or their teenage grandson to do any digital task involving family or other memories in photographic format for them.Not only do the

First off, I would NEVER advise senior citizens and other people born decades before the invention of the term DTP and/or computers becoming a common household item, to do ANYTHING with photos other than store them in albums.

Well both my mother and grandmother scan family photos sometimes. They do it both for storage/archival purposes (but the archive is only for personal/family use), but also so they can email them around and things like that. They're not computer geniuses, but they're smart enough to use a scanner and even do some basic adjustments in Photoshop once they're digital. They're not going to contact a professional photographer just to scan some family photos.

They're not going to contact a professional photographer just to scan some family photos.

That is why I said "contact a professional or their teenage grandson".

scanner being sold 5 years from now

And that is why I said "at this point".

But I have a feeling that 5 years from now something like "crease-fix" will be laughable.Although, I doubt that it will be this particular way of implementation. Multiple lamps can only make scanners more expensive.Maybe something along the lines of doing multiple scans while rotating the photo to get the similar effect?

They're not going to contact a professional photographer just to scan some family photos.

That is why I said "contact a professional or their teenage grandson".

But my point is that they scan things by themselves right now, already. They don't have any teenage sons or grandsons left, either.

But I have a feeling that 5 years from now something like "crease-fix" will be laughable.
Although, I doubt that it will be this particular way of implementation. Multiple lamps can only make scanners more expensive.
Maybe something along the lines of doing multiple scans while rotating the photo to get the similar effect?

Rotating the picture seems too complicated, and too much work. How much more expensive would two lamps be? What, you have to add another lightbulb? It might not even need to be bright in order to allow the computer to determine depth. Maybe a small LED mounted somewhere would do the job.

I don't know if this particular approach to this particular problem will be used in any

Actually...After reading through the PDF, I've found that they did that exact thing in one method - manually rotating images to get multiple angle scans of the same source.That method actually gives better results, as it covers the "perfectly aligned defects" better.

On the other hand - they ARE in fact already putting a second lamp in some cheap(ish) scanners in order to increase the scanner's gamut - but the procedure does require multiple passes, first with one lamp then with the other."Just a small LED"

EVERY bitmap image in the PDF is low-res and lousy in exactly the same way. This is an indicator of what DPI settings were used within Adobe Acrobat when creating the PDF, and not in any way telling of the quality of the original example photos.

Observe the bitmaps closely and you will see the places where they were "fixed".

The fact that it is not visible right away in the low-res photos shown in the PDF, directly indicates that said corrections would be more visible had the photos been of higher resolution.Also, examples show the following:

Which are standard, but in high-quality print studios and other places that would do this kind of retouching by hand anyway in order to preserve or achieve better quality of the final product.

Actually, most images are restored using digital techniques these days, because it can achieve better results than doing it by hand. You'd only do it by hand if you were talking about something like a historical artifact or unique artwork.

Pray tell - how would one use a scanner (mentioned in the sentence above the one you quoted) in the "restoration by hand" that you envision?As a work surface that you can put your brushes and chemicals on?

*Meant as a joke, not a troll.On the other hand... If a mod with points to spare does find it to be trolling, this is my message to them: "SCREW YOU and the (figurative) horse you rode in on!"