找到你要的答案

Q:Area of the BoundingBox matlab

Q:MATLAB框区域

blobAnalysis = vision.BlobAnalysis('BoundingBoxOutputPort', true, ...
'AreaOutputPort', true, 'CentroidOutputPort', true, ...
'MinimumBlobArea', 100);
[areas, centroids, bbox] = step(blobAnalysis, filteredForeground);

Does the result in the vector areas represent the area of the blob (it measured in pixel or no)?

blobAnalysis = vision.BlobAnalysis('BoundingBoxOutputPort', true, ...
'AreaOutputPort', true, 'CentroidOutputPort', true, ...
'MinimumBlobArea', 100);
[areas, centroids, bbox] = step(blobAnalysis, filteredForeground);

结果在矢量区域代表斑点面积(测量像素或没有)?

answer1: 回答1:

As mentioned in the docs for the BlobAnalysis object:

[AREA,CENTROID,BBOX] = step(H,BW) returns the area, centroid and the bounding box of the blobs when the AreaOutputPort, CentroidOutputPort and BoundingBoxOutputPort properties are set to true.

Therefore, the answer to your question is YES. And the result is in pixels.

To answer your comment about the bounding box, if you read CAREFULLY the docs you will find the information:

M-by-4 matrix of [x y width height] bounding box coordinates, where M represents the number of blobs and [x y] represents the upper left corner of the bounding box

在文档中提到的blobanalysis对象:

[AREA,CENTROID,BBOX] = step(H,BW) returns the area, centroid and the bounding box of the blobs when the AreaOutputPort, CentroidOutputPort and BoundingBoxOutputPort properties are set to true.

所以,你的问题的答案是肯定的。结果是像素。

回答你关于包围盒的评论,如果你仔细阅读文档,你会发现信息:

M-by-4 matrix of [x y width height] bounding box coordinates, where M represents the number of blobs and [x y] represents the upper left corner of the bounding box

matlab