The objective for this python lib is be able to get images from USB probes easily, under python, in a user-friendly API, getting images in 3 lines of code.
import pyusbus as usbProbe probe = usbProbe.UP20() frames = probe.getImages(n=10) # should yield loop of 10 frames
Getting signals and images from ultrasound mechanical probes is an interesting step to know what radiofrequency signals mean in ultrasound imaging, be it for non-destructive testing or medical imaging. The two pulse-echo boards are achieving this, however, this requires extra hardware (electronics, probes, a fair bit of soldering, ..). Getting ultrasound images could be more straightforward, especially considering ~1kUSD usb probes available on the market. Their image quality is quite good at first glance.
This lib was tested on both a convex and a linear probe, each from a different manufacturer. Would you be interested in getting one, let me know so that I can refer to the fab contact at un0rick.cc.
Even if SDK exists at the OEM level, I have tried and explore the communication protocols using a VM, on which the OEM software is installed. Then listening using wireshark to get packets and understand how the probes communicate. Both were using Cypress chips.
The protocols themselves are not overly complicated, especially for the convex one. The linear one was a bit more tricky, playing between control and bulk transfers.
Once the probe is initiated, getting images is relatively straightforward, using bulk transfers. But the configuration is trickier.
Both probes require a bit of configuration, and byte arrays are sent to them to set items. In the case of the linear, additional short transfers took place.
It would definitely be interesting to get more into these configuration arrays, as one finds back some ultrasound artefacts (beamformers, time gain compensation, gain curves, …).
Interestingly, the two probes have different ways of working. The Linear one does send preformed images, for which the images is “ready to be used”. All parameters seem to be applied inside the probe head, as seen below:
However, the convex one seems to send back RF signals, post-beamforming. I’m curious to see if that is direct sampling or IQ demodulated signals.
Plenty left to do !
- Understand the packets
- Improve the documentation
- Clean the code
- Streamline the configuration procedures
- Get moar probes
Would you like to support the project, anything can go!
- You have ultrasound stuff (probes, phantoms, devices…) : let me know at luc at un0rick.cc. Always good to have stuff to explore. Been already playing with a fair bit of mechanical probes.
- Contribute to the repos? Straightforward, isn’t it?
- Any type of contribution works!
- If you are keen on understanding the configuration arrays or have any ideas.. feel free!
- Are you a researcher, startup or student in need of ultrasound hardware? Buy some open-source hardware and support the cause! Want to partner? I’m open, too. Let me know if you have questions or want to develop a proof of concept.
- Buy me a coffee, it’s always appreciated =)
- Wanna chat? Join the slack !