- After the warning is displayed, the ROIPosition property has been updated to an allowed value. If you set the property to this value, you should no longer see the warning.
- The warning function in MATLAB will allow you to suppress individual warnings. Depending on the hardware that you are using, the identifier for the message that you are receiving changes, so I can't give you the exact command, but after you receive the warning, you can use the lastwarn function to determine the identifier:
Disable "Warning: The ROIPosition property was modified by the device."
3 次查看(过去 30 天)
显示 更早的评论
I'm recording a custom region of interest, which does not change. However, every time I run my script Matlab displays this notification:
Warning: The ROIPosition property was modified by the device.
How can I turn this warning off?
Thanks
0 个评论
采纳的回答
David Tarkowski
2013-3-18
Although Image Acquisition Toolbox will allow you to specify arbitrary values for the ROIPosition property (within the allowed range of values), not all devices will accept all values. Commonly, devices will require the size or offset values to be multiples of four or eight. There are two ways to deal with this warning:
set(vid, 'ROIPosition', newROIvalue);
[~, ident] = lastwarn
You can then add the following line to your script (before you try to set the ROIPosition property):
warning('off', 'value of the ident variable from above');
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!