gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 16:38:57 24 4
gpt4 key购买 nike

我们的目标是无法运行 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com