 
             if (r1 == r2) return;
 
-            int mi = min(r1, r2);
-            int ma = max(r1, r2);
+            int mi = ::min(r1, r2);
+            int ma = ::max(r1, r2);
 
             int y = ma / comps.cols;
             int x = ma - y * comps.cols;

// the use of this software, even if advised of the possibility of such damage.
//M*/

#include "opencv2/gpu/device/common.hpp"
#include <iostream>
#include <stdio.h>


                        int label = new_labels[i][j];

                        if (c & UP)
                           label = ::min(label, labelsTile[yloc - 1][xloc]);

                        if (c &  DOWN)
                           label = ::min(label, labelsTile[yloc + 1][xloc]);

                        if (c & LEFT)
                           label = ::min(label, labelsTile[yloc][xloc - 1]);

                        if (c & RIGHT)
                           label = ::min(label, labelsTile[yloc][xloc + 1]);

                       new_labels[i][j] = label;
                    }
