i hame image plane have perspective transform.
i need detect center of each white rhombus or rhombus itself.
here examples:
as unserstand problem can solved simple template matching if rectify image, need automatically.
is there functions in opencv suitable task? other ideas?
here 2 quick tests did without correcting perspective issue.
pure mathematical morphology:
- extract red channel
- big white top-hat in order detect bright areas, without big bright reflexion.
- small white top-hat in order detect thin lines between rhombus
- result of 2 minus result of 3. lines between rhombus thinner or disappeared.
- opening clean final result.
here 2 results: image1 , image2. main issue rhombus not have same sizes (different magnification , perspective), can problematic mathematical morphology.
so here an other solution using hough transform:
- you start resulting image of step 3 previous algorithm.
- you apply hough transform.
here results: hough1 , hough2. have filter between lines touching rhombus or not, can use first algorithm that. if rhombus not detected first algorithm, , enough detect lines touching rhombus. line intersections centroids looking for.
Comments
Post a Comment