Spot Border Detection

版本 1.0.0.0 (40.6 KB) 作者: Eduard Polityko
Spot on image ? get border as numeric array and a number of measurements of a spot and a border
3.0K 次下载
更新时间 2007/1/15

查看许可证

A collection of files for path tracing is intended for detecting an external border of spot ? 1-connected black pixels set.
A c c e p t data: a file with an image or an appropriate array.
O u t p u t: two integer arrays with coordinates of spot border pixels.
In order to find a first point of spot border (starting pixel) we move from left upper pixel along first column until value of matrix element not equals zero. If no zero element in the first column then repeat detecting for second one and so on. Then we move along a border clockwise. It means that we move along black pixels and must always have a white pixel on the left hand.
Other o u t p u t s:
coordinates (position in input array) of points of optimal location (centers of mass) for a spot and for spot border (the mass of each pixel are supposed to be all equal with each other). Optimal location means that sum of distances from all points under consideration to this point is minimal;
border length as count of external edges of border pixels;
perimeter as length of line connected centers of border pixels;
coordinates (position in output arrays) of the most remote pixels and distance between them;
count of black pixels of spot and its border;
coordinates of ends of diagonal of minimal rectangle which includes a spot (sides of rectangle are supposed to be parallel to axes).
If a spot has ?rays? ? one pixel width lines connected with border you will be suggested delete it by virtue of a special procedure. This procedure doesn't delete vertices of polygons as it does ?spur? option of bwmorf function of Image Processing Toolbox. Time of path tracing significantly increases.
The application could be used in image processing, image recognition, measurements etc. and doesn?t use an Image Processing Toolbox.

引用格式

Eduard Polityko (2024). Spot Border Detection (https://www.mathworks.com/matlabcentral/fileexchange/13662-spot-border-detection), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R14
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

html/

版本 已发布 发行说明
1.0.0.0