matlab - 如果图像使用 matlab,则区域周围的最小矩形边界框

标签 matlab image-processing computer-vision

您好,我正在使用 matlab 并尝试使用边界框选择一个区域。代码如下图

BW=bwconncomp(I1);
STATS = regionprops(BW, 'FilledArea','BoundingBox','Image');

结果如下图

enter image description here

我正在尝试获得如下所示的输出。可能吗?

enter image description here

最佳答案

我在 File Exchange 上找到了这两个用于生成定向边界框的代码:

  • orientedBox David Leglandgeom2d 中:

    OBOX = orientedBox(PTS) Computes the oriented bounding box of a set of points.

  • imOrientedBox Feret 直径和方向盒 也由 David Legland

    OBB = imOrientedBox(IMG) Computes the minimum area oriented bounding box of labels in image IMG.

您可能会从 imOrientedBox 中找到您想要的东西。

关于matlab - 如果图像使用 matlab,则区域周围的最小矩形边界框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29103460/

相关文章:

c++ - OpenCV - 加速 3x3 补丁的 SSD 计算

machine-learning - 在测试中使用增强数据图像

java.lang.UnsatisfiedLinkError 即使设置了 LD_LIBRARY_PATH 和 -Djava.library.path

matlab - 在Matlab结构中过滤 'rows'

c++ - BLAS 中矩阵之间的元素明智乘法?

c++ - 绘制图像的最简单方法?

image - 计算图像中每行的像素数

matlab - 填充用 patch 函数绘制的矩形

Python Scikit-凝胶电泳数据的图像处理

algorithm - 图像方向图