Effacer les filtres
Effacer les filtres

i have a binary image with gird i want to select each segments in a grid

3 vues (au cours des 30 derniers jours)
Raghu Rao
Raghu Rao le 20 Fév 2017
Commenté : Raghu Rao le 22 Fév 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.
  8 commentaires
Image Analyst
Image Analyst le 20 Fév 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);
Raghu Rao
Raghu Rao le 21 Fév 2017
My question is I want to divide a binary image into CxR equal size and in each segment Sij I want to to find foreground

Connectez-vous pour commenter.

Réponse acceptée

Image Analyst
Image Analyst le 20 Fév 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???
  1 commentaire
Raghu Rao
Raghu Rao le 22 Fév 2017
Sorry, am working on handwritten word image in grid. When I select an image I want to convert that image into binary after converting the image I want to add rows and columns like C = width of binary image / w, where w is user defined width and R = height of binary image / h, where h is user defined height, and finding C And R values I want to divide an binary image of equal size CxR, after dividing in each segment Sij for i:C for j:R In each segment I want to find foreground pixels based on foreground pixels I want to find the centre of mass after finding the centre of mass I want to add node to where centre of present in the segment Sij

Connectez-vous pour commenter.

Plus de réponses (2)

Raghu Rao
Raghu Rao le 20 Fév 2017
Please go through the above attached image, am working on hand written word image and I want to extract graph from it using grid strategy.

Walter Roberson
Walter Roberson le 21 Fév 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.

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by