What code can I use to get a signal from the image?
16 次查看(过去 30 天)
显示 更早的评论
Can I use another code besides this one?
YourSignal = original(:);
plot(YourSignal);
0 个评论
回答(1 个)
Hiro Yoshino
2022-12-27
Taks this as an example.
im = imread("coins.png");
imshow(im);
if you want to convert the matrix into either row or column vector:
im_row = reshape(im,1,[])
im_col = reshape(im,[],1)
if you just swap the row and column (n x m >> m x n)
im_reshape = reshape(im,size(im,2),size(im,1));
imshow(im_reshape);
Note that the pixels are numbered from top to bottom and from left to right.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!