Array dimensions must match for binary array op. error how to solve this problem thanks for all
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
採用された回答
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
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
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)
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 Exchange で Multidimensional Arrays についてさらに検索
タグ
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)

