Technical background
The dark angle of camera lens is that the light intensity being embodied in lens edge is less than camera lens middle section because the characteristic of camera lens itself causes, and causes the surrounding of image to occur the dark angle phenomenon darker than central area.In order to eliminate dark angle, need to revise to each pixel of image compensation coefficient.
Figure 1 shows that the principle schematic of the dark angle compensation method of camera lens in prior art.As shown in Figure 1, this compensation deals process first image to be compensated is divided into N × M rectangular area, then obtains the end points compensation coefficient value of each end points in this N × M rectangular area, and these end points compensation coefficient values be stored in compensation coefficient table.
When process will be compensated to a pixel to be compensated, first to judge whether this pixel to be compensated is end points.If this point to be compensated is end points, then direct this end points compensation coefficient value that reads from compensation coefficient table compensates and processes.If this point to be compensated is not end points, then from compensation coefficient table, read the end points compensation coefficient value of end points around this pixel, utilize the end points compensation coefficient value of end points around these to carry out the compensation coefficient of interpolation arithmetic in the hope of this pixel.Such as, as indicated with 1, the end points compensation coefficient being numbered the end points of 1 ~ 16 is utilized to carry out cubic algebraic curves computing, in the hope of the compensation coefficient of pixel A to be compensated.Must arrange the hardware module of carrying out interpolation arithmetic in the chip of such execution compensation deals and just can complete compensation process, this not only can increase the size of chip, also improves the manufacturing cost of chip.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of new camera lens dark angle compensation method and system, solves in chip of the prior art the hardware module that must arrange and carry out interpolation arithmetic and causes chip size to increase, and the problem that chip manufacturing cost increases.
Embodiments provide a kind of dark angle compensation method of camera lens, comprising:
Gather the image penetrating camera lens generation with uniform illumination;
The intensity of illumination of each pixel and the intensity of illumination of image center on image is utilized to calculate the compensation coefficient of each pixel;
The compensation coefficient of described each pixel is stored in chip exterior memory module;
The compensation coefficient obtaining pixel to be compensated from described chip exterior memory module compensates.
The dark angle compensation system of a kind of camera lens that the embodiment of the present invention provides, comprising:
Uniform source of light, makes lens sensors gather image for irradiating camera lens with uniform source of light;
Computing module, is configured to utilize the intensity of illumination of each pixel and the intensity of illumination of image center on image to calculate the compensation coefficient of each pixel;
Control module, is configured to the compensation coefficient of described each pixel to be stored in chip exterior memory module;
Compensation chips, the compensation coefficient being configured to obtain pixel to be compensated from described chip exterior memory module compensates.
The dark angle compensation method and system of the camera lens utilizing the embodiment of the present invention to provide, is stored in the compensation coefficient of each for image to be compensated pixel in chip exterior memory module.Like this when processing a pixel to be compensated, chip directly reads the compensation coefficient of this pixel to be compensated from this chip exterior memory module, without the need to carrying out interpolation arithmetic at chip internal, thus save the hardware spending that chip internal arranges interpolation arithmetic.So both reduce the size of chip, again reduce the manufacturing cost of chip.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Figure 2 shows that the schematic flow sheet of the dark angle compensation method of camera lens that one embodiment of the invention provides.As shown in Figure 2, the dark angle compensation method of this camera lens comprises:
Step 201: gather the image penetrating camera lens generation with uniform illumination.All identical due to the illumination condition of each pixel on the image that lens sensors generates will be ensured, uniform illumination therefore will be adopted to penetrate camera lens.
Step 202: utilize the intensity of illumination of each pixel and the intensity of illumination of image center on image to calculate the compensation coefficient of each pixel.In an embodiment of the present invention, compensation coefficient is directly proportional to the intensity of illumination of image center, is inversely proportional to the intensity of illumination of pixel.
It will be understood by those skilled in the art that and any method of the prior art can be adopted to try to achieve the compensation coefficient of each pixel in image, the present invention does not limit this.The concrete grammar of the compensation coefficient obtaining a pixel in image is described below by an example.
Figure 3 shows that the principle schematic of the acquisition pixel compensation coefficient that one embodiment of the invention provides.As shown in Figure 3, the light intensity of Ex represent pixel point x, Eo represents the light intensity of o position, center, focal plane.The Relationship of Light intensity between Ex and E0 is:θ is the light angle of light source and pixel x and center, focal plane o;
Again according to triangle geometry relation:and l12=l02+ r2; Wherein, r is the distance of pixel apart from center on focal plane, 10for focal plane is to the distance of camera lens;
Compensation coefficient coef can be drawn:
That is the compensation coefficient of pixel and this pixel are apart from the distance r of center on focal plane and focal plane to the distance 1 of camera lens0relevant.
Step 203: the compensation coefficient of described each pixel is stored in chip exterior memory module.
In an embodiment of the present invention, chip exterior memory module comprises non-volatility memorizer.Now the compensation coefficient of each pixel is stored in chip exterior memory module to comprise: the compensation coefficient of each pixel is stored in non-volatility memorizer.When the reading speed of non-volatility memorizer cannot meet the reading requirement of compensation coefficient, chip exterior memory module also can comprise further: the plug-in memory of chip.Now when compensating initialization, also will by the compensation coefficient of each pixel from non-volatility memorizer unloading to the plug-in memory of chip.
Step 204: the compensation coefficient obtaining pixel to be compensated from described chip exterior memory module compensates.Such chip directly reads the compensation coefficient of this pixel to be compensated from this chip exterior memory module, without the need to carrying out interpolation arithmetic at chip internal, thus saves the hardware spending that chip internal arranges interpolation arithmetic.So both reduce the size of chip, again reduce the manufacturing cost of chip.
Figure 4 shows that the structural representation of the dark angle compensation system of camera lens that one embodiment of the invention provides.As shown in Figure 4, the dark angle compensation system of this camera lens comprises:
Uniform source of light, makes lens sensors gather image for irradiating camera lens with uniform source of light.
Computing module, is configured to utilize the intensity of illumination of each pixel and the intensity of illumination of image center on image to calculate the compensation coefficient of each pixel.
Control module, is configured to the compensation coefficient of each pixel to be stored in chip exterior memory module.
Compensation chips, the compensation coefficient being configured to obtain from chip exterior memory module pixel to be compensated compensates.
In an embodiment of the present invention, chip exterior memory module comprises non-volatility memorizer and the plug-in memory of chip.Now, in an alternative embodiment of the invention, control module is further configured to: be stored in non-volatility memorizer by the compensation coefficient of each pixel; When compensating initialization, by the compensation coefficient of each pixel from non-volatility memorizer unloading to the plug-in memory of chip.
In an embodiment of the present invention, non-volatility memorizer is eeprom memory or FLASH memory.The plug-in memory of chip is DDR memory.
These are only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement etc., all should be included within protection scope of the present invention.