How to plot picese-wise linear transformation graph?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Ig = rgb2gray(imread('example.jpg'));
A = 50;
B = 180;
In = (A < Ig) & (Ig < B);
I want to plot "In" graph like this
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1503574/image.png)
So, on the x-axis there are values from 0 to 255, and on the y-axis I want the values between A and B to rise like a peak.
1 Commento
Dyuman Joshi
il 6 Ott 2023
What's the relation of reading of the image to getting this graph/plot? The graph/plot can be obtained without the image data.
Risposte (1)
檮杌
il 6 Ott 2023
Would this work for you?
X = rgb2gray(imread('peppers.png'));
idx = X > 50 & X < 180;
X_transformed = uint8(double(X).*idx);
montage({X, X_transformed});
0 Commenti
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!