Sliding window search and Entropy value for each window
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello, I want some help here
I need to apply Sliding window search in image, and calculate the Entropy value for each window (I looking for highest Entropy value in the image),
Here is the pseudo code:
(1) Sliding window search
Emax=0
For each window Wi
Compute the Entropy Ei
If Ei > Emax
Then update Emax
End
End
Can someone help me with that please?
0 Commenti
Risposte (1)
Subhadeep Koley
il 3 Feb 2020
Hi, refer the code below. It calculates entropy values for different (16x16) window of an image and displays them as a heatmap.
clc; close all;
% Read the image
img = im2double(imread('cameraman.tif'));
% Define the function handle
fun = @(block_struct) entropy(block_struct.data);
% Distinct block processing for the image
blockEntropy = blockproc(img, [16 16], fun);
% Display heatmap for visualization
figure; heatmap(blockEntropy); colormap hot;
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!