"Go" matlab function _ Connected Area

Source: Internet
Author: User

Reprinted from the Einyboy of the Bowen Regionprops in MATLAB

1, matlab function bwareaopen── Delete Small area object
Format: BW2 = Bwareaopen (bw,p,conn)
Function: Delete the binary image bw object with an area less than p, by default using 8 neighbors.
Algorithm:
(1) Determine the connected components.
L = Bwlabeln (BW, conn);
(2) Compute the area of each component.
S = Regionprops (L, ' area ');
(3) Remove small objects.
BW2 = IsMember (L, find ([S.area] >= P));

2. Matlab function bwarea── Calculating Object Area
Format: total = Bwarea (BW)
Effect: estimates the area of an object in a binary image.
Note: This area and two value images do not necessarily have equal number of pixels in the object.

3. Matlab function imclearborder── Boundary Object Suppression
Format: IM2 = Imclearborder (im,conn)
Action: Suppresses light objects that are connected to the image boundary. If IM is a two-value graph, Imclearborder will delete objects connected to the image boundary. The default is conn=8.
Note: For grayscale images, Imclearborder tends to reduce the overall intensity level in addition to suppressing border struct Ures.
Algorithm:
(1) Mask image is the input image.
(2) Marker image is zero everywhere except along the border, where it equals the mask image.

4. Matlab function bwboundaries── Get object outline
Format: B = Bwboundaries (bw,conn) (basic format)
Function: Gets the contour of the object in the binary graph, similar to the function of the cvfindcontours function in OpenCV. B is a Px1 cell array, p is the number of objects, each cell is a matrix of Qx2, corresponding to the coordinates of the object's contour pixel.

5, Matlab function imregionalmin── get the minimum area
Format: BW = Imregionalmin (i,conn)
Function: Find the minimum area of image I (regional maxima), conn=8 by default.
Regional minima is connected components of pixels with a constant intensity value, and whose external boundary pixels all has a higher value.


6, Matlab function bwulterode── The maximum value of the distance transformation
Format: BW2 = Bwulterode (bw,method,conn)
Effect: Ultimate corrosion. Find the region maxima of the distance transform graph of the binary image bw (regional maxima). The distance used for distance transformation defaults to Euclidean, and connectivity is 8 neighbors.

7, Regionprops statistics The area of the marked area distribution, showing the total number of regions.
The regionprops syntax rule for the function is: STATS = Regionprops (l,properties)
This function is used to measure a series of attributes for each label area in the label Matrix L.
The different positive integer elements in L correspond to different regions, for example: the element corresponding to the integer 1 in L is the corresponding region of the element in the 1;l equal to the integer 2 in the region 2;

The return value stats is a structure array of length Max (L (:)), and the corresponding fields of the structure array define the measures under the corresponding properties of each zone.

Properties can be a comma-delimited list of strings, an array of cells containing strings, a single string of ' all ', or ' basic '. If properties equals the string ' All ', the metric data in Table 4.1 will be computed, and if properties equals the string ' Basic ', then the attribute: ' area ', ' centroid ' and ' BoundingBox ' will be computed. Table 1 is all the valid property strings.

Table 1 List of property strings----Measures the properties or functions of an image area
' Area 'Total number of pixels in each area of the image
' BoundingBox ' contains the smallest rectangle of the corresponding area
' centroid ' centroid of each region (center of gravity)
' Majoraxislength ' The long axis length of the ellipse with the same standard second-order center moment as the region (in pixel sense)
' Minoraxislength ' the short axis length of the ellipse with the same standard second-order center moment as the region (in pixel sense)
' Eccentricity ' the eccentricity of the ellipse with the same standard second-order center moment as the region (can be used as a feature)
' Orientation ' the intersection of the long axis and the x-axis of the ellipse with the same standard second-order center moment as the region (degrees)
' Image ' has a logical matrix of the same size as an area
' Filledimage ' has the same size fill logical matrix as an area
The number of on pixels in the ' filledarea ' filled area image
' Convexhull ' contains the smallest convex polygon of an area
' Conveximage ' draws the smallest convex polygon in the area above
The number of on pixels in a convex polygon image of ' convexarea ' populated area
A topological invariants in the ' Eulernumber ' geometric topology--Euler number
' Extrema ' eight-directional region extremum Point
' Equivdiameter ' diameter of the circle with the same area as the area
The pixel ratio of ' solidity ' at the same time in the region and its smallest convex polygon
The pixel scale of ' Extent ' at the same time in the region and its minimum bounding rectangle
Index subscript for the ' pixelidxlist ' storage area pixels
' Pixellist ' stores the pixel coordinates of the above index

"Go" matlab function _ Connected Area

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.