How to find a fix number of (almost) fixed proportion rectangles with opencv?

Viewed 562

I am writing a simple fly tracking software and I would love some input from opencv experts.

The image I have looks pretty much like:

sample image for fly tracking

I used to do tracking using kmeans and PIL/numpy but I re-wrote everything to use blob detection in opencv. Tracking works OK but I would also like to automatize division of ROI. What I need to do is find each of the 32 grooves that appear in the picture, where flies live. See the black rectangle on the image as example of what I mean.

I think cornerHarris may be what I need but how do I specify only the grooves and not each single rectangle found in the image? All those grooves have proportions of roughly 10:1.

Thanks!

1 Answers
Related