有谁知道处理1080 x 1920像素图像的C程序可能需要多少资源? [英] Does anyone know the amount of resources that a C program that handles 1080 x 1920 pixel images may require?

查看:60
本文介绍了有谁知道处理1080 x 1920像素图像的C程序可能需要多少资源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个项目,该项目包括从图像中提取文本,然后将其放置在.txt文件中,然后将该.txt转换为某些扬声器将播放的mp3.我的问题是,考虑到我希望它尽可能经济,我不知道哪种类型的微控制器将能够执行所有这些任务.

I am developing a project that consists of extracting text from images and then placing them in a .txt file and later converting that .txt into an mp3 that will be played by some speakers. My problem is that I do not know what type of microcontroller will be able to carry out all these tasks taking into account that I want it to be as economical as possible.

推荐答案

首先,您应该从计算器入手,然后输入数字以查看得到的结果.

First thing, you should start with your calculator and punch in the numbers to see what you get.

例如,一个1920 x 1080像素的图像,每像素1位,则约为253KB的数据.

For example, a 1920 x 1080 pixel image with 1 bit per pixel is ~253KB of data.

如果您要处理大图像文件,则微控制器不会将其剪切.如果那样的话,大多数微控制器的总内存不足1MB.例如, Raspberry Pi Pico 具有264KB的内存,相当大的数量,几乎不能容纳这么大的位图图像.

If you're handling large image files, a microcontroller isn't going to cut it. Most microcontrollers have less than 1MB of memory total, if that. The Raspberry Pi Pico for example has 264KB of memory, a fairly generous amount, and that can barely hold a bitmap image that size.

您需要一个更强大的处理器.Raspberry Pi具有2GB +的内存,并且可以处理以24位色深缩放的图像.每个像素1920 x 1080 x 3字节约为5.9MB的数据.在内存大于32MB的系统上完全可管理.

You need a more robust processor. A Raspberry Pi has 2GB+ of memory and can handle images that scale at 24-bit color depth. 1920 x 1080 x 3 bytes per pixel is about 5.9MB of data. Totally manageable on a system with >32MB of memory.

请记住,微控制器擅长执行简单的任务,例如驱动键盘,伺服电机,与传感器通信等,并且在进行密集处理方面确实很糟糕.Pico的CPU运行在133MHz.几瓦的功率只能做很多事情!

Remember, microcontrollers excel at performing simple tasks like driving a keyboard, servo motors, communicating with sensors and such, and are really bad at doing intensive processing. The Pico's CPU runs at 133MHz, that's it. There's only so much you can do with a few watts of power!

您将需要一个完整的CPU来进行图像处理,或者甚至需要更好的利用Pi等系统上的GPU元素来更高效地执行此操作,而这是微控制器所无法提供的.

You'll need a full CPU to do image processing, or even better, leverage the GPU elements on a system like the Pi to do that more efficiently, something no microcontroller is ever going to include.

这篇关于有谁知道处理1080 x 1920像素图像的C程序可能需要多少资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