How can I assign a matrix to a grid on an image?
Ältere Kommentare anzeigen
I would like to split a 1000x1000 pixel image into 10x10 pixel boxes to form a grid. I would then like to assign a zero to each box in the grid using the zeros function to create a matrix where each element in the matrix represents a box in the grid. In this case, there should be 10,000 boxes in the grid, or elements in the matrix. Any help, tips would be appreciated, I am a beginner. Thanks!
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 28 Mai 2013
How about this:
yourMatrix(:) = 0;
It has the same effect as what you said - sets every pixel to zero.
2 Kommentare
Image Analyst
am 28 Mai 2013
I still don't understand. Wouldn't the grid cover up rows and columns of pixels? A grid has to be one pixel wide.
Kategorien
Mehr zu Image Arithmetic finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!