| The attachment on my last post didn't go through. An example of what
| I am describing can be found here:
|
| http://www.magicpancakes.com/example_rgb_gap.jpg
|
| Hello all,
| I'm writing with what should be a relatively simple task. I've never
| tried to do anything beyond simple conversions, resizing, composites,
| etc. using IM, so I'm sort of a newbie.
| I am starting with three individual images, representing R G and B
| bands that I combine into a single RGB image. In the resulting
| image, the individual bands do not line up properly (an issue
| inherent in the individual bands, not anything that I can control).
| I've attached a small section as an example.
| I want to set the entire region to 0 while preserving the surrounding
| areas where the RGB pixel value is correct. In other words, if the
| value is 0 on an individual band, it should be 0 in the final image.
| I have been playing with fx statements, but I'm having trouble with
| syntax, and it is SLOW.
| I know there must be a simple and FAST solution. Perhaps creating a
| mask from the individual bands and then applying it over the RGB
| image? I need to run this as a step in a script to process many of
| these images (~11 mb each).
| Thanks for any suggestions.
What you are asing for is simple -- for use humans, It is not so simple
for a computer.
You basically want to adjust the overlay offset of each image until they
match.
if your 'black' or value 0 area are exactly the same orientation and
size you should be able to just find the first top-most zero point and
line up the offsets (set using -page and -flatten on the channel images
before the channel combining).
If however the shape could have slight rotations or size adjustments,
then you will need to find some way of locating 'registeration' common
control points in the images, distorting the images to line up the
areas, before combining the channels. Im is only on the brink of being
able to do this, though I have had little time to work on it.
Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
"Hear me, Oh Gods! Its a rest break not a timeout!
Put the fire back..."
--- Larry Niven and Steven Barnes, "Dream Park"
-----------------------------------------------------------------------------
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