Access to higher resolutions in 48MP USB camera
Show older comments
I am using a 48MP USB camera - this one specifically: https://www.elpcctv.com/elp-48mp-high-resolution-usb-camera-with-varifocal-cs-3610mm-lens-p-443.html
I am using a Macbook Apple M2 (Sequoia 15.6) and thus using the 'macvideo' Adaptor ... the problem is that although this is a 48MP camera - so a max resolution of 8000x6000 at low FPS, the highest res returned is 3840x2160 (see below). I guess this is because this is a "generic" adaptor?? Is there any way in which I can tap into all of the possible resolutions of this camera using matlab? (I note that the manufacturer says the high res are availabile via a different codec - MJPEG vs YUY2 (8000x6000 @ 5fps MJPEG / 4000x3000 @ 12fps MJPEG
3840x2160 @ 30fps MJPEG) could this be the main issue?
Any pointers greatly appreciated ...
Thanks
>> imaqhwinfo('macvideo',1)
ans =
DefaultFormat: 'YCbCr422_1920x1080'
DeviceFileSupported: 0
DeviceName: '48MP USB Camera'
DeviceID: 1
VideoInputConstructor: 'videoinput('macvideo', 1)'
VideoDeviceConstructor: 'imaq.VideoDevice('macvideo', 1)'
SupportedFormats: {'YCbCr422_1280x720' 'YCbCr422_1920x1080' 'YCbCr422_192x144' 'YCbCr422_320x240' 'YCbCr422_352x288' 'YCbCr422_3840x2160' 'YCbCr422_480x360' 'YCbCr422_960x540'}
>>
3 Comments
dpb
on 7 Aug 2025
From the website FAQ one finds
♦Can you provide SDK for secondary development?
Yes, We can offer Linux, Windows, Android SDK.
♦What operating system your cameras support?
Android, Windows and Linux System
from which one can infer there's not much hope for anything camera-specific for the Mac.
Christopher
on 7 Aug 2025
Not unless you can talk to the camera over the USB port with some command set to control it and return data from it.
Where did the "macvideo" adapter come from; is it from Mathworks with the (I guess) Vision Toolbox which I don't have so know nuthink! about it)? If you could get that source, then it might be feasible to add another resolution mode; I wouldn't say it would be easy. You'd also have to have the vendor SDK documentation to have any klew about what its internal commands are.
Answers (2)
Christopher
on 19 Aug 2025
1 vote
3 Comments
dpb
on 19 Aug 2025
What a bummer...I don't suppose they would indicate any intent to extend support nor provide any suggested workarounds.
Christopher
on 20 Aug 2025
dpb
on 20 Aug 2025
Any chance there's a users group for the vendor's cameras that might be of help?
Otherwise, it would appear your choices are indeed very limited with MATLAB and Mac; I notice the vendor recommends some Mac app with the camera, but that would then entail either figuring out some way to "drive" that app programmatically or a pass-thru scenario that undoubtedly is not useful.
Seems a big hole in Mathworks support for Mac...
dpb
on 7 Aug 2025
0 votes
I'd say that's your chance...
6 Comments
Christopher
on 8 Aug 2025
Edited: Christopher
on 8 Aug 2025
You will have to code specifically for your particular device and needs...<see webcam properties> documentation.
Have you tried to set the resolution desired? The documentation implies any compliant webcam should be usable. If you can't set resolution, or otherwise control the camera, I'd suggest submitting an official official support request at <Product Support Page>
There's also guidance for <Creating Custom Adaptors> under the Imaging TB. Somewhere earlier I saw a link to "request additional hardware support" but don't seem to find the link to it at the moment; that may have been under the Test & Measurement TB rather than Image Processing, though...
But, writing a custom adaptor is undoubtedly not for the faint at heart; will take learning the vendor SDK API intimately as well as knowing enough C++ to be able to write the code. I didn't look to see if could find examle source code from which to start; the source for the <macvideo> generic would probably be a good place to start if it is available.
Christopher
on 11 Aug 2025
dpb
on 11 Aug 2025
Did you just try to set the resolution with the webcam object interface? From the above link in the documentation
Set Properties for Webcam Acquisition
Set object-specific properties for the webcam object to use with any webcam. You can also set device-specific properties for a specific webcam, if supported by your device. Use dot notation to set object-specific or device-specific properties.
Object-Specific Properties
Use dot notation to set property values for the webcam object. The preview window is dynamic, so if you set a property while previewing your image, you can see the change take effect.
Set properties after creating the webcam object and before acquiring images.
To set an object-specific property, use the object name and property name in dot notation as the first argument, and the value you want to set as the second argument. Property names and values can be character vectors or numerics. This example sets the camera resolution to the value shown for the webcam object cam.
cam.Resolution = '320x240';
You can use these webcam object-specific properties for any webcam.
I "know nuthink!" a la Sgt Schultz about Python, but I would presume the roundabout way could be made to work as well.
Christopher
on 12 Aug 2025
Edited: Christopher
on 12 Aug 2025
dpb
on 12 Aug 2025
OK, thanks for the clarification; just checking to be sure you had recognized that are supposed to be able to control the camera that way. Any chance you have an earlier MATLAB release still installed to see if this also has something to do with the new release?
Submit this to Mathworks as an official support request/bug at <Product Support Page>, unless the implementation of the interface by the vendor is non-compliant with the Standard, this surely seems to be an issue.
Categories
Find more on Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!