hausdorff distance and it's application to tile images classification
来源:互联网 发布:vscode 网页预览 编辑:程序博客网 时间:2024/06/05 05:05
前段时间有会友发过求瓷砖图片分类的帖子,我看这是一个演示hausdorf距离的好例子,所以就发到这里来了。
hausdorf 距离的介绍请参考如下文献:
[1] D. P. Huttenlocher, G. A. Klanderman, and W. J.
Rucklidge, “Comparing images using the Hausdorff
distance”, IEEE Trans. PAMI, vol. 15, pp. 850-
863, 1993.
[2] Marie-Pierre Dubisson and A.K.Jain. A modified hausdorff distance for
object matching
这里用的是文献[2] modified hausdorff distance.
核心函数:
function d = m_hd(im1, im2)%Effect: compute the modified haussdorff distance between 2 bw image 'im1'% and 'im2'%inputs:%im1, im2: bw image with the size%outputs:%d: the modified haussdorff distance between 'im1' & 'im2'%Author: Su dongcai at 2012/1/11%Email: suntree4152@gmail.com, qq:272973536%reference:%[1] D. P. Huttenlocher, G. A. Klanderman, and W. J. % Rucklidge, “Comparing images using the Hausdorff % distance”, IEEE Trans. PAMI, vol. 15, pp. 850- % 863, 1993.%[2] Marie-Pierre Dubisson and A.K.Jain. A modified hausdorff distance for% object matching%0. check inputs:im_sz1 = size(im1); im_sz2 = size(im2);if(sum(abs(im_sz1-im_sz2))~=0) error('im1 and im2 must with the same size');enddist_im1 = bwdist(im1); dist_im2 = bwdist(im2);pidx_im1 = find(im1); pidx_im2 = find(im2);%eq.(6) in [2]d12 = mean(dist_im1(pidx_im2));d21 = mean(dist_im2(pidx_im1));%eq.(8) in [2]d = max(d12, d21);
结果演示:
splice_alltiles('.\tileImgs', '.\', 'splicedTiles_sort',100, 10, 10, [1:100]);
得到原始未分类图片:
[sort_idx, num_indv] = sortImgs('.\tileImgs', 100, 1.5);
splice_alltiles('.\tileImgs', '.\', 'splicedTiles_sort',100, 10, 10, sort_idx);
得到分类图片:
[local]2[/local]
num_indv =
21 14 12 11 2 2 10 12 4 1 1 3 3 1 3
表示按列优先顺序(从上往下,从左往右),前21块砖为1类, 紧接着的14块砖为另一类,以此类推。
- hausdorff distance and it's application to tile images classification
- Hausdorff distance between mesh and its symmertic one.
- hausdorff distance 豪斯多夫距离
- Hausdorff distance的模板匹配
- A Sample Of HQL And It's Application
- Application Icons and Images for iOS
- Ball valve's classification and advantage
- 豪斯多夫距离-- Hausdorff distance of convex polygons
- It’s Time to Move to a Four-Tier Application Architecture
- non-linear stationary subspace analysis with application to video classification
- Unsupervised Nearest Neighbors Clustering With Application to Hyperspectral Images
- how to build your web application on spring boot and deploy it on heroku
- Gst-0.10 released and it's good time to be sentenced to death.
- WHAT IS ISO? A CAMERA’S SENSITIVITY TO LIGHT EXPLAINED, AND HOW TO USE IT
- OpenCV compute Hausdorff Distance Example (OpenCV计算Hausdorff距离样例)
- Spam classification using Spark’s DataFrames, ML and Zeppelin
- ICMP and it’s ApplicationsICMP and it’s Applications
- ICMP and it’s Applications
- 在使用vector的push_back函数时,Release版下运行会出错的一个原因
- Eclipse调试断点的几种方法
- NetBeans IDE 7 中使用英文字体中文变方块的解决办法
- java equals与hashCode 两个重要方法的重写
- 一些Source Insight常用宏
- hausdorff distance and it's application to tile images classification
- delphi-requirement
- source insight整段代码注释
- 几种常用的排序算法
- iphone4教程之使用iTunes为iphone4设置铃声教程
- Oracle 数据导入方法比较
- Java正则表达式详解
- 实用的adb命令
- Java 知识点