CN101840055B - Video auto-focusing system based on embedded media processor - Google Patents

Video auto-focusing system based on embedded media processor Download PDF

Info

Publication number
CN101840055B
CN101840055B CN2010101848912A CN201010184891A CN101840055B CN 101840055 B CN101840055 B CN 101840055B CN 2010101848912 A CN2010101848912 A CN 2010101848912A CN 201010184891 A CN201010184891 A CN 201010184891A CN 101840055 B CN101840055 B CN 101840055B
Authority
CN
China
Prior art keywords
focusing
camera lens
image
video
module
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
CN2010101848912A
Other languages
Chinese (zh)
Other versions
CN101840055A (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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN2010101848912A priority Critical patent/CN101840055B/en
Publication of CN101840055A publication Critical patent/CN101840055A/en
Application granted granted Critical
Publication of CN101840055B publication Critical patent/CN101840055B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

The invention relates to a video auto-focusing system based on an embedded media processor. The system comprises a video collection module, an image acquisition and processing module, a focusing search module and a focusing execution module, wherein the acquisition and processing module is used to perform noise processing to the obtained original video image data and extract Y-component in the data, wherein the induction area selection algorithm based on region segmentation is adopted to extract focus area, the Tenengrad function based on Sobel gradient operator is adopted to calculate definition; the focusing search module is used to determine the moving direction of the camera lens and calculate the required step length (mov_step = step*level) of the lens; the position corresponding to the maximum definition value is used as focus position; and the focusing execution module is used to transmit control signals to a stepping motor used for driving the lens so as to adjust the position of the lens, according to the determined moving direction and step length of the lens in the focusing search module. By using the video auto-focusing system, the focusing accuracy and stability can be effectively increased, and the smoothness is improved.

Description

Video auto-focusing system based on embedded media processor
Technical field
The present invention relates to the video auto-focusing technical field, especially a kind of video auto-focusing system.
Background technology
The video auto-focusing technology is one of gordian technique of modern machines vision.When people carry out obtaining of picture rich in detail through video camera, often need the long period to face toward scenery and focus.Owing to focus on the complicacy of environment, in the focusing process, be difficult to guarantee the flatness that focuses on, promptly the readability of image changes inconsistent.Therefore, how to realize that quick, accurate, level and smooth video auto-focusing seems very important.
The video auto-focusing technology that is directed to video camera at present mainly contains the initiatively type of focusing and the passive type of focusing.So because do not need extra servicing unit to be widely used in the digital camera based on the passive type automatic focus of image.The Chinese patent " auto focusing method and use its automatic focusing system " that such as publication number is 101034198 (application number is 200710079748.5) is through being provided with a plurality of active windows of a plurality of peripheral windows around center window and the center window, and the automatic focus value that assigns weight and calculate per step to a plurality of active windows.But image in the focusing process, still can occur by clear-fuzzy phenomenon, it is unsmooth promptly to focus on process.Such as publication number be the Chinese patent " automatic-focusing camera " of 1199869 (application number is 98107054.X) adopted Hi-pass filter extract collection image high-frequency signal and carry out focused search as focusing on evaluation of estimate; But this method is subject to The noise and does not carry out the selection of focal zone, makes focusing stability not high.
Passive type focalizer that these are traditional and method are prone to affected by environment in focusing stationarity and reliability; And the way of selecting for focal zone generally adopts fixing selection strategy such as center-spot or panorama focusing; But therefore the actual often more complicated of scene that focuses on has caused the accuracy and the poor stability that focus on.Simultaneously do not consider that in the focusing process flatness of focusing makes that people's subjective vision effect is relatively poor.The focusing flatness here refers to scene can only become clear from fuzzy in the focusing process, and can not occur bluring-clear-fuzzy this phenomenon that changes repeatedly.
Summary of the invention
The deficiency of, flatness difference low with stability for the accuracy of the focusing that overcomes existing video auto-focusing system, the present invention provides a kind of accuracy that can effectively improve focusing and stability, improves the video auto-focusing system based on embedded media processor of flatness.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of video auto-focusing system based on embedded media processor comprises: video acquisition module, in order to obtain the raw video image data from camera; The image acquisition process module; Be used for the raw video image data of obtaining are carried out noise processed; And extract Y component wherein, and adopt induction zone zone selection algorithm to extract focal zone based on Region Segmentation, adopt Tenengrad function to carry out sharpness computation based on the Sobel gradient operator; The focused search module; Be used for the direction that definite camera lens moves; And according to current zoom value (the zoom value here is a lens parameters; Be used for characterizing the amplification and the minification of camera lens, reflected the focal length length of variable lens) decide the basic step-length step of search to read the definition values of current lens location image, establish its value and be designated as f 1And the definition values f of previous frame image 2Compare and calculate the sharpness rate of change: Δ f=(f 1-f 2)/f 2, calculate step-length coefficient value level, the required mobile step-length mov_step=step of camera lens * level according to Δ f; The definition values that compares present frame and previous frame image does not arrive peak region if the definition values increase is then explained, has arrived peak region if sharpness reduces then judgement, and the position of value of maximum articulation correspondence is as focal position; Focus on execution module, be used for the direction and the step-length that move according to the camera lens that the focused search module is confirmed, to the stepper motor that the drives camera lens adjustment lens location that transmits control signal.
As preferred a kind of scheme: in the said image acquisition process module, based on the process of the induction zone zone selection algorithm of Region Segmentation be: the raw video image data of input are divided into 4 * 4 zonules.Calculate each regional definition values w then i, wherein i=1...16 compares the definition values w in 16 zones i, find out maximal value w Max, its corresponding region is designated as (x as seed 0, y 0), with (x 0, y 0) be the center, consider (x 0, y 0) 4 fields zones (x, y), if (x y) satisfies similarity criterion, then will (x is y) with (x 0, y 0) merge as similar area, simultaneously with (x y) is pressed into storehouse, from storehouse, takes out a zone, is used as seed (x to it 0, y 0), continue above-mentioned combining step, when storehouse was sky, then Region Segmentation finished, and the zone that is merged is the area-of-interest that chooses.
As preferred another kind of scheme: in the said focused search module, level value calculation criterion is as shown in table 1 below:
Figure GDA0000060997950000031
Table 1
Wherein, Δ f is the sharpness rate of change, and level representes the coefficient of step-length, and dir representes the camera lens moving direction, and times representes the focused condition counting; When Δ f be on the occasion of the time, use minimum step to move promptly level=1 this moment when the sharpness rate of change surpasses 10%; When the sharpness rate of change increases (representing with symbol " ++ " in the table 1) certainly less than 10% level value, wherein make the level value from subtracting (representing with symbol "--" in the table 1) again 5%~10%; When Δ f was negative value, threshold setting was 5%, and promptly the absolute value of rate of change level=1 greater than 5% time is reverse with the camera lens moving direction simultaneously; When the absolute value of rate of change less than 5% the time, adopt level to skip the local extremum zone from the mode that increases, keep the camera lens moving direction constant simultaneously.
As preferred another scheme: in the said focused search module, confirm that the process of the direction that camera lens moves is: continuously camera lens is moved three positions with minimum step, read three two field pictures, its definition values relatively, the definition values of establishing three images of positions is s 1, s 2, s 3, and if only if s 1<s 2<s 3The judgement direction is a negative direction, s 1>s 2>s 3The judgement direction is a positive dirction, and all the other situation are then explained and do not found direction, then recomputate the moving direction of camera lens.
Further, in said image acquisition process module, adopt parallel mode to carry out IMAQ.
Further, the formula of said sharpness computation is:
F ( I ) = Σ x Σ y | G x ( x , y ) | + | G y ( x , y ) | - - - ( 2 )
In the following formula, G x(x, y), G y(x y) is gradient magnitude, and F (I) is exactly the definition values of the image I that calculates;
Wherein, the G of gradient magnitude x(x, y), G y(x, calculating y) with in the image I (x y) carries out convolution for the eight neighborhood subgraphs at center and Sobel gradient operator template and obtains, and the convolution formula is:
G x ( x , y ) = I 8 ( x , y ) * S x G y ( x , y ) = I 8 ( x , y ) * S y - - - ( 3 )
Wherein, I 8(x, y) expression with in the image I (x y) is the eight neighborhood subgraphs at center, S xAnd S yBe the Sobel gradient operator, its operator template is:
S x = - 1 0 1 - 2 0 2 - 1 0 1 With S y = 1 2 1 0 0 0 - 1 - 2 - 1 - - - ( 4 ) .
Technical conceive of the present invention is: adopt low-power consumption, high performance embedded media processor to realize that quick, accurate, level and smooth video focuses on.In order to realize this function, the present invention need solve following technical matters: (1), need a kind of new focused search strategy for the flatness that guarantees image change in the focusing process.(2), in order to increase the accuracy of focusing, the system of selection of a kind of focal zone effectively of needs.(3), in image acquisition process, how to change original serial operation, maximally utilise processor performance and improve focusing speed.
In the focused search module, the present invention proposes the long searching algorithm of adaptivity multistep.Its algorithm principle is: decide the basic step-length step of search earlier according to current zoom value, the promptly minimum step-length that moves.Rate of change according to the definition values of present frame and previous frame decides step-length coefficient level then, has so just obtained the step-length mov_step=step that ultimate demand moves * level.Because the value of step is come respective change according to the zoom value, so it is bigger than normal and cause converging to the situation of focal position minimum focusing amount can not occur.Because step-length can dynamically be adjusted by the image definition rate of change, make moving of whole step-length can both guarantee that image definition changes steadily simultaneously, promptly people's subjective quality is good when video focuses on, thereby has solved the problem of level and smooth focusing on the whole.
In the image acquisition process module, adopted area-of-interest selection algorithm based on Region Segmentation.Focal zone is selected can reduce data processing amount on the one hand, accelerates focusing speed; Through choosing area-of-interest, eliminate of the influence of non-area-of-interest on the other hand, improve the focusing degree of accuracy the evaluation function curve.Its algorithm thought is: at first the image division with input becomes 4 * 4 zonules.Calculate each regional definition values w then i, i=1...16 wherein.The definition values w that compares 16 zones i, find out maximal value w Max, its corresponding region is designated as (x as seed 0, y 0).With (x 0, y 0) be the center, consider (x 0, y 0) 4 fields zones (x, y), if (x y) satisfies similarity criterion, then will (x is y) with (x 0, y 0) merge as similar area, simultaneously with (x y) is pressed into storehouse.From storehouse, take out a zone, be used as seed (x to it 0, y 0), continue the combining step of front.When storehouse was sky, then Region Segmentation finished, and the zone that is merged is the area-of-interest that chooses.
In the image acquisition process module, the present invention proposes image pipeline and gather notion, improve focusing speed through rational parallel work-flow.Image pipeline is gathered notion: the process of image once collection is divided into four parts, and the A step is for sending order, the position of adjustment lens.The B step is adjusted to assigned address for inquiry up to lens position.The C step drives for configuration collection, starts IMAQ.The D step is that IMAQ finishes, and carries out the automatic focus analysis.Be illustrated in figure 3 as the string type image acquisition process, at first analyze the needed time that once focuses on: t=(t 1+ t 2)+t 3+ t 4T wherein 1And t 2By lens assembly decision, t 3By two factors decisions of data volume of the moment that starts collection and collection, t 4By automatic focus analytical algorithm complexity and two factor decisions of processor host frequency.Because video acquisition is to send into buffer queue through PPI, calling through DMA, view data is sent into the SDRAM zone of appointment.If gather a sub-picture to time of internal memory be t s, then needed image memory unit number n is at least n=t/t sIn order to save focal time; It is as shown in Figure 4 that the present invention adopts parallel mode to carry out IMAQ; Be that PPI opens video acquisition always, through DMA constantly with video acquisition in the image memory unit of SDRAM, image acquisition step C only need arrive and find the image of corresponding address to get final product in the storage unit like this; Thereby saved the time of IMAQ, the time that once focus on this moment becomes t 1=(t 1+ t 2)+t 4, the image memory unit number of needed SDRAM is n 1=t 1/ t sThe method of from internal memory, seeking the corresponding address image is: in steps A, write down current internal memory numbering m, 1<m<n 1Then the address number from image storage unit is among the step C:
m 1=[(t 1+t 2)/t s+m]%n 1 1<m 1<n 1
The effect that the present invention is useful is: (1), do not need extra servicing unit just can realize quick, accurate, level and smooth video auto-focusing.(2), image change is level and smooth in whole focusing process, people's subjective vision property is good.
Description of drawings
Fig. 1 is the video auto-focusing system schematic diagram.
Fig. 2 is a video auto-focusing system primary controller design drawing.
Fig. 3 is a string type IMAQ process flow diagram.
Fig. 4 is a parallel type IMAQ process flow diagram.
Fig. 5 is the video auto-focusing system main program flow chart.
Fig. 6 is the automatic focus subroutine flow chart.
Fig. 7 is an image definition counting subroutine process flow diagram.
Embodiment
Below in conjunction with accompanying drawing the present invention is further described.
With reference to Fig. 1~Fig. 7, a kind of video auto-focusing system based on embedded media processor comprises: video acquisition module 7, in order to obtain the raw video image data from camera; Image acquisition process module 8; Be used for the raw video image data of obtaining are carried out noise processed; And extract Y component wherein, and adopt induction zone zone selection algorithm to extract focal zone based on Region Segmentation, adopt Tenengrad function to carry out sharpness computation based on the Sobel gradient operator; Focused search module 9 is used for the direction that definite camera lens moves, and decides the basic step-length step of search according to current zoom value; Read the definition values of current lens location image, establish its value and be designated as f 1And the definition values f of previous frame image 2Compare and calculate the sharpness rate of change: Δ f=(f 1-f 2)/f 2, calculate step-length coefficient value level, the required mobile step-length mov_step=step of camera lens * level according to Δ f; The definition values that compares present frame and previous frame image does not arrive peak region if the definition values increase is then explained, has arrived peak region if sharpness reduces then judgement, and the position of value of maximum articulation correspondence is as focal position; Focus on execution module 10, be used for the direction and the step-length that move according to the camera lens that the focused search module is confirmed, each stepper motor that drives camera lens sends crowd fighting and adjusts lens location through control signal.
In the present embodiment, comprise lens 2, CCD 3, FPGA 4, SDRAM 5, primary controller DSP 6 based on the video auto-focusing system of embedded media processor.Described DSP 6 comprises video acquisition module 7, image acquisition process module 8, focused search module 9 again and focuses on execution module 10.Described FPGA 4 links to each other with video acquisition module 7 among the DSP 6.Described SDRAM 5 links to each other with DSP 6.Focusing execution module 10 among the described DSP 6 links to each other with the stepper motor of controls lens.Object 1 at first images on the CCD 3 through lens 2, through FPGA 4 the raw video image data that CCD 3 exports is formatd processing then, and output meets the vision signal of BT.656 standard.Video acquisition module 7 among the DSP 6 collects the specify image storage area among the SDRAM 5 with the video standard signal of FPGA4 output.Image acquisition process module 8 gets current lens location from the designated memory cell of SDRAM 5 image at first carries out noise processed to the image that gets access to, and extracts Y component wherein.Then adopt area-of-interest selection algorithm to extract focal zone, use Tenengrad function to carry out sharpness computation at last based on the Sobel gradient operator based on Region Segmentation.Whether focused search module 9 at first judges camera lens at focal position according to the sharpness evaluation of estimate, if then do not calculate required mobile direction of next step camera lens and step-length, otherwise maintenance lens focus invariant position is accomplished in explanation focusing.Focus on execution module 10 and calculate camera lens moving direction and step-length, send camera lens control signal adjustment lens location for the stepper motor that drives camera lens, thereby realize the focusing of camera lens is moved according to focused search module 9.
With reference to shown in Figure 5, be the video auto-focusing system main program flow chart.Its concrete workflow is as follows: at first carry out the initialization of DSP; The DSP initialization need dispose in have: PPL clock configuration; The configuration of EBIU external bus interface, the external interrupt configuration behind FLASH memory configurations, the DMA, sdram memory configuration and PPI data transmit configuration.Then begin to start video acquisition, only need configure PPI and DMA here after, main control chip is sent to CCD camera capture video data the SDRAM image memory region of appointment automatically.Next carry out camera lens control through button, function is divided into: turn left, turn right, go up change, commentaries on classics, zoom adjustment, manual focusing, automatic focusing and quit a program down.After button carries out automatic focusing, then get into the automatic focus program.
With reference to shown in Figure 6, be the automatic focus program flow diagram.At first need judge the direction that camera lens moves, adopt here with minimum step and continuously camera lens is moved three positions, read three two field pictures, relatively its definition values.If the definition values of three images of positions is s 1, s 2, s 3And if only if s 1<s 2<s 3The judgement direction is a negative direction, s 1>s 2>s 3The judgement direction is a positive dirction, and all the other situation explain then and do not find direction that then program recomputates the moving direction of camera lens.After lens direction is confirmed, then from internal memory, read current lens location image, and call the definition values calculating that the sharpness computation subroutine is carried out present image, establish its value and be designated as f 1Then and the definition values f of previous frame image 2Compare and calculate the sharpness rate of change: Δ f=(f 1-f 2)/f 2Calculate step-length level value according to Δ f, it is as shown in table 1 below to provide level value calculation criterion below:
Figure GDA0000060997950000091
Table 1
Δ f is the sharpness rate of change in the last table, and level representes the coefficient of step-length, and dir representes the camera lens moving direction, and times representes the focused condition counting.It is to decide according to people's in the experiment subjective observation result that the threshold value of sharpness rate of change is divided, and in experiment, finds to be no more than in 10% when the sharpness rate of change, and human eye can not differentiated the sharpness difference of two width of cloth images.So among the present invention Δ f be on the occasion of the time, use minimum step to move promptly level=1 this moment when the sharpness rate of change surpasses 10%; When the sharpness rate of change increases (representing with symbol " ++ " in the table 1) certainly less than 10% level value, wherein make the level value from subtracting (representing with symbol "--" in the table 1) again 5%~10%, prevent to increase too fast.When Δ f is negative value, occur in order to prevent from the clear phenomenon that fogs, be decided to be 5% to threshold value here, promptly the absolute value of rate of change level=1 greater than 5% time is reverse with the camera lens moving direction simultaneously; When the absolute value of rate of change less than 5% the time, explain this moment slippage seldom, and might be noise or local extremum, so adopt level to skip the local extremum zone, keep the camera lens moving direction constant simultaneously from the mode that increases.The basic step-length step that combine the zoom value to calculate this moment, just can calculate camera lens is required mobile step-length mov_step=step * level.Be to focus on Rule of judgment at last, general focal position judges it all is when definition values reduces when, has thought peak value at this moment, then the pairing position of the definition values of maximum as focal position.But the easy like this local extremum that is absorbed in.And adopt repeatedly judgment mechanism among the present invention, just explained when the situation that occurs the peak value minimizing continuously and crossed peak value.Definition global variable times in whole focused search process, its initial value is made as 0.And if only if when Δ f is negative value, and times is the zero clearings of all the other situation from increasing.When the times value equals T (T is that threshold value is decided according to actual conditions), judge that then camera lens is at focal position at this moment like this.
With reference to shown in Figure 7, image definition counting subroutine process flow diagram.At first carry out the noise processed of image, adopt the medium filtering of 5 * 5 templates to suppress disturbing pulse and point-like noise here.Carry out image Y component extraction then, video format is YUV4:2:2, only need the memory copying of Y component be come out to be used to carry out ensuing focal zone here and detect.The algorithm flow of selecting based on the Region Segmentation area-of-interest is:
Step1: image division is become 4 * 4 zonules.
Step2: calculate wherein i=1...16 of each regional definition values
Figure GDA0000060997950000101
.
Step3: find out maximal value w Max, its corresponding region is designated as (x as seed 0, y 0).
Step4: with (x 0, y 0) be the center, consider (x 0, y 0) 4 fields zones (x, y), if (x y) satisfies similarity criterion, then will (x is y) with (x 0, y 0) merge as similar area, simultaneously with (x y) is pressed into storehouse.
Step5: from storehouse, take out a zone, be used as seed (x to it 0, y 0), get back to the Step4 step.
Step6: when storehouse was sky, then Region Segmentation finished, and the zone that is merged is the area-of-interest that chooses.
Next carry out image definition and calculate, adopt improvement Tenengrad function to carry out sharpness computation here based on the Sobel gradient operator.If the image of input is I, based on the Tenengrad function definition of Sobel gradient operator shown in (1).
F ( I ) = Σ x Σ y G x 2 ( x , y ) + G y 2 ( x , y ) - - - ( 1 )
G in the formula (1) x(x, y), G y(x y) is gradient magnitude.F (I) is exactly the definition values of the image I that calculates.Though the Tenengrad function calculation precision based on the Sobel gradient algorithm is high, therefore calculated amount is big makes improvements, and the Tenengrad function after the improvement is suc as formula shown in (2).
F ( I ) = Σ x Σ y | G x ( x , y ) | + | G y ( x , y ) | - - - ( 2 )
Tenengrad function after the improvement is by original 2M * N multiplying and M * N extracting operation, and having changed to only needs M * N sub-addition computing (M, N are the length and the width of image I).Gradient magnitude G in the formula x(x, y), G y(x, calculating y) is so that (x y) carries out convolution for the eight neighborhood subgraphs at center and Sobel gradient operator template and obtains, and the convolution formula is suc as formula shown in (3) in the image I.
G x ( x , y ) = I 8 ( x , y ) * S x G y ( x , y ) = I 8 ( x , y ) * S y - - - ( 3 )
I in the formula 8(x, y) expression with in the image I (x y) is the eight neighborhood subgraphs at center, S xAnd S yFor its operator template of Sobel gradient operator suc as formula shown in (4).
S x = - 1 0 1 - 2 0 2 - 1 0 1 With S y = 1 2 1 0 0 0 - 1 - 2 - 1 - - - ( 4 )
At last the image definition value that calculates is delivered in the automatic focus program, and withdraws from subroutine.
Although illustrated and described embodiments of the invention, it should be appreciated by those skilled in the art, under the situation that does not deviate from invention spirit and principle, in accompanying claims and equivalent restricted portion thereof, can make various changes to these instances.

Claims (4)

1. video auto-focusing system based on embedded media processor comprises: video acquisition module, in order to obtain the raw video image data from camera; It is characterized in that: said video auto-focusing system also comprises:
The image acquisition process module; Be used for the raw video image data of obtaining are carried out noise processed; And extract Y component wherein, and adopt induction zone zone selection algorithm to extract focal zone based on Region Segmentation, adopt Tenengrad function to carry out sharpness computation based on the Sobel gradient operator; The focused search module is used for the direction that definite camera lens moves, and decides the basic step-length step of search according to current zoom value; Read the definition values of current lens location image, establish its value and be designated as f 1And the definition values f of previous frame image 2Compare and calculate the sharpness rate of change: Δ f=(f 1-f 2)/f 2, calculate step-length coefficient value level, the required mobile step-length mov_step=step of camera lens * level according to Δ f; The definition values that compares present frame and previous frame image does not arrive peak region if the definition values increase is then explained, has arrived peak region if sharpness reduces then judgement, and the position of value of maximum articulation correspondence is as focal position;
Focus on execution module, be used for the direction and the step-length that move according to the camera lens that the focused search module is confirmed, to the stepper motor that the drives camera lens adjustment lens location that transmits control signal;
In the said image acquisition process module, based on the process of the induction zone of Region Segmentation zone selection algorithm be: the raw video image data of input are divided into 4 * 4 zonules, calculate each regional definition values w then i, wherein i=1...16 compares the definition values w in 16 zones i, find out maximal value w Max, its corresponding region is designated as (x as seed 0, y 0), with (x 0, y 0) be the center, consider (x 0, y 0) 4 neighborhoods zones (x, y), if (x y) satisfies similarity criterion, then will (x is y) with (x 0, y 0) merge as similar area, simultaneously with (x y) is pressed into storehouse, from storehouse, takes out a zone, is used as seed (x to it 0, y 0), continue above-mentioned combining step, when storehouse was sky, then Region Segmentation finished, and the zone that is merged is the area-of-interest that chooses;
In the said focused search module, level value calculation criterion is as shown in table 1 below:
Table 1
Wherein, Δ f is the sharpness rate of change, and level representes the coefficient of step-length, and dir representes the camera lens moving direction, and times representes the focused condition counting; When Δ f be on the occasion of the time, use minimum step to move promptly level=1 this moment when the sharpness rate of change surpasses 10%; When the sharpness rate of change increases less than 5% level value certainly, said from adding symbol " ++ " expression, wherein make the level value from subtracting again 5%~10%, said subtracting with symbol "--" certainly represented; When Δ f was negative value, threshold setting was 5%, and promptly the absolute value of rate of change level=1 greater than 5% time is reverse with the camera lens moving direction simultaneously; When the absolute value of rate of change less than 5% the time, adopt level to skip the local extremum zone from the mode that increases, keep the camera lens moving direction constant simultaneously.
2. the video auto-focusing system based on embedded media processor as claimed in claim 1; It is characterized in that: in the said focused search module; The process of confirming the direction that camera lens moves is: continuously camera lens is moved three positions with minimum step; Read three two field pictures, compare its definition values, the definition values of establishing three images of positions is s 1, s 2, s 3, and if only if s 1<s 2<s 3The judgement direction is a negative direction, s 1>s 2>s 3The judgement direction is a positive dirction, and all the other situation are then explained and do not found direction, then recomputate the moving direction of camera lens.
3. the video auto-focusing system based on embedded media processor as claimed in claim 1 is characterized in that: in said image acquisition process module, adopt parallel mode to carry out IMAQ.
4. the video auto-focusing system based on embedded media processor as claimed in claim 1 is characterized in that: the formula of said sharpness computation is:
F ( I ) = Σ x Σ y | G x ( x , y ) | + | G y ( x , y ) | - - - ( 2 )
In the following formula, G x(x, y), G y(x y) is gradient magnitude, and F (I) is exactly the definition values of the image I that calculates;
Wherein, the G of gradient magnitude x(x, y), G y(x, calculating y) with in the image I (x y) carries out convolution for the eight neighborhood subgraphs at center and Sobel gradient operator template and obtains, and the convolution formula is:
G x ( x , y ) = I 8 ( x , y ) * S x G y ( x , y ) = I 8 ( x , y ) * S y - - - ( 3 )
Wherein, I 8(x, y) expression with in the image I (x y) is the eight neighborhood subgraphs at center, S xAnd S yBe the Sobel gradient operator, its operator template is:
S x = - 1 0 1 - 2 0 2 - 1 0 1 With S y = 1 2 1 0 0 0 - 1 - 2 - 1 - - - ( 4 ) .
CN2010101848912A 2010-05-28 2010-05-28 Video auto-focusing system based on embedded media processor Expired - Fee Related CN101840055B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101848912A CN101840055B (en) 2010-05-28 2010-05-28 Video auto-focusing system based on embedded media processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101848912A CN101840055B (en) 2010-05-28 2010-05-28 Video auto-focusing system based on embedded media processor

Publications (2)

Publication Number Publication Date
CN101840055A CN101840055A (en) 2010-09-22
CN101840055B true CN101840055B (en) 2012-01-18

Family

ID=42743543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101848912A Expired - Fee Related CN101840055B (en) 2010-05-28 2010-05-28 Video auto-focusing system based on embedded media processor

Country Status (1)

Country Link
CN (1) CN101840055B (en)

Families Citing this family (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087413B (en) * 2010-12-20 2012-05-30 东莞市金翔电器设备有限公司 Optical method capable of achieving normal imaging and microscopic and telescopic function
CN102098411B (en) * 2010-12-20 2012-11-14 东莞市金翔电器设备有限公司 High-velocity scanning method capable of realizing compound sensing
CN102879210B (en) * 2012-10-09 2014-12-10 吉林大学 Device and method for testing brake performances based on stereoscopic vision
CN103034373B (en) * 2012-11-23 2015-09-09 广东威创视讯科技股份有限公司 The automatic selecting method of battle array camera positioning image effective coverage, face and system
CN103354599B (en) 2013-07-24 2016-08-10 浙江宇视科技有限公司 A kind of auto focusing method being applied to dynamic light source scene and device
CN103713375B (en) * 2013-12-12 2016-05-25 东莞市南星电子有限公司 A kind of automatic regulating jig and control method thereof for tight shot focusing
US10690816B2 (en) 2013-12-31 2020-06-23 Cognex Corporation Systems and methods reduce temperature induced drift effects on a liquid lens
US9575221B2 (en) 2013-12-31 2017-02-21 Cognex Corporation Systems and methods reduce temperature induced drift effects on a liquid lens
CN105279752A (en) * 2014-07-25 2016-01-27 王辉 Digital image overall artistic effect processing method
CN105592258B (en) * 2014-10-22 2018-08-03 杭州海康威视数字技术股份有限公司 Auto focusing method and device
CN106375647B (en) * 2015-07-23 2020-05-29 杭州海康威视数字技术股份有限公司 Method, device and system for adjusting back focus of camera
CN105242268A (en) * 2015-10-09 2016-01-13 中国电子科技集团公司第五十研究所 Automatic focusing imaging method for short-range holographic radar
CN109660726B (en) * 2015-12-23 2021-03-05 北京奇虎科技有限公司 Quick automatic focusing method and device for camera
CN106303242A (en) * 2016-08-18 2017-01-04 上海交通大学 The focusing system quickly of muti-spectrum imaging and method
CN106488122A (en) * 2016-10-14 2017-03-08 北京信息科技大学 A kind of dynamic auto focusing algorithm based on improved sobel method
CN106534676B (en) * 2016-11-02 2019-03-26 西安电子科技大学 Autofocus adjustment method towards zooming camera system
CN106772925A (en) * 2016-12-20 2017-05-31 天津理工大学 A kind of passive camera automatic focusing method based on inner product energy
CN106973219B (en) 2017-02-21 2019-06-28 苏州科达科技股份有限公司 A kind of auto focusing method and device based on area-of-interest
CN108519654B (en) * 2018-04-13 2020-01-17 上海大学 Automatic focusing method based on electro-hydraulic adjustable-focus lens
CN109361849B (en) * 2018-09-30 2021-03-05 桂林优利特医疗电子有限公司 Automatic focusing method
CN109254382B (en) * 2018-10-12 2021-11-26 南通大学 Thread detection automatic focusing method based on machine vision
CN109451244B (en) * 2018-12-21 2020-12-04 广州医软智能科技有限公司 Automatic focusing method and system based on liquid lens
CN109769090A (en) * 2019-02-18 2019-05-17 桂林长海发展有限责任公司 A kind of focal length zoom quick focusing method and system based on image procossing
CN110381261B (en) * 2019-08-29 2020-11-03 重庆紫光华山智安科技有限公司 Focusing method, focusing device, computer-readable storage medium and electronic equipment
CN110753182B (en) * 2019-09-30 2021-02-09 华为技术有限公司 Adjusting method and apparatus of image forming apparatus
CN113676661B (en) * 2019-11-09 2023-08-01 深圳市瑞沃德生命科技有限公司 Focusing searching method and system thereof
EP3879811B1 (en) 2020-03-09 2021-12-15 Axis AB Determining whether a camera is out-of-focus
CN111757008B (en) * 2020-07-10 2021-12-31 普联技术有限公司 Focusing method, device and computer readable storage medium
CN114286064A (en) * 2020-09-17 2022-04-05 深圳光峰科技股份有限公司 Real-time focusing method, device, system and computer readable storage medium
CN112040136B (en) * 2020-09-23 2021-08-10 重庆邮电大学 Automatic focusing optimization method based on clear domain and scotopic vision
CN112333383A (en) * 2020-10-27 2021-02-05 浙江华创视讯科技有限公司 Automatic focusing method and device
CN114185164B (en) * 2021-12-17 2022-07-29 重庆切克威科技有限公司 Quick automatic focusing method of microscope
CN114513607B (en) * 2022-01-27 2022-11-11 中南大学 Method, device and system for self-adjusting field range of high-temperature industrial endoscope
CN114245023B (en) * 2022-02-24 2022-06-03 浙江华创视讯科技有限公司 Focusing processing method and device, camera device and storage medium
CN114460791A (en) * 2022-03-07 2022-05-10 合肥英睿***技术有限公司 Focusing method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101058009B1 (en) * 2004-08-06 2011-08-19 삼성전자주식회사 Automatic focusing method in digital photographing apparatus, and digital photographing apparatus employing this method
CN100407038C (en) * 2005-12-19 2008-07-30 佛山普立华科技有限公司 Automatic focusing method for digit imaging system
CN101494737B (en) * 2009-03-09 2011-04-20 杭州海康威视数字技术股份有限公司 Integrated camera device and self-adapting automatic focus method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘永新等.基于区域生长的电路板图像分割算法的研究.《国外电子测量技术》.2007,第26卷(第12期),第8页. *
李成.视频监控***中自动调焦技术的研究.《中国优秀硕士学位论文全文数据库 信息科技辑》.2009,(第12期),第31-42页. *

Also Published As

Publication number Publication date
CN101840055A (en) 2010-09-22

Similar Documents

Publication Publication Date Title
CN101840055B (en) Video auto-focusing system based on embedded media processor
CN107395993B (en) Full-automatic focusing method and system
EP2037320B1 (en) Imaging apparatus, imaging apparatus control method, and computer program
CN107529011B (en) A kind of motorized zoom lens control method
CN102419505B (en) Automatic focusing method and system and integrated camera
CN104301601B (en) The infrared image automatic focusing method that a kind of coarse-fine tune is combined
CN101021604B (en) Image processing-based dynamic target automatic focusing system
WO2019109805A1 (en) Method and device for processing image
CN110166692A (en) A kind of method and device improving camera automatic focusing accuracy rate and speed
WO2019105297A1 (en) Image blurring method and apparatus, mobile device, and storage medium
CN103728813A (en) Method for synchronizing focusing operation and zooming operation
KR20120140571A (en) Object recognition method using camera and camera system for the same
CN106534676A (en) Automatic focus adjustment method for zoom camera systems
CN104459940A (en) Quick self-adaptation automatic focusing method
CN101660946A (en) Auto-focusing method and device of thermal imager
CN101452181A (en) Automatic focusing system and method OF electronic device
US20140362275A1 (en) Autofocus
CN101950116B (en) Video automatic focusing method applied to multi-main-body scene
CN103217854B (en) Camera system and Atomatic focusing method
CN103049879A (en) FPGA-based (field programmable gate array-based) infrared image preprocessing method
US10491804B2 (en) Focus window determining method, apparatus, and device
CN106341596A (en) Focusing method and focusing device
CN104580917A (en) Automatic fast focusing method and automatic fast focusing device
US8295609B2 (en) Image processing apparatus, image processing method and computer readable-medium
CN103034042A (en) Panoramic shooting method and device

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120118

Termination date: 20180528