matlab - How does "bwareaopen" work? -


i saw documentation of bwareaopen, confusing me number of pixels. when 8-neighbourhood, doesn't mean 9-pixels? in function, specify number of pixels, , if see example provided in documentation, find mention 50-pixels, mean 10x5 window?

so, if specify number of pixels, function do? mentions removing small pixels. mean? isn't each square in image matrix considered square? small pixel in case?

thanks.

you mixing 2 of variables. in documentation can see following:

bw2 = bwareaopen(bw, p) bw2 = bwareaopen(bw, p, conn) 

where have p , conn variables.

conn neighbourhood variable. chose values understand "neigbour". see example:

conn=4;  - x - x 0 x - x -   conn=8  x x x x 0 x x x x 

higher numbers higher dimensions. p variable variable choose "small". the function bwareaopen delete white areas smaller p pixels.

in example in documentation can see:

    bw = imread('text.png');     bw2 = bwareaopen(bw, 50);     imshow(bw); 

but "50" p variable, not conn. conn not defined set default, in case 8.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

java - How to create Table using Apache PDFBox -

mpi - Why is MPI_Bsend not returning error even when the buffer is insufficient to accommodate all the messages -