c - matlab 的 bwarea 函数如何工作,我如何在 C 中实现它?

标签 c image-processing opencv matlab

我想了解 MATLAB 的 bwarea 函数的工作原理。我也想在 C 中实现这个功能。任何关于如何实现的想法都会非常有帮助。

在 opencv 中还有 bwarea 的替代品吗?

谢谢。

最佳答案

手册建议按 2×2 邻域检查像素。 这些邻居可以采取 6 种不同的模式,我试图在此处描绘这些模式。检查每个 2×2 邻居并计算总数是 bwarea 的工作原理。

allOn enter image description here enter image description here enter image description here enter image description here enter image description here

关于c - matlab 的 bwarea 函数如何工作,我如何在 C 中实现它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9683819/

相关文章:

c++ - 关于声明/释放 IplImages 的两种情况

android - SURF 和 SIFT 特征检测器 OpenCV android

c - Cudd_bddIte 的意外输出

CYGWIN Ms-Dos 路径检测到警告

c - 程序收到信号 SIGTRAP,Trace/breakpoint 陷阱。 [切换到线程 6]

java - 了解 BufferedImage.getRGB 输出值

python - 在 OpenCV + Python 中计算汽车

python - python上的Opencv错误

c - 解析 CSV 并将数据存储在结构数组中?

node.js - 使用 OpenCV 和 node.js 自动检测瞳孔