CN116567412A - Zoom tracking curve determination method, apparatus, computer device and storage medium - Google Patents

Zoom tracking curve determination method, apparatus, computer device and storage medium Download PDF

Info

Publication number
CN116567412A
CN116567412A CN202310328382.XA CN202310328382A CN116567412A CN 116567412 A CN116567412 A CN 116567412A CN 202310328382 A CN202310328382 A CN 202310328382A CN 116567412 A CN116567412 A CN 116567412A
Authority
CN
China
Prior art keywords
curve
zoom
depth
tracking curve
predicted
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.)
Pending
Application number
CN202310328382.XA
Other languages
Chinese (zh)
Inventor
李�浩
王文龙
华旭宏
魏然然
杨国全
俞鸣园
曹亚曦
王克彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Huachuang Video Signal Technology Co Ltd
Original Assignee
Zhejiang Huachuang Video Signal Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Huachuang Video Signal Technology Co Ltd filed Critical Zhejiang Huachuang Video Signal Technology Co Ltd
Priority to CN202310328382.XA priority Critical patent/CN116567412A/en
Publication of CN116567412A publication Critical patent/CN116567412A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • H04N23/671Focus control based on electronic image sensor signals in combination with active ranging signals, e.g. using light or sound signals emitted toward objects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • H04N23/676Bracketing for image capture at varying focusing conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The application relates to a zoom tracking curve determination method, a zoom tracking curve determination device, computer equipment and a storage medium. The method comprises the following steps: acquiring imaging data of a camera, wherein the imaging data comprises camera parameters and predicted object distances; calculating a depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with a reference object distance within the depth of field as a curve searching range; and performing curve searching based on the curve searching range to determine a target zoom tracking curve. By acquiring the predicted object distance, the method shortens the searching range of the zooming tracking curve, performs zooming and focusing operations in the limited curve searching range, and can ensure the image definition of the whole zooming and zooming process of the camera.

Description

