IMS135 on RPI: lens shading data relative path

Hello,

what are the lens shading data used for? Can you explain a bit, please?

When I run the executable outside of the folder where it was compiled (I copy it to $HOME/bin) then the libarducam_mipicamera.so complains:

Can’t open the file
mmal: Failed to fix lens shading, use the default mode!

If I then link the lens_shading_table folder to that directory it works again. Is there a way for me to specify an absolute path to the lens_shading_table folder?

 

Hi,

The lens shading data is used to fix lens shading problems.

The driver will find the file in the MIPI_Camera/tree/master/RPI/lens_shading_table/imx135

path, if it is not exist, it will use default mode.

 

Hi bin!

Can you elaborate on what the lens shading problems are? How do they distort the picture?

> The driver will find the file in the MIPI_Camera/tree/master/RPI/lens_shading_table/imx135

Yes, but this is a RELATIVE path to the current directory (working directory) I am in when I call the command to take a picture. Is there a way to make this an ABSOLUTE path so that the Ardu commands will work when called in any arbitrary directory? Can I specify this path either via API or via an environment variable?

> path, if it is not exist, it will use default mode.

Right. But how good is the default mode? I assume the lens_shading_table data are better than the default mode, or? So I would really like to be able to use these lens_shading_table data from anywhere. This is not possible as long as the path is a RELATIVE path to the directory from which I call the command. Please try to call, e.g., the arducamstill command from $HOME.

Helmut

Hi,

About lens shading problems, it is due to the mismatch between the lens and the sensor caused the image to be off-color. The principle of lens table generation is to make the image as uniform as possible by compensating the gain of pixels.

About the lens shading path, it just support relative paths, you can’t set it in special.

If the driver does not find the lens shading table, it will use the default mode, which means

the image is original image without gain compensation. In fact, due to without the official raspberrypi ISP support, the result of the lens shading is not very well.