Wolfgang,

I believe you want to do the following using convert and -composite:

convert backgroundimage overlayimage maskimage -composite resultimage

but you need to change the mask so that it is not black and white, but make the white value some graylevel value that corresponds to the (complement of the) amount that you want the overlay to be transparent.

convert rect.jpg -threshold 99.8% -fill "rgb(75%,75%,75%)" -opaque white mask.jpg

Note: you should also be able to use gray75 or grey75 instead of rgb(...)
See: http://imagemagick.org/script/color.php

This replaces the white with a graylevel at 75% which means that it will make the overlay 25% transparent during the composite.

Use this overlay instead. Change the % to whatever works for you. I would start with 50% and then go either way, depending upon if you need more or less transparency.

Fred



This is probably quite easy, but I can't solve it at the moment:

I would like to suerpose the attached images (i.e. rather their larger
originals) such that I can see both of them.

composite -dissolve rect.jpg correct.jpg overlay.jpg

gives a quite what I desire, but I would like to restict the overlay to
the non-white region of 'rect.jpg'. I already generated a mask by

convert rect.jpg -threshold 99.9% mask.png

but I don't get any further. I read that 'composite' can take a third
image as a mask, but the 'dissolve' option somehow seems to affect that.

.......
The background behind this question is image rectification. The image
'rect.jpg' was rectified by use of IM such that it matches with the
perspectively correct image. This works well in the region surrounded by
the match points, but gives poor results the further you go out of that
surrounded area.

So in the end, I would like to use several rectified patches and map
them on the perspectively correct image. Therefore I have to limit each
supersposition area.
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to