Open source USB C camera with C mount lens, MIPI Sensor, Lattice FPGA, USB 3.0
circuitvalley.com
circuitvalley.com
Was it a scrappy startup or a large established corporation?
Asking since I've also experienced this and seems to be prevailing in this industry and yet I feel it's relatively easily preventable.
This camera disaster was in a big old company. They wanted to get mpg pictures straight from the camera to show on other device. Half million € was gone between planing and first buggy prototype. A company was hired to design it externally. This external company generated design with matlab rendering it non-debuggable.
I think it’s managerial thing. I was screaming many times as simple developer not to hit own leg with an axe. But I felt like I was barking. Manager has always last word and there is a need for convincing to do technically sane thing. Now I just do what I was told. Even when technically it makes no sense. I don’t need additional tensions with insulted manager (anymore).
I wish it could be mass produced, with some minor polish. I would throw money at it instantly. If the author is reading this, have you considered crowd sourcing it? It's great that everything is open source, but putting one together is above my skill level.
I'm desperately looking for a hackable webcam that isn't a huge privacy risk. Adding network connectivity to this project probably wouldn't be a large endeavour.
or you can plug in one or more usb webcams, some of which have good cases.
"mass" production is really expensive, as you have to add design-for-manufacturability and design-for-testing, and account for yield loss and customer support (how happy would you be if your expensive camera appeared DOA?).
At that price-point, are there other devices on the market that already fulfill the need?
> Adding network connectivity to this project probably wouldn't be a large endeavour
lol
No there aren't. Webcams in 2022 all have miniscule lenses/sensors paired with decade-old tech and none of the big players seem interested in producing anything higher quality.
https://reincubate.com/support/how-to/why-are-webcams-bad/
If you want high-quality video capture, your options are pretty much just (1) plug in a "real" $$$$ DSLR/mirrorless camera which will be fiddly and prone to overheating, or (2) use a cell phone as an IP camera, which will add noticeable latency and is still a tiny sensor compensated for by AI.
If this was for sale fully assembled I'd easily spend a few hundred on it. I don't care about networking, just give me plain old USB.
I have a coworker with this setup and it’s easily the best video quality I’ve ever seen on a teams call even in his fairly dark room.
The “professional video” category has quite a few
Is the video quality that much better? Or is there some other feature that justifies the price?
Physical lens zoom on most of those, with decent lens sizes, but that's not that helpful for a Zoom call, unless you've got a very weird setup.
SDI is https://en.wikipedia.org/wiki/Serial_digital_interface
NDI and 2110 are video-over-IP standards. https://renewedvision.com/blog/guide-to-video-standards-sdi-...
HoW I can't figure out.
I like how the original comment was kind of slagging HoW and legislative to the lower realms of quality. For the most part, that's going to be true, but there's definitely edge cases. I run in weird circles having grown up in HoW production and moving into cinematic production. One of the megachurches in town is one of Sony's flagship install locations. They always have the top end equipment that even some production houses can't get yet. The amount of money that flows through these places is flabbergasting. Their control rooms are better equipped than some of the live sports trucks I've been in. The only thing they are missing is the crew of slo-mo operators. They have a couple of seats for shaders, they have chyron ops, they have technical director, director, multiple sound boards (one for record, one for stage, one for broadcast), and just an incredible amount of gear overall. Yes, this is said from a state of jelly.
* I actual have a love for HoW as a vertical because they’re much more willing to try wild or experimental things with their production since they often have a greater tolerance for things going wrong and often have entire days of downtime between shows to tinker. This is probably part of why they’re a Sony flagship - willingness to run beta software! I know of at least one other vendor who has churches as beta testing sites…
But before anybody freaks out too much, it's probably worth pointing out that the median church size is 75 people.
PTZ is really nice but for normal webcam use doesn't add much.
> No there aren't.
There are tons of cameras that meet this need. They're "machine vision" or "scientific" cameras, google for those. Edmund Scientific has a good selection. They're ridiculously expensive for what you get if you're comparing against a webcam or a surveillance camera since they're very similar to those for >10x the price. That's the price of low volume assembly, proper support, et cetera.
A lot of sbc boards support MIPI CSI (iirc even RPI). Nvidia robotic modules has IO for Sony's LVDS (driver not provided though).
Not quite a fully assembled solution but all you have to do is screw the two boards together with a few standoffs.
The IMX477/R sensor supports Full (16:9) Binning 1080P @ 2028(H) × 1128(V) with 240hz/fps availability in a drive mode. However, no IMX477/R package I've ever found - including those from Arducam - support a CSI->USB board or similar that can drive this mode, only allowing 100 FPS maximum on most packages. (ex: https://www.uctronics.com/arducam-high-quality-complete-usb-...)
I am looking to buy a product involving the IMX477/R sensor that can drive this mode or similar 240 FPS modes, but cannot find it for the life of me despite the datasheet openly supporting this drive mode.
Image sensors are really just high speed ADC clocking out data, whether the data is useful or not is up to the viewer. What I’m getting at is forget FPS and think data rates.
So, you need a processor that is that can handle that data rate. The napkin math says 2K@240FPS has the same data rate as 4K@60FPS. All you need is a processor or module that can handle it and you’re golden. There are demos of the RPI pushing 1000fps (at a significant lower resolution) but you get the point.
Off the top of my head, NVIDIA jetson, imx8m mini plus, the latest allwinner V series, and a whole host of unobtainable in less than 10k qty parts all supported this. The rest is up to you.
Also, RPi is out even with 4 lanes because the CSI input doesn’t support the speed required on each lane.
Any idea where to start? I am proficient enough in scripting/coding to pick up a new platform like the Jetson/Nvidia products, but no idea where to find the correct sensor+board package to actually give me the data rates I need.
Looking for 240fps/hz @ 720p in some form of greyscale, for the record.
You can use them directly via USB using Camo or OBS - no IP needed, and that changes the latency equation.
Also, the new iOS continuity webcam feature is essentially zero latency - it's better than my good webcams.
Companion app is pretty shit though, but they seem to be working on it.
The cameras themselves aren't especially "hackable" but then they don't need to be, because everything going in and out is extremely well-documented.
If you want an open source and open hardware camera there's nothing on the market AFAIK. Of course when people discover that open source costs 10x more than proprietary they are usually no longer interested.
After working with cheapish cameras before, I won't ever look back.
You'd need:
- Find components from Mouser/DigiKey/etc
- Order PCBs w/ a stencil from JLCPCB/PCBWay
- USB-C Mini Hot Plate
- Pinecil/TS100/TS101 soldering iron w/ a set of fine tips
- Soldering paste, regular solder, flux, IPA, old tooth brush, magnifying glass w/ light
- Steady hands
Then you apply solder paste over the stencil to the top side with all the chips, put components on, and reflow on the hot plate. You solder the rest of the components on the back with soldering iron and flux.
Overall the whole set is gonna cost you ~300 bucks (provided the components are not crazy expensive). But you'll have a pretty advanced electronics setup AND an open-source camera.
> IMX335 is also MIPI CSI sensor, So it can be added, I just did a quick search and found sensor itself is not available for purchase but you can buy IMX335 based cameras pretty cheap and get camera sensor out of it.
Do you desolder the sensor (and how would you do that)? Or does the sensor still needs to be on its original PCB?
RPi is no good for that? If they are available.
There will be Third revision of this camera coming in few months. I am working on absolute new hardware with lots of improvement in image quality.
https://github.com/circuitvalley/USB_C_Industrial_Camera_FPG...
I suspect you're currently limited by the optics you're using, lack of white-balance and low CRI lighting. Looking forward to seeing further tests!
https://github.com/showmewebcam/showmewebcam
and it turns your Pi into a UVC-compatible USB webcam with a C mount lens. This firmware also boots instantly, and is also safe to unplug and plug without logging in and issuing a shutdown command. There are even some 3D print housings for this combination on Thingiverse.
I really wish we had something similar with a larger e.g. APS-C or 35mm full frame sensor though. The Pi "HQ" camera is more like shit-Q compared to a modern consumer camera.
I have no idea if this camera is any better but will try to compare specs.
I have a bunch of industrial cams, which are pretty similar and pretty good, but open design would be huge for what I do. What I want:
- Quality 1080p capture at 30fps (25 is fine too)
- USB Webcam
- C-mount
- Compressed output, so I can connect a few without saturating USB
ELP makes many modules like this, and they're <$100 and work well. Other brands do too, which have been a mixed bag.
Slight off topic but do you have any recommendations on cameras with motorized focus that can be controlled electronically? For example with OpenCV's CV_CAP_PROP_FOCUS flag?
Many (perhaps most) off-the-shelf webcams do allow you to control focus, but aren't C-mount, and you're stuck with their lens and their preprocessing.
For what I do, webcam preprocessing makes it almost useless for my applications. Almost all are auto-something, and I don't need exposure or white balance changing once I've calibrated lighting and a machine vision pipeline. Many do nominally have manual exposure and white balance controls, but I've had poor luck finding ones where I have consistency at the level of a module like an ELP.
If you're willing to hack or forgo OpenCV integration, it's ridiculously easy to control C-mount lenses with electronic focus control. That's what I did when I needed to do this. You can look on eBay for something like a vintage Computar TV Zoom Lens (and documentation on Computar's web site still existed when I did this). Prices vary, but when contractors rip out ancient surveillance systems, these can be had for a song.
Or you can splurge, and get a 20x zoom f/1.8.
The ones I bought, it's literally just applying a voltage to a pair of wires to make it zoom or focus in one direction or the other. You just need a few GPIO pins, and to step up the voltage to what it needs (I'm inclined to say 12V, but it might be 5V; it's been a while -- but from not recalling, you can see how easy this was; if this was a week project, I'd remember).
What you really want is a module with the same interface as something like the Computar, which I know exist, but I've never used, so I can't recommend them one way or the other.
And it'd be easy to hack into OpenCV if you really wanted.
https://semiconductor.samsung.com/image-sensor/
E.g. the ISOCELL HP3 has 200 megapixels, 0.56μm pixelsize and 120 fps at 4K resolution.
The openmv h7 and arducam boards have tempted me, but getting housing made for them is difficult.
(I know that Elphel cameras were used for iterations of Google StreetView and Googles book scanning project.)
Thank you.
Have had a ton of problems trying to figure this out.
What would be the theoretical limit of the sensor itself?
Could you extend the project to work as a high speed camera? Perhaps using a Firewire ip core implementation instead of USB?
Right now there are not many controllers on market that can do more than 5Gbit
Most useable solution is to use Ethernet , I would say optical.
I am fine doing this and have done it using raspiraw and know the Edgertronic platform / source code very well. The problem is that sensors and MIPI lanes on commercially-available products are complete trash with even worse documentation.
Any pointers on where to start? I've done raspiraw frame dumping with the RPi HQ camera but it's just going to be a non-starter given all the issues it has.
Looking at code: why are you not using the byte aligner built into the hardmacro?
I had many issues with Crosslink NX part. I never specifically got/or noticed the issue you have mentioned.