Dose anyone can help with PCA technique
Ältere Kommentare anzeigen
How can PCA code reduce the dimension of image, if I have image with 128*128, after used PCA to compress image?
3 Kommentare
M
am 22 Nov. 2017
PCA mainly relies on a singular value decomposition of your data, what is it exactly you want to achieve ?
KSSV
am 22 Nov. 2017
Noor Abbas
am 24 Nov. 2017
Antworten (1)
Image Analyst
am 22 Nov. 2017
0 Stimmen
Attached is a demo where I use it.
10 Kommentare
Noor Abbas
am 24 Nov. 2017
Image Analyst
am 24 Nov. 2017
Get the PCs - 128 of them - and throw away the ones you don't want. Keep just 3 or 4 of them.
Noor Abbas
am 26 Nov. 2017
Image Analyst
am 26 Nov. 2017
Let's say you had an array where you had one row for each person, and each column was a measurement. The measurements were height (in col1), weight (in col 2), cholesterol, A1C, blood pressure, age (in days), social security number, street address, credit card number, and number of followers on Facebook. Now you do PCA on those and get 10 PCs. Now, might find good correlation between the first 6, but the last 4 don't show any trend or correlation at all - essentially they're random with respect to the first 6 biometric measurements. So you could just use the first 6 PCs and ignore the last 4, thus achieving data reduction.
Noor Abbas
am 27 Nov. 2017
Image Analyst
am 27 Nov. 2017
You have to have more than 1 feature. Like for the color image demo I gave you the features were the rad value, green value, and blue value at each pixel. For your image, is it grayscale? Or color? What are the features?
Noor Abbas
am 27 Nov. 2017
Image Analyst
am 27 Nov. 2017
OK . . . but what about the last, and most important, question that I asked. What are your features?
Noor Abbas
am 27 Nov. 2017
Image Analyst
am 27 Nov. 2017
Like what are your distinguishing attributes? You can't have just one - the gray level - you need more than 1. Like when I did it in the demo for a color image we had 3 - the red value,the green value, and the blue value. You can't just take one measurement and do PCA. Like if you had the heights of your classmates, you can't just say "I want to do PCA on the list of heights" - it doesn't make sense. Just like you can't say "I want to do PCA on the gray levels". If you don't even know what your features are, then why do you think that PCA is the approach you want to use??? Are you just wanting to write a compressed image, like in JPG or PNG format or something?
Kategorien
Mehr zu Dimensionality Reduction and Feature Extraction finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!