• 大小: 927KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-25
  • 语言: Matlab
  • 标签: matlab  图像分割  

资源简介

采用交互式方法(人为标注一些像素点)的图像分割方法,matlab程序,可以运行,值得收藏。

资源截图

代码片段和文件信息

%   version 2.0 --Jun/2010 
%   version 1.0 --Feb/2008 

%   written by Shiming Xiang ( smxiang@gmail.com ) 


function dist = calcu_between_distance_matrix_iter(XR XS)

% XR:     the reference data points each column is a data point;
% XS:     the data points for calculating the distance matrix from XS to XR. Each column is a data point

% dist:  squared distance: each row is a distance vector for a data point w.r.t. XR




[D Nr] = size(XR);
[D Ns] = size(XS);

X2 = sum(XR.^2 1);              % square each element and then add each column
dist =  zeros(Ns Nr);

% I do not thinkwritting the following sentences with a for-loop is a good selection. Actually we can try to use technique of block matrices to speed up the computaion.

for i = 1: Ns
    XX = XS(:i);                                              % extract the i-th column
    XX2 = (XX‘ * XX) * ones(1 Nr);
    dist_temp = XX2 - 2 * XX‘ * XR;
    distance = X2 + dist_temp;
    dist(i :) = distance;
end






 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件      116618  2007-12-13 15:42  001.bmp
     文件      116618  2008-04-12 20:17  001_label.bmp
     文件       40362  2010-06-09 10:16  001_spline.bmp
     文件      227754  2008-04-20 17:33  002.bmp
     文件      227754  2008-04-20 18:11  002_label.bmp
     文件       77578  2010-06-09 10:19  002_spline.bmp
     文件      227754  2008-04-25 11:58  scissors.bmp
     文件      227754  2008-04-25 12:19  scissors_label.bmp
     文件       77578  2010-06-09 10:16  scissors_spline.bmp
     文件        2752  2008-04-12 20:20  data_image_kmeans_001.mat
     文件        3811  2008-04-25 12:19  data_image_kmeans_scissors.mat
     文件        1025  2010-06-09 12:16  calcu_between_distance_matrix_iter.m
     文件         625  2010-06-09 12:16  calcu_distance_matrix_iter.m
     文件         884  2010-06-09 14:01  construct_coefficient_matrix.m
     文件        6062  2010-06-09 12:37  call_segmentation.m
     文件         678  2010-06-09 12:17  cvrt_img_to_matrix.m
     文件        5491  2010-06-09 11:40  demo_for_figure_01.m
     文件        5504  2010-06-09 11:24  demo_for_figure_scissors_image.m
     文件        2402  2010-06-09 12:36  demo_for_your_own_image.m
     文件         999  2010-06-09 12:18  extract_label_from_image.m
     文件        1331  2010-06-09 12:18  post_process_image_for_two_class_regression.m
     文件        2143  2010-06-09 12:18  reshape_to_image.m
     文件         752  2010-06-09 14:02  solve_linear_system.m
     文件         665  2010-06-09 12:18  spline_regression.m
     文件        3062  2010-06-09 12:19  transform_spline.m
     文件        1990  2010-06-09 10:51  readme.txt

评论

共有 条评论