- binarize the image
- use regionprops() to get bounding box, orientation, and area of all objects in the binary image
- bounding box information to extract the objects
- use orientation and imrotate() to orient the sub-images
- use area to arrange them as you see fit
Alignment of rice grains
1 view (last 30 days)
Show older comments
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 Comments
Rik
on 2 Jun 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.
Answers (0)
See Also
Categories
Find more on Modify Image Colors in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!