TransWikia.com

What is the order of the output of HoughCircles in OpenCV, when having several circles on a frame?

Signal Processing Asked by Faiza Ali on December 23, 2020

So I am trying to use stereo vision to calculate the depth of several red balls. With the function HoughCircles, I get an output at one frame from one of the cameras like for example:

[x1, y1, r1
 x2, y2  r2
 x3, y3, r3]

where xi and yi (i = 1,2,3) are the coordinates of the center points for respective ball and ri is the radius.

The problem is that HoughCircles for the other camera at the same capture moment, outputs the coordinates in a different order like:

[x2', y2', r2'
 x3', y3'  r3'
 x1', y1', r1']

where xi’, yi’ and ri’ is NOT equal to xi, yi and ri (where i = 1,2,3) because it is a different camera with a different frame angle than the previous one. However, coordinates with the same indexes, like for example x1′ and x1, are coordinates for the same ball, viewed from different cameras (Hope that was understandable).

I want the program to recognize exactly which balls are the same, even though the output-matrices are not in the same order for the respective cameras. And it seems like HoughCircles gives different orders in this matrix for different frames.

How do I control or predict the row-order in the matrices?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP