简体   繁体   English

相机/ LCD分辨率缩放

[英]Camera/LCD resolution scaling

Thanks in advance. 提前致谢。

I am trying to interface a 480x640 camera with a 480x272 lcd (through an FPGA) while preserving as much data as possible and maintaining a clear image. 我试图将480x640摄像机与480x272液晶显示器(通过FPGA)接口,同时保留尽可能多的数据并保持清晰的图像。 Is this possible? 这可能吗? If so, is this a scaling issue and are there any relevant algorithms you can direct me towards? 如果是这样,这是否是扩展问题,您是否可以指导我使用任何相关算法?

There are several image resizing techniques out there (just google). 有几种图像调整大小的技术在那里(只是谷歌)。 Some of the fancier ones will require thought vis-a-vis implementation in hardware and likely require a reasonable pipeline and one or two hardware multipliers (though you could theoretically pipeline this too). 一些较高级的处理器需要在硬件上进行面对面的思考,并且可能需要合理的流水线和一个或两个硬件乘数(尽管理论上您也可以流水线化)。 Are you planning on resizing video in real-time or just a single still? 您打算实时调整视频大小还是仅静态调整大小?

The easiest/dirtiest is just subsampling. 最简单/最脏的只是采样。 In your case you need to shrink the vertical of your image by at least a factor of 640/272 = 2.35. 在您的情况下,您需要将图像的垂直方向至少缩小640/272 = 2.35。 Since the aspect ratio of the display and the camera are different you won't be able to maintain a full display and the aspect ratio of the original image. 由于显示器和相机的纵横比不同,因此您将无法维持完整的显示和原始图像的纵横比。 Of course you can't really subsample by a non integer number. 当然,您不能真正通过非整数对子采样。 What you can do instead is either a combination of interpolation and sub-sampling or just round the 2.35 to 2 or 4 and sub-sample in both dimensions. 相反,您可以做的是将内插和二次采样结合起来,或者仅将2.35取整为2或4,然后在两个维度上进行二次采样。 Obviously if you go to 2 you'll end up cropping a bit and if you go to 4 then you won't fill the entirety of the vertical dimension. 显然,如果转到2,则最终会裁切一点,如果转到4,则将无法填充整个垂直尺寸。 Subsampling is nice because it's trivial to implement in hardware. 子采样很好,因为在硬件中实现它很简单。 On the other hand it's not the best algorithm for a nice image result. 另一方面,它不是获得良好图像效果的最佳算法。 My suggestion would be to start with subsampling (you can easily simulate in matlab or something similar) and see if it's good enough for you. 我的建议是从子采样开始(您可以轻松地在matlab或类似工具中进行模拟),然后看看它是否对您足够好。 If so go for it. 如果是这样,那就去吧。 Otherwise keep exploring in the SW world and think about a HW implementation of whatever algorithm seems interesting to you. 否则,请继续在软件世界中进行探索,并考虑对您似乎感兴趣的任何算法进行硬件实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM