What I would like to do is extract the darker area of the river bed in the aerial image (1.png) then apply this area (ROI) to crop the water image (2.png), making it transparent outside this crop area. Then combine them to overlay the cropped area on the original image (such as 3.png).
I have done this using fuzz, but it’s not quite there. This method does not try to extract the darker areas of the original image and that is why it is not very good. I am just trimming the green which is trimming the green over the darker areas which I want to prevent.
Just to document how I am generating image 3 as attached.
Code: Select all
>convert 2.png –fuzz 40% -transparent green 2a.png
>composite 1.png 2a.png 3.png
1.png
2.png
2a.png
3.png