no errors

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
while ( !frontier.max_size()) 
{
if (img(p.x,p.y) >= lowthreshold)
{
	img(p.x,p.y)=max;
frontier.push_back(Point(p.x,p.y));
p.x++;
p.y++;
}
else 
{
	img(p.x,p.y)=0;
}
}




i am trying to write a program to perform thresholding on an image. through the program i have written am not getting any errors but i am not getting any output either.....i am getting the original image itself
Hello!

I don't know your algorithm but yours checks the diagonal. Because p.x and p.y is increased by 1 together.

Did you want it?

Additionally your p.x and p.y is increased only if true branch.


Bye
Last edited on
Topic archived. No new replies allowed.