does anyone know how do I calculate the distance between the blue point at the upper shape straight down to the border of that one below? I have the coordinates of the point. I was trying to check the color point by point until it reach the white part of the firgure below, but it is consuming too much hardware. (I start the positionY at the black part, but I may be doing something wrong...)
while(true){
p = pixelColor.ptr<Point3_<uchar> >( positionY, positionX);
if((p->z==255)&&(p->y==255)&&(p->x==255)){
cout<<"Found"<<endl;
break;
}
positionY++;
}