フィルターのクリア

''Error using reshape: To RESHAPE the number of elements must not change''

1 回表示 (過去 30 日間)
Touhidul islam
Touhidul islam 2017 年 12 月 27 日
コメント済み: Image Analyst 2019 年 10 月 12 日
in image one you can say it is showing no error ,but in second image (b.img) it is showing ,error . why this is happening?

採用された回答

Image Analyst
Image Analyst 2017 年 12 月 27 日
Use this:
[rows, columns, numberOfColorChannels] = size(I);
F = reshape(I, rows*columns, numberOfColorChannels);
  5 件のコメント
marie lasz
marie lasz 2019 年 10 月 12 日
hello Bhanveet,
Did you find out the solution of this error? because I am also getting the same error and I am also working on watermarking.
Image Analyst
Image Analyst 2019 年 10 月 12 日
The image array called "message" is most likely color. Use rgb2gray() to cast it to gray scale.

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

その他の回答 (1 件)

Benjamin Kraus
Benjamin Kraus 2017 年 12 月 27 日
What is the size of I both before and after calling imresize on the second image? Is one of the images grayscale or black and white? If so, it is possible the third dimension of the image is 1 instead of 3.
  1 件のコメント
Touhidul islam
Touhidul islam 2017 年 12 月 27 日
1. 256 256. 2. image is attached . GADOimage.jpg 3. what is the difference between 1 & 3 in third dimension of the image. when i will come to know if it is 1 or 3

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by