select adjacent pixels
Posted: 2007-10-21T15:06:12-07:00
Hello,
in Gimp or any other image manipulation program, usually there is a tool called "magic selection", which selects adjacent pixels based on the color and a tolerance value.
This is very useful when processing images, and i would like to know if there is a similar functionality in ImageMagick (command line or perl).
To be more clear, i will give an example:
I have a scanned image whose background is black but with variations of color, and some noise, and i want to make it transparent.
These cannot be done with:
convert input.gif -fuzz 20% -transparent "#15151b" output.gif
Because that would also replace pixels inside the image and not only in the border.
Also, it cannot be done with:
convert input.gif -fuzz 20% -trim output.gif
Because this would only cut a rectagular area.
thanks
dani
in Gimp or any other image manipulation program, usually there is a tool called "magic selection", which selects adjacent pixels based on the color and a tolerance value.
This is very useful when processing images, and i would like to know if there is a similar functionality in ImageMagick (command line or perl).
To be more clear, i will give an example:
I have a scanned image whose background is black but with variations of color, and some noise, and i want to make it transparent.
These cannot be done with:
convert input.gif -fuzz 20% -transparent "#15151b" output.gif
Because that would also replace pixels inside the image and not only in the border.
Also, it cannot be done with:
convert input.gif -fuzz 20% -trim output.gif
Because this would only cut a rectagular area.
thanks
dani