资源简介
基于分割的立体匹配及算法-Segment_Based_Stereo_Matching.part2.rar
Segment-Based Stereo Matching Using Belief Propogation and a Self-Adapting Dissimilarity Measure
一文及所带程序,可以实现两幅图像的立体匹配及可得到视差图。
PS:我现在做的方向是3DTV,有此方向的朋友可联系我。
QQ:349537618
Segment-Based Stereo Matching Using Belief Propogation and a Self-Adapting Dissimilarity Measure
一文及所带程序,可以实现两幅图像的立体匹配及可得到视差图。
PS:我现在做的方向是3DTV,有此方向的朋友可联系我。
QQ:349537618

代码片段和文件信息
%-----------------------------------------------------------------
% function [dsp pixel_dsp segs labels] = total_stereo...
% (i1i2 hshrMmins maxs segs labels)
%
% A first take at 3D from stereo. This function takes a stereo pair
% (that should already be registered so the only difference is in the
% ‘x‘ dimension) and produces a ‘disparity map.‘ The output here is
% pixel disparity which can be converted to actual distance from the
% cameras if information about the camera geometry is known.
%
% The output here does show which objects are closer and ‘segments‘
% by distance to camera.
%
% EXAMPLE:
% i1 = imread(‘tsuL.jpg‘);
% i2 = imread(‘tsuR.jpg‘);
% [d p s l] = total_stereo(i1i210730120);
%
% dsp = final disparity map
% pixel_dsp = pixel disparities before final filtering
% segs = segmented image from msseg
% labels = labemap from msseg
%
% i1 = right image
% i2 = left image
% hs = spacial bandwidth (for msseg) (usually 10)
% hr = range(color) bandwidth (for msseg) (usually 7)
% M = minimum segment size (for msseg) (usually 30)
% mins = minimum shift (usually 1)
% maxs = maximum shift (depends on images)
% segs = segments (if you have them pre-computed)
% labels = labelmap (if you have it pre-computed)
%
% Algorithm adapted from: “Segment-based Stereo Matching Using
% Belief Propogation and Self-Adapting Dissimilarity Measure“ by
% Klaus Sormann and Karner.
%
% (The algorithm in the paper is better and more complete. The
% codes here are inspired by these guys and parts are original)
%
% Coded by Shawn Lankton (http://www.shawnlankton.com) Dec. 2007
%-----------------------------------------------------------------
function [dsp pixel_dsp segs labels] = total_stereo...
(i1i2 hshrMmins maxs segs labels)
win_size = 5; %-- larger for less textured surfaces
tolerance = 0; %-- larger for less textured surfaces
[dimy dimx c] = size(i1);
[xx yy] = meshgrid(1:size(i12)1:size(i11));
dsp = ones(size(i11)size(i12));
%--segment reference image
if(nargin<9)
[segs labels] = msseg(i1hshrM); %-- mean shift segmentation
end
%--determine pixel correspondence Right-to-Left
[disparity1 mindiff1] = slide_images(i1i2 mins maxs win_size);
%--determine pixel correspondence Left-to-Right
[disparity2 mindiff2] = slide_images(i2i1 -mins -maxs win_size);
disparity2 = abs(disparity2); %-- disprities will be negative
%--create high-confidence disparity map
pixel_dsp = winner_take_all(disparity1 mindiff1 disparity2 mindiff2);
%--filter with segmented image
for(i = 0:length(unique(labels))-1)
lab_idx = find((labels == i));
inf_idx = find(labels == i & pixel_dsp dsp(lab_idx) = median(pixel_dsp(inf_idx));
end
%--I think this looks cleaner but it doesn‘t really serve a purpose
pixel_dsp(pixel_dsp==inf)=NaN;
%%----- HELPER FUNC
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3304030 2010-05-19 10:23 lankton_stereo\msseg\Mean Shift A Robust Approach Toward Feature Space Analysis.pdf
文件 1195 2007-12-20 11:48 lankton_stereo\msseg\msfilt.m
文件 1468 2007-12-20 11:48 lankton_stereo\msseg\msseg.m
文件 21504 2010-05-27 20:41 lankton_stereo\msseg\readme 整理.doc
文件 1550 2010-05-27 20:32 lankton_stereo\msseg\readme.txt
文件 798 2007-12-20 11:48 lankton_stereo\msseg\RGB2Luv.m
..A.SH. 9728 2010-03-17 17:07 lankton_stereo\Thumbs.db
文件 6004 2007-12-20 11:48 lankton_stereo\total_stereo.m
文件 174571 2007-12-20 11:48 lankton_stereo\tsuL.png
文件 175014 2007-12-20 11:48 lankton_stereo\tsuR.png
文件 418169 2010-05-31 16:43 lankton_stereo\unti
文件 70457 2010-05-31 16:48 lankton_stereo\unti
文件 466877 2010-03-17 17:07 Segment-ba
----------- --------- ---------- ----- ----
1347335 分割檔 2 12
相关资源
- 编程实现二维DCT变换
- 图像二值化
- 用FFT对信号进行频谱分析
- Tone-Reservation
- QGA 量子遗传算法
- 差分形式的阻滞增长模型
- 遗传算法的M文件
- 简单二阶互联系统的非线性动力学分
- 手写数字识别-模板匹配法
- Stock_Watson_动态因子分析模型
- 果蝇优化算法优化支持向量回归程序
- 自己做的一个简单GUI扑克纸牌识别-
- multi output SVR
- AR过程的线性建模过程与各种功率谱估
- PCNN TOOLBOX
- plstoolbox.zip
- 中国国家基础地理信息系统GIS数据
- 粒子群微电网优化调度
- 矩阵分析-经典教材-中文版-Roger.A.Ho
- 压缩感知TwIST
- 基于最小错误率的贝叶斯手写数字分
- 最全系统辨识源代码,包括多种最小
- 导弹制导实验
- 画跟踪精确度图的程序.zip
- 重力场大地水准面及重力异常阶次误
- prtools5.2.3工具包
- 脉冲耦合神经网络工具箱PCNN-toolbox
- SVM算法-回归拟合程序.zip
- Kriging代理模型EGO算法.zip
- Matalb实现停车场完整系统
评论
共有 条评论