How to plot Intensity profile along the vertical line of an image
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have plotted the intensity profile of an image. Below is the image file.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/228249/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/228249/image.jpeg)
Below is the code.
I = imread('Intensity1.jpg');
x = [0 size(I,2)];
y = [size(I,1)/2 size(I,1)/2];
c = improfile(I,x,y);
figure
subplot(2,1,1)
imshow(I)
hold on
plot(x,y,'r')
subplot(2,1,2)
plot(c(:,1,1),'r')
hold on
plot(c(:,1,2),'g')
plot(c(:,1,3),'b')
I want to find the intensity profile of the image in the vertical direction instead of the horizontal direction. Any help would be appreciated. Thank you.
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!