white in the black

Posted by gcc on Stack Overflow See other posts from Stack Overflow or by gcc
Published on 2010-04-18T21:00:46Z Indexed on 2010/04/18 21:03 UTC
Read the original article Hit count: 402

Filed under:

how can i detect white image surrounded by black image

take input

000 000 000 000 000 255 255 255 000 000 255 255 255 000 000 255 255 255 000 000 000 000 000 000 000

make it simpliest form

0 0 0 0 0 2 2 2 0 0 2 2 2 0 0 2 2 2 0 0 that step i couldnot did

then

search for coordinate of leading entry x,y

then

determine are there any detection

if not

print no detection

else

go another step

find length of the square

and

how can calculate length and widht of the square

© Stack Overflow or respective owner

Related posts about gcc