i have a binary image with gird i want to select each segments in a grid
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Raghu Rao
il 20 Feb 2017
Commentato: Raghu Rao
il 22 Feb 2017
Help me to extract or select a region in a grid because i want to find foreground pixels in each grid in the attached image.
![](https://www.mathworks.com/matlabcentral/images/broken_image.png)
8 Commenti
Image Analyst
il 20 Feb 2017
What are the rows and columns of your grid lines? You know how to compute the center of mass - it's just the mean of the rows and columns in the grid.
thisGridTile = binaryImage(row1:row2, column1:column2);
[y, x] = find(thisGridTile);
centroidx = mean(x);
centroidy = mean(y);
Risposta accettata
Image Analyst
il 20 Feb 2017
I don't know exactly what that means, but to extract a grid tile from the large image, if you know the rows and columns, you can simply do this:
thisGridTile = binaryImage(row1:row2, column1:column2);
beyond that then you will need to specify exactly what information you want when you say you want to "find" or "select" the white foreground pixels in each tile. In my mind they're already automatically selected. What else more do you want???
Più risposte (2)
Walter Roberson
il 21 Feb 2017
blockproc() large blocks over the image. Have blockproc call regionprops on the binary negation of the image to determine the centroid of the black pixels.
0 Commenti
Vedere anche
Categorie
Scopri di più su Image Segmentation and Analysis in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!