-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
in texture.cpp a function named: Mat segmentTexture() has a loop question:
do
{
seedPoint.x=rng.uniform(0, texture.cols);
seedPoint.y=rng.uniform(0, texture.rows);
seed=texture.at(seedPoint.y, seedPoint.x);
}
while(mark.at(seedPoint.y, seedPoint.x) !=0 );
if this region are all 0, it will not end. So could add a conditon:
int cout_num = 0;
do
{
seedPoint.x=rng.uniform(0, texture.cols);
seedPoint.y=rng.uniform(0, texture.rows);
seed=texture.at<Vec4b>(seedPoint.y, seedPoint.x);
cout_num++;
}
while(mark.at<uchar>(seedPoint.y, seedPoint.x) !=0 && cout_num <= 50);
Metadata
Metadata
Assignees
Labels
No labels