6

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:

input
(source: opencv.org)

output
(source: opencv.org)

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?

Community
  • 1
  • 1
cjm2671
  • 18,348
  • 31
  • 102
  • 161
  • how is your center variable created? – user1269942 May 01 '15 at 02:00
  • Find the biggest black round thing, find the weighted centre of that. I finally concluded that the algorithm in OpenCV wasn't good enough, and wrote my own. – cjm2671 May 12 '15 at 09:20
  • if you could get the rough diameter of the pupil, perhaps you could use that information to crop the transformed image...removing the black strip. and with the diameter of the iris, the right side of the transformed image could be stripped off too. example of cropping: out2 = out[:, 100:300] just guessing on the x slice! – user1269942 May 13 '15 at 19:44
  • that's what I did in the end. the problem I was really asking about was the weird distortions/interpolations that this function made. In the end though, I wrote a completely custom one that took into account the lack of concentricity of the iris and pupil, and warped it appropriately to produce a nice output. – cjm2671 May 13 '15 at 21:01
  • This distortion is due not precise circle center detection or not full circle fitting (in case real figure is ellipse for example). – mrgloom Mar 03 '18 at 20:06
  • Cjm2671, I think you are trying to say, that the calculated array width should be the size of the radius (hence thin), while instead it is distorted and about twice as wide as it should be. Can you share the output from your own code? – icypy Jan 08 '20 at 01:36

0 Answers0