How to get 1% of the image?

1 回表示 (過去 30 日間)
Jason
Jason 2016 年 3 月 30 日
コメント済み: Jason 2016 年 3 月 30 日
After I load a image, how do we get the 1% of the image?

採用された回答

Stalin Samuel
Stalin Samuel 2016 年 3 月 30 日
A = imread('ngc6543a.jpg');
n =size(A,2)
Im_1per = A(:,1:round(n*0.01))%here 0.01 states that 1 % and it can be varied from 0.01 to 1.0
imshow(Im_1per)
  5 件のコメント
Jason
Jason 2016 年 3 月 30 日
Could you write some code about that.
I am going to produce some percentage of a image, then insert this percentage of a image to the original image, using LSB.
Jason
Jason 2016 年 3 月 30 日
I think randperm(n) could not work since how can we know the n. If we know n is 200. but pixel is not from 1-200? for example, pixel is 1, 3, 4, 200. But randperm(n) will produce like [3, 1, 2, 4, ...., 200, 199]

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by