The method of adjustment of image quality control parameter of optical indicator
[technical field]
The present invention relates to a kind of image quality control method, be meant especially on the optical indicating device that is used for computing machine or video system to adjust the method for image quality control parameter.
[background technology]
Optical indicating device as mouse, is one of human interface device the most commonly used.When the user on working surface during rolling mouse, just this motion of perception of the movement sensing device in the mouse, the pointer on the control computer screen is corresponding thus moves.
Fig. 1 is the composition block scheme of optical mouse, this mouse 1 comprises luminescence unit (LED) 10, image sensor 11, programmable gain amplifier (PGA) 12, converter (A/D) 13, data processing unit 14 and control module 15, at work, luminescence unit 10 is lighted with certain frequency usually, launch light to the desktop 2 of this mouse 1 placement, usually this desktop 2 has certain textural characteristics, it is the rough surface of microcosmic, the light that luminescence unit 10 sends is after desktop 2 reflections, and via being input on the image sensor 11 after lens (not shown) focusing, this image sensor 11 forms voltage or current signal according to catoptrical intensity, voltage or the current signal that is formed by 12 pairs of these image sensors 10 of programmable gain amplifier amplifies afterwards, and this voltage or current signal are converted to digital signal by converter 13, be about to the image digitazation of desktop 2.And the image that data processing unit 14 is sampled according to image sensor 11 calculates, thereby determine the displacement of this mouse 1, its detailed process is set at reference picture (being reference frame) for it with a previous sub-picture, a sub-picture of then obtaining is set at target image (being target frame), by selecting a reference block in the target image, and in reference picture, select a plurality of selection pieces, this reference block is mated one by one and compares with selecting piece, determine maximally related selection piece afterwards, select the position of piece to determine the displacement of this mouse 1 according to this, be sent to main frame after by control module 15 this displacement being handled afterwards and move with the correspondence of controlling screen cursor.
Be accuracy and the validity that guarantees that coupling is calculated, industry adopts the amplification coefficient of adjusting time shutter, exposure intensity or programmable gain amplifier to obtain preferable image with assurance usually, and then the accuracy and the validity of the calculating of assurance coupling, it is linear that but existing adjustment mode mostly is, promptly a desire definite value subtracts by adding or pursuing, so cause adjustment cycle long, and the adjustment period between the displacement miscount may appear.
[summary of the invention]
The method of adjustment that the purpose of this invention is to provide a kind of image quality control parameter of optical indicator, the different adjustment mode of feature selecting that it can picture quality, thus rapidly image quality control parameter is adjusted to desirable scope.
For achieving the above object, the method for adjustment of image quality control parameter of the present invention is used for the optical indicating device of computing machine or video system, and this method comprises the steps:
Set up image area according to characteristics of image, be divided into target area, close-target district and target area far away, wherein the close-target district is the zone of both sides, adjacent objects district, and target area far away then is both sides, wide district and the zone that is connected with the close-target district;
Obtain a new two field picture;
Add up the eigenwert of this two field picture;
Determine the regional extent that this eigenwert is affiliated;
In the target area, then keep the current images quality-controlling parameters constant as this eigenwert, with sampling next frame image;
In the close-target district, then adjust image quality control parameter with first mode as this eigenwert, with sampling next frame image, wherein first mode is for increasing or reduce image quality control parameter with a predetermined value;
In target area far away, then adjust image quality control parameter with second mode as this eigenwert, with sampling next frame image, second mode is for being multiplied or reducing image quality control parameter.
According to above-mentioned principal character, the parameter that influences picture quality comprises the time shutter and the light source exposure intensity of image.
According to above-mentioned principal character, this optical indicating device has a programmable amplifier, and the parameter that influences picture quality comprises the enlargement factor and the time shutter of this programmable amplifier.
According to above-mentioned principal character, the eigenwert of this image is the number of pixels of overflow.
According to above-mentioned principal character, the eigenwert of this image is the weak excessively number of pixels of signal.
According to above-mentioned principal character, the eigenwert of this image is a pixel average.
According to above-mentioned principal character, above-mentioned close-target is divided into close-target district and following close-target district, wherein go up the range of characteristic values that comprises in the close-target district higher limit greater than the target area, and the range of characteristic values that comprises in time close-target district is less than the lower limit of target area.
According to above-mentioned principal character, above-mentioned target area far away is divided into target area far away and following target area far away, wherein go up the range of characteristic values that comprises in the target area far away higher limit, and the range of characteristic values that comprises in the target area far away down is less than the lower limit in close-target district down greater than last close-target district.
According to above-mentioned principal character, when this optical indicating device has a programmable amplifier, the parameter that influences picture quality is for this reason when the enlargement factor of programmable amplifier and time shutter, when the eigenwert of this image is in the target area far away, then earlier judge whether the enlargement factor of programmable amplifier is minimum value, then adjust the time shutter in this way in second mode, wherein second mode will be for will shorten to 1/2nd or 1/3rd the time shutter, enlargement factor as programmable amplifier is not a minimum value, then reduces the enlargement factor of programmable amplifier.
According to above-mentioned principal character, when this optical indicating device has a programmable amplifier, the parameter that influences picture quality is for this reason when the enlargement factor of programmable amplifier and time shutter, when the eigenwert of this image is in the close-target district, then earlier judge whether the time shutter has the space of downward modulation, if any then adjusting the time shutter in first mode, wherein first mode is to shorten the time shutter with a predetermined value, the space that does not have downward modulation as the time shutter, then reduce the enlargement factor of programmable amplifier, as be reduced to originally 1/2nd, will prolong the time shutter more afterwards, as be corresponding two times, to guarantee the continuity of exposure, adjust the time shutter in first mode again, and the like, reach ideal state up to picture quality.
According to above-mentioned principal character, when this optical indicating device has a programmable amplifier, the parameter that influences picture quality is for this reason when the enlargement factor of programmable amplifier and time shutter, when the eigenwert of this image is in the following close-target district, then earlier judge whether the time shutter has the space of rise, if any then adjusting the time shutter in first mode, wherein first mode is to increase the time shutter with a predetermined value, the space that does not have rise as the time shutter, then increase the enlargement factor of programmable amplifier, as to original two times, to reduce the time shutter more afterwards, as can be originally 1/2nd, adjust the time shutter in first mode again, and the like, reach perfect condition up to picture quality.
According to above-mentioned principal character, when this optical indicating device has a programmable amplifier, the parameter that influences picture quality is for this reason when the enlargement factor of programmable amplifier and time shutter, when the eigenwert of this image is in the following target area far away, then earlier judge whether the enlargement factor of programmable amplifier is maximal value, as otherwise increase the enlargement factor of programmable amplifier, judge then in this way whether the time shutter also has the space of raising, if any then adjusting the time shutter in second mode, soon the time shutter is extended for two to three times, if the time shutter does not have the space of rise, then reduce the frame per second of the image sampling of this optical indicating device, the value that changes the time shutter according to above-mentioned similar mode in bigger adjustable range makes exposure reach or near the target area as far as possible.
Compared with prior art, the present invention is according to the interval range at the eigenwert place of image information, adjust the parameter that influences picture quality in different ways, can guarantee that so this parameter that influences picture quality adjusts to proper range rapidly, further assurance obtains the image of better quality, thereby is beneficial to the displacement of correct calculation indicating device.
[description of drawings]
Fig. 1 is the composition block scheme of optical mouse.
The identified region of Fig. 2 for dividing according to characteristics of image among the present invention.
Fig. 3 is the process flow diagram of an embodiment of the present invention.
[embodiment]
See also shown in Figure 1, optical indication device image quality control method of the present invention, can be used on computing machine or the video system indicating device, this indicating device is by the image of optics perception exterior object, by calculating the correlativity between two sub-pictures, thereby determine the displacement of this optical indicating device, thereby control the cursor on the display screen corresponding, thereby realize the fixed function of desire with this indicating device.
For understanding conveniently, below in conjunction with Fig. 1 concrete application of the present invention is described, Fig. 1 is the composition block scheme of optical mouse, this mouse 1 comprises luminescence unit (LED) 10, image sensor 11, programmable gain amplifier (PGA) 12, converter (A/D) 13, data processing unit 14 and control module 15, at work, luminescence unit 10 is lighted with certain frequency usually, launch light to the desktop 2 of this mouse 1 placement, usually this desktop 2 has certain textural characteristics, it is the rough surface of microcosmic, the light that luminescence unit 10 sends is after desktop 2 reflections, and via being input on the image sensor 11 after lens (not shown) focusing, this image sensor 11 forms voltage or current signal according to catoptrical intensity, voltage or the current signal that is formed by 12 pairs of these image sensors 10 of programmable gain amplifier amplifies afterwards, and this voltage or current signal are converted to digital signal by converter 13, be about to the image digitazation of desktop 2.And the image that data processing unit 14 is sampled according to image sensor 11 calculates, thereby determine the displacement of this mouse 1, its detailed process is set at reference picture (being reference frame) for it with a previous sub-picture, a sub-picture of then obtaining is set at target image (being target frame), by selecting a reference block in the target image, and in reference picture, select a plurality of selection pieces, this reference block is mated one by one and compares with selecting piece, determine maximally related selection piece afterwards, select the position of piece to determine the displacement of this mouse 1 according to this, be sent to main frame after by control module 15 this displacement being handled afterwards and move with the correspondence of controlling screen cursor.
Be accuracy and the validity that guarantees that coupling is calculated, industry adopts the amplification coefficient of adjusting time shutter, exposure intensity or programmable gain amplifier to obtain preferable image with assurance usually, and then the accuracy and the validity of the calculating of assurance coupling, it is linear that but existing adjustment mode mostly is, promptly a desire definite value subtracts by adding or pursuing, so cause adjustment cycle long, and the adjustment period between the displacement miscount may appear, the present invention proposes a kind of image quality control parameter that can make fast and adjusts to the method that desire is decided scope for this reason.
See also shown in Figure 2, be the identified region of dividing according to characteristics of image among the present invention, it mainly is divided into the target area, close-target district and target area far away, wherein the close-target district is the zone of both sides, adjacent objects district, target area far away then is both sides, wide district and the zone that is connected with the close-target district, wherein close-target is divided into close-target district and following close-target district, wherein go up the range of characteristic values that comprises in the close-target district higher limit greater than the target area, and the range of characteristic values that comprises in the following close-target district is less than the lower limit of target area, and above-mentioned target area far away is divided into target area far away and following target area far away, wherein go up the range of characteristic values that comprises in the target area far away higher limit greater than last close-target district, and descend the range of characteristic values that comprises in the target area far away less than the lower limit of descending the close-target district, and the eigenwert of image can be the number of pixels of overflow, number of pixels or pixel average that signal is weak excessively.As being as the criterion with pixel average, then above-mentioned target area average pixel value is 106-147, last close-target district average pixel value is 148-191, going up target area far away average pixel value is 192-255, and following close-target district average pixel value is 64-105, and following target area far away average pixel value is 0-63, if number of pixels, the weak excessively number of pixels of signal with overflow are standard, then its number need be divided according to the situation in the reality, and this people in the industry can understand fully, repeats no more herein.
See also shown in Figure 3ly, be the process flow diagram of one embodiment of the invention, in the present embodiment, image quality control parameter is the enlargement factor of time shutter and programmable amplifier (PGA), and this method comprises the steps:
Set up image area partial objectives for district according to characteristics of image, close-target district and target area far away, wherein the close-target district is the zone of both sides, adjacent objects district, target area far away then is both sides, wide district and the zone that is connected with the close-target district, and above-mentioned close-target is divided into close-target district and following close-target district, wherein go up the range of characteristic values that comprises in the close-target district higher limit greater than the target area, and the range of characteristic values that comprises in the following close-target district is less than the lower limit of target area, and above-mentioned target area far away is divided into target area far away and following target area far away, wherein go up the range of characteristic values that comprises in the target area far away higher limit, and the range of characteristic values that comprises in the target area far away down is less than the lower limit in close-target district down greater than last close-target district.
Obtain a new two field picture;
Add up the eigenwert of this two field picture, in the specific implementation, this eigenwert is one of the weak excessively number of pixels of number of pixels, the signal of overflow or pixel average;
Determine the regional extent that this eigenwert is affiliated;
In the target area, then keep the current images quality-controlling parameters constant as this eigenwert, with sampling next frame image;
When the eigenwert of this image is in the target area far away, then earlier judge whether the enlargement factor of programmable amplifier (PGA) is minimum value, then adjust the time shutter in this way in second mode, wherein second mode will be for will shorten to 1/2nd or 1/3rd the time shutter, enlargement factor as programmable amplifier is not a minimum value, then reduces the enlargement factor of programmable amplifier.
When the eigenwert of this image is in the close-target district, then earlier judge whether the time shutter has the space of downward modulation, if any then adjusting the time shutter in first mode, wherein first mode is to shorten the time shutter with a predetermined value, do not have the space of downward modulation as the time shutter, then reduce the enlargement factor of programmable amplifier, as be reduced to original 1/2nd, to prolong the time shutter more afterwards, as be two times of corresponding continuitys with the assurance exposure.Adjust the time shutter in first mode again, and the like, reach ideal state up to picture quality.
When the eigenwert of this image is in the following close-target district, then earlier judge whether the time shutter has the space of rise, if any then adjusting the time shutter in first mode, wherein first mode is to increase the time shutter with a predetermined value, the space that does not have rise as the time shutter, then increase the enlargement factor of programmable amplifier, as to original two times, to reduce the time shutter more afterwards, as can be original 1/2nd, adjust the time shutter in first mode again, and the like, reach perfect condition up to picture quality.
When the eigenwert of this image is in the following target area far away, then earlier judge whether the enlargement factor of programmable amplifier is maximal value, as otherwise increase the enlargement factor of programmable amplifier, judge then in this way whether the time shutter also has the space of raising, then have then and adjust the time shutter in second mode, soon the time shutter is extended for two to three times, if the time shutter does not have the space of rise, then reduce the frame per second of the image sampling of this indicating device, the value that changes the time shutter according to above-mentioned similar mode in bigger adjustable range makes exposure reach or near the target area as far as possible.
Compared with prior art, the present invention is according to the interval range at the characteristic value place of image information, adjust in different ways image quality control parameter, can guarantee that so this image quality control parameter adjusts to rapidly proper range, further assurance obtains the better image of quality, thereby is beneficial to the displacement of correct calculating indicating device.