Alignment of rice grains

i want a code that aligns rice grains in a straight line. the image shows that the rice kernels are scattered around in different position. i want to change orientation of the kernels so that they appear in same position and also they are placed according to their size.

3 commentaires

DGM
DGM le 24 Mai 2021
Modifié(e) : DGM le 24 Mai 2021
Start with:
  1. binarize the image
  2. use regionprops() to get bounding box, orientation, and area of all objects in the binary image
  3. bounding box information to extract the objects
  4. use orientation and imrotate() to orient the sub-images
  5. use area to arrange them as you see fit
or something like that.
sana fatima
sana fatima le 2 Juin 2021
thank you so much for this but it would be great if you help me with the code with it.
Rik
Rik le 2 Juin 2021
DGM did help you. Now it is your turn: show what you have tried and which specific step is giving you trouble implementing it.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Biotech and Pharmaceutical dans Centre d'aide et File Exchange

Commenté :

Rik
le 2 Juin 2021

Community Treasure Hunt

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

Start Hunting!

Translated by