How to get the matching pixel co-ordination(x,y) of two matrices ?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Here I mentioned the two matrices which include x and y co-ordinations of pixels of two different regions of an image. I want to get the matching pixel co-ordinations(x and y) of these two matrices( A and B). How can I do this ... please help me ..(please note that first column of the matrices is X co-ordination and the second column is y co-ordination)
A =
96 97
96 98
96 99
96 100
96 101
95 102
95 103
94 104
94 105
93 106
93 107
B =
174 270
173 271
172 272
171 273
95 102
169 275
169 276
93 107
2 comentarios
Image Analyst
el 26 de Mayo de 2017
Please define "matching pixel co-ordinations". I see that some rows of the arrays are common to both and some are not. Are you just wondering if there is a function like ismember()? Or do you want something else?
Piyum Rangana
el 27 de Mayo de 2017
Editada: Piyum Rangana
el 27 de Mayo de 2017
Respuestas (1)
KSSV
el 27 de Mayo de 2017
Use
id = find(ismember(A,B,'rows'))
instead of
id = find(ismember(A',B','rows'))
0 comentarios
Ver también
Categorías
Más información sobre Image Preview and Device Configuration en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!