フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Create a image that goes from white to black

1 回表示 (過去 30 日間)
Julen Vicente Pipaon
Julen Vicente Pipaon 2022 年 10 月 31 日
閉鎖済み: Julen Vicente Pipaon 2022 年 10 月 31 日
Hi everyone.
I want to create an image that have white in the middle and while it goes to the sides it gets darker.
An image like this but with variable rows and colums.
I have try whit this:
theta = linspace(0, 2*pi, 256);
I = repmat((-cos(theta) + 1)/2, [256 1]);
h = imshow(I);
But i don't know how to change its size.
  2 件のコメント
KSSV
KSSV 2022 年 10 月 31 日
What do you meanby changing size? You can play around with his right?
n = 256 ; % change this
theta = linspace(0, 2*pi,n);
Julen Vicente Pipaon
Julen Vicente Pipaon 2022 年 10 月 31 日
Yep you're rigth.
I get it now.
%Change rows
n = 1500 ; % change this
theta = linspace(0, 2*pi,n);
%Change colums
n1=1000 ; %Change this
I = repmat((-cos(theta) + 1)/2, [n1 1]);
h = imshow(I);
Thanks for answering.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by