How to create a sliding window??
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to create a sliding window of Height= height of the bounding boxes
After this that window should slide untill it finds next bounding box if it doesn't find window should move to next line.
In next line again the height of the sliding window changes based on the height of the bounding boxes
1 commentaire
Walter Roberson
le 19 Avr 2019
How does this differ from your existing question https://www.mathworks.com/matlabcentral/answers/457107-how-to-use-sliding-window-technique-to-detect-one-single-line ?
Réponses (2)
Walter Roberson
le 19 Avr 2019
Apply regionprops() to find the bounding boxes. Sort the bounding boxes by lower left corner, according to x within y (that is, y first, and if there are multiple ones with the same y, then sort those ones by x.) This is equivalent to sliding your attention column by column (x coordinate) within each row looking for a lower left corner of a bounding box. (Depending on the scan order, you might prefer to add the height to the y coordinate so you sort by upper left corner.)
No actual sliding needs to be done for this once you have your bounding box coordinates from regionprops.
0 commentaires
Voir également
Catégories
En savoir plus sur Live Scripts and Functions 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!