Moving x and y of a picture and transfr color

조회 수: 1 (최근 30일)
Ali Azizi
Ali Azizi 2021년 11월 6일
댓글: DGM 2021년 11월 6일
Hi everyone
I=imread('Untitled.jpg');
im3= I(:,545:-1:1,:);
im4= im3(498:-1:1,:,:);
figure;
subplot(2,1,1)
imshow(I)
subplot(2,1,2)
imshow(im4)
I did the above operation on this photo and got the answer.
Now I want to do something that with using a three-dimensional matrix transducer which rotates the colors by rotating the matrix and moving the x and y to transfer color values as well.
please help me
  댓글 수: 1
DGM
DGM 2021년 11월 6일
It might help if you can provide an example of the image and what end result you expect. At least provide an example image and a concrete description of the changes you want to make.
So far, the guesses are that you want to do one of the following
  • principle component analysis
  • color adjustment in RGB (HSV?)
  • image translation (rotation?)
In other words, your explanation is not clear.

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

답변 (2개)

Sudharsana Iyengar
Sudharsana Iyengar 2021년 11월 6일
Do you want to perform a PCA in 3D. You can use hyperpca command in Image Processing tool box.
It is not clear to me what you want to do. If you want to seperate the planes of an image into R,G,B you can use imsplit command. This will seperate the R,G,B. Later you can do any manuplation and later use imfuse to combine the image again. I dont know if this was of any help.
[R,G,B] = imsplit(img);
  댓글 수: 2
Ali Azizi
Ali Azizi 2021년 11월 6일
Can you use this method in my code? What will the code look like?
Sudharsana Iyengar
Sudharsana Iyengar 2021년 11월 6일
First you bring in your image.
I=imread('Untitled.jpg'); % I used a different picture.
[R,G,B]=imsplit(I); % This will split your images.
imshow([R,G,B]) % This will show all R,G,B planes side by side.
% suppose you want to change G and R (green and red planes and then
% multiply Red by 10, we get,
X(:,:,1)=G;
X(:,:,2)=R*10;
X(:,:,3)=B;
imshow([I,X]) % Left side is original image and Right is transformed one.

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


Image Analyst
Image Analyst 2021년 11월 6일
Maybe you want circshift() or imtranslate().

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by