Zoom tracking curve determination method, apparatus, computer device and storage medium
Technical Field
The present disclosure relates to the field of camera technologies, and in particular, to a zoom tracking curve determining method, apparatus, computer device, and storage medium.
Background
In order to keep the image captured by the image pickup apparatus clear during zooming, it is necessary to perform zooming tracking, that is, to make the focus motor in the image pickup apparatus change synchronously according to the change in the position of the zoom motor. The position of the zoom motor determines the optical magnification, and when the optical magnification is larger, the focal point change range of the focus motor is larger, so that the focus is more difficult to find.
In the related art, when a camera is started, automatic aggregation is performed, then a zoom tracking curve with clear current focusing is used as a reference curve when the camera is zooming, then a zooming amplifying process from a wide angle end to a long focal end is started, a focusing evaluation value corresponding to the current object distance is generated, a reference object distance corresponding to the reference curve is corrected according to the focusing evaluation value, and the corrected object distance is used as a new reference object distance. The method has the defects that a focus-clear zoom tracking curve is used as a reference curve when the camera is started, the condition of virtual focus easily occurs when the camera is zoomed to a long focus end, and the definition of the zooming and focusing processes of the camera cannot be ensured.
Aiming at the problem of insufficient definition in the zooming and focusing processes of cameras in the related art, no effective solution is proposed at present.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a zoom tracking curve determination method, apparatus, computer device, and computer-readable storage medium capable of improving focusing efficiency.
In a first aspect, the present application provides a zoom tracking curve determination method. The method comprises the following steps:
acquiring imaging data of a camera, wherein the imaging data comprises camera parameters and predicted object distances;
calculating a depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with a reference object distance within the depth of field as a curve searching range;
and performing curve searching based on the curve searching range to determine a target zoom tracking curve.
In one embodiment, the calculating the depth of field based on the camera parameters and the predicted object distance includes: and detecting whether the predicted object distance is within the depth of field, and if the predicted object distance is not within the depth of field, expanding the depth of field by adjusting the aperture size until the predicted object distance is within the depth of field.
In one embodiment, the determining the target zoom tracking curve based on the curve search range includes: acquiring a predicted search direction; switching a preset zooming tracking curve in the curve searching range according to the predicted searching direction; synchronously changing the zoom position according to the switching process of the preset zoom tracking curve, and calculating a corresponding focus evaluation value according to the real-time preset zoom tracking curve and the real-time zoom position; and determining a target tracking curve according to a plurality of the focusing evaluation values.
In one embodiment, the obtaining the predicted search direction includes: acquiring a first search direction in which a zoom motor moves from a previous two zoom positions to a previous zoom position; acquiring a second search direction in which the zoom motor moves from a previous zoom position to a current zoom position; and if the second search direction is the same as the first search direction, the predicted search direction is opposite to the second search direction.
In one embodiment, the obtaining the predicted search direction further includes: acquiring a current zoom position; and detecting whether the current zoom position is positioned at the edge of the depth of field, and if so, enabling the predicted search direction to be opposite to the second search direction.
In one embodiment, the obtaining the predicted search direction further includes: if the second search direction is opposite to the first search direction, acquiring a front two-zoom position, and calculating a front focus evaluation value corresponding to the front two-zoom position based on a first preset zoom tracking curve; acquiring a previous zoom position, selecting a second preset zoom tracking curve based on the object distance variation in the first search direction, and calculating a previous focus evaluation value corresponding to the previous zoom position; acquiring a current zoom position, selecting a third preset zoom tracking curve based on the object distance variation in the second search direction, and calculating a current focus evaluation value corresponding to the current zoom position; and determining the predicted searching direction according to the previous two-zoom position and the previous focusing evaluation value, the previous zoom position and the previous focusing evaluation value and the current zoom position and the current focusing evaluation value.
In a second aspect, the present application further provides a zoom tracking curve determining apparatus. The device comprises:
the acquisition module is used for acquiring imaging data of the camera, wherein the imaging data comprise camera parameters and predicted object distances;
the calculation module is used for calculating the depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with the reference object distance within the depth of field as a curve searching range;
and the processing module is used for carrying out curve search based on the curve search range and determining a target zoom tracking curve.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
acquiring imaging data of a camera, wherein the imaging data comprises camera parameters and predicted object distances;
calculating a depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with a reference object distance within the depth of field as a curve searching range;
and performing curve searching based on the curve searching range to determine a target zoom tracking curve.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring imaging data of a camera, wherein the imaging data comprises camera parameters and predicted object distances;
calculating a depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with a reference object distance within the depth of field as a curve searching range;
and performing curve searching based on the curve searching range to determine a target zoom tracking curve.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
acquiring imaging data of a camera, wherein the imaging data comprises camera parameters and predicted object distances;
calculating a depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with a reference object distance within the depth of field as a curve searching range;
and performing curve searching based on the curve searching range to determine a target zoom tracking curve.
The zoom tracking curve determining method, the device, the computer equipment and the storage medium are used for acquiring imaging data of a camera, wherein the imaging data comprise camera parameters and predicted object distances; calculating a depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with a reference object distance within the depth of field as a curve searching range; and performing curve searching based on the curve searching range to determine a target zoom tracking curve. By predicting the object distance, the predicted object distance is placed in a range capable of guaranteeing clear imaging, the searching range of a zooming tracking curve is reduced, zooming and focusing operations are carried out in a limited range, and the image definition of the whole zooming and focusing process of a camera can be guaranteed.
Drawings
FIG. 1 is a flow chart of a method of determining a zoom tracking curve in one embodiment;
FIG. 2 is a schematic representation of optical imaging in one embodiment;
FIG. 3 is a schematic diagram of a depth of field and aperture correspondence in one embodiment;
FIG. 4 is a schematic diagram of depth of field adjustment in one embodiment;
FIG. 5 is a schematic view of depth of field limiting in one embodiment;
FIG. 6 is an approximated schematic of a target zoom tracking curve in one embodiment;
FIG. 7 is a schematic diagram of a camera magnification versus depth of field in one embodiment;
FIG. 8 is a diagram illustrating a camera magnification versus zoom step size in one embodiment;
FIG. 9 is a convexity schematic of a concavity and convexity algorithm in one embodiment;
FIG. 10 is a convexity schematic of a concavity and convexity algorithm in another embodiment;
FIG. 11 is a schematic diagram of concavity of a concavity-convexity algorithm in one embodiment;
FIG. 12 is a schematic diagram of concavity of a concavity-concavity algorithm in another embodiment;
FIG. 13 is a schematic diagram of a zoom tracking curve determination method in another embodiment;
FIG. 14 is a schematic diagram of a zoom tracking curve determination apparatus in one embodiment;
fig. 15 is an internal structural view of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
With the wide application of zoom lenses, zoom tracking technology has become an important function of digital cameras, and is widely applied to industrial detection, military safety, life and leisure, and the like. Zoom tracking refers to changing the focal length of a system by movement of a zoom lens when a zoom operation is performed. In the moving process of the zoom motor, the focusing motor can synchronously track and move according to a zoom tracking curve calibrated in advance, so that the focusing of the lens is realized, and the imaging definition is improved.
Generally, before the camera leaves the factory, the manufacturer sets a plurality of preset zoom tracking curves for the camera, and different preset zoom tracking curves correspond to different reference object distances. The preset zoom tracking curve characterizes the corresponding relation between the zoom position and the focusing position when the imaging is the clearest under the reference object distance. However, if the initial zoom position is located near the wide-angle end, since the respective curves overlap, the respective curves gradually separate as the zoom motor moves toward the telephoto end, and it is difficult to determine one evaluation tracking curve without any policy. In the related art, a zoom tracking curve with clear initial focus is often used as a target tracking curve, but in this way, a virtual focus condition easily occurs when a camera zooms to a long focus end. Therefore, a solution is needed that can ensure that the camera remains clearly imaged throughout the zooming and focusing process.
In one embodiment, as shown in fig. 1, there is provided a zoom tracking curve determining method, as shown in fig. 1, including the steps of:
in step S101, imaging data of the camera is acquired, the imaging data including camera parameters and a predicted object distance.
Specifically, the camera refers to an imaging system in a broad sense, including but not limited to a video conference camera, a monitoring camera, a digital camera, a mobile phone camera module, a computer camera module, and the like, and a terminal capable of implementing an auto-focusing function is regarded as the camera in the embodiment. The camera parameters comprise relevant parameters of camera optical path systems such as a circle-of-diffusion diameter delta, an aperture value F, a lens focal length F and the like of the camera. The predicted object distance is an estimated value of the actual object distance obtained by a measurement technology, and the process of obtaining the predicted object distance is an auxiliary focusing process. The method for estimating the target object distance comprises laser ranging, a time of flight technique TOF, a phase difference technique PDAF, a space calibration object distance technique and the like.
Step S102, calculating the depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with the reference object distance within the depth of field as a curve searching range.
Specifically, an approximate curve search range may be defined by imaging data, particularly predicted object distances, and in one embodiment, the predicted object distances may be used as references, and a look-up table is formed by pre-measuring the relation between the predicted object distances and the curve search range and placed in the camera, and the curve search range is determined based on the look-up table. For example, the depth of field may be calculated in real time, and the curve search range may be determined by means of real-time calculation. The depth of field refers to the front-to-back distance range of a shot object measured when the front edge of a camera lens or other imagers can acquire clear images, and the front depth of field and the back depth of field are included by taking the shot object as a boundary. The aperture, lens, and distance of the focal plane to the object are important factors affecting the depth of field. After the depth of field of the imaging data is calculated, the predicted object distance can be enabled to fall into the depth of field through means such as adjusting a camera aperture. And the object distance curve is regulated within the depth of field range, so that the image definition of the whole zooming tracking process can be ensured. The range of the reference object distance corresponding to the preset zooming tracking curve for searching is limited through the depth of field, so that the searching range of the curve is shortened, and the curve searching efficiency is improved.
And step S103, performing curve search based on the curve search range, and determining a target zoom tracking curve.
Specifically, after determining the curve search range, a target zoom tracking curve is determined based on a curve search algorithm. The existing curve searching method or zoom tracking method mainly comprises three types, namely a table look-up method, a geometric method and a machine learning method. The look-up table method refers to storing a large number of tracking curves of various object distances in a memory, and estimating a real trace by selecting a closest curve among the stored curves. The geometric method mainly comprises geometric zooming tracking GZT, adaptive zooming tracking AZT and simplified zooming tracking RZT; wherein, the geometric zoom tracking method GZT obtains the estimated value of the track curve by linear interpolation according to only two track curves of the near and far targets; the self-adaptive zoom tracking method AZT is an improved method of GZT, the method also stores two tracking curves of near object distance and far object distance, a position is selected to be used as a demarcation point of a linear region and a nonlinear region in the whole stroke of a zoom motor, when the zoom motor moves to the demarcation point in the zooming process, the zoom motor is suspended, and then a focusing and focusing algorithm is called to find the clearest point of an image at the position, so that the tracking error is reduced; the simplified zoom tracking method RZT is improved in terms of the difference between the table lookup method and the GZT method, is obviously improved in terms of the curve storage quantity compared with the table lookup method, and is superior to the GZT method in terms of tracking accuracy of a nonlinear region.
In the method for determining the zoom tracking curve, the predicted object distance is obtained by calculating the estimated value of the object distance, the depth of field is calculated based on the predicted object distance and the camera parameters, the search range of the zoom tracking curve is reduced, the zoom and focusing operations are performed according to the zoom tracking curve in the range, and the whole-course image definition can be ensured. In addition, the speed of determining the target zoom tracking curve is improved, the efficiency of determining the target zoom tracking curve is improved, and the focusing speed is improved.
In one embodiment, the determining the curve search range of the target zoom tracking curve from the imaging data includes: calculating a depth of field based on the camera parameters and the predicted object distance; and taking a corresponding preset zooming tracking curve set with the reference object distance within the depth of field as the curve searching range.
In particular, as shown in fig. 2, when the lens of the camera is focused clearly against an object, a fairly clear image can be formed on the film or receiver at a point on the same plane perpendicular to the lens axis where the center of the lens is located. Points in front of and behind this plane along the lens axis may also form clear image points that the eye can accept, and the distance of all scenes in front of and behind this plane is called the depth of field of the camera.
Before and after the focal point, the light starts to collect and spread, and the image of the point becomes blurred, forming an enlarged circle, called a circle of confusion. In reality, the image that is viewed and photographed is observed in some way (such as projection, zooming into a photograph, etc.), and the image perceived by the naked human eye has a great relationship with the magnification, the projection distance, and the viewing distance, and if the diameter of the circle of confusion is smaller than the discrimination capability of the human eye, the blur generated by the actual image cannot be recognized in a certain range. This unrecognizable circle of confusion is referred to as the allowable circle of confusion, permissible of confusion. There is one admissible circle of confusion in front of and behind the focus. The depth of field is calculated as follows:
front depth of field:
rear depth of field:
depth of field:
wherein delta is the diameter of a circle of confusion, F is the aperture value, F is the focal length, and L is the focusing distance, namely the sum of the estimated object distance and the image distance.
In one embodiment, the calculating the depth of field based on the camera parameters and the predicted object distance includes: and detecting whether the predicted object distance is within the depth of field, and if the predicted object distance is not within the depth of field, expanding the depth of field by adjusting the aperture size until the predicted object distance is within the depth of field.
Specifically, the distance of the aperture, the lens, and the subject is an important factor affecting the depth of field: as shown in fig. 3, the aperture size is inversely proportional to the depth of field. The larger the aperture, or the smaller the aperture value F, the shallower the depth of field; the smaller the aperture, or the larger the F-number of the aperture, the deeper the depth of field. The longer the lens focal length, the shallower the depth of field, and the farther the subject is, the deeper the depth of field. Limiting of a zoom tracking curve is performed by controlling the depth of field, and the aperture size is the most effective adjusting factor for controlling the depth of field. As shown in fig. 4, when the predicted object distance exceeds the depth of field range, the aperture can be properly adjusted to enlarge the depth of field range, so that the predicted object distance falls within the depth of field range, and the limit of the zooming and focusing processes is realized. When the predicted object distance is within the depth of field, the search range of the target zoom tracking curve is shown in fig. 5, the reference object distance corresponding to the preset zoom tracking curve from top to bottom is gradually increased along the vertical direction in fig. 5, and by determining the preset zoom tracking curve corresponding to the front depth of field and the preset zoom tracking curve corresponding to the rear depth of field, it can be determined that the target zoom tracking curve is located between the two preset zoom tracking curves, so that the curve search range of the target zoom tracking curve is reduced, and the search precision and the search efficiency of determining the target zoom tracking curve are improved.
In one embodiment, the determining the target zoom tracking curve based on the curve search range includes: acquiring a predicted search direction; switching a preset zooming tracking curve in the curve searching range according to the predicted searching direction; synchronously changing the zoom position according to the switching process of the preset zoom tracking curve, and calculating a corresponding focus evaluation value according to the real-time preset zoom tracking curve and the real-time zoom position; and determining a target tracking curve according to a plurality of the focusing evaluation values.
Specifically, the predictive search direction refers to a direction in which the target zoom tracking curve is found. After determining the curve search range, a search may be performed within the range according to a computer algorithm, for example, switching the target zoom tracking curves one by one according to the direction from near to far or from far to near of the reference object distance until the target zoom tracking curve with the highest focus evaluation value, i.e., FV value, is found, wherein the value characterizes the sharpness or contrast of the image. Preferably, the predicted search direction can also be adjusted frame by frame according to an algorithm, and the target zoom tracking curve can be found more quickly and accurately by adjusting the search direction and the zoom step length of each frame.
In one embodiment, the zoom tracking curve is switched within the determined depth limit range, so that the zoom tracking curve with the highest contrast is gradually approximated while the definition of the image is ensured, namely, the actual object distance of the photographed object is determined. Preferably, the concave-convex algorithm is adopted for approximation, the approximation process is as shown in fig. 6, when searching the highest position of definition, the mode of switching the zoom tracking curve is that after two continuous foreground or background direction searches, the search is needed to be reversed once, so that the concave-convex algorithm can be fully utilized, the concave-convex algorithm can complete one-time calculation only by two times of reverse searches, and the direction of the target zoom tracking curve is determined. In the algorithm execution process, as shown in fig. 7, since the depth of field is greatly affected by the magnification, the depth of field is rapidly reduced with the increase of the magnification of the camera, and thus the zoom step of each frame of the camera needs to be adjusted. As shown in fig. 8, the zoom step per frame, i.e., the zoom step, decreases rapidly and then slowly.
In one embodiment, the obtaining the predicted search direction includes: acquiring a first search direction in which a zoom motor moves from a previous two zoom positions to a previous zoom position; acquiring a second search direction in which the zoom motor moves from a previous zoom position to a current zoom position; and if the second search direction is the same as the first search direction, the predicted search direction is opposite to the second search direction.
In one embodiment, the obtaining the predicted search direction further includes: acquiring a current zoom position; and detecting whether the current zoom position is positioned at the edge of the depth of field, and if so, enabling the predicted search direction to be opposite to the second search direction. Specifically, the preset searching direction determining mode of the embodiment can ensure that the definition of the image in the whole searching process is within an acceptable range, and ensure that the whole process of the image in the zooming and focusing processes is clear.
In one embodiment, the obtaining the predicted search direction further includes: if the second search direction is opposite to the first search direction, acquiring a front two-zoom position, and calculating a front focus evaluation value corresponding to the front two-zoom position based on a first preset zoom tracking curve; acquiring a previous zoom position, selecting a second preset zoom tracking curve based on the object distance variation in the first search direction, and calculating a previous focus evaluation value corresponding to the previous zoom position; acquiring a current zoom position, selecting a third preset zoom tracking curve based on the object distance variation in the second search direction, and calculating a current focus evaluation value corresponding to the current zoom position; and determining the predicted searching direction according to the previous two-zoom position and the previous focusing evaluation value, the previous zoom position and the previous focusing evaluation value and the current zoom position and the current focusing evaluation value.
Specifically, the predictive search direction is determined by a concave-convex algorithm. As shown in fig. 9, the concave-convex 0 point is a point corresponding to the previous two zoom positions, the concave-convex 1 point is a point corresponding to the previous zoom position, and the concave-convex 2 point is a point corresponding to the current zoom position. Record P x A zoom position, namely a zoom position; v (V) x Is a focus evaluation value, i.e., FV value. According to the concave-convex 0 point and the concave-convex 2 point, the estimated FV value of the concave-convex 1 point can be estimated, and the estimated FV value has the following calculation formula:
wherein V is 1 meter Is the estimated FV value of the concave-convex 1 point, V 2 For the current focus evaluation value, V 0 For the pre-focusing evaluation value, P 2 P is the current focus position 0 For the front focal position, P 1 Is the previous focus position. After calculating to obtain the estimated FV value, the estimated FV value corresponding to the previous focusing position and the actual tested FV value V corresponding to the previous focusing position 1 practice of And comparing to determine the convexity and concavity of the current detection. Convexity as shown in FIGS. 9 and 10, V 1 practice of >V 1 meter Indicating that the search direction of the concave-convex 1 point is correct, the predicted search direction continues to proceed in the direction pointed by the concave-convex 1 point. Concavity as shown in FIGS. 11 and 12, V 1 practice of <V 1 meter The search direction of the concave-convex 1 point is shown to be wrong, and the predicted search direction proceeds in the opposite direction to the direction in which the concave-convex 1 point is pointed.
According to the concave-convex algorithm, the target zooming tracking curve can be continuously approximated, and finally the target zooming tracking curve is even hit near the target zooming tracking curve, so that the effect of clear whole course in the zooming tracking process is achieved.
In one embodiment thereof, as shown in fig. 13, there is provided a zoom tracking curve determination method including: and (5) auxiliary focusing to estimate the target object distance and calculating the depth of field range. If the depth of field range edge is reached, the next probing direction is opposite to the previous direction, and the probing direction refers to the direction pointed by the middle detection position among the three adjacent detection positions; if the previous searching direction is opposite to the next searching direction, the next probing direction is judged by the concave-convex algorithm, wherein the searching direction refers to the direction of the current detection position to be moved; if the two consecutive probing directions are consistent, the next probing direction is opposite to the previous direction.
According to the zoom tracking curve determining method, the object distance is estimated according to auxiliary focusing, the depth of field range is calculated, the object distance curve is adjusted steplessly in the depth of field range, and the image definition of zoom tracking is guaranteed. In addition, the concave-convex algorithm gradually approaches the actual object distance curve, so that the whole course in the zooming tracking process is ensured to be clear. In addition, the zoom tracking curve determining method is not only suitable for the field of video conferences, but also suitable for zoom lens control in the fields of security protection and the like.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a zoom tracking curve determining device for implementing the above-mentioned zoom tracking curve determining method. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiments of the zoom tracking curve determining apparatus provided below may be referred to the limitation of the zoom tracking curve determining method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 14, there is provided a zoom tracking curve determination apparatus including: an acquisition module 10, a calculation module 20 and a processing module 30, wherein:
an acquisition module 10 for acquiring imaging data of the camera, the imaging data comprising camera parameters and a predicted object distance.
The calculation module 20 is configured to calculate a depth of field based on the imaging data, and use a corresponding preset zoom tracking curve set with a reference object distance within the depth of field as a curve search range.
And the processing module 30 is used for searching the curve based on the curve searching range and determining a target zoom tracking curve.
The calculation module 20 is further configured to detect whether the predicted object distance is within the depth of field, and if the predicted object distance is not within the depth of field, enlarge the depth of field by adjusting the aperture size until the predicted object distance is within the depth of field.
The processing module 30 is further configured to obtain a predicted search direction; switching a preset zooming tracking curve according to the predicted searching direction; synchronously changing the zoom position according to the switching process of the preset zoom tracking curve, and calculating a corresponding focus evaluation value according to the real-time preset zoom tracking curve and the real-time zoom position; and determining a target tracking curve according to a plurality of the focusing evaluation values.
The processing module 30 is further configured to obtain a first search direction in which the zoom motor moves from the previous two zoom positions to the previous zoom position; acquiring a second search direction in which the zoom motor moves from a previous zoom position to a current zoom position; and if the second search direction is the same as the first search direction, the predicted search direction is opposite to the second search direction.
The processing module 30 is further configured to obtain a current zoom position; and detecting whether the current zoom position is positioned at the edge of the depth of field, and if so, enabling the predicted search direction to be opposite to the second search direction.
The processing module 30 is further configured to obtain a front two-zoom position if the second search direction is opposite to the first search direction, and calculate a front focus evaluation value corresponding to the front two-zoom position based on a first preset zoom tracking curve; acquiring a previous zoom position, selecting a second preset zoom tracking curve based on the object distance variation in the first search direction, and calculating a previous focus evaluation value corresponding to the previous zoom position; acquiring a current zoom position, selecting a third preset zoom tracking curve based on the object distance variation in the second search direction, and calculating a current focus evaluation value corresponding to the current zoom position; and determining the predicted searching direction according to the previous two-zoom position and the previous focusing evaluation value, the previous zoom position and the previous focusing evaluation value and the current zoom position and the current focusing evaluation value.
The respective modules in the above-described zoom tracking curve determination apparatus may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 15. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a zoom tracking curve determination method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 15 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application is applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
acquiring imaging data of a camera, wherein the imaging data comprises camera parameters and predicted object distances;
calculating a depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with a reference object distance within the depth of field as a curve searching range;
and performing curve searching based on the curve searching range to determine a target zoom tracking curve.
In one embodiment, there is also provided a computer device including a memory and a processor, the memory storing a computer program, the processor implementing the steps of the method embodiments described above when the program is executed.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring imaging data of a camera, wherein the imaging data comprises camera parameters and predicted object distances;
calculating a depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with a reference object distance within the depth of field as a curve searching range;
and performing curve searching based on the curve searching range to determine a target zoom tracking curve.
In an embodiment the computer program is further adapted to implement the steps of the method embodiments described above when executed by a processor.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
acquiring imaging data of a camera, wherein the imaging data comprises camera parameters and predicted object distances;
calculating a depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with a reference object distance within the depth of field as a curve searching range;
and performing curve searching based on the curve searching range to determine a target zoom tracking curve.
In an embodiment, the computer program, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A zoom tracking curve determination method, the method comprising:
acquiring imaging data of a camera, wherein the imaging data comprises camera parameters and predicted object distances;
calculating a depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with a reference object distance within the depth of field as a curve searching range;
and performing curve searching based on the curve searching range to determine a target zoom tracking curve.
2. The method of claim 1, wherein the calculating a depth of field based on the camera parameters and the predicted object distance comprises:
and detecting whether the predicted object distance is within the depth of field, and if the predicted object distance is not within the depth of field, expanding the depth of field by adjusting the aperture size until the predicted object distance is within the depth of field.
3. The method of claim 1, wherein the determining a target zoom tracking curve based on the curve search range comprises:
acquiring a predicted search direction;
switching a preset zooming tracking curve in the curve searching range according to the predicted searching direction;
synchronously changing the zoom position according to the switching process of the preset zoom tracking curve, and calculating a corresponding focus evaluation value according to the real-time preset zoom tracking curve and the real-time zoom position;
and determining a target tracking curve according to a plurality of the focusing evaluation values.
4. The method of claim 3, wherein the obtaining a predicted search direction comprises:
acquiring a first search direction in which a zoom motor moves from a previous two zoom positions to a previous zoom position;
acquiring a second search direction in which the zoom motor moves from a previous zoom position to a current zoom position;
and if the second search direction is the same as the first search direction, the predicted search direction is opposite to the second search direction.
5. The method of claim 4, wherein the obtaining a predicted search direction further comprises:
acquiring a current zoom position;
and detecting whether the current zoom position is positioned at the edge of the depth of field, and if so, enabling the predicted search direction to be opposite to the second search direction.
6. The method of claim 4, wherein the obtaining a predicted search direction further comprises:
if the second search direction is opposite to the first search direction, acquiring a front two-zoom position, and calculating a front focus evaluation value corresponding to the front two-zoom position based on a first preset zoom tracking curve;
acquiring a previous zoom position, selecting a second preset zoom tracking curve based on the object distance variation in the first search direction, and calculating a previous focus evaluation value corresponding to the previous zoom position;
acquiring a current zoom position, selecting a third preset zoom tracking curve based on the object distance variation in the second search direction, and calculating a current focus evaluation value corresponding to the current zoom position;
and determining the predicted searching direction according to the previous two-zoom position and the previous focusing evaluation value, the previous zoom position and the previous focusing evaluation value and the current zoom position and the current focusing evaluation value.
7. A zoom tracking curve determination apparatus, the apparatus comprising:
the acquisition module is used for acquiring imaging data of the camera, wherein the imaging data comprise camera parameters and predicted object distances;
the calculation module is used for calculating the depth of field based on the imaging data, and taking a corresponding preset zooming tracking curve set with the reference object distance within the depth of field as a curve searching range;
and the processing module is used for carrying out curve search based on the curve search range and determining a target zoom tracking curve.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310328382.XA 2023-03-27 2023-03-27 Zoom tracking curve determination method, apparatus, computer device and storage medium Pending CN116567412A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310328382.XA CN116567412A (en) 2023-03-27 2023-03-27 Zoom tracking curve determination method, apparatus, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310328382.XA CN116567412A (en) 2023-03-27 2023-03-27 Zoom tracking curve determination method, apparatus, computer device and storage medium

