MATLAB: How to change the resolution of images I acquire with the Image Acquisition Toolbox

acquisitionimageImage Acquisition Toolboxresolution

I am using the Image Acquisition Toolbox to acquire images. Is it possible for me to change the resolution of the images?

Best Answer

The resolution of images acquired from a camera using the Image Acquisition Toolbox is not directly set by MATLAB. Instead, it is dependent upon the video format of the hardware device. Each video format has a specific resolution associated with it. Once a video format is chosen, the associated resolution is used.
As an example, if you have a 'winvideo' compatible imaging device connected to your system, the following command returns more information about the available image acquisition hardware:
info = imaqhwinfo('winvideo')
In order to see a list of supported video formats for this device, type:
info.DeviceInfo.SupportedFormats
This results in an output similar to the one shown below:
ans =
'RGB24_160x120' 'RGB24_176x144' 'RGB24_320x240' 'RGB24_352x288' 'RGB24_640x480'
Select a video format and associate it with a video object when creating the object in the MATLAB workspace. For example:
obj = videoinput('winvideo',1, 'RGB24_640x480')
Sets the video format of the camera to acquire RGB images at a resolution of 640X480. The video object's 'VideoResolution' property specifies the resolution of acquired images. This property, however, is read-only and can not be directly set.