Load image in form one-dimensional signal

2 ビュー (過去 30 日間)
Arkanra Kadhum
Arkanra Kadhum 2016 年 12 月 10 日
コメント済み: Image Analyst 2016 年 12 月 11 日
How can I use the Matlab statement "s = leleccum(1:3920)" for any image rather than leleccum image? The number 3920, what it means please I need your help Arkan

回答 (2 件)

Walter Roberson
Walter Roberson 2016 年 12 月 10 日
Img = imread('ImageFileName.png');
s = Img(:) ;

Image Analyst
Image Analyst 2016 年 12 月 10 日
That takes an image called leleccum and stacks all columns on top of each other with col 1 at the top, then col 2 underneath that, then col 3 and so on. Then it extracts the first 3920 elements of that column vector into a new column vector. This may or may not be an exact integer number of columns.
To do it for an image of any other name, simple use the name of the other image.
For example to get the first 58 pixels in image "grayImage", do this:
s = grayImage(1:58)
  4 件のコメント
Arkanra Kadhum
Arkanra Kadhum 2016 年 12 月 11 日
編集済み: Image Analyst 2016 年 12 月 11 日
Thank you so much for you important reply. My problem is to decompose the EMG image. When I write
EmgImg=imread('emg1.jpg');
s = EmgImg(1:3920); %Load original one-dimensional signal.
l_s = length(s);
[C,L] = wavedec(s,3,'db1');
I get the warning
Warning: CONV2 on values of class UINT8 is obsolete.
Use CONV2(DOUBLE(A),DOUBLE(B)) or CONV2(SINGLE(A),SINGLE(B)) instead.
Best regards
Arkan
Image Analyst
Image Analyst 2016 年 12 月 11 日
OK, so...did you do that? Did you convert your image to double like it said? If not, why not?

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

カテゴリ

Help Center および File ExchangeContinuous Wavelet Transforms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by