List Info

Thread: Re: fuzz




Re: fuzz
user name
2005-06-13 23:27:42
Al Bogner on  wrote...
| Am Montag, 13. Juni 2005 09:22 schrieb Anthony Thyssen:
| > Al Bogner on  wrote...
| > | convert -fuzz 25% -trim -shave 25x25 -page +0+0 ...
| > |
| > | Sometimes a thin black line remains at the border.
Any suggestions?
| >
| > The borders of some camera images could contain a
binary pixel code.
| > Have a close look at that edge.
| >
| > I suggest you -chop that one pixel edge before you
trim.
| 
| It is a scan from a filmscanner and a color print film. It
makes me crazy, 
| because with the same film, nearly all pictures can be
trimmed. But now I 
| found out what happens. I assumed that the border color is
black, but when I 
| enlarged it, I saw that there are a lot of different
colors, most of them are 
| dark, but there are red and yellow colors too.
| 
| I resized a small piece of the border to size 1x1 and got
the color 100D06, 
| nevertheless it didn't work to use -border 2x2
-bordercolor 100D06
| before trimming. Does it make sense to use -border 2x2
instead of 1x1?
| 

I would suggest you set the border color BEFORE you add the
border!!!!



| At the moment I try this:
| 1st step: -shave 15x15
| 2nd step: adding a border: -border 2x2 -bordercolor black
| 3rd step: -fuzz 40% -trim
| 4th step: -shave 12x12
| 
| This works for most pictures of the same film, but
unfortunately not all.
| 
It sounds to me like you have some small bit errors in the
image...
This is typical of most scanners, however these bit errors
are usally
isolated single pixels.

May I suggest you do something like...

  1. shave edge a little to remove the border interference.
  2. on a copy of that image -blur the image  and trim say
20%
  3. read the results of the -trim from that result.
  4. apply the same 'crop' to the original image that wasn't
blurred.

By bluring the image single pixels become unimportant, while
pixels
next to each other gain importance.

Of course a seperate script is needed to extract and convert
the -trim
result into a crop argument.

I have added a note about this to the -trim section of the
Example
Pages, though I have no examples at present.


| I use ImageMagick 6.0.6 05/26/05 Q16 with Sarge in a
bash-script:
| 
| convert -shave $SHAVEAREA1 -border 2x2 -bordercolor black
-fuzz $FUZZVALUE 
| -trim "$TEMPNEWNAME" miff:- 2>/dev/null |
convert -shave $SHAVEAREA2 -page 
| +0+0 - "$TEMPNEWNAME""2.tif"
| 
| I don't understand, why it makes sense to use chop in this
case. Doesn't shave 
| do the same, but for all borders?
| 
-chop is like shave but only for one side or two adjacent
sides.
-shave always shaves oppisite sides.

| BTW I read (and thanks for it) 
| http://www.cit.gu.edu.au/~anthony/graphics/imagick
6/crop/#trim and an example 
| how to trim a scan from a filmscanner would be nice.
| 
For this I need a good example to demonstrate with.  The
problem is that
such an example is not easy to generate with IM.

I need two images, one is the result of a low JPEG quality,
which I have
not demostrated on the JPEG examples page yet.  The other is
a 'noisy'
image such as a scanner could produce.

These should not be very large either.

  Anthony Thyssen ( System Programmer )    <A.Thyssengriffith.edu.au>
 -----------------------------------------------------------
------------------
Wizard Rincewind on `Attacting Trouble' :-
       "Let's just say that if complete and utter chaos
was lightning, then
    he'd be the sort to stand on a hill top in a
thunderstorm wearing wet
    copper armour and shouting,  ``All gods are bastards.''.
					 Terry Pratchet - "The Colour of Magic"
 -----------------------------------------------------------
------------------
     Anthony's Home is his Castle     http://www.cit.gu.
edu.au/~anthony/
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )