I am using the answer of bill s in Greater operator should give greater element.
Here he showed the example:
lst1 = {{1, 2}, {3, 4}}; lst2 = {{5, 1}, {7, 2}};
max[list1_, list2_] := Module[{out}, Unprotect[Max]; SetAttributes[Max, Listable];
out = Max[list1, list2]; ClearAttributes[Max, Listable]; out];
max[lst1, lst2]
{{5, 2}, {7, 4}}
Now I would like to apply it to two images:
image 1:
image 2:
I though the code below would show the superposed image with max intensity at each pixel.
imageData1=ImageData[image1];
imageData2=ImageData[image2];
maxImage=Image[max[imageData1,imageData2]]
The result is a message:
Image::imgarray: The specified argument 1.` should be an array of rank 2 or 3 with machine-sized numbers. >>
What do I wrong?