Moving x and y of a picture and transfr color

1 次查看(过去 30 天)
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