×

基于stm32f4的三维旋转显示平台资料下载

消耗积分:2 | 格式:pdf | 大小:722.41KB | 2021-04-24

分享资料个

现实的世界是一个拥有宽度、高度和深度的三维立体世界。在平面二维显示技术已经成熟的今天,三维立体显示技术首当其冲的成为了当今显示技术领域的研究热点。本作品搭建了基于stm32f4的三维旋转显示平台,它的显示原理属于三维显示中的体三维显示一类。它是通过适当方式来激励位于透明显示体内的物质,利用可见辐射光的产生三维体像素。当体积内许多方位的物质都被激励后,便能形成由许多分散的体像素在三维空间内构成三维图像。体三维显示又称为真三维显示,因为他所呈现的图像在真实的三维空间中,展示一个最接近真实物体的立体画面,可同时允许多人,多角度裸眼观看场景,无序任何辅助眼镜。本作品的特点在于,利用stm32f4的浮点运算能力,实现了低成本的体三维显示数据的生产,并利用类似分布式处理的系统结构,满足了体三维显示所需要的巨大数据吞吐量,等效吞吐量可达约300Mb/s1.系统方案众所周知人眼在接收被观察物体的信息时,携带物体信息的光信号通过人眼细胞及神经传入大脑神经,光的作用时间只是一个很短暂的时间段,当光的作用时间结束后,视觉影像并不会立即消失,这种残留的视觉称“后像”,视觉的这一现象则被称为“视觉暂留”( duration of vision)物体在快速运动时, 当人眼所看到的影像消失后,人眼仍能继续保留其影像0.1---0.4秒左右的图像。在空间立体物体离散化的基础上,再利用人眼视觉暂留效应,基于LED阵列的“三维体扫描”立体显示系统便实现了立体显示效果。如图1所示,以显示一个空心的边长为单位1的正方体为例。LED显示阵列组成的二维显示屏即为正方体每个离散平面的显示载体,LED显示屏上的被点亮的LED即为正方体的平面离散像素。我们将该LED显示平面置于轴对称的角度机械扫描架构内,在严格机电同步的立体柱空间内进行各离散像素的寻址、赋值和激励,由于机械扫描速度足够快,便在人眼视觉上形成一个完整的正方体图像。图1(a)所示为立方体0度平面二维切片图,图1(b)所示为立方体45度平面二维切片图,图1(c)所示为立方体135度平面二维切片图,图1(d)所示为立方体180度平面二维切片图,图1(e)所示为观看者观察到的完整立方体显示效果。图1系统方案如图2所示,整个系统由四个模块组成,其中数据获取单元主要由在PC上的上位机完成,利用3D-Max,OpenCV,OpenGL,将三维建模数据转化成三维矢量表述文件,传给由STM32F4 Discovery开发板构成的控制单元,利用其上的角度传感器,结合wifi模块或以太网模块通过电力线模式传给LED旋转屏单元,其中的STM32F4负责将ASE文件解析成LED显示阵列所需的点云数据流,通过串行总线传输给由FPGA驱动的LED显示阵列,通过LED刷新速率与机械单元旋转速率相匹配,从而实现体三维显示的效果。图22.系统硬件设计系统的机械部分如图3所示,显示面板的硬件结构如图4,图5所示。本系统的底部是直流电机和碳刷,直流电机主要负责带动上层的显示屏幕高速旋转,而碳刷则负责传递能量和通信信号。在显示屏幕的正面是由96*128构成的三色LED点阵,FPGA的PWM信号通过驱动芯片控制三色LED从而实现真彩显示。在屏幕背面由多块STM32F4,SD卡,FIFO构成,主要负责解析由控制单元传过来的ASE文件,并实时生成体三维显示数据,并传给LED灯板的驱动FPGA,并通过其实现最终的图像显示。3.系统软件设计3.1软件控制流程:3.2关于实时生成体三维显示数据的讨论:一个瓦片64*32LED层FPGA*8:每个16*16LED中间层stm32*2:每个4LED层的FPGA,也即32*32由于经过压缩,一个led数据为4bits所以一个stm32每一帧所要生成的数据为32*32*0.5bytes = 512bytes转速800转,一帧1/800s = 1.25ms = 1250000nsstm32f4主频168Mhz,指令周期 = 5.93ns约可执行20万多条指令假设fsmc总线的速度为50Mhz,则每帧写入的时间大概在0.02ms内程序总体思路事先算出所有电子帧上非零的点,以及连续0的个数,在每一个电子帧同步后,算出生成下一帧的数据,写入fifo输入:线段端点的集合//input: endpoints of segments which formed the outline of a 3D model//x position with range 0-95//y position with range 0-95//z position with range 0-128/******************************************///from later discussion, one of the Q format//type should replace the char type/******************************************/struct Coordinate_3D{_iq xPosition;_iq yPosition;_iq zPosition;};//after you get the intersection points in 3d coordinate, you need to remap it into 2d coordinate on the very electrical plane,//and the conversion is quite simple Coordinate_2D.yPosition = Coordinate_3D.zPosition; Coordinate_2D.xPosition = sqrt(xPosition^2+yPosition^2)struct Coordinate_2D{char xPosition;char yPosition;};struct Line{struct Coordinate_3D beginPoint;struct Coordinate_3D endPoint;unsigned char color;};//frame structure to store the visible points in one electrical frame//need to be discussed//here's the prototype of the Frame structure, and basically the frame struture should contain the visible points,//and the zero points. As we have enclosed the number of zero points after each visible points in their own data structure,//only the number of zero points at the beginning of the whole frame should be enclosed in the frame struturestruct Frame{int zerosBefore;PointQueue_t visiblePointQueue;};//we need a union structure like color plane with bit fields to store the color imformation of every four FPGAs in one data segment//actually, it's a kind of frustrateing thing that we had to rebind the data into such an odd form.union ColorPalette{struct{unsigned char color1 : 4;unsigned char color2 : 4;unsigned char color3 : 4;unsigned char color3 : 4;}distributedColor;unsigned short unionColor;};//and now we need a complete point structure to sotre all the imformation above//here we add a weight field = yPosition*96 + xPosition, which will facilitate//our sort and calculation of the zero points number between each visible point//it's important to understand that, 4 corresponding points on the LED panel//will share one visiblepoint data structure.(一块stm32负责4块16*16的LED,每块对应的点的4位颜色信息,拼成16位的数据段)struct VisiblePoint{struct Coordinate_2D coord;union Colorplane ColorPalette;int weight;int zerosAfter;};//as now you can see, we need some thing to store the visible points arraytypedef struct QueueNode{struct VisiblePoint pointData;struct QueueNode * nextNode;}QueueNode_t, *QueueNode_ptr;typedef struct{QueueNode_ptr front;QueueNode_ptr rear;}PointQueue_t;//finally, we will have 16*16 words(16 bits)to write into the fifo after each electrial frame sync cmd.

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !

'+ '

'+ '

'+ ''+ '
'+ ''+ ''+ '
'+ ''+ '' ); $.get('/article/vipdownload/aid/'+webid,function(data){ if(data.code ==5){ $(pop_this).attr('href',"/login/index.html"); return false } if(data.code == 2){ //跳转到VIP升级页面 window.location.href="//m.obk20.com/vip/index?aid=" + webid return false } //是会员 if (data.code > 0) { $('body').append(htmlSetNormalDownload); var getWidth=$("#poplayer").width(); $("#poplayer").css("margin-left","-"+getWidth/2+"px"); $('#tips').html(data.msg) $('.download_confirm').click(function(){ $('#dialog').remove(); }) } else { var down_url = $('#vipdownload').attr('data-url'); isBindAnalysisForm(pop_this, down_url, 1) } }); }); //是否开通VIP $.get('/article/vipdownload/aid/'+webid,function(data){ if(data.code == 2 || data.code ==5){ //跳转到VIP升级页面 $('#vipdownload>span').text("开通VIP 免费下载") return false }else{ // 待续费 if(data.code == 3) { vipExpiredInfo.ifVipExpired = true vipExpiredInfo.vipExpiredDate = data.data.endoftime } $('#vipdownload .icon-vip-tips').remove() $('#vipdownload>span').text("VIP免积分下载") } }); }).on("click",".download_cancel",function(){ $('#dialog').remove(); }) var setWeixinShare={};//定义默认的微信分享信息,页面如果要自定义分享,直接更改此变量即可 if(window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger'){ var d={ title:'基于stm32f4的三维旋转显示平台资料下载',//标题 desc:$('[name=description]').attr("content"), //描述 imgUrl:'https://'+location.host+'/static/images/ele-logo.png',// 分享图标,默认是logo link:'',//链接 type:'',// 分享类型,music、video或link,不填默认为link dataUrl:'',//如果type是music或video,则要提供数据链接,默认为空 success:'', // 用户确认分享后执行的回调函数 cancel:''// 用户取消分享后执行的回调函数 } setWeixinShare=$.extend(d,setWeixinShare); $.ajax({ url:"//www.obk20.com/app/wechat/index.php?s=Home/ShareConfig/index", data:"share_url="+encodeURIComponent(location.href)+"&format=jsonp&domain=m", type:'get', dataType:'jsonp', success:function(res){ if(res.status!="successed"){ return false; } $.getScript('https://res.wx.qq.com/open/js/jweixin-1.0.0.js',function(result,status){ if(status!="success"){ return false; } var getWxCfg=res.data; wx.config({ //debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 appId:getWxCfg.appId, // 必填,公众号的唯一标识 timestamp:getWxCfg.timestamp, // 必填,生成签名的时间戳 nonceStr:getWxCfg.nonceStr, // 必填,生成签名的随机串 signature:getWxCfg.signature,// 必填,签名,见附录1 jsApiList:['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo','onMenuShareQZone'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2 }); wx.ready(function(){ //获取“分享到朋友圈”按钮点击状态及自定义分享内容接口 wx.onMenuShareTimeline({ title: setWeixinShare.title, // 分享标题 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); //获取“分享给朋友”按钮点击状态及自定义分享内容接口 wx.onMenuShareAppMessage({ title: setWeixinShare.title, // 分享标题 desc: setWeixinShare.desc, // 分享描述 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 type: setWeixinShare.type, // 分享类型,music、video或link,不填默认为link dataUrl: setWeixinShare.dataUrl, // 如果type是music或video,则要提供数据链接,默认为空 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); //获取“分享到QQ”按钮点击状态及自定义分享内容接口 wx.onMenuShareQQ({ title: setWeixinShare.title, // 分享标题 desc: setWeixinShare.desc, // 分享描述 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); //获取“分享到腾讯微博”按钮点击状态及自定义分享内容接口 wx.onMenuShareWeibo({ title: setWeixinShare.title, // 分享标题 desc: setWeixinShare.desc, // 分享描述 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); //获取“分享到QQ空间”按钮点击状态及自定义分享内容接口 wx.onMenuShareQZone({ title: setWeixinShare.title, // 分享标题 desc: setWeixinShare.desc, // 分享描述 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); }); }); } }); } function openX_ad(posterid, htmlid, width, height) { if ($(htmlid).length > 0) { var randomnumber = Math.random(); var now_url = encodeURIComponent(window.location.href); var ga = document.createElement('iframe'); ga.src = 'https://www1.elecfans.com/www/delivery/myafr.php?target=_blank&cb=' + randomnumber + '&zoneid=' + posterid+'&prefer='+now_url; ga.width = width; ga.height = height; ga.frameBorder = 0; ga.scrolling = 'no'; var s = $(htmlid).append(ga); } } openX_ad(828, '#berry-300', 300, 250);