how to concatenate image and text in matlab

조회 수: 1 (최근 30일)
Wubie Engdew
Wubie Engdew 2019년 12월 18일
답변: Walter Roberson 2019년 12월 18일
Error using cat
Dimensions of arrays being concatenated are not consistent.
Error in file2>embedding_radiobutton_Callback (line 198)
stegoimage=cat(3,imgrrev,imggrev,imgbrev);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in file2 (line 17)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)file2('embedding_radiobutton_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.

답변 (1개)

Walter Roberson
Walter Roberson 2019년 12월 18일
There are two ways you can concatenate image and text in MATLAB:
  1. Convert the text to numeric form, such as by using double(), and pad it out so that it has the same number of columns as the image you are concatenating it on to.
  2. Put the image and text as different entries in a cell array
Based upon your code, though, I think the real answer for you is rather different: You should be converting the text into a series of bits and embedding it into an image using techniques such as LSB embedding.

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by