| [mmToggle] [Up] [mmIntersec] | Operations |
| User Feedback |
| y | Image [ Unsigned gray-scale (uint8 or uint16), signed (int32) or binary image ] |
mmAddm creates the image y by pixelwise addition of images f1 and f2. When the addition of the values of two pixels saturates the image data type considered, the greatest value of this type is taken as the result of the addition.
unsigned char _f[] = {255, 255, 0, 10, 0, 255, 250};
unsigned char _g[] = { 0, 40, 80, 140, 250, 10, 30};
Image f = Image(7, 1, 1, "uint8", (char *)_f);
Image g = Image(7, 1, 1, "uint8", (char *)_g);
Image y1 = mmAddm(f, g);
Image y2 = mmAddm(g, 100);
printf("y1 =\n%s\n", (char *)y1.str());
printf("y2 =\n%s\n", (char *)y2.str());
y1 =
255 255 80 150 250 255 255
y2 =
100 140 180 240 255 110 130
Image a = mmReadgray("keyb.tif"); Image b = mmAddm(a, 128); mmShow(a); mmShow(b);
![]() |
![]() |
|
| a | b |

| [mmToggle] [Up] [mmIntersec] | |
| User Feedback | |
| Copyright (c) 1998-2008 by SDC Information Systems |