Antoine on  wrote...
| Hi,
| I am trying to detect whether a pdf page has non b&w elements in it -
| does anyone have any ideas on how I might do this with imagemagick
| (and ghostscript).
| Cheers
| Antoine
| 
This is the first step discussed in my 'Comparing Images' IM Examples
reference.

  Determining the Type of an Image
    http://www.cit.gu.edu.au/~anthony/graphics/imagick6/compare/#imagetype

It is short of actual examples, but had lots of ideas.

In your specific case..

compare the image against its grey scaled version
If the image differs quite a bit, then the image contains non-grey
elements.

For non B&W elements, try comparing the image thresholded
with a low value, verses and image threholded against a large value.
Any areas of non B&W will show up in the comparision of the threholded
images.

Any examples you develop would be apprecieted too.

  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
   Symbolic Link(n) : ``A door closes quietly behind you, you are in a
          twisty maze of little passages, all different.''
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to