Why titles are flipped vertically in the following code?
Show older comments
%Please change the file formats into tif first
clear;
clc;
close all;
I=imread('Fig0316(1)(top_left).tif');
I1=imread('Fig0316(2)(2nd_from_top).tif');
I2=imread('Fig0316(3)(third_from_top).tif');
I3=imread('Fig0316(4)(bottom_left).tif');
[nk, rk]=imhist(I);
[nk1, rk1]=imhist(I1);
[nk2, rk2]=imhist(I2);
[nk3, rk3]=imhist(I3);
figure('Name','Images with different contrast','NumberTitle','off');
subplot(2,4,1)
imshow(I);
title('Brighter Image');
subplot(2,4,2)
imshow(I1);
title('Low Contrast Image');
subplot(2,4,3)
imshow(I2);
title('High Contrast Image');
subplot(2,4,4)
imshow(I3);
title('Darker Image');
subplot(2,4,5)
bar(rk,nk);
title('histogram for Brigher Image');
subplot(2,4,6)
bar(rk1,nk1);
title('histogram for Low Contrast Image');
subplot(2,4,7)
bar(rk2,nk2);
title('histogram for High Contrast Image');
subplot(2,4,8)
bar(rk3,nk3);
title('histogram for Darker Image');
6 Comments
madhan ravi
on 31 Dec 2018
select the code and press the code button so that it's easy to read
soe
on 31 Dec 2018
madhan ravi
on 31 Dec 2018
Also upload your image files
Cris LaPierre
on 31 Dec 2018
Edited: Cris LaPierre
on 31 Dec 2018
Not flipped for me. What version of MATLAB are you using? Could you upload an image of what you are seeing in your figure?
soe
on 1 Jan 2019
Snehil Singh
on 2 May 2021
'imhist' requires Image Processing Toolbox.
Error in Untitled3 (line 8)
[nk, rk]=imhist(I);
How to resolve this error
Accepted Answer
More Answers (1)
soe
on 2 Jan 2019
0 votes
Categories
Find more on Display Image in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!