what is the process to store the "gaborMag,[]" into a variable like x?

1 回表示 (過去 30 日間)
Md Salahuddin Bhuiyan
Md Salahuddin Bhuiyan 2019 年 3 月 7 日
回答済み: Walter Roberson 2024 年 9 月 27 日
I = imread('fab2.jpg');
figure
imshow(I);
impixelinfo
title('Original Image');
wavelength = 2;
orientation = 30;
gaborMag = imgaborfilt(I,wavelength,orientation);
figure
imshow(gaborMag,[]);

回答 (2 件)

Naga
Naga 2024 年 9 月 27 日
Hello Bhuiyan,
To store the gaborMag result into a variable x, you can simply assign it as follows:
gaborMag = imgaborfilt(I, wavelength, orientation);
% Store gaborMag into variable x
x = gaborMag;
Now, x contains the Gabor filter magnitude result.

Walter Roberson
Walter Roberson 2024 年 9 月 27 日
I suspect that you are asking how to store the output of
imshow(gaborMag,[]);
into a variable such as x.
The answer is
gM_scaled = rescale(gaborMag);
cmap = colormap();
x = ind2rgb(gM_scaled, cmap);

カテゴリ

Help Center および File ExchangeImage Filtering and Enhancement についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by