Please help me implementing code of histogram equalization.
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi there, am trying to implement histogram equalization, I have implemented the following code,
function [ output_image ] = mod_hist( input_image ) close all clc %UNTITLED Summary of this function goes here % Detailed explanation goes here output_image = zeros(size(input_image)); for j = 1:size(input_image,3) hist_image = imhist(input_image(:,:,j)); figure, plot(hist_image) normalized_sum = zeros(size(hist_image)); for i = 0:255 normalized_sum(i+1,1) = round(sum(hist_image(1:i+1,1)).*(255/sum(hist_image))) [row,col] = find(input_image(:,:,j) == i); output_image(row,col,j) = normalized_sum(i+1,1); end end figure, imshow(input_image) figure, plot(input_image); title('histogram of input image') figure, plot(normalized_sum); title('histogram of normalized image') figure, plot(imhist(output_image)); title('histogram of output image') figure,imshow(output_image) end
But its not working, can anyone please tell me whats the problem with it
Regards, Sajid Khan
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Convert Image Type in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!