CN102932613B - Based on analog video ADC automatic adjusting method and the device of FPGA - Google Patents

Based on analog video ADC automatic adjusting method and the device of FPGA Download PDF

Info

Publication number
CN102932613B
CN102932613B CN201210510171.XA CN201210510171A CN102932613B CN 102932613 B CN102932613 B CN 102932613B CN 201210510171 A CN201210510171 A CN 201210510171A CN 102932613 B CN102932613 B CN 102932613B
Authority
CN
China
Prior art keywords
value
dialogues
told
play
stage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201210510171.XA
Other languages
Chinese (zh)
Other versions
CN102932613A (en
Inventor
陈羽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vtron Technologies Ltd
Original Assignee
Vtron Technologies Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CN201210510171.XA priority Critical patent/CN102932613B/en
Publication of CN102932613A publication Critical patent/CN102932613A/en
Application granted granted Critical
Publication of CN102932613B publication Critical patent/CN102932613B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Of Color Television Signals (AREA)

Abstract

The embodiment of the invention discloses a kind of analog video ADC automatic adjusting method based on FPGA and device, can digitlization automatically adjust, adjustment effect precision is out high, and adjustment result is unified reliable, and substantially reduces regulation time.Embodiment of the present invention method comprises: preset ideal field value scope; By the photochromic actual field value of acquisition Rule preset, described photochromic be at least one in red R, green G or blue B; When photochromic actual field value is not within ideal field value scope, by the regulation rule adjustment biased coefficient of described photochromic correspondence preset and gain coefficient until the photochromic actual field value after adjustment is within described ideal field value scope.The embodiment of the invention discloses a kind of analog video ADC automatic adjusting method based on FPGA and device, can digitlization automatically adjust, adjustment effect precision is out high, and adjustment result is unified reliable, and substantially reduces regulation time.

Description

Based on analog video ADC automatic adjusting method and the device of FPGA
Technical field
The embodiment of the present invention relates to image processing field, is specifically related to the analog video ADC automatic adjusting method based on FPGA and device.
Background technology
Video simulation front end is the significant components of multimedia processing system, although burgeoning digital interface is more and more universal, but because analog interface has the high characteristic particularly low in energy consumption of picture quality, so analog video interface still plays important role in multimedia application.And process such as encoding and decoding, transmission, the picture quality optimization of video is at present all carry out based on numeral, so front end analogue video all needs to do an analog-to-digital conversion, video A/D converter (ADC, Analog to Digital Converter) is the chip of this work responsible.
After video carries out AD conversion, in order to reach optimum efficiency, the digital quantity after conversion needs the size that truly can reflect analog quantity.But because ADC exists gain error and biased error, it is Y=X*GAIN+OFFSET that actual input X closes with output Y, wherein GAIN is gain coefficient, OFFSET is biased coefficient, simultaneously because client is different, environment is different, the input range that ADC faces is different, can cause the image after ADC conversion, dark place is brighter, and bright place is darker, contrast diminishes, thus cause image fault, therefore video AD C will carry out real-time adjustment according to actual user scene to GAIN and OFFSET, and the effect after making video carry out AD conversion reaches best.
Method of adjustment conventional is at present that Engineering Service personnel utilize the signal source of client to export a width gray scale image to scene, then according to actual displayed effect, GAIN and OFFSET of manual setting ADC, and gray scale image be it seems, and brightness is moderate, each rank transition nature; But because adjustment process tester revises GAIN and OFFSET according to self to the subjective assessment of picture quality, therefore debug process has very large subjectivity, the effect that different testers debugs out can be different, the quality of effect depends on that the experience of commissioning staff, effect are difficult to ensure and unification; Output area in addition due to unlike signal source is different, therefore also will adjust for different signal sources, just needs to readjust, increase workload after user changes signal source.
Summary of the invention
Embodiments provide a kind of analog video ADC automatic adjusting method based on FPGA and device, can digitlization automatically adjust, adjustment effect precision is out high, and adjustment result is unified reliable, and substantially reduces regulation time.
The analog video ADC automatic adjusting method based on FPGA that the embodiment of the present invention provides, comprising:
Preset ideal field value scope, described ideal field value scope comprises desirable details in a play not acted out on stage, but told through dialogues value scope and ideal white field value scope, described desirable details in a play not acted out on stage, but told through dialogues value scope comprises smallest ideal details in a play not acted out on stage, but told through dialogues value and maximum desired details in a play not acted out on stage, but told through dialogues value, and described ideal white field value scope comprises smallest ideal white field value and maximum desired white field value;
By the photochromic actual field value of acquisition Rule preset, described photochromic be at least one in red R, green G or blue B;
When photochromic actual field value is not within ideal field value scope, by the regulation rule adjustment biased coefficient of described photochromic correspondence preset and gain coefficient until the photochromic actual field value after adjustment is within described ideal field value scope;
Described actual field value comprises actual details in a play not acted out on stage, but told through dialogues value and reality white field value.
Alternatively, the described biased coefficient by the described photochromic correspondence of default regulation rule adjustment and gain coefficient are until the photochromic actual field value after adjustment comprises within described ideal field value scope:
The analog signal received is set to entirely black the darkest, obtains photochromic actual details in a play not acted out on stage, but told through dialogues value;
If described photochromic actual details in a play not acted out on stage, but told through dialogues value is not within desirable details in a play not acted out on stage, but told through dialogues value scope, then adjust the biased coefficient of described photochromic correspondence until the photochromic actual details in a play not acted out on stage, but told through dialogues value after adjustment is within described desirable details in a play not acted out on stage, but told through dialogues value scope by the details in a play not acted out on stage, but told through dialogues regulation rule preset;
The analog signal received is set to complete white the brightest, obtains photochromic reality white field value;
If described photochromic reality white field value is not within the value scope of ideal white field, then adjust the gain coefficient of described photochromic correspondence until the photochromic reality white field value after adjustment is within the value scope of described ideal white field by the white field regulation rule preset.
Alternatively, the described biased coefficient by the described photochromic correspondence of default regulation rule adjustment and gain coefficient are until the photochromic actual field value after adjustment comprises within described ideal field value scope:
The analog signal received is set to entirely black the darkest, obtains the actual details in a play not acted out on stage, but told through dialogues value of R;
If the actual details in a play not acted out on stage, but told through dialogues value of R is not within desirable details in a play not acted out on stage, but told through dialogues value scope, then adjust the biased coefficient of described R until the actual details in a play not acted out on stage, but told through dialogues value of described R is within described desirable details in a play not acted out on stage, but told through dialogues value scope;
Obtain the actual details in a play not acted out on stage, but told through dialogues value of G;
If the actual details in a play not acted out on stage, but told through dialogues value of G is not within desirable details in a play not acted out on stage, but told through dialogues value scope, then adjust the biased coefficient of described G until the actual details in a play not acted out on stage, but told through dialogues value of described G is within described desirable details in a play not acted out on stage, but told through dialogues value scope;
Obtain the actual details in a play not acted out on stage, but told through dialogues value of B;
If the actual details in a play not acted out on stage, but told through dialogues value of B is not within desirable details in a play not acted out on stage, but told through dialogues value scope, then adjust the biased coefficient of described B until the actual details in a play not acted out on stage, but told through dialogues value of described B is within described desirable details in a play not acted out on stage, but told through dialogues value scope;
Analog signal is set to complete white the brightest, obtains the reality white field value of R;
If the reality of R white field value not within the value scope of ideal white field, then adjusts the gain coefficient of described R until the reality of described R white field value is within the value scope of described ideal white field;
Obtain the reality white field value of G;
If the reality of G white field value not within the value scope of ideal white field, then adjusts the gain coefficient of described G until the reality of described G white field value is within the value scope of described ideal white field;
Obtain the reality white field value of B;
If the reality of B white field value not within the value scope of ideal white field, then adjusts the gain coefficient of described B until the reality of described B white field value is within the value scope of described ideal white field.
Alternatively, described details in a play not acted out on stage, but told through dialogues regulation rule comprises:
If photochromic actual details in a play not acted out on stage, but told through dialogues value is greater than maximum desired details in a play not acted out on stage, but told through dialogues value, then reduce described biased coefficient until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope by the details in a play not acted out on stage, but told through dialogues increase and decrease rule preset, if photochromic actual details in a play not acted out on stage, but told through dialogues value is less than smallest ideal details in a play not acted out on stage, but told through dialogues value, then increase described biased coefficient until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope by the details in a play not acted out on stage, but told through dialogues increase and decrease rule preset.
Alternatively, described white field regulation rule comprises:
If photochromic reality white field value is greater than maximum desired white field value, then reduce described gain coefficient until actual white field value is within the value scope of ideal white field by the white field increase and decrease rule preset, if photochromic reality white field value is less than smallest ideal white field value, then increase described gain coefficient until actual white field value is within the value scope of ideal white field by the white field increase and decrease rule preset.
Alternatively, described details in a play not acted out on stage, but told through dialogues increase and decrease rule comprises:
Biased coefficient described in coarse adjustment;
When the photochromic actual details in a play not acted out on stage, but told through dialogues value after coarse adjustment is not within desirable details in a play not acted out on stage, but told through dialogues value scope, finely tune described biased coefficient, until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope;
Described coarse adjustment comprises: will be biased coefficient adjustment to desirable details in a play not acted out on stage, but told through dialogues value midpoint;
Described fine setting comprises: desirable details in a play not acted out on stage, but told through dialogues value is divided at least two parts, each adjustment portion wherein.
Alternatively, described details in a play not acted out on stage, but told through dialogues increase and decrease rule comprises:
Obtain biased difference between coefficient and desirable details in a play not acted out on stage, but told through dialogues value mid point;
Using 1/2nd of difference as stepping;
According to described stepping, described biased coefficient is adjusted, until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope.
Alternatively, described white field increase and decrease rule comprises:
Obtain the perfect Gain coefficient according to adjusted biased coefficient and ideal white field value, described the perfect Gain coefficient comprises maximum desired gain coefficient and smallest ideal gain coefficient;
The midrange of the perfect Gain coefficient is obtained according to the perfect Gain coefficient;
Obtain the difference between gain coefficient and the midrange of the perfect Gain coefficient;
Using 1/2nd of difference as stepping;
According to described stepping, described biased coefficient is adjusted, until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope.
The analog video ADC automatic regulating apparatus based on FPGA that the embodiment of the present invention provides, comprising:
Preset unit, for default ideal field value scope, described ideal field value scope comprises desirable details in a play not acted out on stage, but told through dialogues value scope and ideal white field value scope, described desirable details in a play not acted out on stage, but told through dialogues value scope comprises smallest ideal details in a play not acted out on stage, but told through dialogues value and maximum desired details in a play not acted out on stage, but told through dialogues value, and described ideal white field value scope comprises smallest ideal white field value and maximum desired white field value;
Acquiring unit, for by the photochromic actual field value of acquisition Rule preset, described photochromic be at least one in red R, green G or blue B;
Adjustment unit, for when photochromic actual field value is not within ideal field value scope, by the regulation rule adjustment biased coefficient of described photochromic correspondence preset and gain coefficient until the photochromic actual field value after adjustment is within described ideal field value scope;
Described actual field value comprises actual details in a play not acted out on stage, but told through dialogues value and reality white field value.
Alternatively, described adjustment unit comprises biased adjustment subelement and biased adjustment subelement;
Described biased adjustment subelement, for adjusting biased coefficient;
Described Gain tuning subelement, for adjusting gain coefficient.
In the embodiment of the present invention, first ideal field value scope is preset, then by the actual field value that the acquisition Rule preset is photochromic, photochromic is red R, at least one in green G or blue B, when photochromic actual field value is not within ideal field value scope, the biased coefficient of photochromic correspondence and gain coefficient is adjusted until the photochromic actual field value after adjustment is within ideal field value scope by the regulation rule preset, so the photochromic actual field value after adjustment seems that meeting brightness is moderate, each rank transition nature, realize digitlization automatically to adjust, adjustment effect precision is out high, adjustment result is unified reliable, and substantially reduce regulation time.
Accompanying drawing explanation
Fig. 1 is the analog video ADC automatic adjusting method first embodiment flow chart based on FPGA in the embodiment of the present invention;
Fig. 2 is the analog video ADC automatic adjusting method second embodiment flow chart based on FPGA in the embodiment of the present invention;
Fig. 3 is the analog video ADC automatic regulating apparatus example structure figure based on FPGA in the embodiment of the present invention.
Embodiment
Embodiments provide a kind of analog video ADC automatic adjusting method based on FPGA and device, can digitlization automatically adjust, adjustment effect precision is out high, and adjustment result is unified reliable, and substantially reduces regulation time.
Refer to Fig. 1, analog video ADC automatic adjusting method first embodiment based on FPGA in the embodiment of the present invention comprises:
101, ideal field value scope is preset;
In the present embodiment, after video AD C receives analog video signal, export digital RGB signal, the output valve of this digital RGB signal in the present embodiment, can be claimed to be field value.If video AD C receives the darkest analog video signal of black, then obtain details in a play not acted out on stage, but told through dialogues value, if video AD C receives the brightest analog video signal of white, then obtain white field value, when video AD C receives standard analog video signal, do not having under gain coefficient and biased index impacts, the field value obtained is ideal field value.
Ideal field value scope comprises desirable details in a play not acted out on stage, but told through dialogues value scope and ideal white field value scope, and desirable details in a play not acted out on stage, but told through dialogues value scope comprises smallest ideal details in a play not acted out on stage, but told through dialogues value and maximum desired details in a play not acted out on stage, but told through dialogues value, and desirable white field value scope comprises smallest ideal white field value and maximum desired white field value.
102, by the photochromic actual field value of acquisition Rule preset, photochromic is at least one in red R, green G or blue B;
Before carrying out ADC adjustment, photochromic actual field value can be obtained, wherein photochromicly to be made up of R, G and B tri-kinds of colors, once can obtain the actual field value of three kinds of colors, again the actual field value of wherein a certain color is extracted in time needing to use, when also can adjust certain color, only obtain the actual field value of this color.
It should be noted that, when video AD C receive black the darkest analog video signal time, the ideal field value of each photochromic correspondence of R, G, B is identical, when video AD C receive white the brightest analog video signal time, the ideal field value of each photochromic correspondence of R, G, B is also identical, be convenient to unified adjustment, therefore, select the brightest and the darkest analog video signal of black of white as input signal.
103, when photochromic actual field value is not within ideal field value scope, the biased coefficient of photochromic correspondence and gain coefficient is adjusted until the photochromic actual field value after adjustment is within ideal field value scope by the regulation rule preset;
Actual field value comprises actual details in a play not acted out on stage, but told through dialogues value and reality white field value.
Biased coefficient is worth corresponding with actual details in a play not acted out on stage, but told through dialogues, and gain coefficient is worth corresponding with the white field of reality, by adjusting biased coefficient and gain coefficient can make the photochromic actual field value after adjustment within ideal field value scope.
In the embodiment of the present invention, first ideal field value scope is preset, then by the actual field value that the acquisition Rule preset is photochromic, photochromic is red R, at least one in green G or blue B, when photochromic actual field value is not within ideal field value scope, the biased coefficient of photochromic correspondence and gain coefficient is adjusted until the photochromic actual field value after adjustment is within ideal field value scope by the regulation rule preset, presetting ideal field value scope is that adjustment gain coefficient and biased coefficient provide foundation, realize the automatic adjustment of video AD C, adjustment result is unified reliable, and substantially reduce regulation time.
Simply describe analog video ADC automatic adjusting method first embodiment that the present invention is based on FPGA above, below analog video ADC automatic adjusting method second embodiment that the present invention is based on FPGA is described in detail, refer to Fig. 2, analog video ADC automatic adjusting method second embodiment based on FPGA in the embodiment of the present invention comprises:
201, ideal field value scope is preset;
Before adjusting, FPGA can prestore in inside desirable details in a play not acted out on stage, but told through dialogues value scope and ideal white field value scope, and suppose that the ADC in the present embodiment is 8, then the output area of ADC is 0 to 255, can express totally 256 rank gray scale images.Its middle ideal details in a play not acted out on stage, but told through dialogues value scope comprises smallest ideal details in a play not acted out on stage, but told through dialogues value and maximum desired details in a play not acted out on stage, but told through dialogues value, can be respectively 5 and 10, and desirable white field value scope comprises smallest ideal white field value and the white field of maximum desired is worth a desirable details in a play not acted out on stage, but told through dialogues value, can be respectively 245 and 250.
202, the analog signal received is set to entirely black the darkest, obtains photochromic actual details in a play not acted out on stage, but told through dialogues value;
User is entirely black the darkest by the analog signal received being set to, get a width all black picture, the video AD C of front end can carry out digitlization to this analog signal, change into the digital RGB signal of 24, its form can be the combination of 3 groups of binary numbers, and that each group represents is red R, green G and blue B respectively, and then user starts video AD C offset coefficient automatic regulating function, notice FPGA processes accordingly, and first FPGA obtains photochromic actual details in a play not acted out on stage, but told through dialogues value.
FPGA is every some seconds, can be read once current details in a play not acted out on stage, but told through dialogues value in 2 seconds, altogether read several times, can be after 10 times, the all current details in a play not acted out on stage, but told through dialogues value of above-mentioned acquisition is averaged and obtains actual details in a play not acted out on stage, but told through dialogues value mean value, using the actual details in a play not acted out on stage, but told through dialogues value that actual details in a play not acted out on stage, but told through dialogues value mean value obtained above is used in discriminating step below.
203, judge described photochromic actual details in a play not acted out on stage, but told through dialogues value whether within desirable details in a play not acted out on stage, but told through dialogues value scope, if then perform step 204, otherwise perform step 205;
204, by the biased coefficient of the described photochromic correspondence of details in a play not acted out on stage, but told through dialogues regulation rule adjustment preset;
Adjustment due to biased coefficient can affect actual white field value, and the adjustment of gain coefficient can not affect actual details in a play not acted out on stage, but told through dialogues value, so first adjust biased coefficient, then in the hope of maximum desired gain coefficient and smallest ideal gain coefficient, just can adjust gain coefficient according to reality white field value, maximum desired gain coefficient and smallest ideal gain coefficient according to the complete biased coefficient of adjustment and ideal white field value.
If photochromic actual details in a play not acted out on stage, but told through dialogues value is greater than maximum desired details in a play not acted out on stage, but told through dialogues value 10, then reduce biased coefficient until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope by the details in a play not acted out on stage, but told through dialogues increase and decrease rule preset, if photochromic actual details in a play not acted out on stage, but told through dialogues value is less than smallest ideal details in a play not acted out on stage, but told through dialogues value 5, then increase biased coefficient until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope by the details in a play not acted out on stage, but told through dialogues increase and decrease rule preset.
Above-mentioned details in a play not acted out on stage, but told through dialogues increase and decrease rule can be because offset coefficient value is exactly actual details in a play not acted out on stage, but told through dialogues value, therefore, in the ideal case, be exactly the adjustment to actual details in a play not acted out on stage, but told through dialogues value to the adjustment of offset coefficient.First coarse adjustment is carried out to offset coefficient, above-mentioned coarse adjustment is the midrange 7.5 obtaining desirable details in a play not acted out on stage, but told through dialogues value, offset coefficient value is substituted with the midrange of desirable details in a play not acted out on stage, but told through dialogues value, obtain actual details in a play not acted out on stage, but told through dialogues value now, if actual details in a play not acted out on stage, but told through dialogues value is not within desirable details in a play not acted out on stage, but told through dialogues value scope, then offset coefficient is finely tuned, above-mentioned fine setting is for be divided at least two parts by desirable details in a play not acted out on stage, but told through dialogues value, in time pursuing precision, the number of times of division can be improved, it can be 10 times, now every part is 0.5, when the speed of pursuit time, the number of times of division can be reduced, it can be 5 times, now every part is 1, be a stepping with portion, each offset coefficient increases or reduces the size of one of them stepping, until actual details in a play not acted out on stage, but told through dialogues value drops within desirable details in a play not acted out on stage, but told through dialogues value.
Above-mentioned details in a play not acted out on stage, but told through dialogues increase and decrease rule also can be, the method of successive approximation, can in the hope of the midrange 7.5 of desirable details in a play not acted out on stage, but told through dialogues value according to maximum desired details in a play not acted out on stage, but told through dialogues 10 and smallest ideal details in a play not acted out on stage, but told through dialogues value 5, then the difference of the midrange of offset coefficient value and desirable details in a play not acted out on stage, but told through dialogues value is asked, using the half of above-mentioned difference as stepping, each offset coefficient value changes the size of a stepping, then slowly approaches the midrange of desirable details in a play not acted out on stage, but told through dialogues value, until actual details in a play not acted out on stage, but told through dialogues value drops within desirable details in a play not acted out on stage, but told through dialogues value.
205, the analog signal received is set to entirely white the brightest, obtains photochromic reality white field value;
User is complete white the brightest by the analog signal received being set to, get the complete white image of a width, the video AD C of front end can carry out digitlization to this analog signal, change into the digital RGB signal of 24, its form can be the combination of 3 groups of binary numbers, and that each group represents is red R, green G and blue B respectively, and then user starts video AD C gain coefficient automatic regulating function, notice FPGA processes accordingly, and first FPGA obtains photochromic reality white field value.
The analog signal received is set to complete white the brightest, FPGA is every some seconds, can be read once current white field value in 2 seconds, altogether read several times, can be after 10 times, the all current white field value of above-mentioned acquisition is averaged and obtains actual white field value mean value, using the reality white field value that white for reality obtained above field value mean value is used in discriminating step below.
206, judge photochromic reality white field value whether within the value scope of ideal white field, if then perform step 207, otherwise terminate adjustment;
207, by the gain coefficient of the described photochromic correspondence of white field regulation rule adjustment preset.
If photochromic reality white field value is greater than maximum desired white field value 250, then reduce gain coefficient until actual field in vain value is within the value scope of ideal white field by default white field increase and decrease rule, if otherwise photochromic reality white field value is less than smallest ideal white field value 245 by the white field increase and decrease rule increase gain coefficient preset until actual white field value is within the value scope of ideal white field.
Above-mentioned white field increase and decrease rule can be, according to adjusting complete offset coefficient value and ideal white field value can in the hope of maximum desired gain coefficient value and smallest ideal gain coefficient value, herein because the minor variations of slope can cause the change that actual white field value is larger, so adopt the method for Step wise approximation, can in the hope of the midrange 247.5 of the perfect Gain coefficient value according to maximum desired gain coefficient value and smallest ideal gain coefficient value, then the difference of the midrange of present gain coefficient value and the perfect Gain coefficient value is asked, using the half of above-mentioned difference as stepping, each gain coefficient value changes the size of a stepping, then the midrange of the perfect Gain coefficient value is slowly approached, until actual white field value drops within the value of desirable white field.
In the embodiment of the present invention, first ideal field value scope is preset, then by the actual field value that the acquisition Rule preset is photochromic, photochromic is at least one in red R, green G or blue B, when photochromic actual field value is not within ideal field value scope, adjust the biased coefficient of photochromic correspondence and gain coefficient until the photochromic actual field value after adjustment is within ideal field value scope by the regulation rule preset.Photochromic actual field value can be obtained one by one, then make comparisons with ideal field value; Also once can obtain three kinds of photochromic actual field values, then make comparisons with ideal field value one by one, adjust biased coefficient and gain coefficient.The present embodiment is described in detail regulation rule, first adjusts biased coefficient, then adjusts gain coefficient, and be in course of adjustment the employing method of successive approximation, makes the effect precision that adjusts out high, is more suitable for digitlization and automatically adjusts.
Above the second embodiment of the analog video ADC automatic adjusting method that the present invention is based on FPGA is described in detail, the particularly adjustment process of biased coefficient and gain coefficient, introduce the analog video ADC automatic regulating apparatus embodiment based on FPGA that the embodiment of the present invention provides below, refer to Fig. 3, the analog video ADC automatic regulating apparatus embodiment based on FPGA in the embodiment of the present invention comprises:
Preset unit 301, for default ideal field value scope, described ideal field value scope comprises desirable details in a play not acted out on stage, but told through dialogues value scope and ideal white field value scope, described desirable details in a play not acted out on stage, but told through dialogues value scope comprises smallest ideal details in a play not acted out on stage, but told through dialogues value and maximum desired details in a play not acted out on stage, but told through dialogues value, and described ideal white field value scope comprises smallest ideal white field value and maximum desired white field value;
Acquiring unit 302, for by the photochromic actual field value of acquisition Rule preset, described photochromic be at least one in red R, green G or blue B;
Adjustment unit 303, for when photochromic actual field value is not within ideal field value scope, by the regulation rule adjustment biased coefficient of described photochromic correspondence preset and gain coefficient until the photochromic actual field value after adjustment is within described ideal field value scope;
Described actual field value comprises actual details in a play not acted out on stage, but told through dialogues value and reality white field value.
Above-mentioned adjustment unit 303 comprises further:
Biased adjustment subelement 3031, for adjusting biased coefficient;
Gain tuning subelement 3032, for adjusting gain coefficient.
What provide the embodiment of the present invention with the example of a practical application below is described in detail based on the communication mode in the analog video ADC automatic regulating apparatus of FPGA between unit.
Before adjusting, preset unit 301 and can to prestore in inside desirable details in a play not acted out on stage, but told through dialogues value scope and ideal white field value scope, suppose that the ADC in the present embodiment is 8, then the output area of ADC is 0 to 255, can express totally 256 rank gray scale images.Its middle ideal details in a play not acted out on stage, but told through dialogues value scope comprises smallest ideal details in a play not acted out on stage, but told through dialogues value and maximum desired details in a play not acted out on stage, but told through dialogues value, can be respectively 5 and 10, and desirable white field value scope comprises smallest ideal white field value and the white field of maximum desired is worth a desirable details in a play not acted out on stage, but told through dialogues value, can be respectively 245 and 250.
User is entirely black the darkest by the analog signal received being set to, get a width all black picture, the video AD C of front end can carry out digitlization to this analog signal, change into the digital RGB signal of 24, its form can be the combination of 3 groups of binary numbers, that each group represents is red R, green G and blue B respectively, and then user starts video AD C offset coefficient automatic regulating function, and notice FPGA processes accordingly.
First photochromic actual details in a play not acted out on stage, but told through dialogues value is obtained by acquiring unit 302.Acquiring unit 302 is every some seconds, can be read once actual details in a play not acted out on stage, but told through dialogues value in 2 seconds, altogether read several times, can be after 10 times, the all actual details in a play not acted out on stage, but told through dialogues value of above-mentioned acquisition is averaged and obtains actual details in a play not acted out on stage, but told through dialogues value mean value, using the actual details in a play not acted out on stage, but told through dialogues value that actual details in a play not acted out on stage, but told through dialogues value mean value obtained above is used in discriminating step below.
Adjustment due to biased coefficient can affect actual white field value, and the adjustment of gain coefficient can not affect actual details in a play not acted out on stage, but told through dialogues value, so first adjust biased coefficient, then in the hope of maximum desired gain coefficient and smallest ideal gain coefficient, just can adjust gain coefficient according to reality white field value, maximum desired gain coefficient and smallest ideal gain coefficient according to the complete biased coefficient of adjustment and ideal white field value.
If photochromic actual details in a play not acted out on stage, but told through dialogues value is greater than maximum desired details in a play not acted out on stage, but told through dialogues value 10, then biased adjustment subelement 3031 reduces biased coefficient until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope by the details in a play not acted out on stage, but told through dialogues increase and decrease rule preset, if photochromic actual details in a play not acted out on stage, but told through dialogues value is less than smallest ideal details in a play not acted out on stage, but told through dialogues value 5, then increase biased coefficient until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope by the details in a play not acted out on stage, but told through dialogues increase and decrease rule preset.
Above-mentioned details in a play not acted out on stage, but told through dialogues increase and decrease rule can be because offset coefficient value is exactly actual details in a play not acted out on stage, but told through dialogues value, therefore, in the ideal case, be exactly the adjustment to actual details in a play not acted out on stage, but told through dialogues value to the adjustment of offset coefficient.First coarse adjustment is carried out to offset coefficient, above-mentioned coarse adjustment is the midrange 7.5 obtaining desirable details in a play not acted out on stage, but told through dialogues value, offset coefficient value is substituted with the midrange of desirable details in a play not acted out on stage, but told through dialogues value, obtain actual details in a play not acted out on stage, but told through dialogues value now, if actual details in a play not acted out on stage, but told through dialogues value is not within desirable details in a play not acted out on stage, but told through dialogues value scope, then offset coefficient is finely tuned, above-mentioned fine setting is for be divided at least two parts by desirable details in a play not acted out on stage, but told through dialogues value, in time pursuing precision, the number of times of division can be improved, it can be 10 times, every part is 0.5, when the speed of pursuit time, the number of times of division can be reduced, it can be 5 times, every part is 1, each offset coefficient increases or reduces the size of a copy of it, until actual details in a play not acted out on stage, but told through dialogues value drops within desirable details in a play not acted out on stage, but told through dialogues value.
Above-mentioned details in a play not acted out on stage, but told through dialogues increase and decrease rule also can be, the method of successive approximation, can in the hope of the midrange 7.5 of desirable details in a play not acted out on stage, but told through dialogues value according to maximum desired details in a play not acted out on stage, but told through dialogues 10 and smallest ideal details in a play not acted out on stage, but told through dialogues value 5, then the difference of the midrange of offset coefficient value and desirable details in a play not acted out on stage, but told through dialogues value is asked, each offset coefficient value moves the half of above-mentioned difference, then the midrange of desirable details in a play not acted out on stage, but told through dialogues value is slowly approached, until actual details in a play not acted out on stage, but told through dialogues value drops within desirable details in a play not acted out on stage, but told through dialogues value.
User is complete white the brightest by the analog signal received being set to, get the complete white image of a width, the video AD C of front end can carry out digitlization to this analog signal, change into the digital RGB signal of 24, its form can be the combination of 3 groups of binary numbers, that each group represents is red R, green G and blue B respectively, and then user starts video AD C gain coefficient automatic regulating function, and notice FPGA processes accordingly.
First acquiring unit 302 obtains photochromic reality white field value.Acquiring unit 302 is every some seconds, can be within 2 seconds, read once actual white field value, altogether read several times, can be after 10 times, all reality white field value of above-mentioned acquisition is averaged and obtains actual white field value mean value, using the reality white field value that white for reality obtained above field value mean value is used in discriminating step below.
If photochromic reality white field value is greater than maximum desired white field value 250, then Gain tuning subelement 3032 reduces gain coefficient until actual white field value is within the value scope of ideal white field by the white field increase and decrease rule preset, if otherwise photochromic reality white field value is less than smallest ideal white field value 245, then increase gain coefficient until actual white field value is within the value scope of ideal white field by the white field increase and decrease rule preset.
Above-mentioned white field increase and decrease rule can be, according to adjusting complete offset coefficient value and ideal white field value can in the hope of maximum desired gain coefficient value and smallest ideal gain coefficient value, herein because the minor variations of slope can cause the change that actual white field value is larger, so adopt the method for Step wise approximation, can in the hope of the midrange 247.5 of the perfect Gain coefficient value according to maximum desired gain coefficient value and smallest ideal gain coefficient value, then the difference of the midrange of present gain coefficient value and the perfect Gain coefficient value is asked, each gain coefficient value now moves the half of above-mentioned difference, then the midrange of the perfect Gain coefficient value is slowly approached, until actual white field value drops within the value of desirable white field.
In the embodiment of the present invention, first preset unit 301 and preset ideal field value scope, then acquiring unit 302 presses the photochromic actual field value of default acquisition Rule, photochromic is red R, at least one in green G or blue B, when photochromic actual field value is not within ideal field value scope, adjustment unit 303 adjusts the biased coefficient of photochromic correspondence and gain coefficient until the photochromic actual field value after adjustment is within ideal field value scope by the regulation rule preset, so the photochromic actual field value after adjustment seems that meeting brightness is moderate, each rank transition nature, realize digitlization automatically to adjust, adjustment effect precision is out high, adjustment result is unified reliable, and substantially reduce regulation time.
One of ordinary skill in the art will appreciate that all or part of step realized in above-described embodiment method is that the hardware that can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
Above the analog video ADC automatic adjusting method based on FPGA provided by the present invention and device are described in detail, for one of ordinary skill in the art, according to the thought of the embodiment of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (7)

1., based on an analog video ADC automatic adjusting method of FPGA, it is characterized in that, comprising:
Preset ideal field value scope, described ideal field value scope comprises desirable details in a play not acted out on stage, but told through dialogues value scope and ideal white field value scope, described desirable details in a play not acted out on stage, but told through dialogues value scope comprises smallest ideal details in a play not acted out on stage, but told through dialogues value and maximum desired details in a play not acted out on stage, but told through dialogues value, and described ideal white field value scope comprises smallest ideal white field value and maximum desired white field value;
By the photochromic actual field value of acquisition Rule preset, described photochromic be at least one in red R, green G or blue B;
When photochromic actual field value is not within ideal field value scope, by the regulation rule adjustment biased coefficient of described photochromic correspondence preset and gain coefficient until the photochromic actual field value after adjustment is within described ideal field value scope;
Described actual field value comprises actual details in a play not acted out on stage, but told through dialogues value and reality white field value;
If photochromic actual details in a play not acted out on stage, but told through dialogues value is greater than maximum desired details in a play not acted out on stage, but told through dialogues value, then reduce described biased coefficient until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope by the details in a play not acted out on stage, but told through dialogues increase and decrease rule preset, if photochromic actual details in a play not acted out on stage, but told through dialogues value is less than smallest ideal details in a play not acted out on stage, but told through dialogues value, then increase described biased coefficient until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope by the details in a play not acted out on stage, but told through dialogues increase and decrease rule preset;
Described details in a play not acted out on stage, but told through dialogues increase and decrease rule comprises: obtain biased difference between coefficient and desirable details in a play not acted out on stage, but told through dialogues value mid point; Using 1/2nd of difference as stepping; According to described stepping, described biased coefficient is adjusted, until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope.
2. the analog video ADC automatic adjusting method based on FPGA according to claim 1, it is characterized in that, the biased coefficient of the described described photochromic correspondence of regulation rule adjustment by presetting and gain coefficient are until the photochromic actual field value after adjustment comprises within described ideal field value scope:
The analog signal received is set to entirely black the darkest, obtains photochromic actual details in a play not acted out on stage, but told through dialogues value;
If described photochromic actual details in a play not acted out on stage, but told through dialogues value is not within desirable details in a play not acted out on stage, but told through dialogues value scope, then adjust the biased coefficient of described photochromic correspondence until the photochromic actual details in a play not acted out on stage, but told through dialogues value after adjustment is within described desirable details in a play not acted out on stage, but told through dialogues value scope by the details in a play not acted out on stage, but told through dialogues regulation rule preset;
The analog signal received is set to complete white the brightest, obtains photochromic reality white field value;
If described photochromic reality white field value is not within the value scope of ideal white field, then adjust the gain coefficient of described photochromic correspondence until the photochromic reality white field value after adjustment is within the value scope of described ideal white field by the white field regulation rule preset.
3. the analog video ADC automatic adjusting method based on FPGA according to claim 1, it is characterized in that, the biased coefficient of the described described photochromic correspondence of regulation rule adjustment by presetting and gain coefficient are until the photochromic actual field value after adjustment comprises within described ideal field value scope:
The analog signal received is set to entirely black the darkest, obtains the actual details in a play not acted out on stage, but told through dialogues value of R;
If the actual details in a play not acted out on stage, but told through dialogues value of R is not within desirable details in a play not acted out on stage, but told through dialogues value scope, then adjust the biased coefficient of described R until the actual details in a play not acted out on stage, but told through dialogues value of described R is within described desirable details in a play not acted out on stage, but told through dialogues value scope;
Obtain the actual details in a play not acted out on stage, but told through dialogues value of G;
If the actual details in a play not acted out on stage, but told through dialogues value of G is not within desirable details in a play not acted out on stage, but told through dialogues value scope, then adjust the biased coefficient of described G until the actual details in a play not acted out on stage, but told through dialogues value of described G is within described desirable details in a play not acted out on stage, but told through dialogues value scope;
Obtain the actual details in a play not acted out on stage, but told through dialogues value of B;
If the actual details in a play not acted out on stage, but told through dialogues value of B is not within desirable details in a play not acted out on stage, but told through dialogues value scope, then adjust the biased coefficient of described B until the actual details in a play not acted out on stage, but told through dialogues value of described B is within described desirable details in a play not acted out on stage, but told through dialogues value scope;
Analog signal is set to complete white the brightest, obtains the reality white field value of R;
If the reality of R white field value not within the value scope of ideal white field, then adjusts the gain coefficient of described R until the reality of described R white field value is within the value scope of described ideal white field;
Obtain the reality white field value of G;
If the reality of G white field value not within the value scope of ideal white field, then adjusts the gain coefficient of described G until the reality of described G white field value is within the value scope of described ideal white field;
Obtain the reality white field value of B;
If the reality of B white field value not within the value scope of ideal white field, then adjusts the gain coefficient of described B until the reality of described B white field value is within the value scope of described ideal white field.
4. the analog video ADC automatic adjusting method based on FPGA according to claim 2, is characterized in that, described white field regulation rule comprises:
If photochromic reality white field value is greater than maximum desired white field value, then reduce described gain coefficient until actual white field value is within the value scope of ideal white field by the white field increase and decrease rule preset, if photochromic reality white field value is less than smallest ideal white field value, then increase described gain coefficient until actual white field value is within the value scope of ideal white field by the white field increase and decrease rule preset.
5. the analog video ADC automatic adjusting method based on FPGA according to claim 1 or 4, is characterized in that, described details in a play not acted out on stage, but told through dialogues increase and decrease rule comprises:
Biased coefficient described in coarse adjustment;
When the photochromic actual details in a play not acted out on stage, but told through dialogues value after coarse adjustment is not within desirable details in a play not acted out on stage, but told through dialogues value scope, finely tune described biased coefficient, until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope;
Described coarse adjustment comprises: will be biased coefficient adjustment to desirable details in a play not acted out on stage, but told through dialogues value midpoint;
Described fine setting comprises: desirable details in a play not acted out on stage, but told through dialogues value is divided at least two parts, each adjustment portion wherein.
6. the analog video ADC automatic adjusting method based on FPGA according to claim 1 or 4, is characterized in that, described white field increase and decrease rule comprises:
Obtain the perfect Gain coefficient according to adjusted biased coefficient and ideal white field value, described the perfect Gain coefficient comprises maximum desired gain coefficient and smallest ideal gain coefficient;
The midrange of the perfect Gain coefficient is obtained according to the perfect Gain coefficient;
Obtain the difference between gain coefficient and the midrange of the perfect Gain coefficient;
Using 1/2nd of difference as stepping;
According to described stepping, described biased coefficient is adjusted, until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope.
7., based on an analog video ADC automatic regulating apparatus of FPGA, it is characterized in that, comprising:
Preset unit, for default ideal field value scope, described ideal field value scope comprises desirable details in a play not acted out on stage, but told through dialogues value scope and ideal white field value scope, described desirable details in a play not acted out on stage, but told through dialogues value scope comprises smallest ideal details in a play not acted out on stage, but told through dialogues value and maximum desired details in a play not acted out on stage, but told through dialogues value, and described ideal white field value scope comprises smallest ideal white field value and maximum desired white field value;
Acquiring unit, for by the photochromic actual field value of acquisition Rule preset, described photochromic be at least one in red R, green G or blue B;
Adjustment unit, for when photochromic actual field value is not within ideal field value scope, by the regulation rule adjustment biased coefficient of described photochromic correspondence preset and gain coefficient until the photochromic actual field value after adjustment is within described ideal field value scope;
Described actual field value comprises actual details in a play not acted out on stage, but told through dialogues value and reality white field value;
Described adjustment unit comprises biased adjustment subelement and biased adjustment subelement;
Described biased adjustment subelement, for adjusting biased coefficient;
Described Gain tuning subelement, for adjusting gain coefficient;
If photochromic actual details in a play not acted out on stage, but told through dialogues value is greater than maximum desired details in a play not acted out on stage, but told through dialogues value, then described biased adjustment subelement reduces described biased coefficient until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope by the details in a play not acted out on stage, but told through dialogues increase and decrease rule preset, if photochromic actual details in a play not acted out on stage, but told through dialogues value is less than smallest ideal details in a play not acted out on stage, but told through dialogues value, then described biased adjustment subelement increases described biased coefficient until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope by the details in a play not acted out on stage, but told through dialogues increase and decrease rule preset;
Described details in a play not acted out on stage, but told through dialogues increase and decrease rule comprises: described acquiring unit obtains biased difference between coefficient and desirable details in a play not acted out on stage, but told through dialogues value mid point; Using 1/2nd of difference as stepping; Described biased adjustment subelement adjusts described biased coefficient according to described stepping, until actual details in a play not acted out on stage, but told through dialogues value is within desirable details in a play not acted out on stage, but told through dialogues value scope.
CN201210510171.XA 2012-12-03 2012-12-03 Based on analog video ADC automatic adjusting method and the device of FPGA Expired - Fee Related CN102932613B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210510171.XA CN102932613B (en) 2012-12-03 2012-12-03 Based on analog video ADC automatic adjusting method and the device of FPGA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210510171.XA CN102932613B (en) 2012-12-03 2012-12-03 Based on analog video ADC automatic adjusting method and the device of FPGA

Publications (2)

Publication Number Publication Date
CN102932613A CN102932613A (en) 2013-02-13
CN102932613B true CN102932613B (en) 2015-09-02

Family

ID=47647301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210510171.XA Expired - Fee Related CN102932613B (en) 2012-12-03 2012-12-03 Based on analog video ADC automatic adjusting method and the device of FPGA

Country Status (1)

Country Link
CN (1) CN102932613B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107197183B (en) * 2017-04-10 2020-03-17 上海顺久电子科技有限公司 Method for adjusting gain and method and device for adjusting offset
CN113031496B (en) * 2021-05-27 2021-09-21 之江实验室 Industrial protocol mapping structure and method based on FPGA

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725814A (en) * 2004-07-20 2006-01-25 上海乐金广电电子有限公司 ADC bias regulation method for top-set box of TV
CN101080025A (en) * 2007-06-18 2007-11-28 东莞黄江达裕科技电子厂 A white balance adjustment method and system
CN101105916A (en) * 2007-08-10 2008-01-16 东莞黄江达裕科技电子厂 GAMMA curve regulation method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725814A (en) * 2004-07-20 2006-01-25 上海乐金广电电子有限公司 ADC bias regulation method for top-set box of TV
CN101080025A (en) * 2007-06-18 2007-11-28 东莞黄江达裕科技电子厂 A white balance adjustment method and system
CN101105916A (en) * 2007-08-10 2008-01-16 东莞黄江达裕科技电子厂 GAMMA curve regulation method and device

Also Published As

Publication number Publication date
CN102932613A (en) 2013-02-13

Similar Documents

Publication Publication Date Title
RU2670782C9 (en) Methods and devices for creating code mapping functions for hdr image coding and methods and devices for using such encoded images
US11521537B2 (en) Optimized decoded high dynamic range image saturation
CN101976012B (en) Method and device for regulating brightness of light source as well as laser projection equipment
CN108781290B (en) HDR video encoder and encoding method thereof, HDR video decoder and decoding method thereof
CN102209179B (en) Image-color-gamut-based adaptive color gamut matching method
CN101667416B (en) Method for adjusting and analyzing color temperature and GAMMA of display
CN100565658C (en) The color correcting method of the target GAMMA curve of target setting display device
CN101290755A (en) Display apparatus and color data processing method thereof
CN101047773B (en) Imaging apparatus, video signal processing circuit, video signal processing method
CN109845262B (en) Method and apparatus for encoding/decoding high dynamic range pictures into an encoded bitstream
CN102932613B (en) Based on analog video ADC automatic adjusting method and the device of FPGA
CN105898252A (en) Television color adjustment method and device
CN104980650A (en) F-stop weighted waveform with picture monitor markers
CN109327734B (en) Method for down-converting HDR video to SDR video based on dynamic photometry
US6744464B2 (en) Apparatus and method for real-time testing/adjusting of television picture colors
CN100502469C (en) Imaging apparatus and method of processing image signal
KR20200002786A (en) Signal Encoding and Decoding for High-Contrast Theater Displays
CN101406038B (en) Dynamic softclipping of video levels
CN100435086C (en) A spliced screen display parameter balance adjustment method
CN101783135B (en) Method of 336 white balance adjustment
CN105141934A (en) Analog-digital signal compensation method and apparatus
CN208590061U (en) A kind of color adjustment system of mosaic screen
CN105227943A (en) A kind of liquid crystal TV set that sets dispatches from the factory the method for high-high brightness
CN117319620B (en) HDR preview-level on-site real-time color mixing method
EP4277281A1 (en) Hdr video reconstruction by converted tone mapping

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150902

CF01 Termination of patent right due to non-payment of annual fee