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
im3= I(:,545:-1:1,:);
im4= im3(498:-1:1,:,:);
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 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 件のコメント
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,
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().




Community Treasure Hunt

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

Start Hunting!

Translated by