I have an original RGB JPEG image of which I have created a normalized RGB image. I'm able to plot the histrogram for this normalized RGB image. I need to now plot a 2-d histogram of the normalized RGB image, where the 2 axes represent the normalized red and green components of each pixel in Matlab. Please help me with this.
1 Answers
1
votes
I think you just need to use histogram2(x,y)
Create two vectors x and y such that x represents the R value of all pixels and G represents the G value of all pixels (make sure same order or make a 2 column vector). Then make the call above and show(), and it should give you what you are after.
https://www.mathworks.com/help/matlab/ref/histogram2.html?requestedDomain=www.mathworks.com