How to find a specific row and column RGB matrix
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Arpit Bhatt
el 15 de Abr. de 2021
Editada: Arpit Bhatt
el 29 de Abr. de 2021
Hello. I want to select a RGB matrix from one image (For example as rows-200 to 220 and coloumn 230to246 matrix) and want to find pixel location of same matrix in another image. For that I wrote below program.Here I1 is first image,I2 is second image and Irefmat is specific matrix from image I1 which I want to find in I2.
Irefmat=I1(100:120,100:120);
red=I2(:,:,1);
green=I2(:,:,2);
blue=I2(:,:,3);
mask=red == Irefmat
green == Irefmat
blue == Irefmat ;
[rows,columns]=find(mask);
subplot(2,2,1);
imshow(mask);
But error is coming. Looking forward for some help!!!
3 comentarios
Constantino Carlos Reyes-Aldasoro
el 15 de Abr. de 2021
IT would be easier to help if you illustrate your problem with actual images.
Respuesta aceptada
Image Analyst
el 16 de Abr. de 2021
I do exactly that in my demo of normxcorr2(). I extract out a rectangular ROI (white onion) from an image (that contains the onion) and then find it in the image. I use the same image, but you could just as well find it in a different image.
1 comentario
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!