matlab - OpenCV 中是否有与 Matlab Vision.blobAnalysis() 功能相同的函数?

标签 matlab opencv computer-vision feature-detection

我们的目标是无法运行 Matlab 的嵌入式系统上的 Linux。
我们有计算机视觉 Matlab 脚本原型(prototype),并希望将此功能(Vision.blobAnalysis)移植到嵌入式。

两种选择:使用 Matlab CODER 将 Matlab 计算机视觉功能移植到嵌入式,或在嵌入式系统上使用 openCV 重现功能。

最佳答案

尝试一个简单的 Blob 检测器:

using namespace cv;
// Read image
Mat im = imread( "blob.jpg", IMREAD_GRAYSCALE );

// Set up the detector with default parameters.
SimpleBlobDetector detector;

// Detect blobs.
std::vector<KeyPoint> keypoints;
detector.detect( im, keypoints);

// Draw detected blobs as red circles.
// DrawMatchesFlags::DRAW_RICH_KEYPOINTS flag ensures the size of the circle corresponds to the size of blob
Mat im_with_keypoints;
drawKeypoints( im, keypoints, im_with_keypoints, Scalar(0,0,255), DrawMatchesFlags::DRAW_RICH_KEYPOINTS );

// Show blobs
imshow("keypoints", im_with_keypoints );
waitKey(0);

关于matlab - OpenCV 中是否有与 Matlab Vision.blobAnalysis() 功能相同的函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32097839/

相关文章:

python - opencv,python,如何读取框中的分组文本

matlab - 图像处理——使用opencv进行服装分割

matlab - 如何创建并行循环?

c - 在 C 中使用大数组时出现 EXCEPTION_ACCESS_VIOLATION

python - cv2.SIFT() 导致段错误

python - 使用 np.where 基于另一个维度设置一个 numpy 切片

python - 相当于 Python 中 Matlab 中的 'ismember' 吗?

image-processing - 创建一个简单的 haarcascade 所需的正面和负面图像的数量

opencv - 使用用户定义的目标跟踪视频序列

computer-vision - 识别图片中的动物