简体   繁体   English

opencv 安卓边缘检测

[英]opencv android-edge detection

I am creating a project in android,where i need to detect the edges of the object in very intial stage.But the edges are not appropriate they are broken.I have tried otsu thresholding method for edge detection .我正在 android 中创建一个项目,我需要在非常初始的阶段检测objectedges 。但edges不合适,它们被破坏了。我尝试了 otsu thresholding方法进行edge detection Now im trying to get the intensity from histogram,can anyone help me to figure out the mean from the histogram of an image using calchist method in opencv .现在我试图从直方图中获取强度,任何人都可以帮助我使用calchist opencv从图像的histogram中找出平均值。 Also, i am giving a thought to dividing the image into blocks of 3* 3,as then computing each block.,but enable to find how to do that.另外,我正在考虑将图像划分为 3 * 3 的块,然后计算每个块。但是能够找到如何做到这一点。 I am using opencv library.我正在使用opencv库。

Thanks, Please do respond.谢谢,请回复。

Canny, sobel,prewitt and many edge detection algorithms perform edge detection. Canny、sobel、prewitt 和许多边缘检测算法都执行边缘检测。 But, as you said,they remain incapable to extract all edges.但是,正如您所说,它们仍然无法提取所有边缘。 You can use some edge linking algorithms to link those broken edges.您可以使用一些边缘链接算法来链接那些破碎的边缘。 I used ant colony algorithm(genetic algorithm) to make the image understandable.我使用 ant 菌落算法(遗传算法)使图像易于理解。 But there are dozens of linking algorithm you can use.但是您可以使用数十种链接算法。

Cheers.干杯。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM