image processing, dimension reduction

if i have number of images (multi spectral images for the same scene), and i want to reduce the dimensional of this images by any dimension reduction techniques where in the result i get one reducing image for 200 as example. how can i do this task? thank you.

 采纳的回答

Image Analyst
Image Analyst 2018-3-19
See my attached demo for pca. It should be easy for you to adapt it to take any number of spectral bands instead of the 3 visible color (RGB) bands I took. If you want just one single image that represents most of the variation, take the principal components #1 image.

4 个评论

i try your demo sir, and it's work, but if i have more than 9 images how can i applying this demo for it?
A demo is just an example of how the code works, you usually need to adapt the code for your own purposes.
Two code samples for processing multiple files in a folder are shown in the FAQ : http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
ok, thanks all; another question please, i wrote an code for (KLT) techniques for dimension reduction for image (I'm just a beginner in matlab my code maybe is not good enough one or it's want some modification) the result for the code is binary image, is it possible that i reduce the dimensionality without losing the color (can i get colored reducing image as result)
clc, clear all, close all x = imread ('10.bmp'); whos %x2 = imread ('2.bmp'); %x3 = imread ('3.bmp'); %x4 = imread ('4.bmp'); %x5 = imread ('5.bmp'); %x6 = imread ('6.bmp'); %x=[x1 x2 x3 x4 x5 x6]; t=graythresh(x) z=im2bw(x,t); [n m]=size(z);
for j=1:m mu(:,j)=mean(z(:,j)); end for j=1:m xx(:,j)=z(:,j)-mu(j); end xx=xx'; cx=(xx*xx')./(n-1); [M V]=eig(cx);
%my
V; size(V) mm=max(max(V)) ee=sum(diag(V));
%
A=(rot90(M))'; y=A*xx; Ay=A'*y; for j=1:m xhad=Ay+mu(j); end
k=input('k='); for i=1:k for j=1:k xxk(i,j)=xx(i,j); cxk(i,j)=cx(i,j); end end for j=1:k muk(:,k)=mean(xxk(:,k)); end
[M1 V1]=eig(cxk); Ak=(rot90(M1))'; yk=Ak*xxk; Ayk=Ak'*yk; for j=1:k xhadk=Ayk+mu(j); end
figure; imshow(xhadk),title('A=510')
figure; subplot(3,2,1),imshow(x); subplot(3,2,2),imshow(xhad); subplot(3,2,3),imshow(xhadk);

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by