matlab 实现disparity,Matlab里的disparity map 计算
Matlab里的disparity map 计算
(2010-11-21 15:54:10)
利用mean-shift function [fdsp dsp] = stereo(i1,i2, maxs) %----------------------------------------------------------------- % function [dsp_f dsp] = stereo(img_R,img_L, maxs) % % 3D from stereo. This function takes a stereopair % (that should already be registered so the only difference is inthe % 'x' dimension), and produces a 'disparity map.' The output here is % pixel disparity, which can be converted to actual distance fromthe % cameras if information about the camera geometry is known. % % The output here does show which objects are closer. % Brighter = closer % % EXAMPLE: % img_R = imread('tsuR.jpg'); % img_L = imread('tsuL.jpg'); % [dsp_f dsp] = stereo(img_R,img_L,20); % % Inputs: % img_R =right image % img_L =left image % maxs = maximum pixeldisparity. (depends on image pair) % % Outputs: % dsp = pixel disparities beforefinal filtering (0 indicates bad pixel) % dsp_f = final disparity mapafter mode filtering % % Algorithm: % 1) Compute pixel disparity by comparing shifted versions ofimages. % 2) Use 2D mode filter to replace low-confidence informationwith % informationfrom high-confidence neighbors. % % Coded by Shawn Lankton (http://www.shawnlankton.com) Feb.2008 %----------------------------------------------------------------- win_size = 7; %-- size of window used whensmoothing tolerance = 2; %-- how close R-L and L-R values need to be weight = 5;%-- weight on gradients opposed to color %--determine pixel correspondence Right-to-Left andLeft-to-Right [dsp1, diff1] = slide_images(i1,i2, 1, maxs, win_size,weight); [dsp2, diff2] = slide_images(i2,i1, -1, -maxs, win_size,weight); %--keep only high-confidence pixels dsp = winner_take_all(dsp1,diff1,dsp2,diff2,tolerance); %--try to eliminate bad pixesl fdsp = modefilt2(dsp,[win_size,win_size],2);
matlab 实现disparity,Matlab里的disparity map 计算相关推荐
- Matlab 读取文件夹里所有的文件
Matlab 读取文件夹里所有的文件 (image = dir('D:\gesture\*.*'); % dir是指定文件夹得位置,他与dos下的dir用法相同. 用法有三种: 1. dir 是指工作 ...
- matlab如何excel数据,Matlab如何读取Excel里的数据
Matlab如何读取Excel里的数据呢?一起看看下面这篇文章吧! 我们可以使用xlswrite,用法是这样的:xlswrite('Excel路径+Excel的名称','需要输出的矩阵名称')当然,如 ...
- matlab(simulink)里怎么求一个波形的动态平均值
matlab(simulink)里怎么求一个波形的动态平均值 搭建一个简单的模型 你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页.如果你想学习如何使用Markdown编辑器, 可以仔 ...
- matlab excel操作,Matlab读取excel文件里数据的操作流程
亲们入手Matlab软件过程里会读取excel文件里数据吗?下面小编就提供了Matlab读取excel文件里数据的操作流程,有需要的朋友一起来看看吧. 读取sheet1中的所有数据 以03版excel ...
- matlab计算结果为inf,matlab里的mean为什么计算结果是inf
matlab中的mean函数是什么意思啊,如何使用 在matlab中小编知道mean函数是分享均值的,可是mean(x,dim)中的dim是什么mean :平均值或数组的平均值 语法: M = mea ...
- 在matlab中画多个图,Matlab在一个图形窗口里画多个图形的详细教程
原创Matlab在一个图形窗口里画多个图形的详细教程 编辑:佚名 来源:PC下载网时间:2019-11-18 13:35:08 对于Matlab软件各位应该还有不懂的地方,比如说想在一个图形窗口里画多 ...
- matlab plot多个窗口,Matlab在一个图形窗口里画多个图形的详细教程
Matlab在一个图形窗口里画多个图形的详细教程 作者:佚名 来源:PC下载网时间:2019-11-18 13:35:08 对于Matlab软件各位应该还有不懂的地方,比如说想在一个图形窗口里画多个图 ...
- 【 MATLAB 】使用 MATLAB 求由差分方程表示的滤波器的响应的两种方法
例题: 一个3阶低通滤波器由下面差分方程描述: y(n) = 0.0181 x(n) + 0.0543 x(n-1) + 0.0543 x(n-2) + 0.0181 x(n-3) + 1.76 y( ...
- matlab中fdyn,Matlab的用法总结
1. 对序列进行洗牌 randperm() randperm()产生随机的序列 %if filepaths 是一个5*1的结构体,then cshuffle = randperm(length(fil ...
- 如何恢复matlab关联,恢复matlab文件关联
安装matlab后,其应用程序starter在文件夹C:\Program Files\MATLAB\R2010b\bin中 重装系统后,若没动MATLAB安装目标,则MATLAB不用重新安装.(同样的 ...
最新文章
- struts2值栈内部数据结构详解
- Algorithm:C++/python语言实现之求旋转数组最小值、求零子数组、求最长公共子序列和最长公共子串、求LCS与字符串编辑距离
- 死磕算法第二弹——栈、队列、链表(5)
- html 表格行排序,用客户端HTML表格排序对行进行分组
- 数字社交圈里的白酒“新”消费——腾讯2021白酒行业数字营销洞察白皮书
- AI应用说 | 「虫口夺粮」的害虫识别还是牛场24小时无人监控,AI+农业话题咱们唠一唠...
- 注解形式控制器配置(5) 数据绑定2
- python单词的含义-python
- 订单失效怎么做的_虾皮Shopee新加坡电商做什么产品好呢?订单少得可怜怎么办呢...
- 八大排序算法-java实现
- TI单节电量计基本介绍及常见问题解答
- 回溯法 | 图的m着色问题
- 2013年第四届蓝桥杯Java程序设计本科B组决赛 农场阳光(编程大题)
- HDU 5761 Rower Bo 物理题(积分求时间)
- ORACLE认证(OCM)介绍
- 创业公司如何应对大公司抄袭
- Python操作字符串-截取IP地址
- 马科维茨投资组合理论(均方模型)学习笔记——基于Matlab(二)
- Vivado+FPGA学习之第一次上电
- 动规(12)-开餐馆
热门文章
- 在macOS系统下外接硬盘安装windows10虚拟机
- 东软云HIS医疗管理系统——技术栈【SpringBoot+Vue+MySQL+MyBatis】
- 电商中的订单号如何实现
- XP默认输入法快捷键修复
- DAEMON tools lite “至少SPTD ..与 Windows 2000或更高版本” 报错的解决
- 国外小伙用石头提炼硅,制作芯片,号称99秒“解决”芯片危机
- Tech Blog by Eason!
- 学习|全屏时钟|计时器APP横评
- 模仿类似美团手机版应用源码
- 弘辽科技:淘宝直通车点击量是什么意思?直通车点击量怎么提升?