Background technology
Along with the continuous development of digital product technology, digital camera has also obtained bigger development, and one of them aspect is exactly that the pixel of digital camera is more and more higher, and then the image definition that obtains also is more and more higher.
Yet the raising of digital camera pixel has also brought simultaneously a problem, and the requirement of digital camera fuselage smoothness has had corresponding raising when taking pictures exactly.Especially for for the layman who uses camera in generality work and the life, when taking pictures, be difficult to accomplish to maintain the steady of digital camera fuselage, particularly in the moment of pressing shutter, can shake just so-called usually " hand is trembled " phenomenon unavoidably.
The shake of this fuselage when the digital camera pixel is not too high, is not very big to the influence of the definition of the photo taken.But,, because the not fogging clear problem that the shake of hand causes is more and more obvious, and have influence on the picture quality of photo to a great extent when taking pictures along with the pixel of digital camera is more and more higher.
For the influence that the shake comparison film definition of eliminating this because hand causes, industry is normally set up in digital camera based on gyrostatic image stabilization system.Specifically be, the use gyroscope is tried to achieve the angle of pitch and the azimuth between camera institute grabgraf picture, eliminates because the harmful effect that the hand shake causes by image rotation algorithm then.
But the present market price of gyroscope is higher.Therefore, this based on gyrostatic image stabilization system, generally only be applied to higher shelves and above digital camera at present, and be not suitable in whole digital camera scope, promoting the use of.
Summary of the invention
Technical problem to be solved by this invention is to overcome existing defectives such as too high and range of application is little based on the existing production cost of gyrostatic image stabilization system, and the image stabilization system of the low and applied range of a kind of production cost is provided.
In order to solve the problems of the technologies described above, technical scheme proposed by the invention is:
A kind of image stabilization system, it includes grabgraf device, three geomagnetic sensors and microcontroller.Wherein the grabgraf device is used to obtain a plurality of consecutive image data, and it is transferred to microcontroller.Corresponding geomagnetic field intensity signal value when three geomagnetic sensors are used to obtain grabgraf device grabgraf, and it is transferred to microcontroller.Microcontroller then calculates azimuth, the angle of pitch and the roll angle of each sampled point, and then draw grab azimuth difference, angle of pitch difference and roll angle difference between each picture, eliminate differential seat angle between each picture according to image rotation algorithm then, each picture is superposeed obtain final image at last.
Further, in different execution modes, wherein the grabgraf device can be the known various grabgraf devices of industry, for example, the various grabgraf devices that in digital camera, use, it includes camera lens or the like element.
Further, in different execution modes, wherein the time remaining of the continuous grabgraf of grabgraf device is very short.Specifically can be 5 seconds with interior, 4 seconds with interior, 3 seconds with interior, 2 seconds with interior, 1 second with interior or the like.
Further, in different execution modes, wherein three geomagnetic sensors to the sample mode of the corresponding geomagnetic field intensity signal value of image data are, if the continuous grabgraf n of grabgraf device opens, then corresponding sampling obtains n-1 group geomagnetic field intensity signal value.
Further, in different execution modes, the image stabilization system that wherein the present invention relates to also includes the image output display device, and it is connected with microcontroller to receive and demonstrate by microcontroller handles the view data that obtains.Concrete, it can comprise display panels or LED display floater, is used for outside display image data.
Further, another aspect that the present invention relates to provides a kind of image data acquiring and processing method applicable to the image stabilization system use that the present invention relates to, and it includes following steps:
The coordinate system of setting image stabilization system is as follows: vertical image systems stabilisation surface and the lens direction that points to the grabgraf device are the y axle, and the level of y axle be to the right the x axle, is the z axle upwards, and x axle and z axle are all on the surface of image stabilization system.
When the grabgraf device carried out continuous grabgraf, three geomagnetic sensors were correspondingly sampled to the geomagnetic field intensity signal value in the image stabilization system.
According to x, the data of y axle obtain the azimuth of each sampled point, and according to y, the data of z axle obtain the angle of pitch of each sampled point, and according to x, the data of z axle obtain the roll angle of each sampled point.
Obtain angle of pitch difference, roll angle difference and azimuth difference between institute's grabgraf sheet according to the data of each sampled point, eliminate the differential seat angle between institute's grabgraf sheet, institute's grabgraf sheet is superposeed obtains distinct image.
Further, in different execution modes, wherein three geomagnetic sensors to the sample mode of the corresponding geomagnetic field intensity signal value of image data are, if the continuous grabgraf n of grabgraf device opens, then corresponding sampling obtains n-1 group geomagnetic field intensity signal value.
Further, in different execution modes, wherein the time remaining of the continuous grabgraf of grabgraf device is very short.Specifically can be 5 seconds with interior, 4 seconds with interior, 3 seconds with interior, 2 seconds with interior, 1 second with interior or the like.
Further, in different execution modes, comprise also that wherein the geomagnetic field intensity signal value that sampling is obtained carries out normalization and calculates, obtain the signal value of actual response geomagnetic field intensity.
Further, in different execution modes, the normalization numerical computations formula that wherein relates to use is: the numerical value after the normalization=(semaphore of Magnetic Sensor-its bias)/Sensitirity va1ue.
Further, in different execution modes, the azimuth calculating formula that wherein relates to use is: the value after the value after azimuth=atan(y axle normalization/x axle normalization).
Further, in different execution modes, the angle of pitch computing formula that wherein relates to use is: the value after the value after the angle of pitch=atan(z axle normalization/y axle normalization).
Further, in different execution modes, the roll angle computing formula that wherein relates to use is: the value after the value after roll angle=atan(z axle normalization/x axle normalization).
In above azimuth, the angle of pitch, the roll angle computing formula, wherein atan is an arctan function ,/be the division sign.
Further, in different execution modes, the differential seat angle of wherein eliminating between institute's grabgraf sheet has adopted image rotation algorithm, and the computing formula that it adopted is:
If the picture that camera is grabbed successively is made as b and n, wherein the attitude angle difference of picture b and n is the azimuth difference
, angle of pitch difference
, the roll angle difference
, because
,
,
Be low-angle all, so coordinate conversion matrix is approximately:
If picture n ' eliminates for picture n and picture b between picture behind the differential seat angle.
The coordinate figure that multiply by pixel correspondence among the picture n obtains new coordinate figure and deposits in the pixel of picture n ' according to new coordinate figure then and can obtain new picture n '.
It is poor not had shooting angle between picture n ' and the picture b, stackable and ghost image can not occur.
Compared with prior art, the invention has the beneficial effects as follows: image stabilization system that the present invention relates to and image data acquiring and processing method thereof, use three geomagnetic sensors to replace gyroscope, because the cost of three geomagnetic sensors itself is lower than gyrostatic cost, therefore will reduce the cost of image stabilization system greatly accordingly, help image stabilization system and apply in the larger context, especially in digital camera field, its corresponding benefit that can produce will be huge.
Embodiment
Describe the specific embodiment of the present invention in detail below in conjunction with accompanying drawing.
See also shown in Figure 1, a kind of image stabilization system that the present invention relates to, it includes grabgraf device, three geomagnetic sensors, microcontroller and image output display devices.
Wherein the grabgraf device is used to obtain the interior a plurality of consecutive image data of certain hour, and it is transferred to microcontroller.Corresponding geomagnetic field intensity signal value when three geomagnetic sensors are used to obtain grabgraf device grabgraf, and it is transferred to microcontroller.Microcontroller then calculates azimuth, the angle of pitch and the roll angle of each sampled point, and then draw grab azimuth difference, angle of pitch difference and roll angle difference between each picture, eliminate differential seat angle between each picture according to image rotation algorithm then, each picture is superposeed obtain final image at last.The picture rich in detail transfer of data that obtain after will handling of microcontroller is given the image output display device and by its outside demonstration then.
Wherein the grabgraf device can be the known various grabgraf devices of industry, for example, the various grabgraf devices that in digital camera, use, it comprises elements such as camera lens.
The image stabilization system that the present invention relates to is when work, and it has used the image data acquiring and processing method that the present invention relates to, and it includes following image data acquiring treatment step:
The first step, the coordinate system of setting image stabilization system is as follows: vertical image systems stabilisation surface and the lens direction that points to the grabgraf device are the y axle, and the level of y axle be to the right the x axle, is the z axle upwards, and x axle and z axle are all on the surface of image stabilization system.
In second step, during grabgraf device grabgraf, three geomagnetic sensors are sampled to corresponding geomagnetic field intensity signal value.Specifically, if the continuous within a certain period of time grabgraf n of grabgraf device opens, three geomagnetic sensors can be sampled and be obtained n-1 group geomagnetic field intensity signal value, then by Magnetic Sensor normalization formula, calculate the signal value of actual response geomagnetic field intensity.
The Magnetic Sensor normalization formula that wherein relates to use is:
Numerical value after the normalization=(semaphore of Magnetic Sensor-its bias)/Sensitirity va1ue.
In the 3rd step, according to x, the data of y axle use the standard solution formula can obtain every azimuth, according to y, the data of z axle use the standard solution formula can obtain every the angle of pitch, and according to x, the data of z axle use the standard solution formula can obtain every roll angle.
The standard solution formula that wherein relates to is:
Value after value after azimuth=atan(y axle normalization/x axle normalization);
Value after value after the angle of pitch=atan(z axle normalization/y axle normalization);
Value after value after roll angle=atan(z axle normalization/x axle normalization);
Wherein atan is an arctan function ,/be the division sign.
The 4th step, data according to the 3rd step obtained can obtain the angle of pitch difference between the grabgraf device institute grabgraf sheet, roll angle difference and azimuth difference, eliminate differential seat angle between institute's grabgraf sheet according to image rotation algorithm, institute's grabgraf sheet is superposeed can obtain distinct image.
Wherein image rotation algorithm is, establish the grabgraf device grab successively picture be b, n, the attitude angle difference of picture b and n is the azimuth difference
, angle of pitch difference
, the roll angle difference
, because
,
,
Be low-angle all, so coordinate conversion matrix is approximately:
If picture n ' eliminates for picture n and picture b between picture behind the differential seat angle.
The coordinate figure that multiply by pixel correspondence among the picture n obtains new coordinate figure, deposits in the pixel of picture n ' according to new coordinate figure then and can obtain new picture n '.
It is poor not had shooting angle between picture n ' and the picture b, stackable and ghost image can not occur.
In sum, the image stabilization system that the present invention relates to is used the faint angle variation that three geomagnetic sensors are measured camera, because the cost of three geomagnetic sensors itself is lower than gyrostatic cost, therefore correspondingly will reduce the production cost of image stabilization system greatly, helping image stabilization system applies in the larger context, especially in digital camera field, its corresponding benefit that can produce will be huge.
The above only is a better embodiment of the present invention; protection scope of the present invention is not exceeded with above-mentioned execution mode; in every case those of ordinary skills' equivalence that disclosure is done according to the present invention is modified or is changed, and all should include in the protection range of putting down in writing in claims.