Home | History | Annotate | Download | only in research

Lines Matching defs:diff

8 /* Tool for drawing diff PPM images between two input PGM images. Normally used
39 void CalculateDiff(int** diff, Image image1, Image image2,
43 diff[i][j] = static_cast<int>(image1[i][j]) - image2[i][j];
48 void DrawDiff(int** diff, Image image1, Image image2,
54 if (max < diff[i][j]) max = diff[i][j];
55 if (min > diff[i][j]) min = diff[i][j];
70 int max_val = std::max(min_val, abs(diff[i][j]));
71 if (diff[i][j] > 0) { /* red */
72 row[3 * j + 0] = abs_max - max_val + diff[i][j];
77 row[3 * j + 1] = abs_max - max_val - diff[i][j];
108 int** diff = new int*[h1];
109 for (size_t i = 0; i < h1; ++i) diff[i] = new int[w1];
110 CalculateDiff(diff, image1, image2, h1, w1);
113 DrawDiff(diff, image1, image2, h1, w1, fdiff);