4 ms·
Probably not, unless you're willing to stretch the definition of 'real time' or 'image'. The classic Arduino Uno processor aka the ATMega328 does about 1 millio
by tkanarsky 4y ago
Probably not, unless you're willing to stretch the definition of 'real time' or 'image'. The classic Arduino Uno processor aka the ATMega328 does about 1 million 8-bit instructions per second per MHz of clock[0]; the Uno iirc has a 8mhz crystal. Even for the contrived example of a 1MP webcam that outputs uint8 grayscale values, you'd only be able to read it at about 8 frames per second, max, much less do anything with it. If you limited yourself to 64x64 boolean images, maybe; you could probably run a simple NN to categorize MNIST examples or do blob detection.
If you want to mess around with image processing within the realm of the Arduino framework, you could pick up a super cheap ESP32-CAM dev board [1], which has a small camera and a dual core microprocessor with much less anemic specs. You can of course program it using the Arduino IDE or, as I prefer doing it, using PlatformIO [2] which is a CLI tool and VSCode extension that allows you to use the [Arduino, ZephyrRTOS, mbed] framework with a zillion different dev boards and architectures.
[0]: https://en.m.wikipedia.org/wiki/ATmega328 https://en.m.wikipedia.org/wiki/ATmega328
[1]: https://www.amazon.com/HiLetgo-ESP32-CAM-Development-Bluetooth-Raspberry/dp/B07RXPHYNM https://www.amazon.com/HiLetgo-ESP32-CAM-Development-Bluetoo...
[2]: https://platformio.org/ https://platformio.org/
- makoto12 4y agolittle bit faster at 20Mhz, but not that that would help much. No reason i see to use a microprocessor for image processing. You either go for an FPGA, or something beefier like a raspberry pi
- tomalpha 4y agoI was going to quibble with your use of "microprocessor", given that you seem to be implying that it wouldn't include more powerful CPUs, but that got me thinking: given the change in transistor sizes since that name was coined should we be calling them "nanoprocessors" these days?
- tkanarsky 4y agoAgh, I meant to say microcontroller. But you're right, microprocessor is too broad of a term these days when it can refer to both a top-flight AMD workstation chip and a tiny stm8. Nanoprocessor sounds about right for the latter :)
- unwind 4y agoI think you meant "microcontroller", the Pi 4B for instance is powered by a 64-bit quad-core ARM A72 running at 1.5 GHz. That is most certainly what most people would call a (rather beefy) microprocessor.
- makoto12 4y agoyeah, definitely meant microcontroller. I'm targeting my statement at hobbyists and people working on solo projects. If you're some company that has the R&D budget to make it work with a beefy microprocessor, then that makes perfect sense.
- girvo 4y agoYou’d be surprised how far you can get with an ESP32-S3, the Xtensa LX7 is a weird little chip, but surprisingly can be quite powerful. Though I’m biased of course because we use them to their limits at work!
- makoto12 4y agohaha, if you can get an ESP32 to do image processing, then you're not an average hobbyist
- girvo 4y agoI guess, but it’s also pretty open code these days now that the S3’s LX7 has some nice vector extensions and other additions for ML applications :) https://github.com/espressif/esp-who https://github.com/espressif/esp-who It’s not out of reach for hobbyists, I think, though getting it to run very well might be. And I would certainly tell anyone interested to start with something more powerful first! I’m currently experimenting with porting Arraymancer to the S3, just to see how it can run, outside of work time mind you. https://github.com/mratsim/Arraymancer https://github.com/mratsim/Arraymancer Slightly orthogonal to what we are discussing above, but more to show that these weird micros have some surprising grunt if you know how to make them sing. Though I still wish ESP-IDFs malloc was better behaved.
- chris_overseas 4y agoThere are many reasons: power usage, size, cost, availability being some of the main ones. I've been using microcontrollers for wearables and, as much as I'd like the power and ease of use of a Raspberry Pi, the size and power requirements can be too much to deal with. The Teensy 4.0 has proven to be a much better alternative for me - much smaller, lower power consumption, and still plenty of performance including a floating point unit which has been a game-changer.
- BlueTemplar 4y agoWouldn't the Pi be a problem, considering it's core OS / especially graphic processing "OS" is closed source ?
- joshvm 4y agoThere's also the OpenMV cam: https://openmv.io/ https://openmv.io/
- utopcell 4y agoIndeed, RP2040 and ESP32 is where the world has moved to. What would be the point of ever using ATMegas anymore, when the RP2040 has two Cortex-M0+ 133MHz cores, a bunch of peripherals and only costs $1 ?
- type111 4y agoThe RP2040 itself 'only costs $1' without the flash chip it needs. Then what if you need an analog comparator? Another chip. Now what if you want a medium current PWM output? Another chip. AVRxt can output as much current on a single pin as an RP2040 can through its entire package. The two are simply not competing in the same space. AVR isn't strong in computation but is a great general purpose brain for many simple real world interfacing machines.
- kragen 4y ago> Now what if you want a medium current PWM output mmbt2222, 2n7000, uln2003, tip122, irf540/9540, sheesh its inputs have a schmitt trigger mode. if you can deal with 200mv hysteresis you can maybe use three resistors instead of an analog comparator
- type111 4y agoAll options and all costing you more money on top of the 'only $1'.