在 ARM 9 板上显示图像
我需要在嵌入式系统上显示图像。板卡配置如下:
AT91sam9263-EK,运行Linux 2.6.20内核。这个板子有图像处理库吗?处理器是ARM926EJ-S。
谢谢大家
I need to display images on an embedded system. The board configuration is as follows:
It is AT91sam9263-EK, with Linux 2.6.20 kernel running on it. Are there any image processing libraries for this board.The processor is ARM926EJ-S.
thank you all
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果帧缓冲区未在 Linux 操作系统中激活,我知道它位于 Linux4Sam。您可以随时尝试通过发出命令
cat /bin/sh > 来激活它。 /dev/fb0
;屏幕上应出现随机图案(请注意,可能需要激活背光 - 如果关闭背光,您可能根本看不到任何内容)。您可能必须首先终止目标上正在运行的图形环境。如果您只想显示图像,可以通过打开帧缓冲区 (/dev/fb0) 并写入它(或只是 cat 它)来实现;但你必须有正确格式的图像。如果我没记错的话,评估板中的帧缓冲区是 RGB555(即 5 位用于红色,5 位用于绿色,5 位用于蓝色)。
如果您想使用 GUI 库,则必须使用具有帧缓冲区后端的库。在标准 Linux 系统上,GUI 库假定您已安装 X,但其中一些库还具有帧缓冲区后端。例如 Qt 可以以这种方式编译(但我认为你必须修改它才能提供正确的颜色信息;它只支持开箱即用的 RGB565)。 DirectFB 是一个更简单的解决方案,提供基本的图形支持(但它支持 FreeType,为您提供良好的字体支持)。有关其他示例,请参阅上面提供的链接。
If the framebuffer isn't activated in the Linux OS you got I know that it is in the Linux OS provided by Linux4Sam. You can always try if it is activated by issuing the command
cat /bin/sh > /dev/fb0
; a random pattern should appear on the screen (note that it might be necessary to activate the backlight - if it is turned off you might not see anything at all). You might have to kill the graphical environment that is running on target first.If all you want to do is to display an image it is possible to do that by opening the framebuffer (/dev/fb0) and write to it (or just cat it); but you have to have an image in the correct format. If I remember correctly the framebuffer in the evaluation board is a RGB555 (i.e. 5 bits for red, 5 bits for green and 5 bits for blue).
If you want to use a GUI library you have to use one that has a framebuffer backend. On a standard Linux system a GUI library assumes that you have X installed but some of them also have framebuffer backends. Qt for instance can be compiled in such a way (but I think you have to modify it to provide the correct color information; it only supports RGB565 out of the box). DirectFB is a simpler solution that provides basic graphic support (but it has support for FreeType giving you good font support). See the links provided above for other examples.
首先,您需要配置在主板上运行的 framebuffer (fbdev)。它将充当您的硬件和 GUI 应用程序之间的一层。 在这里您会找到很多有关它的信息。
完成后,就会出现一堆库/框架。最受欢迎的几个是 SVGAlib 和 SDL(需要 X)。
与通常的跨平台源一样,您需要使用主板的工具链重新编译这些库。
更新:
SO 为您提供的更多链接:此处< /a> 和此处。
First of all, you need to configure framebuffer (fbdev) running on your board. It will act as a layer between your hardware and your GUI app. Here you will find a lot of info about it.
After you are done there is a bunch of libraries/frameworks out there. Few of the most populars are SVGAlib and SDL (requires X).
As usually with cross-platform sources, you will need to recompile those libraries using the toolchain for your board.
UPDATE:
Few more links for you from SO: here, and here.