Access to higher resolutions in 48MP USB camera

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 =
struct with fields:
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

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.
True. They don't say its not Mac compatible though, even stating "Compatible with multi software & operating system: Support Windows, Linux, Android, Mac OS, Ubuntu, Raspberry Pi..." ... However, I agree that from the company side there is not much one can hope for ...
On the other hand, is there any way that I can access these modes of teh camera in Mac, perhaps by delving into DLLs etc. (not really my thing)? I really need to get this thing up and running across both Mac and Windows platforms.
dpb
dpb on 7 Aug 2025
Edited: dpb 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.

Sign in to comment.

Answers (2)

I am told by Matlab support that Matlab does not support MJPEG format on Mac OS and so it would appear that this is why I cannot see the higher resolutions of this camera on my Mac based Matlab system. I have yet to check on a Windows system as I don't have one freely available a this point - but will double check.
Thanks for all answers so far.

3 Comments

What a bummer...I don't suppose they would indicate any intent to extend support nor provide any suggested workarounds.
No, no idea if it will be made available or any workarounds.
Looks like I need to find another camera if I with to work on the Mac.
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...

Sign in to comment.

It says it is UVC compliant and <MATLAB Support Packages> says it will/can support USB webcams.
I'd say that's your chance...

6 Comments

Agreed. Unfortunately though the webcam package offers even less in terms of resolution ... so something is not quite right there :(
>> webcam(2)
ans =
webcam with properties:
Name: '48MP USB Camera'
Resolution: '1920x1080'
AvailableResolutions: {'1920x1080'}
dpb
dpb on 8 Aug 2025
Edited: dpb 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.
Thanks, I agree with your assessment - it will not be easy. I think i will start by seeing if a can first submit an official support request.
Something that occured to me too is that if I can access the camera via a Python script (I have not tried yet - that is next) - I could interface my analysis Matlab code to the camera via a call a Python script??
Many thanks.
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.
I have tried to set the resolution of the camera with the dot notation and I get an error saying only resolution a X b is supported - so no go I am afraid.
Its frustrating as this is a very good camera for my needs - small, lightweight and quite powerful (plus affordable) but I really need the higher resolutions if its going to be of any use to me.
Thanks for persevering.
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.

Sign in to comment.

Products

Release

R2025a

Asked:

on 6 Aug 2025

Commented:

dpb
on 20 Aug 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!