My camera image has a weird curvature

Hi, I recently bought an openMV 7 camera and i´m new in all this matter of python/micropython/machine_vision and i wonder why the image (Tablet) has that weird curvature like eyefish lens?

Thanks in advance

Yeah, that’s the effect of the lens since it’s wide angle to see more. We chose the lens to have about 110 degree field of view. This is more than standard webcams of about 90.

There’s a command called lens_cor() which can undo that curvature. For an example, see the examples/codes and try out the QR code example with lens correction.

Using lens correction slows things down though. Unless you need to fix the curvature try not too.

Hey man, i forgot to thank you for the very prompt response. It help me a lot.

Hi kwagyeman, i have another problem with the command called lens_cor() to fix the eyefish style. The comand works when the frame size is set to QVGA. But when I tryed to set the frame to VGA comes with memoryError: FB alloc collision.

There is a way the correct the lenses in VGA format?

We don’t have enough RAM for doing lens correction on VGA images. Please reduce the resolution.

Lens correction requires us to allocate a temporary image. At VGA we can’t do it any more.

What’s your application?

I want to integrate the camera to a system that tests devices through a robotic arm.
With the photo taken by the camera an OCR will verify that the steps have been done correctly, so I need good resolution and the text is completely horizontal to be recognized by the OCR.

Okay, you can use VGA then. But, turn on the set_windowing command. This will allow you to select a sub resolution of VGA. In particular, you can do 640x240 or something like that. This will give you the horizontal res you need.

For an example see the bar code detection script.