CN110278382A - A kind of focus method, device, electronic equipment and storage medium - Google Patents
A kind of focus method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN110278382A CN110278382A CN201910662640.1A CN201910662640A CN110278382A CN 110278382 A CN110278382 A CN 110278382A CN 201910662640 A CN201910662640 A CN 201910662640A CN 110278382 A CN110278382 A CN 110278382A
- Authority
- CN
- China
- Prior art keywords
- identification point
- focal length
- image
- target object
- target
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Studio Devices (AREA)
Abstract
The invention discloses a kind of focus method, device, electronic equipment and storage mediums, ball machine is according to the second coordinate information of target object and the third coordinate information of each identification point, the determining and nearest target identification point of target object space length, the corresponding relationship of each identification point and focal length is pre-saved in ball machine, after determining target identification point, the corresponding focal length of target object is determined according to initial focal length and preset focusing step-length using the corresponding focal length of target identification point as initial focal length.Because the object distance of the target identification point and target object determined is closest, the focusing focal length of target identification point and target object is closest, therefore carries out focusing on the basis of target object corresponding initial focal length and may be implemented quickly to focus.Focus program in compared to the prior art, substantially reduces focal time, improves candid photograph efficiency.
Description
Technical field
The present invention relates to technical field of image processing more particularly to a kind of focus method, device, electronic equipment and storage to be situated between
Matter.
Background technique
With the fast development of safety-security area, the form of monitoring device is also more and more diversified, in combination with artificial intelligence
After the such application of (Artificial Intelligence, AI) technology, especially recognition of face, rifle ball interlocking equipment is obtained
Extensive use is arrived.Such interlocking equipment generally consists of two parts, and fixed-focus gunlock recognizes in picture for global observation
When there is target object, the coordinate information of target object is sent to zoom ball machine, zoom ball machine is determined for carrying out coordinate conversion
Then target object positions target object, after the completion of positioning, focus and capture.Therefore, during intelligent-tracking,
It is very important for zoom ball machine focusing speed, directly affects candid photograph efficiency.
At present in such interlocking equipment, ball machine is general arbitrarily to choose an initial focal length when focusing, from initial coke
Away from beginning, according to preset step-size change focal length, and one posterior focal distance of every change, one frame image of acquisition simultaneously determine the clear of image
Evaluation of estimate is spent, when the clarity evaluation of estimate of image is met the requirements, it is believed that focus and complete.In many cases, it needs by multiple
Focussing, can just meet the requirements, therefore, at present ball machine focus the problem is that, focal time is long, cause capture efficiency
It is low.
Summary of the invention
The embodiment of the invention provides a kind of focus method, device, electronic equipment and storage mediums, to solve existing skill
Focal time is long in art, leads to the problem of capturing low efficiency.
The embodiment of the invention provides a kind of focus methods, which comprises
According to first coordinate information of the target object in the first image that gunlock acquires, determine the target object in ball
The second coordinate information in second image of machine acquisition;
Believed according to the third coordinate information of each identification point in second image pre-saved and second coordinate
Breath, the determining and nearest target identification point of the target object space length;Wherein, the identification point is in second image
The corresponding pixel logo point of immovable object;
According to the corresponding relationship of each identification point and focal length that pre-save, by the corresponding coke of the target identification point
Away from as initial focal length;
According to the initial focal length and preset focusing step-length, the corresponding focal length of the target object is determined.
Further, according to the third coordinate information of each identification point in second image pre-saved, determine with
The nearest target identification point of the target object space length includes:
According to determining second coordinate information, the target object is positioned, and is obtained described in ball machine positioning
First positional parameter of target object;
Each identification point is positioned according to the third coordinate information of each identification point, and it is described every to obtain ball machine positioning
Second positional parameter of a identification point;
According to first positional parameter and corresponding second positional parameter of each identification point, determine that described first is fixed
The absolute value of position parameter and the difference of corresponding second positional parameter of each identification point;
The confidence level of each identification point is determined according to the maximum positional parameter of each absolute value and the ball machine, is judged
Whether highest confidence level is greater than preset believability threshold, if so, using the corresponding identification point of highest confidence level as with
The nearest target identification point of the target object space length.
Further, the positional parameter includes the step number at horizontal field of view angle, vertical field of view angle and zoom motor;
The maximum positional parameter according to each absolute value and the ball machine determines the confidence level of each identification point
Include:
For each identification point, according to
Determine the confidence level of the identification point;
Wherein, Depend is the confidence level of the identification point, ZoomwholeFor the maximum step number of the zoom motor of ball machine,
DeltaZoomFor in step number the second positional parameter corresponding with the identification point of the first zoom motor in the first positional parameter
The absolute value of the difference of the step number of second zoom motor, PwholeFor the horizontal field of view angle maximum value of ball machine, DeltaPIt is fixed for first
The difference at the second horizontal field of view angle in first level field angle the second positional parameter corresponding with the identification point in the parameter of position
Absolute value, TwholeFor the vertical field of view angle maximum value of ball machine, DeltaTFor the first vertical field of view angle in the first positional parameter
The absolute value of the difference at the second vertical field of view angle in the second positional parameter corresponding with the identification point, A, B, C are quality coefficient.
Further, described that each identification point is positioned according to the third coordinate information of each identification point, and obtain
The second positional parameter that ball machine positions each identification point includes:
Gunlock third image gathered in advance is received, by the central pixel point of second image and the third image
Central pixel point is overlapped;
Receive the 4-coordinate information of each corner pixel point in the third image that the gunlock is sent;According to preparatory
The coordinate transformation relation of preservation determines Five Axis information of each corner pixel point in second image;By institute
The region of pixel composition of Five Axis information is stated as the calibration region in second image;
For each identification point in the calibration region, according to third coordinate of the identification point in second image
Information positions the identification point;And obtain the second positional parameter that ball machine positions the identification point;
The process for pre-saving the corresponding relationship of each identification point and focal length includes:
For each identification point, to the laggard line focusing of mark point location, obtain what ball machine was focused the identification point
Focal length simultaneously saves.
Further, after the determination and the nearest target identification point of the target object space length, according to preparatory
Save each identification point and focal length corresponding relationship, using the corresponding focal length of the target identification point as initial focal length it
Before, the method also includes:
The target object is positioned according to the second coordinate information of the target object, acquires the 4th image, and
Determine the first clarity evaluation of estimate of the 4th image;
According to the corresponding clarity evaluation of estimate of each identification point pre-saved, judge the first clarity evaluation of estimate with
Whether the difference of the corresponding second clarity evaluation of estimate of the target identification point is in default range, if so, carrying out subsequent
Step.
Further, it is described using the corresponding focal length of the target identification point as initial focal length after, according to described initial
Focal length rises and preset focusing step-length, before determining the corresponding focal length of the target object, the method also includes:
According to determining second coordinate information, the target object is positioned, using the initial focal length pair
The target object is focused, and obtains the step number that ball machine focuses the first focusing motor of the target object;
According to first positional parameter, the first focusing number of motor steps, and the positional parameter pre-saved, motor step of focusing
Several corresponding relationships with object distance, determine corresponding first object distance of the target object;
According to the corresponding relationship of the identification point and object distance that pre-save, corresponding second object of the target identification point is determined
Away from;
According to the size relation of first object distance and the second object distance, focusing direction is determined;
According to the initial focal length and preset focusing step-length, determine that the corresponding focal length of the target object includes:
According to the initial focal length and preset focusing step-length, focuses on the focusing direction, determine the mesh
Mark the corresponding focal length of object.
Further, the identification point pre-saved and the corresponding relationship of object distance include:
Identification point is focused, according to the horizontal field of view angle, vertical field of view angle of ball machine after focusing and zoom motor step number
It calculates object distance and is demarcated, establish space object distance figure;
According to position of the identification point in the object distance figure of space, the corresponding relationship of identification point and object distance and preservation are determined.
On the other hand, the embodiment of the invention provides a kind of focusing device, described device includes:
First determining module, for the first coordinate information according to target object in the first image that gunlock acquires, really
Fixed second coordinate information of the target object in the second image that ball machine acquires;
Second determining module, for the third coordinate information according to each identification point in second image pre-saved
With second coordinate information, the determining and nearest target identification point of the target object space length;Wherein, the identification point
For the corresponding pixel logo point of object immovable in second image;
Third determining module will be described for the corresponding relationship according to each identification point and focal length pre-saved
The corresponding focal length of target identification point is as initial focal length;
4th determining module, for determining the target object pair according to the initial focal length and preset focusing step-length
The focal length answered.
Further, second determining module, specifically for according to determining second coordinate information, to the mesh
Mark object is positioned, and obtains the first positional parameter that ball machine positions the target object;According to the third of each identification point
Coordinate information positions each identification point, and obtains the second positional parameter that ball machine positions each identification point;According to
First positional parameter and corresponding second positional parameter of each identification point determine first positional parameter and each
The absolute value of the difference of corresponding second positional parameter of identification point;According to the maximum positional parameter of each absolute value and the ball machine
The confidence level for determining each identification point, judges whether highest confidence level is greater than preset believability threshold, if so, will
The corresponding identification point of highest confidence level is as the target identification point nearest with the target object space length.
Further, the positional parameter includes the step number at horizontal field of view angle, vertical field of view angle and zoom motor;
Second determining module is specifically used for being directed to each identification point, according toDetermine the confidence level of the identification point;Its
In, Depend is the confidence level of the identification point, ZoomwholeFor the maximum step number of the zoom motor of ball machine, DeltaZoomIt is first
The second zoom motor in the step number of the first zoom motor in positional parameter the second positional parameter corresponding with the identification point
The absolute value of the difference of step number, PwholeFor the horizontal field of view angle maximum value of ball machine, DeltaPFor first in the first positional parameter
The absolute value of the difference at the second horizontal field of view angle in the second positional parameter corresponding with the identification point of horizontal field of view angle, TwholeFor
The vertical field of view angle maximum value of ball machine, DeltaTIt is corresponding with the identification point for the first vertical field of view angle in the first positional parameter
The absolute value of the difference at the second vertical field of view angle in the second positional parameter, A, B, C are quality coefficient.
Further, described device further include:
Preserving module, for receiving gunlock third image gathered in advance, by the central pixel point of second image with
The central pixel point of the third image is overlapped;Receive each corner pixel point in the third image that the gunlock is sent
4-coordinate information;According to the coordinate transformation relation pre-saved, determine each corner pixel point in second image
In Five Axis information;The region that the pixel of the Five Axis information is constituted is as the calibration in second image
Region;For each identification point in the calibration region, believed according to third coordinate of the identification point in second image
Breath, positions the identification point;And obtain the second positional parameter that ball machine positions the identification point.
The preserving module is also used to, to the laggard line focusing of mark point location, obtain ball for each identification point
Focal length that machine is focused the identification point and preservation.
Further, described device further include:
Judgment module is adopted for being positioned according to the second coordinate information of the target object to the target object
Collect the 4th image, and determines the first clarity evaluation of estimate of the 4th image;It is corresponding according to each identification point pre-saved
Clarity evaluation of estimate, judge the first clarity evaluation of estimate the second clarity evaluation of estimate corresponding with the target identification point
Difference whether in default range, if so, triggering the third determining module.
Further, described device further include:
5th determining module, for positioning, adopting to the target object according to determining second coordinate information
The target object is focused with the initial focal length, and obtains the first focusing motor that ball machine focuses the target object
Step number;According to first positional parameter, the first focusing number of motor steps, and the positional parameter pre-saved, motor step of focusing
Several corresponding relationships with object distance, determine corresponding first object distance of the target object;According to the identification point and object distance pre-saved
Corresponding relationship, determine corresponding second object distance of the target identification point;According to the size of first object distance and the second object distance
Relationship determines focusing direction;
4th determining module is specifically used for according to the initial focal length and preset focusing step-length, in the focusing
It focuses on direction, determines the corresponding focal length of the target object.
Further, the preserving module is also used to be focused identification point, according to the horizontal field of view of ball machine after focusing
Angle, vertical field of view angle and zoom motor step number calculate object distance and are demarcated, and establish space object distance figure;According to identification point in space
Position in object distance figure determines the corresponding relationship of identification point and object distance and preservation.
On the other hand, the embodiment of the invention provides a kind of electronic equipment, including processor, communication interface, memory and
Communication bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes method and step described in any of the above embodiments.
In another aspect, the embodiment of the invention provides a kind of computer readable storage medium, the computer-readable storage
Dielectric memory contains computer program, and the computer program realizes method step described in any of the above embodiments when being executed by processor
Suddenly.
The embodiment of the invention provides a kind of focus method, device, electronic equipment and storage mediums, which comprises
According to first coordinate information of the target object in the first image that gunlock acquires, determine what the target object was acquired in ball machine
The second coordinate information in second image;According to the third coordinate information of each identification point in second image pre-saved
With second coordinate information, the determining and nearest target identification point of the target object space length;Wherein, the identification point
For the corresponding pixel logo point of object immovable in second image;According to each identification point for pre-saving with
The corresponding relationship of focal length, using the corresponding focal length of the target identification point as initial focal length;According to the initial focal length and preset
Focusing step-length, determine the corresponding focal length of the target object.
Due in embodiments of the present invention, electronic equipment is according to the second coordinate information of target object and each identification point
Third coordinate information, it is determining with the nearest target identification point of target object space length, it has been pre-saved in electronic equipment each
The corresponding relationship of identification point and focal length, after determining target identification point, using the corresponding focal length of target identification point as initial focal length,
According to initial focal length and preset focusing step-length, the corresponding focal length of target object is determined.Because of the target identification point determined
It is closest with the object distance of target object, therefore the focusing focal length of target identification point and target object is closest, therefore in target pair
It may be implemented quickly to focus as carrying out focusing on the basis of corresponding initial focal length.Focus program in compared to the prior art,
Focal time is substantially reduced, candid photograph efficiency is improved.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this
For the those of ordinary skill in field, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is accumulation process schematic diagram provided in an embodiment of the present invention;
Fig. 2 is the synchronous schematic diagram in the rifle ball provided in an embodiment of the present invention visual field;
Fig. 3 is object distance figure in space provided in an embodiment of the present invention;
Fig. 4 is that rifle ball zoom provided in an embodiment of the present invention focuses flow chart;
Fig. 5 is aggregation apparatus structural schematic diagram provided in an embodiment of the present invention;
Fig. 6 is electronic devices structure schematic diagram provided in an embodiment of the present invention.
Specific embodiment
The present invention will be describe below in further detail with reference to the accompanying drawings, it is clear that described embodiment is only this
Invention a part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art exist
All other embodiment obtained under the premise of creative work is not made, shall fall within the protection scope of the present invention.
Fig. 1 be accumulation process schematic diagram provided in an embodiment of the present invention, the process the following steps are included:
S101: according to first coordinate information of the target object in the first image that gunlock acquires, the target pair is determined
As the second coordinate information in the second image that ball machine acquires.
Focus method provided in an embodiment of the present invention is applied to electronic equipment, which can be ball machine itself,
It can be the equipment such as the PC that can control ball machine, tablet computer.It in order to facilitate understanding and describes, with electronics in the embodiment of the present invention
Equipment is that ball machine itself is illustrated.In practical application scene, there is the gunlock being used cooperatively with ball machine, gunlock position is fixed
And fixed-focus, ball machine include rotatable holder and zoom.Fixed-focus gunlock recognizes in picture and occurs for global observation
When target object, the coordinate information of target object is sent to zoom ball machine, zoom ball machine converts determining target for carrying out coordinate
Then object positions target object, after the completion of positioning, focus and capture.
In embodiments of the present invention, using the image of gunlock acquisition as the first image, when target object appears in gunlock view
When in open country, gunlock can acquire the first image, and identify the coordinate information of target object in the first image, by target object the
For coordinate information in one image as the first coordinate information, gunlock is determining first coordinate of the target object in the first image
After information, the first coordinate information is sent to ball machine.Ball machine acquires in advance the second image, wherein can operate ball machine and be in
When minimum times of wide-angle position, the second image is acquired.Also, also calibration has each mark in advance in ball machine the second image gathered in advance
Know point, the identification point in the embodiment of the present invention is the corresponding pixel logo point of object immovable in the second image, such as column
The a certain pixel on a certain pixel, house, a certain pixel on street lamp on bar can be demarcated as identification point.This hair
Bright embodiment is not defined the quantity of identification point.Due to the gunlock visual field be it is fixed, the second image is that ball machine acquires in advance
's.Therefore there are coordinate transformation relations for the first image and the second image.For example, the first corner pixel in the first image of identification
Point, and determine the second corner pixel point corresponding with the first corner pixel point in the second image, according to the first corner pixel point and
The coordinate information of second corner pixel point can determine horizontal offset of second image relative to the first image, vertical shift
The parameters such as amount and rotation angle, the coordinate transformation relation of the first image and the second image can be determined according to above-mentioned parameter.Ball
After machine receives the first coordinate information of gunlock transmission, is converted and closed according to the coordinate of the first image and the second image obtained in advance
System, can determine second coordinate information of the target object in the second image.
S102: it is sat according to the third coordinate information of each identification point in second image pre-saved and described second
Mark information, the determining and nearest target identification point of the target object space length;Wherein, the identification point is second figure
The corresponding pixel logo point of immovable object as in.
Calibration has each identification point in ball machine the second image gathered in advance, and ball machine preserves each identification point the
Third coordinate information in two images.After ball machine determines the second coordinate information of the target object in the second image, according to second
The third coordinate information of coordinate information and each identification point, can determine the target identification nearest with target object space length
Point.Wherein it is possible to identify the identification point nearest with the image distance of the second coordinate information in the second image, which is made
For the target identification point nearest with target object space length.
S103: according to the corresponding relationship of each identification point and focal length that pre-save, by the target identification point pair
The focal length answered is as initial focal length.
The corresponding relationship of each identification point and focal length is pre-saved in ball machine, wherein ball machine is directed to each mark in advance
After the identification point is positioned and focused, the focal length after focusing as the corresponding focal length of the identification point and is saved for point.Ball machine
After determining target identification point, the corresponding focal length of target identification point is determined as initial focal length.
S104: according to the initial focal length and preset focusing step-length, the corresponding focal length of the target object is determined.
Preset focusing step-length is preserved in ball machine, wherein preset focusing step-length can be 1 millimeter, 2 millimeters etc..
After ball machine determines initial focal length, on the basis of initial focal length, focus according to preset focusing step-length.Wherein it is possible to set in advance
It sets the tone burnt direction, the direction that e.g. focal length increases is the direction of preset focusing, then on the basis of initial focal length, according to pre-
If focusing step-length increase focal length, also, image can be acquired after focusing every time, and determine the clarity evaluation of estimate of image, such as
The clarity evaluation of estimate of fruit image is being gradually increased, then when the clarity evaluation of estimate of image is greater than preset clarity Evaluation threshold
When, it is believed that it focuses and completes, and determine that focal length at this time is the corresponding focal length of target object, or can also determine the clear of image
Focal length when spending evaluation of estimate maximum is the corresponding focal length of target object.If the clarity evaluation of estimate of image is being gradually reduced,
It focuses to the opposite direction in preset focusing direction, and determines the corresponding focal length of target object according to the method described above.
Since in embodiments of the present invention, ball machine is according to the second coordinate information of target object and the third of each identification point
Coordinate information, it is determining with the nearest target identification point of target object space length, pre-saved in ball machine each identification point and
The corresponding relationship of focal length, after determining target identification point, using the corresponding focal length of target identification point as initial focal length, according to initial
Focal length rises and preset focusing step-length, determines the corresponding focal length of target object.Because of the target identification point determined and target pair
The object distance of elephant is closest, therefore the focusing focal length of target identification point and target object is closest therefore corresponding in target object
Focusing is carried out on the basis of initial focal length may be implemented quickly to focus.Focus program in compared to the prior art, greatly shortens
Focal time, improves candid photograph efficiency.
Due to two nearest points of object distance in the nearest two points not necessarily actual scene of distance in image, in order to make
The determining target identification point nearest with target object space length is more acurrate, in embodiments of the present invention, according to pre-saving
Second image in each identification point third coordinate information, it is determining with the nearest target of the target object space length
Identification point includes:
According to determining second coordinate information, the target object is positioned, and is obtained described in ball machine positioning
First positional parameter of target object;
Each identification point is positioned according to the third coordinate information of each identification point, and it is described every to obtain ball machine positioning
Second positional parameter of a identification point;
According to first positional parameter and corresponding second positional parameter of each identification point, determine that described first is fixed
The absolute value of position parameter and the difference of corresponding second positional parameter of each identification point;
According to the maximum positional parameter of each absolute value and the ball machine, determines the confidence level of each identification point, sentence
Whether highest confidence level of breaking is greater than preset believability threshold, if so, using the corresponding identification point of highest confidence level as
The target identification point nearest with the target object space length.
It in embodiments of the present invention, can be with after ball machine determines the second coordinate information of the target object in the second image
Cloud platform rotation is controlled according to the second coordinate information, to realize the positioning to target object.After the completion of positioning, ball machine is available
The positional parameter of self poisoning target object, wherein positional parameter can be horizontal field of view angle, vertical field of view angle, zoom motor
Step number.In embodiments of the present invention, the positional parameter of target object will be positioned as the first positional parameter.In addition, ball machine root
Each identification point is positioned according to the third coordinate information of each identification point, then obtains determining for each identification point of self poisoning
Position parameter, using the positional parameter as the second positional parameter.After ball machine obtains the first positional parameter, it can determine that first is fixed respectively
The absolute value of position parameter and the difference of each identification point corresponding second positional parameter, then according to each absolute value, ball machine
Maximum positional parameter and preset formula determine the confidence level of each identification point, preset believability threshold are preserved in ball machine,
When highest confidence level be greater than preset believability threshold when, using the corresponding identification point of highest confidence level as with target object
The nearest target identification point of space length.In order to improve efficiency, ball machine can first determine in the second image with target object distance
Then the identification point of closer preset quantity, such as 3,4 identification points determine the first positional parameter and preset quantity respectively
The absolute value of the difference of corresponding second positional parameter of identification point, then according to the maximum positioning ginseng of each absolute value and ball machine
Number, determines the confidence level of each identification point, when highest confidence level is greater than preset believability threshold, by highest confidence level
Corresponding identification point is as the target identification point nearest with target object space length.
Specifically, determining the confidence level packet of each identification point according to the maximum positional parameter of each absolute value and ball machine
It includes:
For each identification point, according to
Determine the confidence level of the identification point;
Wherein, Depend is the confidence level of the identification point, ZoomwholeFor the maximum step number of the zoom motor of ball machine,
DeltaZoomFor in step number the second positional parameter corresponding with the identification point of the first zoom motor in the first positional parameter
The absolute value of the difference of the step number of second zoom motor, PwholeFor the horizontal field of view angle maximum value of ball machine, DeltaPIt is fixed for first
The difference at the second horizontal field of view angle in first level field angle the second positional parameter corresponding with the identification point in the parameter of position
Absolute value, TwholeFor the vertical field of view angle maximum value of ball machine, DeltaTFor the first vertical field of view angle in the first positional parameter
The absolute value of the difference at the second vertical field of view angle in the second positional parameter corresponding with the identification point, A, B, C are quality coefficient.
Formula is preserved in ball machine
After ball machine determines the absolute value of the difference of the first positional parameter and each second positional parameter, by each absolute value and ball machine
Maximum positional parameter brings above-mentioned formula into, can determine the confidence level of each identification point, then by the highest mark of confidence level
Know point and is determined as target identification point.
It is described that each identification point is positioned according to the third coordinate information of each identification point, and obtain ball machine positioning institute
The second positional parameter for stating each identification point includes:
Gunlock third image gathered in advance is received, by the central pixel point of second image and the third image
Central pixel point is overlapped;
Receive the 4-coordinate information of each corner pixel point in the third image that the gunlock is sent;According to preparatory
The coordinate transformation relation of preservation determines Five Axis information of each corner pixel point in second image;By institute
The region of pixel composition of Five Axis information is stated as the calibration region in second image;
For each identification point in the calibration region, according to third coordinate of the identification point in second image
Information positions the identification point;And obtain the second positional parameter that ball machine positions the identification point;
The process for pre-saving the corresponding relationship of each identification point and focal length includes:
Is obtained by ball machine and is gathered to the identification point for the laggard line focusing of mark point location for each identification point
Burnt focal length and preservation.
Ball machine is before saving corresponding second positional parameter of each identification point, it is necessary first to regard to the gunlock visual field and ball machine
Open country synchronizes, and Fig. 2 is the synchronous schematic diagram in the rifle ball visual field, as shown in Fig. 2, gunlock acquires third image in advance, and by third figure
As being sent to ball machine, it should be noted that the third image and the first image can be same piece image, be also possible to different
Image.The central pixel point a of the central pixel point A of third image and the second image of itself acquisition are overlapped by ball machine, and ball machine is also
Receive the 4-coordinate information of each corner pixel point in the third image that gunlock is sent, that is, tetra- pixels of BCDE in Fig. 2
4-coordinate information of the point in third image determines each corner pixel then according to the coordinate transformation relation pre-saved
Five Axis information o'clock in the second image, that is, determine the 5th of tetra- pixels of bcde in Fig. 2 in the second image
Coordinate information, the region that the pixel of Five Axis information is constituted complete at this time as the calibration region in the second image
The rifle ball visual field is synchronous.
User can be in each identification point of selection in calibration region, wherein user can be chosen by single-click operation and be marked
Know point, identification point can also be chosen by double click operation, or mark can also be chosen by inputting the coordinate information of pixel
Point.It is of course also possible to determine each identification point according to object immovable in the second image by ball machine.Ball machine exists according to user
Selection operation in calibration region determines each identification point, and obtains the third coordinate information of each identification point.Then for every
A identification point controls cloud platform rotation according to the third coordinate information of the identification point, positions to the identification point, after the completion of positioning
Ball machine is obtained to position the second positional parameter of the identification point and save.Corresponding second positioning of each identification point can be saved in this way
Parameter.In addition, ball machine is directed to each identification point, it is focused after being positioned to the identification point, obtains ball machine after the completion of focusing
The focal length be focused to the identification point and preservation, as the corresponding focal length of the identification point.
In order to which the initial focal length for guaranteeing determining is accurate, in embodiments of the present invention, the determination and the target object are empty
Between after the nearest target identification point of distance, according to the corresponding relationship of each identification point and focal length that pre-save, by institute
Before the corresponding focal length of target identification point is stated as initial focal length, the method also includes:
The target object is positioned according to the second coordinate information of the target object, acquires the 4th image, and
Determine the first clarity evaluation of estimate of the 4th image;
According to the corresponding clarity evaluation of estimate of each identification point pre-saved, judge the first clarity evaluation of estimate with
Whether the difference of the corresponding second clarity evaluation of estimate of the target identification point is in default range, if so, carrying out subsequent
Step.
After ball machine determines target identification point, the target object is determined according to the second coordinate information of target object
Position acquires the 4th image, and determines the first clarity evaluation of estimate of the 4th image.Ball machine is directed to each mark point location in advance
Afterwards, the corresponding image of the identification point is acquired, and determines that the second clarity evaluation of estimate of the image is corresponding clear as the identification point
Clear degree evaluation of estimate.Ball machine determines the corresponding second clarity evaluation of estimate of target identification point, and judge the first clarity evaluation of estimate with
Whether the difference of the corresponding second clarity evaluation of estimate of target identification point is in default range.If it is, determining target mark
The confidence level for knowing point is higher, can carry out the corresponding relationship according to each identification point and focal length pre-saved at this time, will
The step of corresponding focal length of the target identification point is as initial focal length, if it is not, then determine the confidence level of target identification point compared with
It is low, a focal length can be set at random at this time as initial focal length.
It is in embodiments of the present invention, described by the corresponding coke of the target identification point in order to further increase focusing speed
After as initial focal length, according to the initial focal length and preset focusing step-length, determine that the target object is corresponding
Before focal length, the method also includes:
According to determining second coordinate information, the target object is positioned, using the initial focal length pair
The target object is focused, and obtains the step number that ball machine focuses the first focusing motor of the target object;
According to first positional parameter, the first focusing number of motor steps, and the positional parameter pre-saved, motor step of focusing
Several corresponding relationships with object distance, determine corresponding first object distance of the target object;
According to the corresponding relationship of the identification point and object distance that pre-save, corresponding second object of the target identification point is determined
Away from;
According to the size relation of first object distance and the second object distance, focusing direction is determined;
According to the initial focal length and preset focusing step-length, determine that the corresponding focal length of the target object includes:
According to the initial focal length and preset focusing step-length, focuses on the focusing direction, determine the mesh
Mark the corresponding focal length of object.
The identification point pre-saved and the corresponding relationship of object distance include:
Identification point is focused, according to the horizontal field of view angle, vertical field of view angle of ball machine after focusing and zoom motor step number
It calculates object distance and is demarcated, establish space object distance figure;
According to position of the identification point in the object distance figure of space, the corresponding relationship of identification point and object distance and preservation are determined.
After ball machine determines initial focal length, according to the second coordinate information of target object, target object is positioned, is adopted
Target object is focused with initial focal length, and obtains the step number of the first focusing motor of ball machine focus objects object;Ball machine
The corresponding relationship of positional parameter, the number of motor steps and object distance of focusing itself is preserved, which determined by the model of ball machine
's.Ball machine according to the first positional parameter, first focusing number of motor steps, and pre-save positional parameter, focusing number of motor steps with
The corresponding relationship of object distance determines corresponding first object distance of target object.In addition, ball machine is directed to each identification point in advance, to the mark
After knowledge point carries out positioning focusing, the step number that ball machine focuses the second focusing motor of the identification point is obtained;Then according to the identification point
The second positional parameter, second focusing motor step number, and pre-save positional parameter, focus number of motor steps and object distance pair
It should be related to, determine the corresponding object distance of the identification point and save.Fig. 3 is the space object distance figure saved in ball machine, as shown in figure 3, empty
Between horizontal field of view angle pan, vertical field of view angle tilt, the relationship between zoom motor step number Zoom are labelled in object distance figure.With ball
The point on each concentric spherical centered on machine represents some PT angle under a burnt section (Zoom step number is identical), if
It is the state focused after completing, then the focusing number of motor steps of the point can serve as absolute amount to calculate object distance and to this
It is fixed to click through rower.Object distance calibration can be carried out after focusing to each spatial point according to focus data, it is final to establish sky
Between object distance equipotential lines, as shown in figure 3, be differently formed several space spherical surfaces with zoom motor step number, and any in space
A little all object distance will be demarcated after each focus.ABCD is closer four identification points of distance objective object O in Fig. 3, and ball machine is true
The identification point is determined as target when there are the identification point that confidence level is more than threshold value by the confidence level for determining tetra- identification points of ABCD
Identification point.Ball machine determines corresponding second object distance of target identification point according to the identification point pre-saved and the corresponding relationship of object distance,
According to the size relation of the first object distance and the second object distance, focusing direction is determined.Specifically, when the first object distance is greater than the second object distance
When, focusing direction is focal length augment direction, and when the first object distance is less than the second object distance, focusing direction is that focal length reduces direction.Root
It according to initial focal length and preset focusing step-length, focuses on the focusing direction determined, determines the corresponding coke of target object
Away from.To further improve focusing speed.
Fig. 4 be rifle ball zoom provided in an embodiment of the present invention focus flow chart, as shown in figure 4, focus start after, first into
Row gunlock is synchronous with the coordinate of ball machine, it is, gunlock third image gathered in advance is received, by the center pixel of the second image
Point is overlapped with the central pixel point of the third image;Receive each corner pixel in the third image that the gunlock is sent
The 4-coordinate information of point;According to the coordinate transformation relation, determine each corner pixel point in second image
Five Axis information;The region that the pixel of the Five Axis information is constituted is as the calibration area in second image
Domain.Then the target identification point that confidence level is greater than preset believability threshold is judged whether there is.It is, according to determining institute
The second coordinate information is stated, the target object is positioned, and obtains the first positioning ginseng that ball machine positions the target object
Number;According to first positional parameter the second positional parameter corresponding with each identification point pre-saved, determine described in
The absolute value of the difference of first positional parameter and corresponding second positional parameter of each identification point;According to each absolute value and described
The maximum positional parameter of ball machine determines the confidence level of each identification point, judge highest confidence level whether be greater than it is preset can
Confidence threshold.If it is present using the corresponding identification point of highest confidence level as nearest with the target object space length
Target identification point, using the corresponding focal length of the target identification point as initial focal length;According to the initial focal length and preset
Focusing step-length, determines the corresponding focal length of the target object.If it does not exist, then being gathered according to method in the prior art
It is burnt.
Fig. 5 is focusing device structural schematic diagram provided in an embodiment of the present invention, which includes:
First determining module 41, for the first coordinate information according to target object in the first image that gunlock acquires,
Determine second coordinate information of the target object in the second image that ball machine acquires;
Second determining module 42, for the third coordinate letter according to each identification point in second image pre-saved
Breath and second coordinate information, the determining and nearest target identification point of the target object space length;Wherein, the mark
Point is the corresponding pixel logo point of object immovable in second image;
Third determining module 43, for the corresponding relationship according to each identification point and focal length pre-saved, by institute
The corresponding focal length of target identification point is stated as initial focal length;
4th determining module 44, for determining the target object according to the initial focal length and preset focusing step-length
Corresponding focal length.
Second determining module 42, specifically for according to determining second coordinate information, to the target object
It is positioned, and obtains the first positional parameter that ball machine positions the target object;Believed according to the third coordinate of each identification point
Breath positions each identification point, and obtains the second positional parameter that ball machine positions each identification point;According to described
One positional parameter the second positional parameter corresponding with each identification point pre-saved, determine first positional parameter and
The absolute value of the difference of corresponding second positional parameter of each identification point;According to the maximum positioning of each absolute value and the ball machine
Parameter determines the confidence level of each identification point, judges whether highest confidence level is greater than preset believability threshold, if
It is, using the corresponding identification point of highest confidence level as the target identification point nearest with the target object space length.
The positional parameter includes the step number at horizontal field of view angle, vertical field of view angle and zoom motor;
Second determining module 42 is specifically used for being directed to each identification point, according toDetermine the confidence level of the identification point;Its
In, Depend is the confidence level of the identification point, ZoomwholeFor the maximum step number of the zoom motor of ball machine, DeltaZoomIt is first
The second zoom motor in the step number of the first zoom motor in positional parameter the second positional parameter corresponding with the identification point
The absolute value of the difference of step number, PwholeFor the horizontal field of view angle maximum value of ball machine, DeltaPFor first in the first positional parameter
The absolute value of the difference at the second horizontal field of view angle in the second positional parameter corresponding with the identification point of horizontal field of view angle, TwholeFor
The vertical field of view angle maximum value of ball machine, DeltaTIt is corresponding with the identification point for the first vertical field of view angle in the first positional parameter
The absolute value of the difference at the second vertical field of view angle in the second positional parameter, A, B, C are quality coefficient.
Described device further include:
Preserving module 45, for receiving gunlock third image gathered in advance, by the central pixel point of second image
It is overlapped with the central pixel point of the third image;Receive each corner pixel point in the third image that the gunlock is sent
4-coordinate information;According to the coordinate transformation relation pre-saved, determine each corner pixel point in second figure
Five Axis information as in;The region that the pixel of the Five Axis information is constituted is as the mark in second image
Determine region;For each identification point in the calibration region, according to third coordinate of the identification point in second image
Information positions the identification point;And obtain the second positional parameter that ball machine positions the identification point.
The preserving module 45 is also used to, to the laggard line focusing of mark point location, obtain for each identification point
Focal length that ball machine is focused the identification point and preservation.
Described device further include:
Judgment module 46, for being positioned according to the second coordinate information of the target object to the target object,
The 4th image is acquired, and determines the first clarity evaluation of estimate of the 4th image;According to each identification point pair pre-saved
The clarity evaluation of estimate answered judges the first clarity evaluation of estimate the second clarity evaluation corresponding with the target identification point
Whether the difference of value is in default range, if so, triggering the third determining module 43.
Described device further include:
5th determining module 47, for being positioned to the target object according to determining second coordinate information,
The target object is focused using the initial focal length, and obtains the first focusing electricity that ball machine focuses the target object
The step number of machine;According to first positional parameter, the first focusing number of motor steps, and the positional parameter, the focusing motor that pre-save
The corresponding relationship of step number and object distance determines corresponding first object distance of the target object;According to the identification point and object pre-saved
Away from corresponding relationship, determine corresponding second object distance of the target identification point;According to the big of first object distance and the second object distance
Small relationship determines focusing direction;
4th determining module 44 is specifically used for according to the initial focal length and preset focusing step-length, in the tune
It focuses on burnt direction, determines the corresponding focal length of the target object.
The preserving module 45, is also used to be focused identification point, according to the horizontal field of view angle of ball machine after focusing, vertical
Field angle and zoom motor step number calculate object distance and are demarcated, and establish space object distance figure;According to identification point in space object distance figure
In position, determine the corresponding relationship of identification point and object distance and preservation.
A kind of electronic equipment is additionally provided in the embodiment of the present invention, as shown in Figure 6, comprising: processor 501, communication interface
502, memory 503 and communication bus 504, wherein processor 501, communication interface 502, memory 503 pass through communication bus
504 complete mutual communication;
It is stored with computer program in the memory 503, when described program is executed by the processor 501, so that
The processor 501 executes following steps:
According to first coordinate information of the target object in the first image that gunlock acquires, determine the target object in ball
The second coordinate information in second image of machine acquisition;
Believed according to the third coordinate information of each identification point in second image pre-saved and second coordinate
Breath, the determining and nearest target identification point of the target object space length;Wherein, the identification point is in second image
The corresponding pixel logo point of immovable object;
According to the corresponding relationship of each identification point and focal length that pre-save, by the corresponding coke of the target identification point
Away from as initial focal length;
According to the initial focal length and preset focusing step-length, the corresponding focal length of the target object is determined.
Based on the same inventive concept, a kind of electronic equipment is additionally provided in the embodiment of the present invention, due to above-mentioned electronic equipment
The principle solved the problems, such as is similar to focus method, therefore the implementation of above-mentioned electronic equipment may refer to the implementation of method, repetition
Place repeats no more.
The communication bus that above-mentioned ball machine is mentioned can be Peripheral Component Interconnect standard (Peripheral Component
Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just
It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface 502 is for the communication between above-mentioned ball machine and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy
The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also
To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit, network processing unit (Network
Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), dedicated collection
At circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hard
Part component etc..
When processor executes the program stored on memory in embodiments of the present invention, realize according to target object in rifle
The first coordinate information in first image of machine acquisition, determines second of the target object in the second image that ball machine acquires
Coordinate information;Believed according to the third coordinate information of each identification point in second image pre-saved and second coordinate
Breath, the determining and nearest target identification point of the target object space length;Wherein, the identification point is in second image
The corresponding pixel logo point of immovable object;According to the corresponding relationship of each identification point and focal length that pre-save,
Using the corresponding focal length of the target identification point as initial focal length;According to the initial focal length and preset focusing step-length, determine
The corresponding focal length of the target object.
Electronic equipment is according to the second coordinate information of target object and the third coordinate information of each identification point, determining and mesh
Mark object space pre-saves the corresponding relationship of each identification point and focal length in nearest target identification point, ball machine, really
After making target identification point, using the corresponding focal length of target identification point as initial focal length, according to initial focal length and preset tune
Burnt step-length determines the corresponding focal length of target object.Because the object distance of the target identification point and target object determined is closest, because
The focusing focal length of this target identification point and target object is closest, thus on the basis of target object corresponding initial focal length into
Row focusing may be implemented quickly to focus.Focus program in compared to the prior art, substantially reduces focal time, improves and grabs
Clap efficiency.
The embodiment of the invention also provides a kind of computers to store readable storage medium storing program for executing, the computer readable storage medium
It is inside stored with the computer program that can be executed by electronic equipment, when described program is run on the electronic equipment, so that institute
It states when electronic equipment executes and realizes following steps:
According to first coordinate information of the target object in the first image that gunlock acquires, determine the target object in ball
The second coordinate information in second image of machine acquisition;
Believed according to the third coordinate information of each identification point in second image pre-saved and second coordinate
Breath, the determining and nearest target identification point of the target object space length;Wherein, the identification point is in second image
The corresponding pixel logo point of immovable object;
According to the corresponding relationship of each identification point and focal length that pre-save, by the corresponding coke of the target identification point
Away from as initial focal length;
According to the initial focal length and preset focusing step-length, the corresponding focal length of the target object is determined.
Based on the same inventive concept, a kind of computer readable storage medium is additionally provided in the embodiment of the present invention, due to place
The principle and focus method that reason device is solved the problems, such as in the computer program stored on executing above-mentioned computer readable storage medium
It is similar, therefore processor may refer to method in the implementation for the computer program for executing above-mentioned computer-readable recording medium storage
Implementation, overlaps will not be repeated.
Above-mentioned computer readable storage medium can be any usable medium that the processor in electronic equipment can access
Or data storage device, including but not limited to magnetic storage such as floppy disk, hard disk, tape, magneto-optic disk (MO) etc., optical memory
Such as CD, DVD, BD, HVD and semiconductor memory such as ROM, EPROM, EEPROM, nonvolatile memory (NAND
FLASH), solid state hard disk (SSD) etc..
Computer program, computer program quilt are provided in the computer readable storage medium provided in embodiments of the present invention
The first coordinate information according to target object in the first image that gunlock acquires is realized when processor executes, and determines the target
Second coordinate information of the object in the second image that ball machine acquires;According to each mark in second image pre-saved
The third coordinate information and second coordinate information of point, the determining and nearest target identification of the target object space length
Point;Wherein, the identification point is the corresponding pixel logo point of object immovable in second image;According to pre-saving
Each identification point and focal length corresponding relationship, using the corresponding focal length of the target identification point as initial focal length;According to
The initial focal length and preset focusing step-length, determine the corresponding focal length of the target object.
Electronic equipment is according to the second coordinate information of target object and the third coordinate information of each identification point, determining and mesh
Mark object space pre-saves the corresponding relationship of each identification point and focal length in nearest target identification point, ball machine, really
After making target identification point, using the corresponding focal length of target identification point as initial focal length, according to initial focal length and preset tune
Burnt step-length determines the corresponding focal length of target object.Because the object distance of the target identification point and target object determined is closest, because
The focusing focal length of this target identification point and target object is closest, thus on the basis of target object corresponding initial focal length into
Row focusing may be implemented quickly to focus.Focus program in compared to the prior art, substantially reduces focal time, improves and grabs
Clap efficiency.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (10)
1. a kind of focus method, which is characterized in that the described method includes:
According to first coordinate information of the target object in the first image that gunlock acquires, determine that the target object is adopted in ball machine
The second coordinate information in second image of collection;
According to the third coordinate information and second coordinate information of each identification point in second image pre-saved, really
The fixed and nearest target identification point of the target object space length;Wherein, the identification point be second image in can not
The corresponding pixel logo point of mobile object;
According to the corresponding relationship of each identification point and focal length that pre-save, the corresponding focal length of the target identification point is made
For initial focal length;
According to the initial focal length and preset focusing step-length, the corresponding focal length of the target object is determined.
2. the method as described in claim 1, which is characterized in that according to each identification point in second image pre-saved
Third coordinate information, determine that the target identification point nearest with the target object space length includes:
According to determining second coordinate information, the target object is positioned, and obtains ball machine and positions the target
First positional parameter of object;
Each identification point is positioned according to the third coordinate information of each identification point, and obtains ball machine and positions each mark
Know the second positional parameter of point;
According to first positional parameter and corresponding second positional parameter of each identification point, the first positioning ginseng is determined
The absolute value of the difference of number the second positional parameter corresponding with each identification point;
The confidence level that each identification point is determined according to the maximum positional parameter of each absolute value and the ball machine, judges highest
Confidence level whether be greater than preset believability threshold, if so, using the corresponding identification point of highest confidence level as with it is described
The nearest target identification point of target object space length.
3. method according to claim 2, which is characterized in that the positional parameter includes horizontal field of view angle, vertical field of view angle
With the step number of zoom motor;
The maximum positional parameter according to each absolute value and the ball machine determines that the confidence level of each identification point includes:
For each identification point, according to
Determine the confidence level of the identification point;
Wherein, Depend is the confidence level of the identification point, ZoomwholeFor the maximum step number of the zoom motor of ball machine, DeltaZoom
For the second zoom in step number the second positional parameter corresponding with the identification point of the first zoom motor in the first positional parameter
The absolute value of the difference of the step number of motor, PwholeFor the horizontal field of view angle maximum value of ball machine, DeltaPFor in the first positional parameter
First level field angle the second positional parameter corresponding with the identification point in the second horizontal field of view angle difference absolute value,
TwholeFor the vertical field of view angle maximum value of ball machine, DeltaTFor in the first positional parameter the first vertical field of view angle and the identification point
The absolute value of the difference at the second vertical field of view angle in corresponding second positional parameter, A, B, C are quality coefficient.
4. method according to claim 2, which is characterized in that the third coordinate information according to each identification point is to each
Identification point is positioned, and is obtained ball machine and positioned the second positional parameter of each identification point and include:
Gunlock third image gathered in advance is received, by the center of the central pixel point of second image and the third image
Pixel is overlapped;
Receive the 4-coordinate information of each corner pixel point in the third image that the gunlock is sent;According to pre-saving
Coordinate transformation relation, determine Five Axis information of each corner pixel point in second image;By described
The region that the pixel of Five Axis information is constituted is as the calibration region in second image;
For each identification point in the calibration region, believed according to third coordinate of the identification point in second image
Breath, positions the identification point;And obtain the second positional parameter that ball machine positions the identification point;
The process for pre-saving the corresponding relationship of each identification point and focal length includes:
For each identification point, to the laggard line focusing of mark point location, obtain what ball machine was focused the identification point
Focal length simultaneously saves.
5. the method as described in claim 1, which is characterized in that the determination and the nearest mesh of the target object space length
After marking identification point, according to the corresponding relationship of each identification point and focal length that pre-save, by the target identification point pair
Before the focal length answered is as initial focal length, the method also includes:
The target object is positioned according to the second coordinate information of the target object, acquires the 4th image, and determine
First clarity evaluation of estimate of the 4th image;
According to the corresponding clarity evaluation of estimate of each identification point pre-saved, judge the first clarity evaluation of estimate with it is described
Whether the difference of the corresponding second clarity evaluation of estimate of target identification point is in default range, if so, carrying out subsequent step.
6. method according to claim 2, which is characterized in that described using the corresponding focal length of the target identification point as initial
After focal length, according to the initial focal length and preset focusing step-length, before determining the corresponding focal length of the target object, institute
State method further include:
According to determining second coordinate information, the target object is positioned, using the initial focal length to described
Target object is focused, and obtains the step number that ball machine focuses the first focusing motor of the target object;
According to first positional parameter, first focusing number of motor steps, and pre-save positional parameter, focusing number of motor steps with
The corresponding relationship of object distance determines corresponding first object distance of the target object;
According to the corresponding relationship of the identification point and object distance that pre-save, corresponding second object distance of the target identification point is determined;
According to the size relation of first object distance and the second object distance, focusing direction is determined;
According to the initial focal length and preset focusing step-length, determine that the corresponding focal length of the target object includes:
According to the initial focal length and preset focusing step-length, focuses on the focusing direction, determine the target pair
As corresponding focal length.
7. method as claimed in claim 6, which is characterized in that the identification point that the basis pre-saves is corresponding with object distance to close
System, determines that corresponding second object distance of the target identification point includes:
Identification point is focused, is calculated according to the horizontal field of view angle, vertical field of view angle of ball machine after focusing and zoom motor step number
Object distance is simultaneously demarcated, and space object distance figure is established;
According to position of the identification point in the object distance figure of space, the corresponding relationship of identification point and object distance and preservation are determined.
8. a kind of focusing device, which is characterized in that described device includes:
First determining module determines institute for the first coordinate information according to target object in the first image that gunlock acquires
State second coordinate information of the target object in the second image that ball machine acquires;
Second determining module, for according to the third coordinate information of each identification point and institute in second image pre-saved
State the second coordinate information, the determining and nearest target identification point of the target object space length;Wherein, the identification point is institute
State the corresponding pixel logo point of immovable object in the second image;
Third determining module, for the corresponding relationship according to each identification point and focal length pre-saved, by the target
The corresponding focal length of identification point is as initial focal length;
4th determining module, for determining that the target object is corresponding according to the initial focal length and preset focusing step-length
Focal length.
9. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein processing
Device, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes the described in any item method steps of claim 1-7
Suddenly.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program realizes claim 1-7 described in any item method and steps when the computer program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910662640.1A CN110278382B (en) | 2019-07-22 | 2019-07-22 | Focusing method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910662640.1A CN110278382B (en) | 2019-07-22 | 2019-07-22 | Focusing method, device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110278382A true CN110278382A (en) | 2019-09-24 |
CN110278382B CN110278382B (en) | 2020-12-08 |
Family
ID=67965040
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910662640.1A Active CN110278382B (en) | 2019-07-22 | 2019-07-22 | Focusing method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110278382B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111105461A (en) * | 2019-12-27 | 2020-05-05 | 万翼科技有限公司 | Positioning apparatus, positioning method based on spatial model, and readable storage medium |
CN111243030A (en) * | 2020-01-06 | 2020-06-05 | 浙江大华技术股份有限公司 | Target focusing dynamic compensation method and device and storage device |
CN111818260A (en) * | 2020-07-06 | 2020-10-23 | 浙江大华技术股份有限公司 | Automatic focusing method and device and electronic equipment |
CN112911128A (en) * | 2019-11-19 | 2021-06-04 | 杭州海康微影传感科技有限公司 | Focus control method, system, device and equipment, and storage medium |
CN112995514A (en) * | 2021-03-03 | 2021-06-18 | 上海悦易网络信息技术有限公司 | Method and device for acquiring photographing object distance of industrial camera |
CN112995517A (en) * | 2021-03-12 | 2021-06-18 | 湖南国科智瞳科技有限公司 | High-precision microscopic image automatic focusing method and system, and computer equipment |
CN113038070A (en) * | 2019-12-25 | 2021-06-25 | 浙江宇视科技有限公司 | Equipment focusing method and device and cloud platform |
CN113347335A (en) * | 2021-05-31 | 2021-09-03 | 浙江大华技术股份有限公司 | Focusing method, device, electronic equipment and storage medium |
CN113660421A (en) * | 2021-08-16 | 2021-11-16 | 北京中安瑞力科技有限公司 | Linkage method and linkage system for positioning videos |
CN113709367A (en) * | 2021-08-24 | 2021-11-26 | 浙江大华技术股份有限公司 | Method and device for controlling focusing and electronic equipment |
CN118381999A (en) * | 2024-06-21 | 2024-07-23 | 浙江大华技术股份有限公司 | Focusing method, device, equipment and medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101742107A (en) * | 2008-11-25 | 2010-06-16 | 索尼株式会社 | Imaging device and imaging method |
US20120218457A1 (en) * | 2011-02-24 | 2012-08-30 | Hon Hai Precision Industry Co., Ltd. | Auto-focusing camera device, storage medium, and method for automatically focusing the camera device |
CN103079059A (en) * | 2013-01-27 | 2013-05-01 | 中国科学技术大学 | Single-gun-camera-multi-dome-camera linkage method based on grid combination interpolation |
US20140078263A1 (en) * | 2012-09-18 | 2014-03-20 | Samsung Techwin Co., Ltd. | Monitoring apparatus and system using 3d information of images and monitoring method using the same |
CN104580915A (en) * | 2015-01-28 | 2015-04-29 | 苏州科达科技股份有限公司 | PTZ (pan/tilt/zoom) camera focusing method and system |
CN105744226A (en) * | 2016-02-22 | 2016-07-06 | 北京深博达智能系统有限公司 | 1+N gun-type camera and dome camera cooperation method based on camera coordinate system |
CN105744167A (en) * | 2016-03-28 | 2016-07-06 | 努比亚技术有限公司 | Image taking method and device, and mobile terminal |
CN107370950A (en) * | 2017-08-09 | 2017-11-21 | 广东欧珀移动通信有限公司 | Focusing process method, apparatus and mobile terminal |
CN108020158A (en) * | 2016-11-04 | 2018-05-11 | 浙江大华技术股份有限公司 | A kind of three-dimensional position measuring method and device based on ball machine |
CN109413324A (en) * | 2017-08-16 | 2019-03-01 | 中兴通讯股份有限公司 | A kind of image pickup method and mobile terminal |
CN109922251A (en) * | 2017-12-12 | 2019-06-21 | 华为技术有限公司 | The method, apparatus and system quickly captured |
-
2019
- 2019-07-22 CN CN201910662640.1A patent/CN110278382B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101742107A (en) * | 2008-11-25 | 2010-06-16 | 索尼株式会社 | Imaging device and imaging method |
US20120218457A1 (en) * | 2011-02-24 | 2012-08-30 | Hon Hai Precision Industry Co., Ltd. | Auto-focusing camera device, storage medium, and method for automatically focusing the camera device |
US20140078263A1 (en) * | 2012-09-18 | 2014-03-20 | Samsung Techwin Co., Ltd. | Monitoring apparatus and system using 3d information of images and monitoring method using the same |
CN103079059A (en) * | 2013-01-27 | 2013-05-01 | 中国科学技术大学 | Single-gun-camera-multi-dome-camera linkage method based on grid combination interpolation |
CN104580915A (en) * | 2015-01-28 | 2015-04-29 | 苏州科达科技股份有限公司 | PTZ (pan/tilt/zoom) camera focusing method and system |
CN105744226A (en) * | 2016-02-22 | 2016-07-06 | 北京深博达智能系统有限公司 | 1+N gun-type camera and dome camera cooperation method based on camera coordinate system |
CN105744167A (en) * | 2016-03-28 | 2016-07-06 | 努比亚技术有限公司 | Image taking method and device, and mobile terminal |
CN108020158A (en) * | 2016-11-04 | 2018-05-11 | 浙江大华技术股份有限公司 | A kind of three-dimensional position measuring method and device based on ball machine |
CN107370950A (en) * | 2017-08-09 | 2017-11-21 | 广东欧珀移动通信有限公司 | Focusing process method, apparatus and mobile terminal |
CN109413324A (en) * | 2017-08-16 | 2019-03-01 | 中兴通讯股份有限公司 | A kind of image pickup method and mobile terminal |
CN109922251A (en) * | 2017-12-12 | 2019-06-21 | 华为技术有限公司 | The method, apparatus and system quickly captured |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112911128A (en) * | 2019-11-19 | 2021-06-04 | 杭州海康微影传感科技有限公司 | Focus control method, system, device and equipment, and storage medium |
CN113038070B (en) * | 2019-12-25 | 2022-10-14 | 浙江宇视科技有限公司 | Equipment focusing method and device and cloud platform |
CN113038070A (en) * | 2019-12-25 | 2021-06-25 | 浙江宇视科技有限公司 | Equipment focusing method and device and cloud platform |
CN111105461A (en) * | 2019-12-27 | 2020-05-05 | 万翼科技有限公司 | Positioning apparatus, positioning method based on spatial model, and readable storage medium |
CN111243030A (en) * | 2020-01-06 | 2020-06-05 | 浙江大华技术股份有限公司 | Target focusing dynamic compensation method and device and storage device |
CN111243030B (en) * | 2020-01-06 | 2023-08-11 | 浙江大华技术股份有限公司 | Target focusing dynamic compensation method and device and storage device |
CN111818260A (en) * | 2020-07-06 | 2020-10-23 | 浙江大华技术股份有限公司 | Automatic focusing method and device and electronic equipment |
CN112995514A (en) * | 2021-03-03 | 2021-06-18 | 上海悦易网络信息技术有限公司 | Method and device for acquiring photographing object distance of industrial camera |
CN112995514B (en) * | 2021-03-03 | 2023-05-30 | 上海万物新生环保科技集团有限公司 | Method and equipment for acquiring photo object distance of industrial camera |
CN112995517B (en) * | 2021-03-12 | 2022-04-15 | 湖南国科智瞳科技有限公司 | High-precision microscopic image automatic focusing method and system, and computer equipment |
CN112995517A (en) * | 2021-03-12 | 2021-06-18 | 湖南国科智瞳科技有限公司 | High-precision microscopic image automatic focusing method and system, and computer equipment |
CN113347335B (en) * | 2021-05-31 | 2022-08-30 | 浙江大华技术股份有限公司 | Focusing method, device, electronic equipment and storage medium |
CN113347335A (en) * | 2021-05-31 | 2021-09-03 | 浙江大华技术股份有限公司 | Focusing method, device, electronic equipment and storage medium |
CN113660421A (en) * | 2021-08-16 | 2021-11-16 | 北京中安瑞力科技有限公司 | Linkage method and linkage system for positioning videos |
CN113709367A (en) * | 2021-08-24 | 2021-11-26 | 浙江大华技术股份有限公司 | Method and device for controlling focusing and electronic equipment |
CN118381999A (en) * | 2024-06-21 | 2024-07-23 | 浙江大华技术股份有限公司 | Focusing method, device, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN110278382B (en) | 2020-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110278382A (en) | A kind of focus method, device, electronic equipment and storage medium | |
US11763540B2 (en) | Automatic data enhancement expansion method, recognition method and system for deep learning | |
US9558543B2 (en) | Image fusion method and image processing apparatus | |
CN105721853B (en) | Generate method, system and the computer readable storage devices of image capture instruction | |
CN107087107A (en) | Image processing apparatus and method based on dual camera | |
CN107566688B (en) | Convolutional neural network-based video anti-shake method and device and image alignment device | |
CN107465877B (en) | Track focusing method and device and related media production | |
CN112367474B (en) | Self-adaptive light field imaging method, device and equipment | |
CN108401457A (en) | A kind of control method of exposure, device and unmanned plane | |
CN105578024B (en) | Camera focusing method, focusing mechanism and mobile terminal | |
CN104853094A (en) | Photographing method and device | |
CN106101540B (en) | Focus point determines method and device | |
CN110245641A (en) | A kind of target tracking image pickup method, device, electronic equipment | |
CN111737518A (en) | Image display method and device based on three-dimensional scene model and electronic equipment | |
CN112312113B (en) | Method, device and system for generating three-dimensional model | |
CN111083388A (en) | Light supplement lamp control method and device, electronic equipment and storage medium | |
CN111429518B (en) | Labeling method, labeling device, computing equipment and storage medium | |
CN110213490A (en) | A kind of image anti-fluttering method, device, electronic equipment and storage medium | |
CN111815715B (en) | Calibration method and device of zoom pan-tilt camera and storage medium | |
CN111357034A (en) | Point cloud generation method, system and computer storage medium | |
CN113365028B (en) | Method, device and system for generating routing inspection path | |
CN111046746A (en) | License plate detection method and device | |
CN109409321A (en) | A kind of determination method and device of camera motion mode | |
US8655162B2 (en) | Lens position based on focus scores of objects | |
CN107592464B (en) | Zoom follows the switching method and device of curve during a kind of zoom |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |