How do I modify the Connectivity used in the regionprops function in matlab?
1 回表示 (過去 30 日間)
古いコメントを表示
In Detail. I have a 3-Dimensional Logical Matrix that represent an Image I have taken. Within this matrix I have two Objects I would like to find. It turns out these objects are visually discrete but are found as a single object by region props. I use the built in function bwconncomp with a connectivity of 6 to identify and remove most extraneous pixels, with the help of the algorithm on the bottom of this page in the documentation ( http://www.mathworks.com/help/images/ref/bwareaopen.html)
Upon doing this I am able to find two new Areas in the Generated Structure 'S' that together represent my one large previous object. When I generate a novel matrix using the ismember function and run region props on it it returns a single region made up of the two sub regions found by bwconncomp.
A close interrogation of the novel matrix uncovers that a single region is found because off the pixels that remain upon the removal of all pixels with a connectivity less than six, there are two of interest. One of these pixels belong to sub-object one and the other two sub-object 2. Call them Pixels A and B. However, Pixel A and B only belong in the same object if a connectivity greater than or equal to eight is used to find objects with regions props. They share only an edge and they are the only connection between Sub-object one and sub-object two This my question. How do I run regionprops using a connectivity other than the default one.
Alliteratively, would you recommend another means to separate "kissing" objects?
Thank you for any input. Olhado
0 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!