Write code to fill specified_hist_cdf end specified_tr clc clear all close all im imread('cameraman.tif'); [a, tr] =
Fantastic news! We've Found the answer you've been seeking!
Question:
Write code to fill specified_hist_cdf end specified_tr
Transcribed Image Text:
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)) 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))
Expert Answer:
Posted Date:
Students also viewed these programming questions
-
1. Prepare a performance report showing both month and year-to-date data for Post Manufacturings Machining Department for February, 2011 using the following data: January February Budgeted Data:...
-
For a closed-subshell configuration, (a) Show that the double sum in (11.80) equals Where the Coulomb and exchange integrals are defined in terms of the n/2 different spatial orbitals Ï; (b) Use...
-
How would you prepare p-ethylbenzylamine from a carboxylic acid, using both Hofmann and Curtius rearrangements?
-
First United Bank Inc. is evaluating three capital investment projects by using the net present value method. Relevant data related to the projects are summarized as follows: Instructions 1. Assuming...
-
The B& L Food Company prepared, packed, and sold quality food products to wholesalers and retailers. Marvin, while grocery shopping at Greggs Red & White retail store, purchased several cans of Mas...
-
Briefly describe the PCAOB.
-
The rise of portable electronic devices such as laptops and smart phones is made possible in part by the availability of lithium ion battery technology. Unfortunately, in some cases these batteries...
-
The following financial statements and additional information are reported. Additional Information a. A $ 30,000 note payable is retired at its $ 30,000 carrying (book) value in exchange for cash. b....
-
4. The atomic numbers of elements, U, V, W and X are 13, 14, 16 and 17 respectively. Which one of the elements will react with oxygen to form an ionic compound? (Atomic number of oxygen is 8) X A. B....
-
A pipe-pump assembly is being considered by a farmer for use in irrigating a field during summer. There is an underground water well that is 75 m deep. The well is an open-hole type in which the free...
-
Write a recursive method tripleChar(String s, char c) that takes a string s and a character c. The method returns the string s with all the occurrences of c repeated 3 times.
-
Hiking trails on steep slopes often zigzag back and forth rather than running in a straight path up the slope. What does having a zigzag path accomplish, given that getting to the top of the slope...
-
A solar cell is illuminated with \(2.0 \mathrm{~W}\) of light. Is the maximum possible current greater with \(2.0 \mathrm{~W}\) of red light or \(2.0 \mathrm{~W}\) of blue light?
-
In Oliver v. Brock, what factors did the court consider most significant in determining whether Dr. Brock had a contractual relationship with Oliver?
-
Explain the reasoning by which we claim that the stopping potential \(V_{\text {stop }}\) measures the maximum kinetic energy of the electrons in a photoelectric-effect experiment.
-
a. For the allowed energies of a particle in a box to be large, should the box be very big or very small? Explain. b. Which is likely to have larger values for the allowed energies: an atom in a...
-
Discuss the impacts of zoning in development plans and density controls on the viability of development proposals. You may use the development control system as currently operates in Ireland or a...
-
Nitrogen monoxide reacts with hydrogen as follows: 2NO(g)+ H2(g) N2O(g) + H2O(g) The rate law is [H2]/ t = k[NO]2[H2], where k is 1.10 107 L2/(mol2s) at 826oC. A vessel contains NO and H2 at...
-
You are going to conduct a survey of the students in your university to nd out whether they read the student newspaper regularly. Based on your friends opinions, you think that a strong majority of...
-
Duvall, the manager of the corporate venturing unit introduced in Example 1, has decided to make a bid for Able Manufacturing. Duvall has decided to use an income approach to value Able. As stated in...
-
Suppose that a second ball is drawn from the urn, without replacing the first. Let Y 2 = 1 if the second ball is red, and let it be 0 otherwise. Use the posterior distribution of X from the previous...
Study smarter with the SolutionInn App