[magick-users] Auto-correction of black border
Glenn Randers-Pehrson
glennrp at comcast.net
Sat Feb 5 15:31:11 PST 2005
At 12:05 AM 2/6/2005 +0100, Al Bogner wrote:
>Am Samstag, 5. Februar 2005 22:12 schrieb Glenn Randers-Pehrson:
>
>> -trim cannot remove *all* of the black border because it has
>> white specks and is not exactly the same thickness along the
>> entire edge.
>
>Ok, so I could put the result in a pipe, something like "-page +0+0
>miff:- | ..." and cut off the rest. I won't mind to loose a little
>bit more of the picture. But how would I do this best?
>
>I tried something like this:
>
>convert -quality 50 -fuzz 70% -trim scan.jpg -page +0+0 miff:- | \
>convert - -shave 13x13 scan70.jpg
I would have suggested a small -shave after the -trim #:-)
>It looks like you have to make a lot of tests to find out the best
>value for fuzz and shave. Fuzz 100% cuts off too much, to remove
>most of the border, so I decided to use less fuzz and more shave.
>Is there a general advice?
Unfortunately it depends on the nature of the images and how well
your scanner works.
>> You might do better scanning to a lossless format instead of JPEG
>> and then trimming. If the scanning is already done this is not
>> much help to you though.
>
>No, I am just starting with the Nikon LS-50. It makes sense to do a
>lot of testing, befor scanning thousands of (very old) slides.
>
>I do not understand the advantage of a lossless format, because I
>can't see the difference.
You will not have any "noise" in the black area due to compression
artifacts. You still might get them due to dust specks though.
>Ok it's lossless, but it uses a lot more
>space and makes some troubles, like
>
>convert -quality 30 -fuzz 100% -trim elementsscan.tif
>elementsscan100.jpg
>convert: elementsscan.tif: wrong data type 1 for "XMLPacket"; tag
>ignored. (TIFFReadDirectory).
>
>Ok, I could try other lossless formats.
>
>I store the jpgs with a quality of 11/12 (>90%) and it looks like
>the quality is ok, after I modified the pic with ImageMagick.
OK.
>Do you strongly recommend I should try png or psd for the scan?
PNG is OK but if you have an uncompressed format like PPM available
that would be faster. I wouldn't worry about the file size because
they are temporary.
>At
>the moment I am unsure which scan-programm I should use, vuescan
>has the advantage to work with Linux, while Nikon scan seems to do
>the better job.
Sorry I can't comment about scan-programs.
Glenn
More information about the Magick-users
mailing list