Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write code to fill specified_hist_cdf end specified_tr clc clear all close all im imread('cameraman.tif'); [a, tr] = histeq(im); tr= double(uint8(255* mat2gray(tr))); [specified_hist,-] = imhist(imread('pout.tif')); specified_hist
Write code to fill specified_hist_cdf end specified_tr
clc clear all close all im imread('cameraman.tif'); [a, tr] = histeq(im); tr= double(uint8(255* mat2gray(tr))); [specified_hist,-] = imhist(imread('pout.tif')); specified_hist specified_hist/(sum(specified_hist)); specified_hist_cdf = zeros(size(specified_hist)); specified_hist_cdf(1) = specified_hist(1); for i = 2 : 256 % write code to fill specified_hist_cdf end specified_tr = round (255 * specified_hist_cdf); final_tr = zeros(256,1); for i = 1 : 256 % write code here to fill final_tr end new_im = im; for i=1: size (im, 1) for j = 1: size (im,2) % write code here to fill new_im end end [old_hist,a] imhist(im); [new_hist,a] = imhist((new_im)); subplot(1,4,1); bar(old_hist) subplot(1,4,2); bar(specified_hist) subplot(1,4,3); bar(new_hist) subplot(1,4,4); imshow(mat2gray(new_im))
Step by Step Solution
★★★★★
3.54 Rating (157 Votes )
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started