How to solve the error?

1 回表示 (過去 30 日間)
Darsana P M
Darsana P M 2018 年 4 月 7 日
編集済み: Walter Roberson 2018 年 4 月 7 日
I am trying to do hide 1 image within another. While performing this, I got an error. What might be the issue?
numberOfBitsOfBitsToBeInserted exceeds totalSizeOfdataTargetBitSpaceInsertable
Error in insertIntoLSB_bits (line 8)
numberOfBitsToBeInserted = length(dataToBeInsertedInBits);
Output argument "dataInDec_WithInsertedBits" (and maybe others) not
assigned during call to "insertIntoLSB_bits".
Error in usage_imageWithinImage (line 20)
dataInDec_WithInsertedBits = insertIntoLSB_bits(dataInDecMasked,
bitStreamOfImageToHide, N );
How to solve this error?

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 4 月 7 日
編集済み: Walter Roberson 2018 年 4 月 7 日
Normally the first of those errors would have stopped the program and you would not have seen the others. However, if you happen to be within the debugger, then sometimes when you dbquit it tries to run further and gives some additional errors.
For the moment, you should change your code so that you always assign a value to the output argument inside insertIntoLSB_bits, even if the value is [] or inf or nan. Like, pretty much assign to it as the first thing you do.

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by