Moving x and y of a picture and transfr color

1 visualizzazione (ultimi 30 giorni)
Ali Azizi
Ali Azizi il 6 Nov 2021
Commentato: DGM il 6 Nov 2021
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 Commento
DGM
DGM il 6 Nov 2021
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.

Accedi per commentare.

Risposte (2)

Sudharsana Iyengar
Sudharsana Iyengar il 6 Nov 2021
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 Commenti
Ali Azizi
Ali Azizi il 6 Nov 2021
Can you use this method in my code? What will the code look like?
Sudharsana Iyengar
Sudharsana Iyengar il 6 Nov 2021
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.

Accedi per commentare.


Image Analyst
Image Analyst il 6 Nov 2021
Maybe you want circshift() or imtranslate().

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by