|
"andrea " <nacchio1983@yahoo.it> wrote in message <i11ubt$ad7$1@fred.mathworks.com>...
> Hi,
>
> I have a BW image (black=0 white=255).
> I want to find the border pixels between black pixels and white pixels.
>
> I wrote this code:
>
> for col = 1:size(img,2)
> [r c v] = find(img(:,col)==255, 1, 'first');
> ...
> end
>
> But in the image I have horizontal and vertical edge and, in the case of vertical edge, the output of fuction find is the first pixel of the edge.
It's hard to understand what you're saying without seeing an image. Could you post an image somewhere so we can see it?
If I'm understanding you correctly what you want is every pixel that's neither black or white but touching a black or white object. Is that correct? Or do you just want all non -(black, white) pixels?
|