Extracting the size of an image

I’m new to using Zed cameras (using ZED SDK 3.4.0), and I have a pretty elementary question;

I have created an object for the sl::Camera class called xm_zed; I’m trying to extract the size of the image as follows:

int xi_Width = (int)xm_Zed.getResolution().width;
int xi_Height = (int)xm_Zed.getResolution().height;

When I execute my code, I get an error that class sl::Camera has no member named getResolution; did you mean getPosition?

I might be missing something obvious, but I’d appreciate any help to resolve this issue; thanks!

Please refer to this page, it may help you out. Go through the API Documentation !!

sl::Resolution sl::getResolution(RESOLUTION resolution)

Hi @mv24,

As @IshanBhatnagar14 pointed out, the function getResolution should be used to get the sl::Resolution from a given sl::RESOLUTION.
In order to get the size of the image, you can do something like this instead :

sl::Resolution image_size = xm_zed.getCameraInformation().camera_configuration.resolution;
int xi_Width = image_size.width;
int xi_Height = image_size.height;

Hope it helps