Publications (1)

Publication Number Publication Date
CN116567412A true CN116567412A (en) 2023-08-08

Family

ID=87490529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310328382.XA Pending CN116567412A (en) 2023-03-27 2023-03-27 Zoom tracking curve determination method, apparatus, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN116567412A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117097984A (en) * 2023-09-26 2023-11-21 武汉华工激光工程有限责任公司 Camera automatic focusing method and system based on calibration and compound search

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117097984A (en) * 2023-09-26 2023-11-21 武汉华工激光工程有限责任公司 Camera automatic focusing method and system based on calibration and compound search
CN117097984B (en) * 2023-09-26 2023-12-26 武汉华工激光工程有限责任公司 Camera automatic focusing method and system based on calibration and compound search

Similar Documents

Publication Publication Date Title
CN108076286B (en) Image blurring method and device, mobile terminal and storage medium
US10848680B2 (en) Zooming control apparatus, image capturing apparatus and control methods thereof
US9521311B2 (en) Quick automatic focusing method and image acquisition apparatus
US9998650B2 (en) Image processing apparatus and image pickup apparatus for adding blur in an image according to depth map
CN107258077B (en) System and method for Continuous Auto Focus (CAF)
KR101643607B1 (en) Method and apparatus for generating of image data
JP4990234B2 (en) Ranging device, ranging method, ranging program or imaging device
KR101560866B1 (en) Viewpoint detector based on skin color area and face area
US8233078B2 (en) Auto focus speed enhancement using object recognition and resolution
JP6091228B2 (en) Image processing apparatus and imaging apparatus
US10324268B2 (en) Method of performing autofocus, autofocus system, and camera comprising an autofocus module
JP6157249B2 (en) Imaging apparatus, distance information acquisition method, and program
CN108710192B (en) Automatic focusing system and method based on statistical data
KR101784787B1 (en) Imaging device and method for automatic focus in an imaging device as well as a corresponding computer program
CN113572958B (en) Method and equipment for automatically triggering camera to focus
CN116567412A (en) Zoom tracking curve determination method, apparatus, computer device and storage medium
CN111491105B (en) Focusing method of mobile terminal, mobile terminal and computer storage medium
JP6645711B2 (en) Image processing apparatus, image processing method, and program
JP5454392B2 (en) Ranging device and imaging device
CN111641782B (en) Control method and device for image pickup apparatus, storage medium, and electronic device
CN111726513A (en) Zooming method and device of imaging equipment and imaging equipment
CN115514895B (en) Image anti-shake method, apparatus, electronic device, and computer-readable storage medium
CN114979472B (en) Automatic focusing method, device, equipment and readable storage medium
CN116804788A (en) Automatic focusing method, automatic focusing device, computer equipment and computer readable storage medium
CN116437203A (en) Automatic focusing method and device, storage medium and monitoring equipment

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