资源简介
基于分割的立体匹配及算法-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
相关资源
- 历年数学建模论文-历年优秀论文Wor
- 光伏模拟系统建模与控制器参数优化
- 关于泊松点过程的生成方法-Report1_P
- PWM整流器及其控制PDF-PWM整流器及其控
- 图像去雾.zip
- 数字信号处理 理论算法与实现(第三
- SimPowerSystems教程
- 基于小波的图像拼接
- 6轴机器人正解、反解例程
- eigenface 人脸表情识别源代码
- 数学建模最短路问题
-
Targetli
nk 使用手册 - lenet-5训练MNIST
- 基于DSP_Builder的FIR滤波器设计
- Stateflow流程图
- EEGLAB中文手册
- 全国二等奖“华为杯”第十四届中国
- 深度图-人脸姿态-特征提取.zip
- RS编码verilog代码与参考文章
- 光伏蓄电池的仿真模型,用在微电网
- 捷联惯导算法与组合导航原理 严
- 基于PCA的人脸识别
- VMD原代码.zip
-
Modified GFDM(Eigendecomposition-ba
sed GF - 马尔科夫链转移矩阵
- 交流伺服电机PID速度智能控制
- 基于PCA的人脸识别MATLA B实现及GUI设计
- 车牌识别及语音播报
- 图像混沌加密
- libPLS文件包
评论
共有 条评论