Array dimensions must match for binary array op. error how to solve this problem thanks for all

 採用された回答

Star Strider
Star Strider 2019 年 6 月 19 日
Apparently ‘InputImage’ does not have the same row, column (and perhaps third-dimension) sizes as ‘ReconstructedImage’.
You have to determine that.
The solution depends on what you want as the end result.

8 件のコメント

the two images dont have the same size
whats your consedration to solve the error
thanks dear Star Strider
Star Strider
Star Strider 2019 年 6 月 19 日
If you want to subtract them, they must have the same sizes.
You could possibly interpolate one to the size of the other, perhaps using the imresize (link) function, however that may not result in an accurate measure of what you are doing, and so an unreliable result. You have to decide how best to resolve this problem.
i have using imresize function but the error still happen
Star Strider
Star Strider 2019 年 6 月 19 日
Be sure that both your images have exactly the same row and column sizes, and the same number of dimensions (2 or 3).
how to determine these attributes
thanx alot dear star strider
Thanx alot dear Star Stider to your cooperation with me
The Problem Solved
The Problem was in images dimention
thanks alot
First:
RIsize = size(ReconstructedImage);
IIsize = size(InputImage);
Then, compare them. For images, try this:
Test = @(I1size,I2size) all((I1size(1:2) == I2size(1:2)) & (numel(I1size) == numel(I2size))); % True If Image Dimensions Are The Same
Check = Test(RIsize,IIsize)
RAJESH RAJAN
RAJESH RAJAN 2020 年 10 月 9 日
Dear Star Strider how to check our images have exactly the same row and column sizes, and the same number of dimensions (2 or 3). ?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMultidimensional Arrays についてさらに検索

製品

リリース

R2015a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by