I need to find the avrege of histograms B,R,G that I already found using this code so can you please help me?
after finding the average I need to use it as the basis to obtain a single histogram equalization intensity transformation function so how is that specifically done?
this the code I used
X = im2double(imread('Capture.PNG')); R = X(:,:,1); G = X(:,:,2); B = X(:,:,3); z = zeros(size(R)); Rimg = cat(3, R, z, z); Gimg = cat(3, z, G, z); Bimg = cat(3, z, z, B); L256 = linspace(0,1,256).'; z256 = zeros(256,1); mapR = [L256, z256, z256]; mapG = [z256, L256, z256]; mapB = [z256, z256, L256]; figure; image(Rimg); colormap(mapR); colorbar(); figure; image(Gimg); colormap(mapG); colorbar(); figure; image(Bimg); colormap(mapB); colorbar(); I=imread('Capture.PNG'); counts1=imhist(I(:,:,1)); counts2=imhist(I(:,:,2)); counts3=imhist(I(:,:,3)); figure, plot(counts1,'r') figure, plot(counts2,'g') figure, plot(counts3,'b') mean_counts = mean([counts1(:), counts2(:), counts3(:)], 2); figure, plot(mean_counts)
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
try :
I=imread('Capture.PNG');
[counts1,edges1]=histcounts(I(:,:,1),linspace(0,1,256));
[counts2,edges2]=histcounts(I(:,:,2),linspace(0,1,256));
[counts3,edges3]=histcounts(I(:,:,3),linspace(0,1,256));
figure, plot(edges1(1:end-1),counts1,'r')
figure, plot(edges2(1:end-1),counts2,'g')
figure, plot(edges3(1:end-1),counts3,'b')
mean_counts = mean([counts1(:), counts2(:), counts3(:)], 2);
figure, plot(edges1(1:end-1),mean_counts)
J = histeq(I,mean_counts)
SEE COMPLETE ANSWER CLICK THE LINK
Comments
Post a Comment