sub2ind is not giving me diesired results
Ältere Kommentare anzeigen
Hi how can you find linear indices of a certain rectangular region in an image. I have its x,y width and height i also have image width and height. Sub2ind is not working or perhaps i dont know how to achieve it using sub2ind. I only want linear indices of a 23x51 area. My X cordinat is 237 and Y is 228 and image size is 375,500. So if provide something like this
linearInd = sub2ind([23 51], 237, 228);
obviously it prompts error that out of range subscript
Thanks
Akzeptierte Antwort
Weitere Antworten (1)
Azzi Abdelmalek
am 19 Jan. 2015
Bearbeitet: Azzi Abdelmalek
am 19 Jan. 2015
0 Stimmen
You have a problem with the size of your matrix, if your matrix is 23x51 how can you get the coordinates [237 228]?
1 Kommentar
Kategorien
Mehr zu Convert Image Type finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!