필터 지우기
필터 지우기

How do I apply SVD (Singular Value Decomposition) to an image?

조회 수: 22 (최근 30일)
buddy
buddy 2011년 3월 2일
댓글: Neelam Yadav 2020년 9월 18일
The syntax given for singular value decomposition is svd(x).
I tried it with my image, but it didn't work. Can you tell me how to work with svd for images please?
  댓글 수: 2
David Young
David Young 2011년 3월 2일
Please could you say what the error message was, and also show any other parts of your code that might be relevant.
Andreas Goser
Andreas Goser 2011년 3월 2일
While I agree with David on the need for specifics, my crystal ball tells my this is about data types and will craft an answer for that...

댓글을 달려면 로그인하십시오.

채택된 답변

Andreas Goser
Andreas Goser 2011년 3월 2일
This sounds like it is about data types or sizes. Example
pout = imread('pout.tif');
svd(pout) % does not work
??? Undefined function or method 'svd' for input arguments of type 'uint8'.
svd(double(pout)) % works
I can however not comment on the mathematical sense of this. I you have another image format like here, you need to think about what you actually like to achieve
I = imread('board.tif');
svd(double(I))
??? Undefined function or method 'svd' for input arguments of type 'double' and
attributes 'full 3d real'.
  댓글 수: 1
buddy
buddy 2011년 3월 2일
thank u sir.. i understand it is bcos of datatype..

댓글을 달려면 로그인하십시오.

추가 답변 (5개)

meenakshi
meenakshi 2011년 9월 6일
HELLO GOSER
i=imread('pout.tif');
i=im2double(i)
[u s v]=svd(i);
you can try like this.
k.meenakshi
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 9월 6일
That would not have any more success than svd(double(I)) if I is a truecolor (3D) image. Remember, images can be stored as pseudocolor (2D arrays in which the values indicate which index to use out of a color map), or as truecolor (3D arrays in which the values directly indicate the color information for each pixel without any map.) The problem is that svd() of a pseudocolor image is not meaningful, and svd() of a 3D array is not allowed. The only choice available to get anything useful out is to convert the image to grayscale and svd() the grayscale image.

댓글을 달려면 로그인하십시오.


slama najla
slama najla 2012년 4월 21일
Hello, can some body help me with the code of SVD decomposition in 3d medical data in matlab please.
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 4월 21일
No. SVD is only for 2D.
You could take the svd() of each plane.

댓글을 달려면 로그인하십시오.


slama najla
slama najla 2012년 4월 28일
But many approaches use it us decomposition for 3d data in watermarking,this is why i reask this question.thanks
  댓글 수: 2
Walter Roberson
Walter Roberson 2012년 4월 28일
SVD is *defined* in terms of rectangular matrices. There is no method to apply SVD to a 3D matrix. I looked at some of the articles about color image watermarking using svd, and of the ones I could access, not one of them attempted to apply SVD to a 3D matrix.
Neelam Yadav
Neelam Yadav 2020년 9월 18일
Hello, can anyone help me how I get different image for U,S,V in svd

댓글을 달려면 로그인하십시오.


Ayesha Iftikhar
Ayesha Iftikhar 2018년 9월 19일
Hello can any one help me how to use SVD for feature extraction

vasanthi Muniasamy
vasanthi Muniasamy 2019년 5월 24일
i=imread('pout.tif');
i=im2double(i)
[u s v]=svd(rgb2gray(i));

카테고리

Help CenterFile Exchange에서 Eigenvalues에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by