user3314570
user3314570

Reputation: 237

How to represent points from PCA space in the RGB space

I'm trying to implement a morphological method for image colors from the article: "Probabilistic pseudo-morphology for grayscale and color images". At one point, we compute the PCA on the entire image, calculate a chebyschev inequality ( the equation 11 in the paper: http://perso.telecom-paristech.fr/~bloch/P6Image/Projets/pseudoMorphology/Caliman-PR2014.pdf) of each 3 components which gives us 3 pairs of vector. We next have to represent these vectors back in the RGB space. I don't understand how do we do that? Can someone help me?

Upvotes: 3

Views: 831

Answers (1)

Alex
Alex

Reputation: 46

Looking at the paper, I'm not sure which representation you're talking about. I'm guessing Fig. 16, but I'm not sure. There's a note in the caption of Fig. 16 that's helpful: "(For interpretation of the references to color in this figure caption, the reader is referred to the web version of this article.)"

Possible answer: if you have a matrix of size A = (y_pixels,x_pixels,3), then you can display this as an RGB image via:

A = rand(100,100,3);
figure()
imshow(A)

Note that your matrix must be scaled in the range [0..1].

It seems easy to map your your PCA scores for each pixel onto such a matrix, and simply display that as RGB via imshow. Does that solve your problem?

Upvotes: 0

Related Questions