Help me!! I want to get middle frequency value from some image.

1 次查看(过去 30 天)
Hello everyone!
How do you know the range of the mid-frequency values after DCT processing from the loaded image?
I am studying the Cox watermark algorithm, and I want to insert 1000 watermark values in mid-frequency, but I really do not know what to do. Here's the code that DCT does.
image = imread(strcat(app.path, app.file));
grayImage = rgb2gray(image);
% DCT Process from 'grayImage'
[row, column] = size(app.grayImage);
for i = 1:row
X(i, :) = fft(app.grayImage(i, :)); % Calculate fourier analysis of each column
end
for j = 1:column
Y(:, j) = fft(X(:, j)); % Calculate fourier analysis of each row
end
magnitude = Y;
magnitude = fftshift(magnitude); % Shift low frequencies to the center
absolute = abs(magnitude); % Magnitude
absolute = (absolute - min(min(absolute))) ./ (max(max(absolute))) .* 255;
DCT = absolute;
It may be a really bad question, but I really want to know. Thanks.

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by