Ask Your Question

AlexRothberg's profile - activity

2018-10-30 12:45:02 -0600 received badge  Famous Question (source)
2017-05-12 13:38:53 -0600 received badge  Notable Question (source)
2017-02-28 22:57:43 -0600 asked a question refineDetectedMarkers on non planar board

I have a non planar board which is five faces of a cube. On each face is four markers (2 x 2 grid). I am currently calling detectMarkers followed by estimatePoseBoard. I would like to call refineDetectedMarkers between these two to improve the pose estimation by finding markers which were not initially detected. This does not work due to the stipulation in the docs "all the marker corners in the board must have the same Z coordinate" (and this code).

That being said is there any way to use refineDetectedMarkers on a face by face manner since each face _is_ planar (with 4 markers)? At the very least is it possible to use refineDetectedMarkers on the top face of the cube since those 4 markers will be planar _and_ have the same z-value?

2016-11-12 01:29:03 -0600 received badge  Popular Question (source)
2015-01-26 23:38:00 -0600 received badge  Enthusiast
2015-01-23 03:34:15 -0600 received badge  Teacher (source)
2015-01-22 23:17:16 -0600 received badge  Editor (source)
2015-01-22 10:35:18 -0600 received badge  Self-Learner (source)
2015-01-22 09:36:05 -0600 commented question Affine Transforming Coordinate Set

I think I made this question sound a lot more complicated than it is. Essentially I just want to get and then apply an affine transformation to a set of points which means multiplying the [point matrix|1] with the transform matrix.

The solution (for translation) is:

arr = np.array([[1,2], [3,4]])

dx = 1
dy = 1
M = np.int32([[1,0,dx],[0,1,dy]])

np.dot(np.c_[arr, np.ones(arr.shape[0])], M.T)
2015-01-22 08:37:37 -0600 commented question Gap Filling Contours / Lines

I tried an 11x11 rectangular kernel and that also did not work.

2015-01-21 17:05:41 -0600 asked a question Affine Transforming Coordinate Set

In OpenCV, I can affine transform an image using:

M = np.float32(...)
array_tform = cv2.warpAffine(arr, M, (cols, row))

this works if the image is represented as bitmap.

What about if the "image" is instead represented as a set of points (coordinates)? i.e. I want to perform the affine transformation on a set of points. For example, translate by (+1,+1):

{ (1, 2), (3, 4) } --> { (2, 3), (4, 5) }

Is there a way to affine transform a point set?

2015-01-21 11:46:51 -0600 asked a question Gap Filling Contours / Lines

I have the following image:

image description

and I would like to fill in its contours (i.e. I would like to gap fill the lines in this image).

I have tried a morphological closing, but using a rectangular kernel of size 3x3 with 10 iterations does not fill in the entire border.

2015-01-17 07:35:25 -0600 received badge  Student (source)
2015-01-16 15:43:20 -0600 asked a question matchTemplate with non-rectangular templ

Is there some way for matchTemplate to work with a non rectangular templ? For example to use the alpha channel, etc to ignore certain pixels when calculating the score?

The various formulas for scores SHOULD generalize to non-rectangular templates.

2015-01-15 17:18:02 -0600 received badge  Supporter (source)