Programmatically Getting Camera Resolution using COM

Programmatically Getting Camera Resolution using COM

I am currently using the Intel MCA SDK with the Intel MCA SDK COM Language pack. As far as I can tell there is a way to set the camera resolution using SetVideoParameters but there is no way to get the available resolutions. We need to know what the maximum camera resolution is before we set it. There is an IDispatch variable called SupportedOptions, but there is no documentation on how to use it.

Does anyone know how to do this?


P.S. Here is the TCamera class that the Active-X Control sets up...

TCamera = class(TOleServer)
FIntf: ICamera;
FProps: TCameraProperties;
function GetServerProperties: TCameraProperties;
function GetDefaultInterface: ICamera;
procedure InitServerData; override;
function Get_Frames: IDispatch;
function Get_DeviceHandle: Integer;
procedure Set_IlluminationLevel(Param1: Integer);
function Get_SupportedOptions: IDispatch;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: ICamera);
procedure Disconnect; override;
procedure ReserveDevice(const FreindlyName: WideString; AquisitionTimeoutMS: Integer);
procedure ReleaseDevice;
procedure StartPreview(var Panel: Integer);
procedure CaptureFrame;
procedure StopPreview;
procedure SetImageParameters(var xSize: Integer; var ySize: Integer);
procedure SetVideoParameters(var xSizePixels: Integer; var ySizePixels: Integer;
framesPerSecond: Single);

procedure SetOptionValue(CamOption: OleVariant; var pOptionVal: Integer);
property DefaultInterface: ICamera read GetDefaultInterface;
property Frames: IDispatch read Get_Frames;
property DeviceHandle: Integer read Get_DeviceHandle;
property IlluminationLevel: Integer write Set_IlluminationLevel;
property SupportedOptions: IDispatch read Get_SupportedOptions;
property Server: TCameraProperties read GetServerProperties;

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Randy,

The MCA SDK typically supports the maximum image width and height supported by the camera.This is configued in the MCA SDK configuration file which is IntelHealthcare.cfg located in the C:Program FilesIntelMCABin directoy by default.The configuration lines to olok atare:




Note that you can use this configuration to reduce the maxium size captured, but you cannot set these values to somethinghigher than the camera supports.

There is more detail on thisin the Mobile Clinical Assistant Developer Guide at:


Leave a Comment

Please sign in to add a comment. Not a member? Join today