Error in an image
1 回表示 (過去 30 日間)
古いコメントを表示
What code do I need in order to find out:
How to check that one image is larger than another image (both rows and columns).
AND
Check that both images are viewable images (three-dimensional, three-layered matrices).
AND
If either of these conditions are not met, produce an error and terminate the program.
回答 (1 件)
Walter Roberson
2019 年 11 月 21 日
ndims(First_Image) == 3 && ndims(Second_Image) == 3 && size(First_Image,[1 2]) >= size(Second_Image, [1 2]) && size(First_Image,3) == 3 && size(Second_Image,3) == 3
This can be written more clearly.
Note: size(First_Image,[1 2]) requires a pretty new MATLAB.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!