Ask Your Question

chrism2671's profile - activity

2014-04-17 03:05:43 -0500 received badge  Student (source)
2014-04-17 03:01:23 -0500 asked a question LinearPolar/LogPolar transformation distoring an iris

I'm currently running the following Python (OpenCV 3):

out = cv2.linearPolar(self.roi, center, self.iris_radius, cv2.WARP_FILL_OUTLIERS)

Input image: / Result:

image description image description

The problem I'm having is that this creates something distorted; what I expected was the output to be tall and thin, to reduce the amount of data thrown away & interpolation.

What can I do to improve the result, and produce a nice, beautiful, detailed iris strip?

2014-04-04 10:47:27 -0500 commented answer errors with cv2.HoughCircles

Isn't this available under cv2 (i.e. why import the old cv interface?)

2014-04-03 08:07:50 -0500 received badge  Editor (source)
2014-03-29 07:09:08 -0500 asked a question Transform Polar to Cartesian co-ordinates?

I've written the following python code that 'unravels' an iris from a pupil (i.e. given a central point, it sweeps round 360 degrees and prints out the iris as a long strip (i.e. a rectangle).

The problem is, this code is very slow in Python; is there a good way to do this using OpenCV?

def unravel(img, pupil):
  height, width, depth = img.shape
  max_radius =  180
  min_radius = int(pupil[2])
  out = np.zeros((max_radius-min_radius,720,3), np.uint8)

  for phi in range(0,720):
    for r in range(min_radius, max_radius):
      target = cmath.rect(r,math.radians(phi/2))
      out[(r-min_radius,phi)] = img[(pupil[1] + target.real, pupil[0]+target.imag)]
  return out

Input:

image description

(Cropped) output:

image description

2014-03-29 06:44:12 -0500 asked a question How do I install OpenCV 3 on Mac 10.9 with Python?

I've tried to do this; everything builds fine but in the end I get a segmentation fault 11 with Python.

Any tips would be very helpful.

Thanks! Chris.

2013-10-29 16:49:25 -0500 received badge  Supporter (source)
2013-10-29 07:14:33 -0500 commented question Do you guys have problem using opencv with osx Mavericks?
2013-10-29 07:03:20 -0500 commented question Do you guys have problem using opencv with osx Mavericks?

I can't get it to install at all. I'm using brew, and I tried every version 2.4.3 up to 2.4.6.1 - they all fail in the build process somewhere. I tried to download the source of 2.4.5 and manually build that using make, but that failed too. Like you, I'm using Mavericks + Xcode 5.0.1.

Did you figure it out?