WO2021207945A1 - 对焦控制方法、装置、设备、可移动平台和存储介质 - Google Patents

对焦控制方法、装置、设备、可移动平台和存储介质 Download PDF

Info

Publication number
WO2021207945A1
WO2021207945A1 PCT/CN2020/084800 CN2020084800W WO2021207945A1 WO 2021207945 A1 WO2021207945 A1 WO 2021207945A1 CN 2020084800 W CN2020084800 W CN 2020084800W WO 2021207945 A1 WO2021207945 A1 WO 2021207945A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
area
contrast
region
focus
Prior art date
Application number
PCT/CN2020/084800
Other languages
English (en)
French (fr)
Inventor
韩守谦
郑子翔
胡涛
Original Assignee
深圳市大疆创新科技有限公司
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 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN202080004951.XA priority Critical patent/CN112640425A/zh
Priority to PCT/CN2020/084800 priority patent/WO2021207945A1/zh
Publication of WO2021207945A1 publication Critical patent/WO2021207945A1/zh

Links

Images

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
    • 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/673Focus control based on electronic image sensor signals based on contrast or high frequency components of image signals, e.g. hill climbing method

Definitions

  • the embodiments of the present invention relate to the field of cameras, and in particular, to a focus control method, device, equipment, movable platform, and storage medium.
  • Contrast Detection Auto Focus is a commonly used focusing method in the prior art. Through contrast focusing, autofocus of the camera can be realized, eliminating the user's manual focusing process and providing convenience for the user.
  • the contrast focus algorithm provides a variety of filters. For the current shooting scene, you can select an appropriate filter, and use the selected filter to filter the captured image to obtain multiple.
  • the contrast of the area the contrast of each area can be used to indicate the clarity of the area. With the continuous change of the lens position, the contrast of each area is also constantly changing, and the focusing process can be completed according to the change of the contrast of the area.
  • the disadvantage of the existing technology is that if there are interfering objects in the captured image, such as white walls, glass, sky, etc., because these objects are relatively large or relatively close, it is possible to use existing focusing algorithms. It will focus on these objects, leading to misfocusing and reducing focusing efficiency and accuracy.
  • the embodiments of the present invention provide a focus control method, device, equipment, movable platform, and storage medium to solve the technical problems of low focus efficiency and accuracy in the prior art.
  • the first aspect of the embodiments of the present invention provides a focus control method, including:
  • a second aspect of the embodiments of the present invention provides a focus control method, including:
  • focus processing is performed with the slender object as a target.
  • a third aspect of the embodiments of the present invention provides a focus control device, including:
  • Memory used to store computer programs
  • the processor is configured to run a computer program stored in the memory to realize:
  • a fourth aspect of the embodiments of the present invention provides a focus control device, including:
  • Memory used to store computer programs
  • the processor is configured to run a computer program stored in the memory to realize:
  • focus processing is performed with the slender object as a target.
  • a fifth aspect of the embodiments of the present invention provides a focus control device, including:
  • the first image acquisition circuit is configured to acquire multiple frames of images to be processed, and the multiple frames of images to be processed include multiple frames of images taken by the lens during the movement of the focus motor;
  • the first determining circuit is used to determine whether there is an object in the multi-frame image to be processed, and whether the relative contrast of the image area corresponding to the object meets a preset condition; wherein, the relative contrast is based on the comparison of at least one filter. Determined by the output result obtained by filtering the image area corresponding to the object;
  • the first focusing processing circuit is configured to perform focusing processing on the image area corresponding to the object when the relative contrast of the image area corresponding to the object satisfies a preset condition.
  • a sixth aspect of the embodiments of the present invention provides a focus control device, including:
  • the second image acquisition circuit is configured to acquire multiple frames of images to be processed, and the multiple frames of images to be processed include multiple frames of images taken by the lens during the movement of the focus motor;
  • the second focusing processing circuit is configured to perform focusing processing with the elongated object as a target when there is an elongated object in the image to be processed, and the elongated object meets a preset requirement.
  • a seventh aspect of the embodiments of the present invention provides a photographing device including the focus control device described in the third aspect.
  • An eighth aspect of an embodiment of the present invention provides a photographing device, including the focus control device described in the fourth aspect.
  • a ninth aspect of the embodiments of the present invention provides a movable platform, including the photographing device described in the seventh aspect.
  • a tenth aspect of the embodiments of the present invention provides a movable platform, including the photographing device described in the eighth aspect.
  • An eleventh aspect of the embodiments of the present invention provides a computer-readable storage medium having program instructions stored in the computer-readable storage medium, and the program instructions are used to implement the focus control method described in the first aspect.
  • a twelfth aspect of the embodiments of the present invention provides a computer-readable storage medium having program instructions stored in the computer-readable storage medium, and the program instructions are used to implement the focus control method described in the second aspect.
  • the focusing control method, device, equipment, movable platform and storage medium provided by the embodiments of the present invention can effectively improve the efficiency and accuracy of focusing.
  • FIG. 1 is a schematic flowchart of a focus control method according to Embodiment 1 of the present invention
  • FIG. 2 is a first schematic diagram of a contrast curve corresponding to multiple frames of images in the focus control method according to the first embodiment of the present invention
  • FIG. 3 is a second schematic diagram of a contrast curve corresponding to multiple frames of images in a focus control method according to the first embodiment of the present invention
  • FIG. 4 is a first schematic diagram of a contrast curve obtained through multiple filters in the focus control method provided by the first embodiment of the present invention
  • FIG. 5 is a second schematic diagram of a contrast curve obtained through multiple filters in the focus control method provided in the first embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of a focus control method according to Embodiment 2 of the present invention.
  • FIG. 7 is a schematic flowchart of a focus control method according to Embodiment 3 of the present invention.
  • FIG. 8 is a schematic flowchart of a focus control method according to Embodiment 4 of the present invention.
  • FIG. 9 is a schematic flowchart of a focus control method according to Embodiment 5 of the present invention.
  • FIG. 10 is a schematic flowchart of a focus control method according to Embodiment 6 of the present invention.
  • FIG. 11 is a schematic structural diagram of a focus control device according to Embodiment 7 of the present invention.
  • FIG. 12 is a schematic structural diagram of a focus control device according to Embodiment 8 of the present invention.
  • FIG. 13 is a schematic structural diagram of a focus control device according to Embodiment 9 of the present invention.
  • FIG. 14 is a schematic structural diagram of a focus control device according to Embodiment 10 of the present invention.
  • FIG. 1 is a schematic flowchart of a focus control method according to Embodiment 1 of the present invention. As shown in FIG. 1, the focus control method in this embodiment may include:
  • Step 101 Acquire multiple frames of images to be processed, where the multiple frames of images to be processed include multiple frames of images taken by the lens during the movement of the focus motor.
  • the execution subject of the focus control method in this embodiment may be a focus control device in a shooting device
  • the shooting device may be any device with shooting function such as a camera
  • the focus control device may be implemented as software, hardware, or software and The combination of hardware.
  • the photographing device may include a lens, a focus motor, an image sensor, etc.
  • the light reflected by an object passes through the lens and then condenses on the image sensor.
  • the image sensor converts the light signal into an electrical signal to form a image.
  • the focus motor may include a drive component such as a drive shaft for driving the lens to move.
  • the movement of the focus motor in each embodiment of the present invention may refer to the movement of the drive component of the focus motor.
  • the focusing motor can drive the lens to move, thereby changing the object distance, resulting in continuous changes in the sharpness of the object being photographed in the image.
  • the movable range of the lens can be determined by the stroke of the focus motor.
  • the object in the captured image usually undergoes a process from blurry to clear to blurry, where the position of the lens when the object is clearest can be regarded as the in-focus position.
  • multiple frames of images may be taken as the images to be processed through the lens during the movement of the focus motor, where the multiple frames of images may be all the images taken within the movable range of the focus motor, or among them Part of the image.
  • Step 102 Determine whether there is an object in the multiple frames of images to be processed, and whether the relative contrast of the image area corresponding to the object meets a preset condition; wherein, the relative contrast is based on at least one filter corresponding to the object
  • the image area is determined by the output result of filtering processing.
  • the existence of a certain object in the image mentioned in the embodiments of the present invention may refer to the existence of an image area corresponding to the object in the image. It is understandable that judging whether there is an object whose relative contrast satisfies the preset condition in the image can be realized by judging whether there is an area in the image whose relative contrast satisfies the preset condition.
  • the calculation of the relative contrast can be implemented based on the contrast.
  • the contrast of each area in the image to be processed can be determined through operations such as filtering processing.
  • the contrast can be used to indicate the degree of clarity.
  • the change in contrast between different frames of images reflects the change in definition of the region. In a certain frame of image, the greater the contrast of the region, it means that The object is clearer in this frame of image.
  • the shooting screen may be divided into multiple regions, assuming that it is divided into n*m regions, divided into n rows in the vertical direction, and m columns in the horizontal direction.
  • Each area includes multiple pixels.
  • each frame of image captured includes N*M pixels, there can be (N/n)*(M/m) pixels in each area.
  • each frame of image can be divided into multiple regions according to the same segmentation method, for example, divided into n*m regions according to the above-mentioned method.
  • the same Regions can correspond to different contrasts in different frames of images.
  • each frame of image can be filtered, and the gradient value corresponding to each pixel in the image can be obtained after filtering.
  • the area can be calculated For example, the gradient value corresponding to each pixel in the area can be accumulated to obtain the contrast of the area.
  • the region division method may not be preset.
  • the captured image may be semantically segmented, or the contour of the object in the image may be recognized, and the result of semantic segmentation may be used or
  • the contour recognition result can identify the area where each object is located, and calculate the contrast of the area corresponding to each object.
  • the contrast corresponding to each region in the image can be obtained for each frame of image.
  • the recognition result corresponding to the region in the multi-frame image can be obtained, that is, the multiple contrasts corresponding to the region in the multi-frame image.
  • the relative contrast of the area can be determined according to the contrast corresponding to the area, and it is determined whether the relative contrast of the area meets a preset condition.
  • the relative contrast of the area may refer to the relative value between at least two contrasts in the plurality of contrasts corresponding to the area, the relative value may be a ratio or a difference, and at least two corresponding to the area
  • the contrast may be the contrast of the region in different images, or the contrast obtained through different filters, and the like.
  • the relative contrast satisfies the preset condition may include: the contrast change of the corresponding image area of the object between the frames of the image satisfies the first preset condition, and/or, the object is in each frame of the image The changes between the multiple contrasts obtained by filtering the corresponding image area through multiple filters satisfy the second preset condition.
  • that the relative contrast satisfies the preset condition may include: the contrast change of the corresponding image area of the object between the frames of the images satisfies the first preset condition.
  • whether the contrast change satisfies the first preset condition can be judged by the ratio or difference between the multiple contrasts of the region, for example, in the multiple contrasts, each contrast is divided by the next contrast , Thereby obtaining multiple ratios, and judging whether the contrast change satisfies the first preset condition by the magnitude of the ratio.
  • the corresponding contrast of the region in each frame of image may be connected into a curve, and whether the contrast change satisfies the first preset condition is determined by the shape of the contrast curve.
  • the first preset condition may be that the curvature or slope of the contrast curve is within a preset range, where the curvature or slope of the contrast curve may refer to a point in the contrast curve, or The curvature or slope corresponding to a segment of a curve, or the entire curve.
  • an ideal contrast curve can also be set in advance, and whether the block satisfies the first preset condition is determined according to the difference between the contrast curve of the block and the ideal contrast curve, and the contrast of the block
  • the difference between the curve and the ideal contrast curve can be represented by the area of the closed region between the contrast curve of the block and the ideal contrast curve.
  • FIG. 2 is a first schematic diagram of a contrast curve corresponding to multiple frames of images in the focus control method according to the first embodiment of the present invention.
  • 3 is a second schematic diagram of a contrast curve corresponding to multiple frames of images in a focus control method according to the first embodiment of the present invention.
  • the horizontal axis is the serial number of the image, different serial numbers correspond to different focus motor positions, and the vertical axis is the contrast corresponding to the area.
  • the contrast curve shown in FIG. 2 has only one peak, and both sides of the peak are relatively steep. According to the contrast curve, focusing can be achieved quickly and accurately. Therefore, the contrast curve shown in FIG. 2 can be used as an ideal contrast curve.
  • both sides of the main peak are not steep enough, and there are many fluctuations in the curve. These fluctuations may cause focus failure. Therefore, it is necessary to set at least one preset condition, which is based on ideal The shape of the contrast curve is determined. By judging whether the actually obtained contrast curve satisfies the preset condition, the degree of difference between the actually obtained contrast curve and the ideal contrast curve is determined, so as to predict whether the degree of difference will cause focus failure. .
  • the contrast curve of the corresponding image area of the object of interest may be calibrated first. In this way, the calibrated contrast curve of the corresponding image area of the object of interest can be approximated as an ideal contrast curve. Then, at least one preset condition regarding the contrast difference or the relative contrast difference is determined according to the calibrated contrast curve of the corresponding image area of the object of interest. By judging whether the contrast curve actually obtained in an image area meets this preset condition, the degree of difference between the contrast curve actually obtained in the image area and the contrast curve of the corresponding image area of the calibrated object of interest is determined, and Predict whether the image area contains the object of interest. If the degree of difference meets the preset condition, the object of interest exists in the image area in the corresponding image.
  • the contrast change of the region between the frames of the images does not meet the first preset condition, it means that the sharpness of the region does not change significantly during the movement of the focus motor, and the region may not be suitable for focusing. , You can discard the area at this time and don't focus on the area. If the contrast change of the region between the frames of the images meets the first preset condition, indicating that the sharpness of the region changes better during the movement of the focusing motor, then the focusing operation can be performed according to the region.
  • the region can be discarded and focus is not performed on the region.
  • the relative contrast satisfying the preset condition may include: the change between the multiple contrasts obtained by filtering the corresponding image area of the object in each frame of the image through multiple filters satisfies the first 2. Preset conditions.
  • multiple filters may be used to filter the image respectively, and after each filter is processed, the contrast of multiple regions in the image may be obtained. Then, for each area in the image, if there are K filters to process the image, then K contrasts of the area can be obtained.
  • the K contrasts can be sorted according to the center frequency of the filter. To determine whether the change in the contrast of the region obtained through multiple filters meets the realization principle of the first preset condition, you can refer to the above-mentioned determining whether the change in the contrast between the images of the region meets the second The realization principle of the preset condition.
  • each contrast can be divided by the next contrast to obtain multiple ratios, so as to determine whether the contrast change satisfies the second preset condition based on the magnitude of the ratio.
  • the contrast obtained through multiple filters may be connected into a curve, and the contrast curve can be used to determine whether the contrast change satisfies the second preset condition.
  • FIG. 4 is a first schematic diagram of a contrast curve obtained through multiple filters in the focus control method provided by the first embodiment of the present invention.
  • FIG. 5 is a second schematic diagram of a contrast curve obtained through multiple filters in the focus control method provided in the first embodiment of the present invention.
  • the horizontal axis is the center frequency of the filter, the center frequency may be a normalized center frequency, and the vertical axis is the contrast corresponding to the area.
  • the contrast curve shown in Figure 4 As the frequency increases, the contrast also increases, indicating that the region has more high-frequency components and richer texture details, which is an area that users will be interested in. Therefore, the contrast The curve may be a contrast curve that satisfies the second preset condition.
  • the contrast obtained by the filters of each frequency band does not change significantly, indicating that the texture details of the region are not rich, and it is not the region that is of interest to the user. Therefore, the contrast curve can be regarded as non-existent. Meet the second preset requirement.
  • the relative contrast satisfying the preset condition may include: the contrast change of the area between the frames of the image satisfies the first preset condition, and the area is in each frame of the image.
  • the changes between the multiple contrasts obtained by filtering through the multiple filters satisfy the second preset condition.
  • the first preset condition and the second preset condition may be the same or different.
  • Step 103 If the relative contrast of the image area corresponding to the object meets a preset condition, perform focusing processing on the image area corresponding to the object.
  • focus processing may be performed according to the area whose relative contrast satisfies the preset condition.
  • the focusing processing may refer to controlling the focusing motor to drive the lens to move to the focusing position.
  • the focus motor may be controlled to drive the lens to move to the focus position corresponding to the object.
  • the area that meets the preset condition is used as the target area for focusing processing; if there are multiple areas that meet the preset condition, one area is selected from the multiple areas Perform focus processing as the target area.
  • the selected strategy can be set according to actual needs. For example, a region in the foreground can be selected as the target region from among the multiple regions that meet the preset conditions, or the target region can be determined according to semantic segmentation and other methods.
  • Category select an area from the category as the target area, for example, you can select the face area as the target area.
  • the lens can be controlled to move to the focus position corresponding to the target area, that is, the position where the lens is located when the target area is clearest, so as to complete the focusing operation.
  • Filtering based on the relative contrast between multiple frames of images can filter out the areas where the contrast between each frame of the image is not obvious, improve the accuracy and efficiency of focusing, and filter based on the relative contrast between multiple filters. Filters out areas that are not rich in texture, effectively preventing misfocusing.
  • the method in this embodiment can be applied to the CDAF algorithm or other focusing algorithms.
  • the relatively poor contrast can be processed.
  • Objects are filtered out to avoid focusing on interfering objects, and focus is only performed on objects whose relative contrast meets the preset conditions.
  • the relative contrast of the image area corresponding to the glass, the wall, and the sky does not meet the preset condition.
  • Glass, walls, and sky are not only objects with insignificant changes in contrast between multiple frames of images, but also objects with insignificant changes in contrast obtained through multiple filters. Therefore, the image areas corresponding to glass, walls, and sky belong to relative In the image area where the contrast does not meet the preset conditions, when there are glass, wall, and sky in the shooting picture, you can focus on objects other than the glass, wall, and sky to improve the efficiency and accuracy of focusing.
  • the focus control method provided in this embodiment can acquire multiple frames of images to be processed, and the multiple frames of images to be processed include multiple frames of images taken by the lens during the movement of the focus motor, and it is determined that among the multiple frames of images to be processed Whether there is an object, whether the relative contrast of the image area corresponding to the object satisfies a preset condition, wherein the relative contrast is determined based on the output result obtained by filtering the image area corresponding to the object by at least one filter If the relative contrast of the image area corresponding to the object satisfies the preset condition, focus processing is performed on the image area corresponding to the object, and the area in the image can be filtered by the relative contrast, and the relative contrast is not satisfied.
  • the area with preset conditions avoids focusing on objects with relatively poor contrast, and improves the efficiency and accuracy of focusing.
  • each region is determined separately Whether the relative contrast of each area meets the third preset condition; if there is an area whose relative contrast meets the third preset condition, it is determined that there is an object in the multi-frame image to be processed, and the relative contrast of the image area corresponding to the object The contrast satisfies the preset condition.
  • performing focusing processing on the image area corresponding to the object may include: focusing on the area meeting the third preset condition deal with.
  • the third preset condition can be designed according to actual needs, and the second embodiment and the third embodiment are taken as examples for description below.
  • the second embodiment of the present invention provides a focus control method.
  • the region is scored according to the contrast obtained through multiple filters, and it is determined whether the relative contrast of the region meets the third preset condition according to the scoring result.
  • FIG. 6 is a schematic flowchart of a focus control method according to Embodiment 2 of the present invention. As shown in FIG. 6, the focus control method in this embodiment may include:
  • Step 601 Acquire multiple frames of images to be processed, where the multiple frames of images to be processed include multiple frames of images taken by the lens during the movement of the focus motor.
  • step 601 the specific implementation principle and process of step 601 can be referred to the foregoing embodiment, which will not be repeated here.
  • Step 602 Perform the following processing on each frame of image to be processed: filter the image through multiple filters to obtain the contrast collection of each of the multiple areas of the image, wherein the contrast of each area The collection includes the contrast of the region obtained after filtering the image through each filter of the plurality of filters.
  • step 602 it is possible to determine the recognition result of multiple regions in the image according to the image to be processed, and the recognition result includes the corresponding contrast of the region in each frame of the image.
  • each frame of image can be divided into 100 areas, and 2 filters can be designed to filter the image.
  • the recognition results corresponding to 100 regions can be obtained, where the recognition result of each region can include the contrast collection corresponding to 40 frames of images, and the contrast collection corresponding to each frame image includes 2 filters. Contrast. That is, the recognition result of each area can include 80 contrasts.
  • Step 603 For each frame of image, score each area according to the contrast set of the multiple areas in the image.
  • Step 604 For each area, determine whether the relative contrast of the area meets the third preset condition according to the score of the area in each frame of the image.
  • step 603 and step 604 it is possible to separately determine whether the relative contrast of each region meets the third preset condition according to the recognition results of the multiple regions.
  • the third preset condition may be that the comprehensive score of the region is greater than a first threshold, and the comprehensive score may be determined according to the score of the region in each frame of image.
  • the score of the region in each frame of image can be determined by the contrast obtained by different filters.
  • scoring each region according to the contrast collection of the multiple regions in the image may include: for each region, in the contrast collection corresponding to the region, according to each contrast The gap between the scoring of the area.
  • the larger the gap between the contrasts the higher the score of the region.
  • the gap can be expressed as a difference and/or a ratio.
  • the plurality of filters may include a high-frequency filter (high-pass filter) and a low-frequency filter (low-pass filter).
  • the high-frequency filter can allow high-frequency signals to pass
  • the low-frequency filter can allow low-frequency signals. pass through.
  • scoring each region according to a collection of contrasts of the multiple regions in the image may include: for each region, respectively performing filtering processing using the high-frequency filter and the low-frequency filter And scoring the region according to the ratio of the contrast obtained by the high-frequency filter and the contrast obtained by the low-frequency filter.
  • the larger the ratio the more high-frequency signals in the area, so the score can be higher, and the smaller the ratio, the less high-frequency signals in the area, and therefore the lower the score.
  • the score of the region in each frame of image can be obtained, and the score corresponding to each frame can indicate the relative contrast of the region in the frame of image.
  • the score can be based on the The scoring of the region in each frame of image comprehensively determines whether the relative contrast of the region meets the third preset condition.
  • the comprehensive score of the region may be determined according to the score of the region in each frame of image, and if the comprehensive score is greater than a first threshold, it is determined that the relative contrast of the region satisfies a third preset condition.
  • the scores of the region in 40 frames of images can be accumulated to obtain the comprehensive score of the region, and from 100 regions, the region with the comprehensive score higher than the first threshold is selected as the region that satisfies the third preset condition . There may be one or more regions with a comprehensive score higher than the first threshold.
  • Step 605 Perform focus processing on the area that meets the third preset condition.
  • the area that meets the third preset condition is used as the target area for focusing processing; if there are multiple areas that meet the third preset condition, select from multiple areas Select an area as the target area for focus processing.
  • the focus motor may be controlled to drive the lens to move to a focus position corresponding to the area.
  • the image can be processed by multiple filters, and the contrast of each area in the image can be obtained through each filter. For each area, the ratio between the contrasts obtained by the multiple filters can be obtained. Or the difference, the area can be scored, so as to filter out the area that does not meet the third preset condition.
  • the focusing operation may be implemented according to the output result of any one of the filters.
  • the corresponding filter may be selected according to the current scene, and the specific implementation principle of the focus operation by selecting the filter according to the scene belongs to the prior art, and will not be repeated in this embodiment.
  • the image is filtered through multiple filters to obtain the contrast collection of each of the multiple regions of the image, and according to the contrast collection of the multiple regions in the image, Score each area, and for each area, determine whether the relative contrast of the area meets the third preset condition according to the score of the area in each frame of the image, and can quickly determine the contrast obtained by multiple filters Whether the area meets the third preset condition, and focus is performed on the area meeting the third preset condition, so as to preferentially focus on objects with rich textures, and effectively improve the accuracy of focusing.
  • the third embodiment of the present invention provides a focus control method.
  • the region is scored based on the contrast change between the images of each frame, and it is determined whether the relative contrast of the region meets the third preset condition according to the scoring result.
  • FIG. 7 is a schematic flowchart of a focus control method according to Embodiment 3 of the present invention. As shown in FIG. 7, the focus control method in this embodiment may include:
  • Step 701 Acquire multiple frames of images to be processed, where the multiple frames of images to be processed include multiple frames of images taken by the lens during the movement of the focus motor.
  • Step 702 Determine the recognition results of multiple regions in the image according to the image to be processed, where the recognition result of each region includes the corresponding contrast of the region in each frame of the image.
  • step 701 to step 702 for the specific implementation principles and processes of step 701 to step 702, reference may be made to the above-mentioned embodiment, which will not be repeated here.
  • the recognition result described in step 702 may include the contrast obtained through any one of the filters.
  • the filter may be a filter corresponding to the current scene, that is, the recognition result obtained by the filter may be a recognition result used as a basis for determining the focus position during a focusing operation.
  • Step 703 For each area, determine the contrast curve of the area during the movement of the focus motor according to the contrast of the area in each frame of the image.
  • the frame number of the image is taken as the abscissa
  • the frame number can represent the position of the focus motor
  • the contrast of the block is taken as the ordinate to form a contrast curve.
  • Step 704 For each area, determine whether the relative contrast of the area meets the third preset condition according to the contrast curve of the area.
  • step 703 to step 704 it is possible to determine whether the relative contrast of each region meets the third preset condition according to the recognition results of the multiple regions.
  • the third preset condition may be that the score of the region is greater than a second threshold, and the score may be determined according to the number of peaks and/or the size of the peaks of the contrast curve of the region.
  • the peak value of the contrast curve may be determined first, and then the peak value of the contrast curve may be determined according to the peak value of the contrast curve. Whether the relative contrast of the area meets the third preset condition.
  • An ideal contrast curve is that the curve has only one peak, and the left side of the peak increases monotonously, and the right side of the peak decreases monotonously. Therefore, it can be determined whether the region meets the third preset condition according to the number of peaks and the size of the peaks of the contrast curve.
  • judging whether the relative contrast of the region satisfies a third preset condition according to the peak value of the contrast curve may include: scoring the region according to the number of peaks and/or the size of the peaks of the contrast curve According to the score of the region, determine whether the relative contrast of the region meets a third preset condition; if the score of the region is greater than a threshold, the relative contrast of the region meets the third preset condition.
  • scoring the region according to the number of peaks of the contrast curve may include: determining a mapping table about the correspondence between the number of peaks and the score; according to the number of peaks of the contrast curve, in the mapping table Determine the scoring value of the area in. The greater the number of peaks of the contrast curve, the lower the score of the region.
  • the mapping table can quickly and accurately realize the scoring of the area and improve the efficiency of focusing.
  • the focus motor can easily use the position corresponding to the peak as the focus position. The more the number of peaks, the greater the focus error may be. Big.
  • scoring the region may include: if there are multiple peaks of the contrast curve, determining the main peak according to the size of each peak; determining the effective value from the peaks other than the main peak The peak value, wherein the effective peak value is a peak value whose ratio to the main peak peak value exceeds a preset value; and the score of the region is determined according to the number of effective peak values in the contrast curve. The more effective peaks in the contrast curve, the lower the score of the region.
  • the preset value may be 80%, and the position with the largest peak in the contrast curve is the main peak.
  • the main peak peak there may be other peaks. If the other peaks are greater than 80% of the main peak peak, it is the effective peak.
  • the number of effective peaks will also affect the focusing effect. If there are more effective peaks in the contrast curve corresponding to a certain image area, it means that it is difficult to give an absolute dominant focus position through changes in contrast. The score will not be too high.
  • Step 705 Perform focus processing on the area that meets the third preset condition.
  • the contrast curve of the area during the movement of the focus motor is determined, and according to the contrast curve, according to the The number of peaks and/or the size of the peaks of the contrast curve, determine whether the relative contrast of the area meets the third preset condition, and focus on the area meeting the third preset condition, which can prioritize focusing on the contrast changes between different frames of images Obvious objects, effectively improve the efficiency of focusing.
  • the focus operation can be performed through the connected domain.
  • performing focus processing on the area meeting the third preset condition may include: determining the area meeting the third preset condition according to a recognition result of the area meeting the third preset condition The focus position corresponding to each area in the, at least one connected domain is determined according to the focus position corresponding to each area; if there is a connected domain that meets the third preset condition, then the connected domain is the The image area where the object is located, and the object is an object contained in the connected domain; wherein, if the focus positions of any two adjacent areas are the same or the distance between the focus positions of any two adjacent areas If the distance is less than the preset distance, the two areas belong to the same connected domain.
  • the fourth embodiment of the present invention provides a focus control method. This embodiment can realize the focus control process for the elongated object.
  • FIG. 8 is a schematic flowchart of a focus control method according to Embodiment 4 of the present invention. As shown in FIG. 8, the focus control method in this embodiment may include:
  • Step 801 Acquire multiple frames of images to be processed, where the multiple frames of images to be processed include multiple frames of images taken by the lens during the movement of the focus motor.
  • Step 802 If there is a slender object in the image to be processed, and the slender object meets a preset requirement, focus processing is performed on the slender object as a target.
  • the slender object after the image to be processed is acquired, if there is a slender object that meets the preset requirements in the image, the slender object can be used as a target for focusing processing.
  • the elongated object may include wires, ropes and the like.
  • a preset ratio such as 10 the object can be considered to be an elongated object.
  • the detection of the elongated object can be achieved by a variety of methods. For example, image processing techniques such as semantic segmentation can be used to determine the area of each object in the image, and determine whether there is a slender object according to the segmented area. If there is a slender object and meet the preset requirements, you can The slender object is used as a target for focusing processing.
  • image processing techniques such as semantic segmentation can be used to determine the area of each object in the image, and determine whether there is a slender object according to the segmented area. If there is a slender object and meet the preset requirements, you can The slender object is used as a target for focusing processing.
  • the preset requirements can be set according to actual needs.
  • the elongated object meeting a preset requirement may include: if the elongated object is a foreground object, determining that the elongated object meets the preset requirement.
  • the foreground object may specifically refer to that the distance between the object and the shooting device is smaller than the distance between other objects in the image and the shooting device, that is, the object is located in the front position in the shooting picture.
  • the elongated object meeting a preset requirement may include: the elongated object is an object of interest to a user, or the elongated object is an object that conforms to the current scene.
  • the electric wires may be slender objects meeting preset requirements
  • branches may be slender objects meeting preset requirements.
  • the slender object can be used as a target for focusing processing, that is, the focus motor is controlled to drive the lens to move to the focus position corresponding to the slender object, so that the slender object It is in a clear state in the image to complete the focusing process.
  • the focus control method provided in this embodiment can focus on a slender object that meets the preset requirements, and meets the needs of industry applications.
  • the focus control method provided in this embodiment can obtain an image to be processed. If there is a slender object in the image to be processed, and the slender object meets the preset requirements, then the slender object is taken as the target.
  • the focus processing can realize the focus on the slender object, meet the needs of the specific scene, and improve the accuracy of the focus.
  • the fifth embodiment of the present invention provides a focus control method.
  • the focus control process of the object is realized through the connected domain.
  • FIG. 9 is a schematic flowchart of a focus control method according to Embodiment 5 of the present invention. As shown in FIG. 9, the focus control method in this embodiment may include:
  • Step 901 Acquire multiple frames of images to be processed, where the multiple frames of images to be processed include multiple frames of images taken by the lens during the movement of the focus motor.
  • Step 902 Determine the focus position corresponding to each of the multiple regions of the image according to the image to be processed.
  • the image can be divided into n*m regions according to the solution provided in the foregoing embodiment, or the image can be divided into multiple regions through semantic segmentation.
  • determining the in-focus position corresponding to each of the multiple regions of the image according to the image to be processed may include: determining the focus position of the multiple regions of the image according to the image to be processed According to the recognition result, the recognition result of each region includes the corresponding contrast of the region in each frame of the image; for each region, the in-focus position corresponding to the region is determined according to the corresponding recognition result.
  • the recognition result may be a recognition result obtained through a filter corresponding to the current scene.
  • determining the in-focus position corresponding to the region may include: determining the in-focus position corresponding to the region according to a change in the contrast of the region in each frame of the image.
  • the lens position corresponding to a frame of image with the largest contrast may be selected as the focus position corresponding to the region.
  • Step 903 Determine at least one connected domain according to the focus positions corresponding to the multiple regions.
  • the two areas belong to the same connected domain.
  • adjacent areas may refer to areas that are connected (adjacent) on the image, and the connection may specifically be eight-connected, four-connected, or M-connected.
  • the eight areas of the upper, lower, left, right, upper left, lower left, upper right, and lower right of the area are all adjacent to the area.
  • the upper, lower, left, and right areas of the area are all areas connected to the area, and the upper left, lower left, upper right, and lower right areas of the area are connected to the area. Areas that are not adjacent to each other.
  • the focus position meets the preset position requirement, the two areas belong to the same connected domain.
  • the preset position requirement may be set according to actual needs.
  • the specific position requirement may be that the focus positions of the two regions are the same or similar.
  • determining at least one connected domain according to the focus positions corresponding to the multiple regions may include: if the focus positions of any two adjacent regions are the same, determining the two The areas belong to the same connected domain, which can quickly and accurately realize the determination of connected domains and subsequent focusing operations.
  • the distance between the focus positions of any two adjacent regions is less than the preset distance, it is determined that the two regions belong to the same connected domain, and the focus positions can be close. The areas are merged into a connected domain to avoid focus failure caused by shooting noise.
  • each connected domain may include at least two regions. If there is at least one connected domain in the image, step 904 may be executed.
  • Step 904 If there is a connected domain that meets the preset requirement, focus processing is performed on the connected domain as a target.
  • a connected domain in the foreground may be selected from at least one connected domain, or a connected domain that meets the requirements of the current scene may be selected as a connected domain that satisfies a preset condition and focus processing is performed.
  • the connected domains may also be filtered. Specifically, if there are connected domains that meet the preset requirements, then focusing on the connected domains may include: if the number of connected domains is more than one, then comparing the connected domains with the area of each connected domain. Each connected domain is screened; among the connected domains that pass the screening, the connected domain that meets the preset requirements is selected as the target for focusing processing.
  • the area of the connected domain is too small, it may be an interference point, and the connected domain can be filtered out, leaving a connected domain with an area that meets the requirements.
  • filtering the connected domains by the area of each connected domain may include: for each connected domain, if the area of the connected domain is greater than a preset area, or the area of the connected domain is different from other connected domains. If the area ratio is greater than the preset area ratio, the connected domain passes the screening, wherein the other area is the sum of the areas of other connected domains except the connected domain.
  • the preset area may be the overall area of the image multiplied by a scale factor. For example, if the ratio of the area of the connected domain to the overall area of the image is greater than 0.05, the connected domain is considered to be a connected domain whose area meets the requirements. . Alternatively, if the ratio of the area of the connected domain to the sum of the areas of the other connected domains is greater than the preset area ratio, such as 0.1, then the connected domain can be considered to be a connected domain that meets the requirements. In this way, connected domains with larger absolute value and larger relative area can be screened out, and effective connected domains can be retained as much as possible to avoid missing small objects.
  • a connected domain that meets a preset requirement such as a connected domain in the foreground
  • a connected domain in the foreground can be selected as a target for focusing processing.
  • whether the connected domain is located in the foreground can be judged by the in-focus position corresponding to the connected domain.
  • the category of each area can also be determined according to semantic segmentation. If a predetermined category appears, the area of the category is prioritized to focus.
  • the category may refer to the category of the object, for example, the category may include people, cars, buildings, and so on.
  • selecting a connected domain that meets a preset requirement as the target for focusing processing may include: identifying the category of each area in the connected domain that has passed the screening; selecting an area whose category meets the preset requirement Perform focus processing as a target.
  • semantic segmentation can be achieved through methods such as Convolutional Neural Networks (CNN) to determine the category of each region.
  • CNN Convolutional Neural Networks
  • the method of CNN semantic segmentation to determine the target can make the selection of the focus target more intelligent.
  • selecting an area whose category meets a preset requirement as the target for focusing processing may include: if there is a preset category in the category of each area, taking the area of the preset category as The target is subject to focus processing. Further, when there are multiple areas of the preset category, the area in the foreground can be selected from them for focusing.
  • the method provided in this embodiment may be applied to a patrol inspection device, and the preset category may be a category corresponding to a patrol target of the patrol inspection device.
  • the inspection equipment is an electrical tower inspection equipment
  • the preset category is an electrical tower. Then, after the electric tower is detected, even if there are other foreground objects in front of the electric tower, the electric tower can still be focused first to ensure the clarity of the electric tower in the image and meet the requirements of the electric tower inspection.
  • the inspection device may be a bridge inspection device, and the preset category may be a bridge.
  • the inspection equipment may be a search and rescue equipment or a tracking equipment, and the preset category may be a category of an object to be searched and rescued or tracked, such as a person.
  • the preset category can also be determined according to the current working state of the device.
  • the working state includes any one of the following: inspection state, navigation state, follow state, self-timer state, and standby state.
  • the category corresponding to the patrol target can be used as the preset category; in the navigation state, the building or road can be the preset category; in the follow state, the following target such as a person can be used as the preset category Preset categories; in the self-portrait state, the face can be used as the preset category to meet the shooting requirements under different working conditions.
  • each category can be sorted to determine the priority corresponding to each category. For example, the priority of people is greater than the priority of cars, and the priority of cars is greater than the priority of buildings. In this way, when there are multiple connected domains that pass the screening, the area with the highest priority can be selected as the target for focusing processing. In different scenarios, the priority of each category can be adjusted accordingly.
  • step 902 to step 904 it can be achieved: if there is a slender object in the image to be processed, and the slender object meets a preset requirement, focus processing is performed on the slender object as a target.
  • the connected domain determined by the in-focus position may belong to the connected domain corresponding to an elongated object such as an electric wire, and may also belong to the connected domain corresponding to other objects such as a person.
  • a focusing operation is performed with the connected domain as a target, so that the slender object that meets the preset requirement can be focused.
  • the focus operation is performed with the connected domain as the target, so that other objects that meet the preset requirements can be focused.
  • the focus positions corresponding to multiple areas in the safe area of the image can be determined, and the focus positions corresponding to the multiple areas can be determined according to the focus positions corresponding to the multiple areas.
  • the areas are grouped, the areas with the same focus position are divided into one group, and the focus processing is performed according to the corresponding focus position of the group with the largest number of areas.
  • the safe area may refer to an area in the image that excludes the extremely distant scene and the extremely close scene, and the extremely long scene and the extremely close scene can be determined by the focus position.
  • the focus position is selected based on the principle that the minority obeys the majority. If the largest number of areas correspond to the same focus position, then the focus processing can be performed according to the focus position.
  • the safe area it is possible to avoid focusing on extremely close-range and extremely long-range views, and improve the focusing accuracy.
  • the minority obeys the majority, the overall sharpness of the image can be maximized, and the focus accuracy can be further improved.
  • the regions in the image can be divided relatively small, for example, the area of each region can be smaller than the area of the image area usually occupied by wires.
  • the focus position corresponding to each of the multiple regions of the image is determined according to the image to be processed, and the focus position corresponding to the multiple regions is determined to be at least For a connected domain, if there is a connected domain that meets the preset requirements, focus processing is performed on the connected domain as the target, which can quickly and accurately achieve focus on objects that meet the preset requirements, and at the same time avoid the influence of sporadic interference points , Improve the success rate of focusing.
  • determining the focal position corresponding to each of the multiple regions of the image in step 902 may include: determining the focal position of each of the multiple regions in the image whose relative contrast satisfies a preset condition. Focus position.
  • the method described in the foregoing embodiment 1 to embodiment 3 may be used to select a plurality of regions satisfying a preset condition with a relative contrast from the image to be processed, and based on the plurality of regions satisfying a preset condition with the relative contrast
  • the area realizes the detection and focus operation of the connected domain.
  • the sixth embodiment of the present invention provides a focus control method.
  • This embodiment integrates the methods provided in the foregoing embodiments, filters regions through relative contrast, and implements a focus control process through connected domains.
  • FIG. 10 is a schematic flowchart of a focus control method according to Embodiment 6 of the present invention. As shown in FIG. 10, the focus control method in this embodiment may include:
  • Step 1001 Obtain multiple frames of images to be processed.
  • the multiple frames of images to be processed include multiple frames of images taken by the lens during the movement of the focus motor.
  • Step 1002 Score each area in the image according to the relative contrast, and determine a qualified area.
  • the scoring may include: scoring according to the ratio of the contrast obtained through different filters, and/or scoring according to the peak value of the contrast change of different frame images.
  • Step 1003 In the qualified area, determine the connected domain according to the focus position.
  • Step 1004 Filter the connected domains according to the area.
  • the area occupies too small proportion to be filtered out, because the connected domain with too small area proportion may not be the connected domain that users are interested in, but the interference point.
  • Step 1005 Perform a focusing operation according to the filtered connected domains.
  • a connected domain located in the foreground or belonging to a preset category may be selected from the filtered connected domains as the target for the focusing operation.
  • focusing on the area or the connected domain to perform focus processing may refer to directly moving the lens to the focus position corresponding to the area or the connected domain, or it may also target the area or the connected domain.
  • the connected domain performs another CDAF operation.
  • step 1003 if at least one connected domain cannot be obtained through step 1003, or, after the screening in step 1004, there is no connected domain that passes the screening, then according to the principle of minority to majority, multiple regions within the safe area of the image Select the appropriate area for focus operation. In this case, there is no need to consider whether the score of the area is qualified, because the connected domains that meet the requirements cannot be selected, indicating that each area is not a particularly ideal focus target. In this case, the score of the area can be ignored, as long as there are many areas If they all correspond to the same focus position, the focus operation can be realized at the focus position.
  • the method in this embodiment integrates the solutions in the above-mentioned multiple embodiments.
  • the parts that are not described in detail in this embodiment please refer to the above-mentioned embodiments, which will not be repeated here.
  • the focus control method provided in this embodiment can score regions based on the contrast and the number of peaks. By analyzing and scoring changes in the contrast of each of the multiple regions, the weight of low-contrast regions can be reduced and monotonic focus can be avoided. Objects, by analyzing and scoring the peaks of each of multiple areas, can reduce the interference impact of multi-peak areas; through the connected domain algorithm, it can detect slender objects, prevent the slender wires from being missed, and meet the needs of industry applications , So that the selection of the focus target is more in line with the user's intentions.
  • the user can also be allowed to click on the screen. According to the position of the user’s click, the user’s desired focus area can be determined.
  • the region of interest is further divided into multiple regions, and a region that meets the requirements is selected according to the solutions provided in the foregoing embodiments for focusing operations, so as to meet the individual needs of users.
  • FIG. 11 is a schematic structural diagram of a focus control device according to Embodiment 7 of the present invention.
  • the focus control device may execute the focus control method corresponding to FIG. 1.
  • the focus control device may include:
  • the memory 11 is used to store computer programs
  • the processor 12 is configured to run a computer program stored in the memory to realize:
  • the structure of the focus control device may further include a communication interface 13 for communicating with other equipment or a communication network.
  • that the relative contrast satisfies the preset condition includes: the contrast change of the corresponding image area of the object between the frames of the image satisfies the first preset condition, and/or, the object in each frame The change between the multiple contrasts obtained by filtering the corresponding image area in the frame image through multiple filters satisfies the second preset condition.
  • the relative contrast of the image regions corresponding to the glass, the wall, and the sky in the image to be processed does not meet a preset condition.
  • the processor 12 when determining whether there is an object in the multiple frames of images to be processed, and whether the relative contrast of the image area corresponding to the object meets a preset condition, the processor 12 is specifically configured to:
  • focus processing is performed on the image area corresponding to the object, and the processor 12 is specifically configured to: Area for focus processing.
  • the processor 12 when determining the recognition results of multiple regions in the image according to the image to be processed, the processor 12 is specifically configured to:
  • Each frame of image to be processed is processed as follows: the image is filtered through multiple filters to obtain the contrast collection of each of the multiple regions of the image, where the contrast collection of each region includes passing The contrast of the region obtained by each filter of the plurality of filters filtering the image.
  • the processor 12 when judging whether the relative contrast of each area satisfies the third preset condition according to the recognition results of the multiple areas, the processor 12 is specifically configured to:
  • the processor 12 when scoring each area according to the contrast collection of the multiple areas in the image, the processor 12 is specifically configured to:
  • the area is scored according to the gap between the respective contrasts.
  • the multiple filters include a high frequency filter and a low frequency filter
  • the processor 12 When scoring each area according to the contrast collection of the multiple areas in the image, the processor 12 is specifically configured to:
  • the high-frequency filter and the low-frequency filter are used to perform filtering processing; and based on the ratio of the contrast obtained through the high-frequency filter to the contrast obtained through the low-frequency filter, The area is scored.
  • the processor 12 when determining whether the relative contrast of the region satisfies the third preset condition according to the score of the region in each frame of image, the processor 12 is specifically configured to:
  • the comprehensive score is greater than the first threshold, it is determined that the relative contrast of the region satisfies the third preset condition.
  • the processor 12 when respectively determining whether the relative contrast of each area meets the third preset condition according to the recognition results of the multiple areas, the processor 12 is specifically configured to:
  • For each area determine the contrast curve of the area during the movement of the focus motor according to the contrast of the area in each frame of the image;
  • the contrast curve it is determined whether the relative contrast of the region satisfies the third preset condition.
  • the processor 12 when judging whether the relative contrast of the region satisfies the third preset condition according to the contrast curve, the processor 12 is specifically configured to:
  • the peak value of the contrast curve it is determined whether the relative contrast of the region meets the third preset condition.
  • the processor 12 when judging whether the relative contrast of the region satisfies the third preset condition according to the peak value of the contrast curve, the processor 12 is specifically configured to:
  • the scoring value of the region is determined in the mapping table.
  • the processor 12 when scoring the region according to the peak size of the contrast curve, is specifically configured to:
  • the main peak is determined according to the size of each peak
  • the score of the region is determined.
  • the processor 12 when performing focusing processing on the area meeting the third preset condition, is specifically configured to:
  • the connected domain is an image area where the object is located, and the object is an object included in the connected domain;
  • the two areas belong to the same connected domain.
  • the focus control device shown in FIG. 11 can execute the methods of the embodiments shown in FIG. 1 to FIG. 7. For parts that are not described in detail in this embodiment, refer to the related descriptions of the embodiments shown in FIG. 1 to FIG. 7. For the implementation process and technical effects of this technical solution, please refer to the description in the embodiment shown in FIG. 1 to FIG. 7, which will not be repeated here.
  • FIG. 12 is a schematic structural diagram of a focus control device according to Embodiment 8 of the present invention.
  • the focus control device may execute the focus control method corresponding to FIG. 8.
  • the focus control device may include:
  • the memory 21 is used to store computer programs
  • the processor 22 is configured to run a computer program stored in the memory to realize:
  • focus processing is performed with the slender object as a target.
  • the structure of the focus control device may further include a communication interface 23 for communicating with other equipment or a communication network.
  • the object is an elongated object.
  • the elongated object includes an electric wire.
  • the processing is specifically used for:
  • the two areas belong to the same connected domain.
  • the processor 22 when determining the in-focus position corresponding to each of the multiple regions of the image, the processor 22 is specifically configured to:
  • the processor 22 when determining the focus position corresponding to each of the multiple regions of the image according to the image to be processed, the processor 22 is specifically configured to:
  • the in-focus position corresponding to the area is determined according to the corresponding recognition result.
  • the processor 22 when determining the focus position corresponding to the region according to the corresponding recognition result, the processor 22 is specifically configured to:
  • the focus position corresponding to the region is determined.
  • the processor 22 when determining at least one connected region according to the focus positions corresponding to the multiple regions, is specifically configured to: if the focus positions of any two adjacent regions are the same , It is determined that the two regions belong to the same connected domain;
  • the processor 22 is specifically configured to:
  • the respective connected domains are screened by the area of each connected domain
  • a connected domain that meets the preset requirements is selected as the target for focusing processing.
  • the processor 22 when each connected domain is screened by the area of each connected domain, the processor 22 is specifically configured to:
  • the connected domain For each connected domain, if the area of the connected domain is greater than the preset area, or the ratio of the area of the connected domain to other areas is greater than the preset area ratio, the connected domain passes the screening, wherein the other The area is the sum of the areas of other connected domains excluding the connected domains.
  • the processor 22 is specifically configured to:
  • the connected domain in the foreground is selected as the target for focusing processing.
  • the processor 22 is further configured to:
  • focus processing is performed.
  • the processor 22 is specifically configured to:
  • the processor 22 when selecting an area whose category meets preset requirements as a target for focusing processing, the processor 22 is specifically configured to:
  • the device is applied to a patrol inspection device, and the preset category is a category corresponding to a patrol target of the patrol inspection device.
  • the inspection equipment is an electrical tower inspection equipment
  • the preset category is an electrical tower
  • the processor 22 is further configured to:
  • the preset category is determined.
  • the working state includes any one of the following: inspection state, navigation state, follow state, and standby state.
  • the focus control device shown in FIG. 12 can execute the methods of the embodiments shown in FIGS. 8-10.
  • parts that are not described in detail in this embodiment reference may be made to the related descriptions of the embodiments shown in FIGS. 8-10.
  • the implementation process and technical effects of this technical solution please refer to the description in the embodiment shown in FIG. 8 to FIG. 10, which will not be repeated here.
  • FIG. 13 is a schematic structural diagram of a focus control device according to Embodiment 9 of the present invention.
  • the focus control device provided in this embodiment may include:
  • the first image acquisition circuit 1301 is configured to acquire multiple frames of images to be processed, and the multiple frames of images to be processed include multiple frames of images taken by the lens during the movement of the focus motor;
  • the first determining circuit 1302 is configured to determine whether there is an object in the multi-frame image to be processed, and whether the relative contrast of the image area corresponding to the object meets a preset condition; wherein, the relative contrast is based on at least one filter pair Determined by the output result obtained by filtering the image area corresponding to the object;
  • the first focusing processing circuit 1303 is configured to perform focusing processing on the image area corresponding to the object when the relative contrast of the image area corresponding to the object satisfies a preset condition.
  • the focus control device is used to execute the method of the embodiment shown in FIG. 1 to FIG. 7.
  • the method of the embodiment shown in FIG. 1 to FIG. 7 can be implemented by a hardware circuit. For example, filtering the image can be achieved through a filter circuit; adding or subtracting points to the area can be achieved through an adder or subtractor, etc.; judging whether the score meets the requirements can be achieved through a comparator, etc.; focusing
  • the processing can be realized by outputting a step signal to the focus motor.
  • FIG. 14 is a schematic structural diagram of a focus control device according to Embodiment 10 of the present invention.
  • the focus control device provided in this embodiment may include:
  • the second image acquisition circuit 1401 is configured to acquire multiple frames of images to be processed, and the multiple frames of images to be processed include multiple frames of images taken by the lens during the movement of the focus motor;
  • the second focusing processing circuit 1402 is configured to perform focusing processing with the elongated object as a target when there is an elongated object in the image to be processed, and the elongated object meets a preset requirement.
  • the focus control device may execute the method of the embodiment shown in FIG. 8-10.
  • the method of the embodiment shown in FIG. 8 to FIG. 10 can be implemented by a hardware circuit.
  • the implementation process and technical effects of this technical solution please refer to the description in the embodiment shown in FIG. 8 to FIG. 10, which will not be repeated here.
  • An embodiment of the present invention also provides a photographing device, including the focus control device described in any of the foregoing embodiments.
  • the photographing device may further include a lens barrel, a lens, a focus motor, and an image sensor.
  • the focus motor is used to drive the lens to move relative to the lens barrel to change the object distance or image distance.
  • the image sensor is used to convert the light signal passing through the lens into an electric signal to form an image.
  • the photographing device may be an inspection device.
  • the embodiment of the present invention also provides a movable platform including the above-mentioned photographing equipment.
  • the movable platform may be an unmanned aerial vehicle, an unmanned vehicle, or a cloud platform.
  • the movable platform may also include a body and a power system. The photographing equipment and the power system are arranged on the body, and the power system is used to provide power for the movable platform.
  • an embodiment of the present invention provides a storage medium, the storage medium is a computer-readable storage medium, the computer-readable storage medium stores program instructions, and the program instructions are used to implement the embodiments shown in FIGS. 1 to 7 above. Focus control method in.
  • the embodiment of the present invention also provides a storage medium, the storage medium is a computer-readable storage medium, the computer-readable storage medium stores program instructions, and the program instructions are used to implement the above-mentioned embodiments shown in FIGS. 8-10 The focus control method.
  • the disclosed related remote control device and method can be implemented in other ways.
  • the embodiments of the remote control device described above are merely illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components. It can be combined or integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, remote control devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present invention essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read_Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks and other media that can store program codes.

Landscapes

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

Abstract

本发明实施例提供一种对焦控制方法、装置、设备、可移动平台和存储介质,其中方法包括:获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件;其中,相对对比度是依据至少一滤波器对所述物体对应的图像区域进行滤波处理而得到的输出结果来确定的;若所述物体对应的图像区域的相对对比度满足预设条件,则对所述物体对应的图像区域进行对焦处理。本发明实施例提供的对焦控制方法、装置、设备、可移动平台和存储介质,可以有效提高对焦的效率和准确率。

Description

对焦控制方法、装置、设备、可移动平台和存储介质 技术领域
本发明实施例涉及相机领域,尤其涉及一种对焦控制方法、装置、设备、可移动平台和存储介质。
背景技术
反差对焦(Contrast Detection Auto Focus,CDAF)是现有技术中一种常用的对焦方法,通过反差对焦,可以实现相机的自动对焦,免除用户手动对焦的过程,为用户提供便利。
为了实现对不同场景的拍摄需求,反差对焦算法提供多种滤波器,针对当前拍摄的场景,可以选择一个合适的滤波器,利用选定的滤波器对拍摄的图像进行滤波,得到图像中多个区域的对比度,每个区域的对比度可以用于表示该区域的清晰程度,随着镜头位置的不断变化,各个区域的对比度也在不断变化,根据区域的对比度变化可以完成对焦过程。
现有技术的不足之处在于,如果拍摄的画面中存在干扰物体,例如存在白墙、玻璃、天空等物体时,由于这些物体较大或者是距离较近,利用现有的对焦算法,有可能会对焦到这些物体上,从而导致误对焦,降低对焦效率和准确率。
发明内容
本发明实施例提供了一种对焦控制方法、装置、设备、可移动平台和存储介质,用以解决现有技术中对焦效率和准确率较低的技术问题。
本发明实施例第一方面提供一种对焦控制方法,包括:
获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件;其中,相对对比度是依据至少一滤波器对所述物体对应的图像区域进行滤波处理而得到的输出结果来确定的;
若所述物体对应的图像区域的相对对比度满足预设条件,则对所述物体对应的图像区域进行对焦处理。
本发明实施例第二方面提供一种对焦控制方法,包括:
获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
若所述待处理的图像中存在细长物体,且所述细长物体满足预设要求,则以所述细长物体为目标进行对焦处理。
本发明实施例第三方面提供一种对焦控制装置,包括:
存储器,用于存储计算机程序;
处理器,用于运行所述存储器中存储的计算机程序以实现:
获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件;其中,相对对比度是依据至少一滤波器对所述物体对应的图像区域进行滤波处理而得到的输出结果来确定的;
若所述物体对应的图像区域的相对对比度满足预设条件,则对所述物体对应的图像区域进行对焦处理。
本发明实施例第四方面提供一种对焦控制装置,包括:
存储器,用于存储计算机程序;
处理器,用于运行所述存储器中存储的计算机程序以实现:
获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
若所述待处理的图像中存在细长物体,且所述细长物体满足预设要求,则以所述细长物体为目标进行对焦处理。
本发明实施例第五方面提供一种对焦控制装置,包括:
第一图像获取电路,用于获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
第一确定电路,用于确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件;其中,相对对比度是依据至少一滤波器对所述物体对应的图像区域进行滤波处理而得到的输出结果来确定的;
第一对焦处理电路,用于在所述物体对应的图像区域的相对对比度满足预设条件时,对所述物体对应的图像区域进行对焦处理。
本发明实施例第六方面提供一种对焦控制装置,包括:
第二图像获取电路,用于获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
第二对焦处理电路,用于在所述待处理的图像中存在细长物体,且所述细长物体满足预设要求时,以所述细长物体为目标进行对焦处理。
本发明实施例第七方面提供一种拍摄设备,包括第三方面所述的对焦控制装置。
本发明实施例第八方面提供一种拍摄设备,包括第四方面所述的对焦控制装置。
本发明实施例第九方面提供一种可移动平台,包括第七方面所述的拍摄设备。
本发明实施例第十方面提供一种可移动平台,包括第八方面所述的拍摄设备。
本发明实施例第十一方面提供一种计算机可读存储介质,所述计算机可读存储介质中存储有程序指令,所述程序指令用于实现第一方面所述的对焦控制方法。
本发明实施例第十二方面提供一种计算机可读存储介质,所述计算机可读存储介质中存储有程序指令,所述程序指令用于实现第二方面所述的对焦控制方法。
本发明实施例提供的对焦控制方法、装置、设备、可移动平台和存储介质,可以有效提高对焦的效率和准确率。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本发明的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1为本发明实施例一提供的一种对焦控制方法的流程示意图;
图2为本发明实施例一提供的对焦控制方法中多帧图像对应的对比度曲线的示意图一;
图3为本发明实施例一提供的一种对焦控制方法中多帧图像对应的对比度曲线的示意图二;
图4为本发明实施例一提供的对焦控制方法中通过多个滤波器得到的对比度曲线的示意图一;
图5本发明实施例一提供的对焦控制方法中通过多个滤波器得到的对比度曲线的示意图二;
图6为本发明实施例二提供的一种对焦控制方法的流程示意图;
图7为本发明实施例三提供的一种对焦控制方法的流程示意图;
图8为本发明实施例四提供的一种对焦控制方法的流程示意图;
图9为本发明实施例五提供的一种对焦控制方法的流程示意图;
图10为本发明实施例六提供的一种对焦控制方法的流程示意图;
图11为本发明实施例七提供的一种对焦控制装置的结构示意图;
图12为本发明实施例八提供的一种对焦控制装置的结构示意图;
图13为本发明实施例九提供的一种对焦控制装置的结构示意图;
图14为本发明实施例十提供的一种对焦控制装置的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。
下面结合附图,对本发明的一些实施方式作详细说明。在各实施例之间不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
实施例一
本发明实施例一提供一种对焦控制方法。图1为本发明实施例一提供的一种对焦控制方法的流程示意图。如图1所示,本实施例中的对焦控制方法,可以包括:
步骤101、获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像。
本实施例中对焦控制方法的执行主体可以为拍摄设备中的对焦控制装置,所述拍摄设备可以为相机等任意具有拍摄功能的设备,所述对焦控制装置可以实现为软件、硬件、或者软件和硬件的组合。
所述拍摄设备可以包括镜头、对焦电机、图像传感器等,物体反射的光经过所述镜头后会聚在所述图像传感器,所述图像传感器将光信号转换为电信号,形成包含有所述物体的图像。
所述对焦电机可以包括驱动部件如驱动轴等,用于驱动所述镜头移动,本发明各实施例中所述的对焦电机移动,可以是指所述对焦电机的驱动部件移动。
在对焦过程中,对焦电机可以驱动镜头移动,从而改变物距,导致被拍摄的物体在图像中的清晰度不断变化。镜头的可移动范围可以由对焦电机的行程决定,在拍摄设备和被拍摄的物体均固定的情况下,镜头位于最前端时,所述镜头与所述物体的距离最短,镜头逐渐拉到最后端时,所述镜头与所述物体的距离逐渐增加。
在镜头移动过程中,拍摄的图像中的物体通常会经历从模糊到清晰再到模糊的过程,其中所述物体最清晰时镜头所在的位置可以认为是合焦位置。
本实施例中,可以在对焦电机移动过程中通过镜头拍摄多帧图像作为待处理的图像,其中,所述多帧图像可以是在对焦电机的可移动范围内拍摄的全部图像,也可以是其中的部分图像。
步骤102、确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件;其中,相对对比度是依据至少一滤波器对所述物体对应的图像区域进行滤波处理而得到的输出结果来确定的。
本发明各实施例中所提及的图像中存在某种物体,可以是指所述图像中存在对应于所述物体的图像区域。可以理解的是,判断图像中是否存在相对对比度满足预设条件的物体,可以通过判断图像中是否存在相对对比度满足预设条件的区域来实现。
若所述图像中存在相对对比度满足预设条件的区域,则可以认为所述图像中存在相对对比度满足预设条件的物体,该区域即为所述物体对应的图像 区域。
本实施例中,相对对比度的计算可以基于对比度来实现。在获取到待处理的图像后,可以通过滤波处理等操作来确定所述待处理的图像中各个区域的对比度。所述对比度可以用于表示清晰程度,对于同一物体来说,不同帧图像之间的对比度变化体现了所述区域的清晰度变化,在某一帧图像中所述区域的对比度越大,说明在所述物体在该帧图像中越清晰。
在一个可选的实施方式中,可以将拍摄画面分割成多个区域,假设分为n*m个区域,竖直方向上分成n行,水平方向上分成m列。每个区域包括多个像素点。假设拍摄的每帧图像包括N*M个像素点,那么每个区域中可以有(N/n)*(M/m)个像素点。
在待处理的多帧图像中,每一帧图像都可以按照同一种分割方法分为多个区域,例如按照上述方法分为n*m个区域,在所述n*m个区域中,同一个区域在不同帧图像中可以对应不同的对比度。
在获取到待处理的图像后,可以对每一帧图像进行滤波,滤波后可以得到所述图像中各个像素对应的梯度值,根据每个区域中各像素对应的梯度值,可以计算所述区域的对比度,例如,可以将所述区域中各像素对应的梯度值累加,得到所述区域的对比度。
在另一可选的实施方式中,区域的划分方法也可以不是预先设定好的,例如,可以对拍摄的图像进行语义分割,或者,识别所述图像中物体的轮廓,根据语义分割结果或者轮廓识别结果可以识别出各个物体所在的区域,并计算各个物体对应的区域的对比度。
通过滤波处理等操作,可以针对每一帧图像,得到所述图像中每个区域对应的对比度。对多帧图像进行处理后,可以得到所述区域在多帧图像中对应的识别结果,即所述区域在多帧图像中对应的多个对比度。
在确定每个区域对应的多个对比度后,可以根据所述区域对应的对比度确定所述区域的相对对比度,并判断所述区域的相对对比度是否满足预设条件。
其中,所述区域的相对对比度可以是指所述区域对应的多个对比度中的至少两个对比度之间的相对值,所述相对值可以为比值或差值,所述区域对应的至少两个对比度可以是所述区域在不同图像中的对比度,或者,通过不同的滤波器获得的对比度等。
可选的,所述相对对比度满足预设条件可以包括:所述物体在各帧图像之间对应的图像区域的对比度变化满足第一预设条件,和/或,所述物体在每帧图像中对应的图像区域通过多个滤波器滤波得到的多个对比度之间的变化满足第二预设条件。
在一个可选的实施方式中,所述相对对比度满足预设条件可以包括:所述物体在各帧图像之间对应的图像区域的对比度变化满足第一预设条件。
其中,对比度变化是否满足第一预设条件可以通过所述区域的多个对比度之间的比值或差值来判断,例如,在所述多个对比度中,将每个对比度与下一对比度相除,从而得到多个比值,通过比值大小判断对比度变化是否满足第一预设条件。
或者,可以将所述区域在各帧图像中对应的对比度连成一条曲线,通过对比度曲线的形态判断对比度变化是否满足第一预设条件。
可选的,所述第一预设条件可以为所述对比度曲线的曲率或者斜率位于预设范围内,其中,所述对比度曲线的曲率或斜率,可以是指所述对比度曲线中的一点、或者一段曲线、或者整条曲线对应的曲率或斜率。
此外,也可以预先设置理想的对比度曲线,根据所述区块的对比度曲线与所述理想的对比度曲线之间的差距来确定所述区块是否满足第一预设条件,所述区块的对比度曲线与所述理想的对比度曲线之间的差距,可以通过所述区块的对比度曲线与所述理想的对比度曲线之间的闭合区域的面积来表示。
图2为本发明实施例一提供的对焦控制方法中多帧图像对应的对比度曲线的示意图一。图3为本发明实施例一提供的一种对焦控制方法中多帧图像对应的对比度曲线的示意图二。图2和图3中,横轴为图像的序号,不同序号对应不同的对焦电机位置,纵轴为区域对应的对比度。
图2所示的对比度曲线只有一个峰值,且峰值两边比较陡峭,根据所述对比度曲线可以快速准确地实现对焦,因此,图2所示的对比度曲线可以作为理想的对比度曲线。
图3所示的对比度曲线,主峰峰值两侧不够陡峭,且曲线中还存在多个波动,这些波动可能会导致对焦失败,因此,有必要设定至少一预设条件,此预设条件根据理想的对比度曲线的形态来确定。通过判断实际获得的对比度曲线是否满足此预设条件,从而确定实际获得的对比度曲线和理想对比度曲线之间的差异程度,以预测此差异程度是否会导致对焦失败。。
在另一实施方式中,可以先标定感兴趣物体的对应的图像区域的对比度曲线。如此一来,可以将标定好的感兴趣物体的对应的图像区域的对比度曲线近似看做理想的对比度曲线。然后,根据标定好的感兴趣物体的对应的图像区域的对比度曲线确定关于对比度差异或者相对对比度差异的至少一预设条件。通过判断一图像区域实际获得的对比度曲线是否满足此预设条件,从而确定所述图像区域实际获得的对比度曲线和标定好的感兴趣物体的对应的图像区域的对比度曲线之间的差异程度,以预测所述图像区域是否包含感兴趣的物体。若差异程度符合预设条件,则对应的图像中的图像区域中存在感兴趣的物体。
如果所述区域在各帧图像之间的对比度变化不满足第一预设条件,说明所述区域在对焦电机移动过程中的清晰度变化不明显,那么所述区域可能并不是适于对焦的区域,此时可以舍弃该区域,不对该区域进行对焦。若所述区域在各帧图像之间的对比度变化满足第一预设条件,说明所述区域在对焦电机移动过程中的清晰度变化比较好,那么可以根据所述区域进行对焦操作。
在另一实施方式中,如果所述区域在各帧图像之间的对比度变化不满足预设条件,所述区域不存在感兴趣的物体,此时可以舍弃该区域,不对该区域进行对焦。
在另一个可选的实施方式中,所述相对对比度满足预设条件可以包括:所述物体在每帧图像中对应的图像区域通过多个滤波器滤波得到的多个对比度之间的变化满足第二预设条件。
具体地,针对一帧图像,可以通过多个滤波器分别对所述图像进行滤波处理,每一个滤波器处理后,可以得到所述图像中多个区域的对比度。那么,对于图像中的每一个区域来说,若有K个滤波器对所述图像进行处理,则可以得到所述区域的K个对比度。
K个对比度可以按照滤波器的中心频率进行排序。判断通过多个滤波器得到的所述区域的对比度的变化情况是否满足第一预设条件的实现原理,可以参见前文所述的判断所述区域在各帧图像之间的对比度变化是否满足第二预设条件的实现原理。
例如,可以在通过多个滤波器得到的对比度中,将每个对比度与下一对比度相除,得到多个比值,从而通过比值大小判断对比度变化是否满足第二预设条件。
或者,可以将通过多个滤波器得到的对比度连成一条曲线,通过对比度曲线判断对比度变化是否满足第二预设条件。
图4为本发明实施例一提供的对焦控制方法中通过多个滤波器得到的对比度曲线的示意图一。图5本发明实施例一提供的对焦控制方法中通过多个滤波器得到的对比度曲线的示意图二。图4和图5中,横轴为滤波器的中心频率,所述中心频率可以是归一化后的中心频率,纵轴为区域对应的对比度。
图4所示的对比度曲线中,随着频率不断升高,对比度也不断增加,说明所述区域的高频成分比较多,纹理细节比较丰富,是用户会感兴趣的区域,因此,所述对比度曲线可以是满足第二预设条件的对比度曲线。
图5所示的对比度曲线中,通过各个频段的滤波器得到的对比度变化不明显,说明所述区域的纹理细节不丰富,并不是用户感兴趣的区域,因此,所述对比度曲线可以认为是不满足第二预设要求的。
在又一个可选的实施方式中,所述相对对比度满足预设条件可以包括:所述区域在各帧图像之间的对比度变化满足第一预设条件,并且,所述区域在每帧图像中通过多个滤波器滤波得到的多个对比度之间的变化满足第二预设条件。其中,所述第一预设条件和所述第二预设条件可以相同,也可以不同。
步骤103、若所述物体对应的图像区域的相对对比度满足预设条件,则对所述物体对应的图像区域进行对焦处理。
在确定相对对比度满足预设条件的区域后,可以根据所述相对对比度满足预设条件的区域进行对焦处理。本发明实施例中,所述进行对焦处理,可以是指控制对焦电机驱动镜头移动到合焦位置。例如,在对所述物体所在的图像区域进行对焦处理时,可以控制所述对焦电机驱动所述镜头移动到所述物体对应的合焦位置。
具体地,若满足预设条件的区域有一个,则以所述满足预设条件的区域为目标区域进行对焦处理;若满足预设条件的区域有多个,则从多个区域中选择一个区域作为目标区域进行对焦处理。
其中,选择的策略可以根据实际需要来设置,例如,可以从所述满足预设条件的多个区域中,选择位于前景的区域作为目标区域,或者,可以根据语义分割等方法确定每个区域的类别,根据类别从中选择一个区域作为目标区域,例如,可以选择人脸区域作为目标区域。
在确定目标区域之后,可以控制所述镜头移动到所述目标区域对应的合焦位置,即所述目标区域最清晰时镜头所在的位置,从而完成对焦操作。
根据多帧图像之间的相对对比度进行筛选,可以筛除掉在各帧图像间对比度变化不明显的区域,提高对焦的准确率和效率,根据多个滤波器之间的相对对比度进行筛选,可以筛除掉纹理不丰富的区域,有效防止误对焦。
在实际应用中,本实施例中的方法可以应用于CDAF算法或其他对焦算法,通过在所述待处理的图像中选择相对对比度满足预设条件的区域进行对焦处理,可以对相对对比度较差的物体进行筛除,避免对焦到干扰物体上,仅针对相对对比度满足预设条件的物体进行对焦。
具体来说,在待处理的图像中,可以认为玻璃、墙、天空对应的图像区域的相对对比度不满足预设条件。玻璃、墙、天空既是多帧图像之间的对比度变化不明显的物体,又是通过多个滤波器得到的多个对比度变化不明显的物体,因此,玻璃、墙、天空对应的图像区域属于相对对比度不满足预设条件的图像区域,在拍摄画面中存在玻璃、墙、天空时,可以对玻璃、墙、天空以外的物体进行对焦,提高对焦的效率和准确率。
本实施例提供的对焦控制方法,可以获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像,确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件,其中,相对对比度是依据至少一滤波器对所述物体对应的图像区域进行滤波处理而得到的输出结果来确定的,若所述物体对应的图像区域的相对对比度满足预设条件,则对所述物体对应的图像区域进行对焦处理,能够通过相对对比度对所述图像中的区域进行筛选,筛除相对对比度不满足预设条件的区域,避免对焦到相对对比度较差的物体上,提高对焦的效率和准确率。
在上述实施例提供的技术方案的基础上,可选的是,确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件,可以包括:
根据待处理的图像确定图像中多个区域的识别结果,其中,每个区域的识别结果包括所述区域在每一帧图像中对应的对比度;根据所述多个区域的识别结果,分别判断每个区域的相对对比度是否满足第三预设条件;若存在相对对比度满足第三预设条件的区域,则确定所述多帧待处理的图像中存在 一物体,所述物体对应的图像区域的相对对比度满足预设条件。
相应的,所述若所述物体对应的图像区域的相对对比度满足预设条件,则对所述物体对应的图像区域进行对焦处理,可以包括:对所述满足第三预设条件的区域进行对焦处理。
通过直接检测各个区域的相对对比度是否满足第三预设条件,并对满足第三预设条件的区域进行对焦处理,能够实现对图像中满足预设条件的物体进行对焦处理。所述第三预设条件可以根据实际需要来设计,下面分别以实施例二和实施例三为例进行说明。
实施例二
本发明实施例二提供一种对焦控制方法。本实施例是在上述实施例提供的技术方案的基础上,根据通过多个滤波器得到的对比度对区域进行评分,并根据评分结果确定所述区域的相对对比度是否满足第三预设条件。
图6为本发明实施例二提供的一种对焦控制方法的流程示意图。如图6所示,本实施例中的对焦控制方法,可以包括:
步骤601、获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像。
本实施例中,步骤601的具体实现原理和过程可以参见上述实施例,此处不再赘述。
步骤602、对待处理的每一帧图像进行如下处理:通过多个滤波器分别对所述图像进行滤波,得到所述图像的多个区域中每个区域的对比度合集,其中,每个区域的对比度合集包括通过所述多个滤波器中的每一滤波器对所述图像进行滤波后得到的所述区域的对比度。
本实施例中,通过步骤602,可以实现根据待处理的图像确定图像中多个区域的识别结果,所述识别结果包括所述区域在每一帧图像中对应的对比度。
假设对焦电机移动过程中共拍摄了40帧图像,每一帧图像均可以分为100个区域,可以设计2个滤波器对图像进行滤波处理。那么,通过步骤602,可以得到100个区域对应的识别结果,其中,每个区域的识别结果可以包括40帧图像对应的对比度合集,每一帧图像对应的对比度合集中包括2个滤波器得到的对比度。也就是说,每个区域的识别结果可以包括80个对比度。
步骤603、针对每一帧图像,根据所述图像中所述多个区域的对比度合集,对每个区域进行评分。
步骤604、针对每个区域,根据所述区域在各帧图像中的评分,确定所述区域的相对对比度是否满足第三预设条件。
本实施例中,通过步骤603和步骤604,可以实现根据所述多个区域的识别结果,分别判断每个区域的相对对比度是否满足第三预设条件。
其中,所述第三预设条件可以为所述区域的综合评分大于第一阈值,所述综合评分可以依据所述区域在各帧图像中的评分来确定。所述区域在每帧图像中的评分可以通过不同滤波器得到的对比度来确定。
可选的,步骤603中的根据所述图像中所述多个区域的对比度合集,对每个区域进行评分,可以包括:针对每个区域,在所述区域对应的对比度合集中,根据各个对比度之间的差距,对所述区域进行评分。可选的,各个对比度之间的差距越大,所述区域评分越高。
具体来说,在一帧图像中,对于任一区域来说,其对比度合集中各个对比度之间的差距越大,说明所述区域的纹理越丰富,对应的评分可以越高。所述差距可以表现为差值和/或比值。
举例来说,所述多个滤波器可以包括高频滤波器(高通滤波器)和低频滤波器(低通滤波器),高频滤波器能够允许高频信号通过,低频滤波器能够允许低频信号通过。
可选的,根据所述图像中所述多个区域的对比度合集,对每个区域进行评分,可以包括:针对每个区域,分别利用所述高频滤波器和所述低频滤波器进行滤波处理;以及根据通过所述高频滤波器得到的对比度与通过所述低频滤波器得到的对比度的比值,对所述区域进行评分。所述比值越大,说明所述区域的高频信号越多,因此评分可以越高,所述比值越小,说明所述区域的高频信号越少,因此评分可以越低。
通过步骤603,可以得到所述区域在每一帧图像中的评分,每一帧对应的评分可以表示所述区域在该帧图像中的相对对比度的好坏,在步骤604中,可以根据所述区域在各帧图像中的评分,综合确定所述区域的相对对比度是否满足第三预设条件。可选的,可以根据所述区域在各帧图像中的评分,确定所述区域的综合评分,若所述综合评分大于第一阈值,则确定所述区域的相对对比度满足第三预设条件。
例如,可以将所述区域在40帧图像中的评分进行累加,得到所述区域的综合评分,从100个区域中,选择综合评分高于第一阈值的区域作为满足第三 预设条件的区域。综合评分高于第一阈值的区域可以有一个,也可以有多个。
步骤605、对所述满足第三预设条件的区域进行对焦处理。
若满足第三预设条件的区域有一个,则以所述满足第三预设条件的区域为目标区域进行对焦处理;若满足第三预设条件的区域有多个,则从多个区域中选择一个区域作为目标区域进行对焦处理。在对所述区域进行对焦处理时,可以控制所述对焦电机驱动所述镜头移动到所述区域对应的合焦位置。在实际应用中,可以通过多个滤波器对图像进行处理,通过每一个滤波器都可以得到所述图像中各个区域的对比度,针对每个区域,根据多个滤波器得到的对比度之间的比值或差值,可以对所述区域进行打分,从而筛除掉不满足第三预设条件的区域。
在确定满足第三预设条件的区域后,可以根据所述滤波器中的任一滤波器的输出结果来实现对焦操作。可选的,可以根据当前场景选择对应的滤波器,根据场景选择滤波器进行对焦操作的具体实现原理属于现有技术,本实施例中不再赘述。
本实施例提供的对焦控制方法,通过多个滤波器分别对图像进行滤波,得到所述图像的多个区域中每个区域的对比度合集,根据所述图像中所述多个区域的对比度合集,对每个区域进行评分,针对每个区域,根据所述区域在各帧图像中的评分,确定所述区域的相对对比度是否满足第三预设条件,能够快速通过多个滤波器得到的对比度确定所述区域是否满足第三预设条件,并对满足第三预设条件的区域进行对焦,从而优先对焦到纹理丰富的物体,有效提高对焦的准确率。
实施例三
本发明实施例三提供一种对焦控制方法。本实施例是在上述实施例提供的技术方案的基础上,通过各帧图像之间的对比度变化对区域进行评分,并根据评分结果确定所述区域的相对对比度是否满足第三预设条件。
图7为本发明实施例三提供的一种对焦控制方法的流程示意图。如图7所示,本实施例中的对焦控制方法,可以包括:
步骤701、获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像。
步骤702、根据待处理的图像确定图像中多个区域的识别结果,其中,每个区域的识别结果包括所述区域在每一帧图像中对应的对比度。
本实施例中,步骤701至步骤702的具体实现原理和过程可以参见上述实施例,此处不再赘述。
在对焦控制装置内设置有多个滤波器的情况下,步骤702中所述的识别结果,可以包括通过其中任意一个滤波器得到的对比度。可选的,所述滤波器可以是对应于当前场景的滤波器,即,通过所述滤波器获得的所述识别结果可以是在对焦操作时作为合焦位置判断依据的识别结果。
步骤703、针对每一个区域,根据所述区域在每一帧图像中的对比度,确定所述区域在对焦电机移动过程中的对比度曲线。
具体可参见图2和图3,以图像的帧数为横坐标,帧数可以表征对焦电机的位置,以区块的对比度为纵坐标,形成对比度曲线。
步骤704、针对每一个区域,根据所述区域的对比度曲线,判断所述区域的相对对比度是否满足第三预设条件。
本实施例中,通过步骤703至步骤704可以实现根据所述多个区域的识别结果,判断每个区域的相对对比度是否满足第三预设条件。
其中,所述第三预设条件可以为所述区域的评分大于第二阈值,所述评分可以依据所述区域的对比度曲线的峰值数目和/或峰值大小来确定。
可选的,在根据所述对比度曲线,判断所述区域的相对对比度是否满足第三预设条件时,可以先确定所述对比度曲线的峰值,然后,根据所述对比度曲线的峰值,判断所述区域的相对对比度是否满足第三预设条件。
比较理想的对比度曲线是,曲线只有一个峰值,并且峰值左侧单调上升,峰值右侧单调下降。因此,可以根据对比度曲线的峰值数目和峰值大小来判断区域是否满足第三预设条件。
可选的,根据所述对比度曲线的峰值,判断所述区域的相对对比度是否满足第三预设条件,可以包括:根据所述对比度曲线的峰值数目和/或峰值大小,对所述区域进行评分;根据所述区域的评分,判断所述区域的相对对比度是否满足第三预设条件;若所述区域的评分大于一阈值,则所述区域的相对对比度满足所述第三预设条件。
其中,根据所述对比度曲线的峰值数目,对所述区域进行评分,可以包括:确定关于峰值数目和评分分值的对应关系的映射表;根据所述对比度曲线的峰值数目,在所述映射表中确定所述区域的评分分值。所述对比度曲线的峰值数目越多,所述区域的评分分值越低。通过映射表可以快速、准确地 实现对区域的评分,提高对焦的效率。
在对焦过程中,常常需要根据前后帧图像的对比度大小来决定对焦电机的移动方向,因此,对焦电机很容易将峰值对应的位置作为合焦位置,峰值数目越多,对焦的误差可能就会越大。
根据所述对比度曲线的峰值大小,对所述区域进行评分,可以包括:若所述对比度曲线的峰值有多个,则根据各个峰值的大小确定主峰;从所述主峰以外的其它峰值中确定有效峰值,其中,所述有效峰值为与主峰峰值的比值超过预设值的峰值;根据所述对比度曲线中的有效峰值的数目,确定所述区域的评分。所述对比度曲线中的有效峰值越多,所述区域的评分越低。
例如,所述预设值可以为80%,在对比度曲线中峰值最大的位置为主峰,除了主峰峰值之外,可能还存在其它峰值,若其它峰值大于80%主峰峰值,则为有效峰值。有效峰值的个数也会影响对焦效果,如果某一图像区域对应的对比度曲线中,有效峰值比较多,说明通过对比度的变化也很难给出一个具有绝对优势的合焦位置,那么所述区域的评分也不会太高。
在实际应用中,可以预先为每个区域设置一个基本分数,然后根据对比度曲线的峰值数目和峰值大小,在基本分数的基础上进行减分。例如,可以首先计算所述区域的对比度曲线的峰值数目,总的峰值数目越多,减分越多,然后,可以根据峰值的大小计算有效峰值,有效峰值越多,减分越多,最后,经过两轮减分之后,若所述区域对应的分数大于预设的分数,那么可以认为所述区域为满足第三预设条件的区域,反之则为不满足第三预设条件的区域。
步骤705、对所述满足第三预设条件的区域进行对焦处理。
本实施例中,步骤705的具体实现原理和过程可以参见上述实施例,此处不再赘述。
本实施例提供的对焦控制方法,针对每一个区域,根据所述区域在每一帧图像中的对比度,确定所述区域在对焦电机移动过程中的对比度曲线,根据所述对比度曲线,根据所述对比度曲线的峰值数目和/或峰值大小,判断所述区域的相对对比度是否满足第三预设条件,并对满足第三预设条件的区域进行对焦,能够优先对焦到不同帧图像之间对比度变化明显的物体,有效提高对焦的效率。
在上述各实施例提供的技术方案的基础上,在确定满足第三预设条件的区域后,可以通过连通域来进行对焦操作。
可选的,对所述满足第三预设条件的区域进行对焦处理,可以包括:根据所述满足所述第三预设条件的区域的识别结果,确定所述满足第三预设条件的区域中每个区域对应的合焦位置;根据所述每个区域对应的合焦位置,确定至少一个连通域;若存在满足所述第三预设条件的连通域,则所述连通域为所述物体所在的图像区域,以及所述物体为所述连通域包含的物体;其中,若任意相邻的两个区域的合焦位置相同或者任意相邻的两个区域的合焦位置之间的距离小于预设距离,则所述两个区域属于同一连通域。
通过连通域进行对焦操作的具体实现方法可以参见实施例五,此处不再赘述。
实施例四
本发明实施例四提供一种对焦控制方法。本实施例可以实现对细长物体的对焦控制过程。
图8为本发明实施例四提供的一种对焦控制方法的流程示意图。如图8所示,本实施例中的对焦控制方法,可以包括:
步骤801、获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像。
步骤802、若所述待处理的图像中存在细长物体,且所述细长物体满足预设要求,则以所述细长物体为目标进行对焦处理。
本实施例中,在获取到待处理的图像后,如果图像中存在满足预设要求的细长物体,则可以以所述细长物体为目标进行对焦处理。
其中,所述细长物体可以包括电线、绳子等。可选的,若物体的长度与宽度的比值超过预设比值例如10,则可以认为所述物体为细长物体。
所述细长物体的检测可以通过多种方法来实现。例如,可以通过语义分割等图像处理技术来确定所述图像中各个物体所在的区域,并根据分割出的区域确定是否存在细长物体,若存在细长物体且满足预设要求,则可以以所述细长物体为目标进行对焦处理。
所述预设要求可以根据实际需要来设置。在一个可选的实施方式中,所述细长物体满足预设要求,可以包括:若所述细长物体为前景物体,则确定所述细长物体满足预设要求。
其中,前景物体可以具体是指,所述物体与拍摄设备的距离小于所述图像中其它物体与所述拍摄设备的距离,也就是说,所述物体在拍摄画面中位 于前面的位置。
在另一个可选的实施方式中,所述细长物体满足预设要求,可以包括:所述细长物体为用户感兴趣的物体,或者,所述细长物体为符合当前场景的物体。例如,在对电线进行维修检测的场景下,电线可以为满足预设要求的细长物体,在对植物进行拍摄的场景下,树枝可以为满足预设要求的细长物体。
在确定满足预设要求的细长物体后,可以以所述细长物体为目标进行对焦处理,即控制对焦电机驱动镜头移动到所述细长物体对应的合焦位置,使得所述细长物体在图像中处于清晰的状态,从而完成对焦过程。
在实际应用中,常常存在需要对细长物体对焦的场景,例如电线检测等行业应用的场景。而现有技术中拍摄设备一般仅对大块的物体进行对焦,会漏掉细长物体,导致无法清晰拍摄到画面中的电线。本实施例提供的对焦控制方法,可以对符合预设要求的细长物体进行对焦,满足了行业应用的需求。
本实施例提供的对焦控制方法,可以获取待处理的图像,若所述待处理的图像中存在细长物体,且所述细长物体满足预设要求,则以所述细长物体为目标进行对焦处理,能够实现对细长物体的对焦,满足了特定场景的需求,提高了对焦的准确率。
实施例五
本发明实施例五提供一种对焦控制方法。本实施例是在实施例四提供的技术方案的基础上,通过连通域实现对物体的对焦控制过程。
图9为本发明实施例五提供的一种对焦控制方法的流程示意图。如图9所示,本实施例中的对焦控制方法,可以包括:
步骤901、获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像。
步骤902、根据所述待处理的图像,确定所述图像的多个区域中每个区域对应的合焦位置。
具体地,可以按照前述实施例中提供的方案,将图像划分为n*m个区域,或者,通过语义分割将图像划分为多个区域。
可选的,根据所述待处理的图像,确定所述图像的多个区域中每个区域对应的合焦位置,可以包括:根据所述待处理的图像,确定所述图像的多个区域的识别结果,每个区域的识别结果包括所述区域在每一帧图像中对应的 对比度;针对每个区域,根据对应的识别结果,确定所述区域对应的合焦位置。
其中,所述识别结果可以是通过当前场景对应的滤波器得到的识别结果。根据对应的识别结果,确定所述区域对应的合焦位置,可以包括:根据所述区域在各帧图像中的对比度变化,确定所述区域对应的合焦位置。
具体地,可以选择对比度最大的一帧图像对应的镜头位置作为所述区域对应的合焦位置。
步骤903、根据所述多个区域对应的合焦位置,确定至少一个连通域。
其中,若任意相邻的两个区域的合焦位置满足预设位置要求,则所述两个区域属于同一连通域。
本实施例中,相邻的区域可以是指在图像上连通(邻接)的区域,所述连通可以具体为八连通、四连通或M连通等。以八连通为例,所述区域的上、下、左、右、左上、左下、右上、右下的八个区域均是与所述区域相邻的区域。以四连通为例,所述区域的上、下、左、右四个区域均是与所述区域连通的区域,所述区域的左上、左下、右上、右下的四个区域是与所述区域不相邻的区域。
任意相邻的两个区域,若合焦位置满足预设位置要求,则所述两个区域属于同一连通域。所述预设位置要求可以根据实际需要来设置,例如,所述特定位置要求可以为两个区域的合焦位置相同或者相近。
在一个可选的实施方式中,根据所述多个区域对应的合焦位置,确定至少一个连通域,可以包括:若任意相邻的两个区域的合焦位置相同,则确定所述两个区域属于同一连通域,能够快速、准确地实现连通域的判定和后续的对焦操作。
在另一个可选的实施方式中,若任意相邻的两个区域的合焦位置之间的距离小于预设距离,则确定所述两个区域属于同一连通域,能够将合焦位置相近的区域融合到一个连通域中,避免拍摄噪声导致对焦失败。
可以理解的是,每个连通域可以包括至少两个区域。若所述图像中存在至少一个连通域,则可以执行步骤904。
步骤904、若存在满足预设要求的连通域,则以所述连通域为目标进行对焦处理。
例如,可以从至少一个连通域中选择位于前景的连通域,或者,选择满 足当前场景要求的连通域作为满足预设条件的连通域并进行对焦处理。
可选的,在确定满足预设条件的连通域之前,还可以对连通域进行筛选。具体地,若存在满足预设要求的连通域,则以所述连通域为目标进行对焦处理,可以包括:若所述连通域的个数为多个,则通过各个连通域的面积对所述各个连通域进行筛选;在通过筛选的连通域中,选择满足预设要求的连通域为目标进行对焦处理。
可以理解的是,如果连通域的面积太小,那么可能是干扰点,可以筛除该连通域,留下面积符合要求的连通域。
可选的,通过各个连通域的面积对所述各个连通域进行筛选,可以包括:针对每一个连通域,若所述连通域的面积大于预设面积,或者,所述连通域的面积与其它面积的比值大于预设面积比值,则所述连通域通过筛选,其中,所述其它面积为除所述连通域以外的其它连通域的面积之和。
具体地,所述预设面积可以是图像整体面积乘以一比例系数,例如,若所述连通域的面积与图像整体面积的比值大于0.05,则认为所述连通域是面积符合要求的连通域。或者,若所述连通域的面积与其它各个连通域的面积之和的比值大于预设面积比值例如0.1,那么可以认为所述连通域也是符合要求的连通域。这样可以筛选出面积绝对值较大和面积相对值较大的连通域,尽量保留有效的连通域,避免漏掉细小物体。
在通过筛选的连通域中,可以选择满足预设要求的连通域例如位于前景的连通域作为目标进行对焦处理。其中,连通域是否位于前景可以所述连通域对应的合焦位置判断。
除了对焦前景的区域或连通域以外,还可以根据语义分割确定各个区域的类别,若出现预定的类别,则优先对该类别的区域进行对焦。其中,类别可以是指物体的类别,例如所述类别可以包括人、车、建筑物等。
可选的,在通过筛选的连通域中,选择满足预设要求的连通域为目标进行对焦处理,可以包括:识别通过筛选的连通域中的各区域的类别;选择类别满足预设要求的区域作为目标进行对焦处理。
其中,可以通过卷积神经网络(Convolutional Neural Networks,CNN)等方法实现语义分割,确定每个区域的类别。通过CNN语义分割的方法来确定目标,可以让对焦目标的选择更加智能。
在一个可选的实施方式中,选择类别满足预设要求的区域作为目标进行 对焦处理,可以包括:若所述各区域的类别中,存在预设类别,则以所述预设类别的区域为目标进行对焦处理。进一步地,当预设类别的区域有多个时,可以从中选择位于前景的区域进行对焦。
可选的,本实施例提供的方法可以应用于巡检设备,所述预设类别可以为所述巡检设备的巡检目标对应的类别。
举例来说,所述巡检设备为电塔巡检设备,所述预设类别为电塔。那么,在检测到电塔后,即使电塔前还存在其它前景物体,依然可以优先对电塔进行对焦,保证电塔在图像中的清晰度,满足电塔巡检的要求。
或者,所述巡检设备可以为桥梁巡检设备,所述预设类别可以为桥梁。又或者,所述巡检设备可以为搜救设备或追踪设备,所述预设类别可以为要搜救或追踪的物体的类别如人等。
可选的,还可以根据设备当前所处的工作状态确定所述预设类别。所述工作状态包括下述任意一项:巡检状态、导航状态、跟随状态、自拍状态、待机状态。例如,在巡检状态下,可以以巡检目标对应的类别作为预设类别;在导航状态下,可以以建筑物或者马路为预设类别;在跟随状态下,可以以跟随的目标如人作为预设类别;在自拍状态下,可以以人脸作为预设类别,从而满足不同工作状态下的拍摄要求。
在另一个可选的实施方式中,可以对各个类别进行排序,确定各个类别对应的优先级,如人优先级大于车的优先级,车的优先级大于建筑物的优先级。这样,在存在多个通过筛选的连通域时,可以从中选择优先级最高的区域作为目标进行对焦处理。不同场景下,各个类别的优先级可以进行相应的调整。
通过步骤902至步骤904可以实现:若所述待处理的图像中存在细长物体,且所述细长物体满足预设要求,则以所述细长物体为目标进行对焦处理。
其中,通过合焦位置确定的连通域,可能属于细长物体例如电线等对应的连通域,也可能属于其它的物体例如人等对应的连通域。当所述连通域中存在细长物体且满足预设要求时,以所述连通域为目标进行对焦操作,可以实现对满足预设要求的细长物体进行对焦。当然,若所连通域中包含的是其它物体且满足预设要求,那么以所述连通域为目标进行对焦操作,可以实现对满足预设要求的其它物体进行对焦。
若所述图像中不存在连通域,或者,没有连通域通过面积筛选,那么说 明图像中可能不存在细长物体或其它面积满足要求的物体,此时可以利用各个区域的对比度来直接进行对焦处理。
具体地,在不存在通过筛选的连通域的情况下,可以确定所述图像的安全区域内的多个区域对应的合焦位置,根据所述多个区域对应的合焦位置,对所述多个区域进行分组,将同一合焦位置的区域分为一组,并根据区域数量最多的一组对应的合焦位置,进行对焦处理。
其中,所述安全区域可以是指图像中排除掉极远景和极近景的区域,所述极远景和所述极近景可以通过合焦位置来确定。在安全区域内的多个区域中,通过少数服从多数的原则来选择合焦位置,若最多数量的区域都对应同一合焦位置,那么可以根据该合焦位置进行对焦处理。
例如,所述图像的安全区域内有10个区域,其中3个区域对应的合焦位置均为A,5个区域对应的合焦位置均为B,另外2个区域对应的合焦位置均为C,那么,可以将多个区域分为三组,分别对应A、B、C三个合焦位置,其中,B组的区域数量最多,那么可以根据合焦位置B来进行对焦处理,即控制对焦电机移动到合焦位置B。
根据安全区域可以避免对焦极近景和极远景,提高对焦准确率。通过少数服从多数的原则,可以最大限度地提升图像整体清晰度,进一步提高对焦准确率。
在实际应用中,由于电线等细长物体比较细小,所占的(Field of View,FOV)比较小,现有技术中图像的区域划分的比较大,细长物体可能会因为占比太小而漏掉,当然每个区域也可以划分得比较小,但是这样可能会受一些干扰点的影响而对焦失败。因此本实施例提出了一种兼顾的方法:通过连通域实现对焦控制。
在本实施例中,所述图像中的区域可以划分得比较小,例如每个区域的面积可以小于电线通常所占的图像区域面积。通过对多个区域做连通域检测,并对满足要求的连通域进行对焦,相对于现有技术具有更强的鲁棒性,既可以可以将划分的区域面积放低,同时也可以避免零星干扰点的影响。通过本实施例提供的方法,可以将CDAF前景对焦成功率从95%提高到99.9%以上,满足行业对成功率的苛求。
本实施例提供的对焦控制方法,通过根据所述待处理的图像,确定所述图像的多个区域中每个区域对应的合焦位置,根据所述多个区域对应的合焦 位置,确定至少一个连通域,若存在满足预设要求的连通域,则以所述连通域为目标进行对焦处理,能够快速、准确地实现对满足预设要求的物体的对焦,同时可以避免零星干扰点的影响,提高对焦的成功率。
本实施例中的方法也可以与前述各实施例中的方法结合起来使用。可选的,步骤902中的确定所述图像的多个区域中每个区域对应的合焦位置,可以包括:确定所述图像中相对对比度满足预设条件的多个区域中每个区域的合焦位置。
其中,可以通过前述实施例一至实施例三所述的方法,从所述待处理的图像中选择满足相对对比度满足预设条件的多个区域,并基于所述相对对比度满足预设条件的多个区域实现连通域的检测和对焦操作。
实施例六
本发明实施例六提供一种对焦控制方法。本实施例整合上述各实施例提供的方法,通过相对对比度对区域进行筛选,并通过连通域实现对焦控制过程。
图10为本发明实施例六提供的一种对焦控制方法的流程示意图。如图10所示,本实施例中的对焦控制方法,可以包括:
步骤1001、获取多帧待处理的图像。
其中,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像。
步骤1002、根据相对对比度对所述图像中的各个区域进行评分,确定合格的区域。
其中,评分可以包括:根据通过不同滤波器得到的对比度的比值进行评分,和/或,根据不同帧图像的对比度变化的峰值进行评分。
具体地,可以首先设定各个区域的分值均为满分,然后判断不同滤波器输出结果之间的比值、各帧图像对应的对比度曲线中的峰值大小、峰值数目等是否满足相应的条件,如果不满足就进行相应的减分操作。最终得到的分值低于合格分值的区域被筛除,高于合格分值的区域属于合格的区域,被保留下来。
步骤1003、在所述合格的区域中,根据合焦位置确定连通域。
步骤1004、根据面积对连通域进行筛选。
其中,面积占比太小的要筛除掉,因为面积占比太小的连通域可能并不 是用户感兴趣的连通域,而是干扰点。
步骤1005、根据筛选后的连通域进行对焦操作。
可选的,可以在通过筛选的连通域中选择位于前景或者属于预设类别的连通域作为目标进行对焦操作。
其中,以所述区域或者所述连通域为目标,进行对焦处理,可以是指,直接将镜头移动到所述区域或者连通域对应的合焦位置,或者,也可以针对所述区域或者所述连通域再进行一次CDAF操作。
可选的,若通过步骤1003不能得到至少一个连通域,或者,通过步骤1004的筛选后,不存在通过筛选的连通域,那么可以按照少数服从多数原则,在图像的安全区域内的多个区域中选择合适的区域进行对焦操作。这种情况下,不需要考虑区域的评分是否合格,因为挑选不出符合要求的连通域,说明各个区域都不是特别理想的对焦目标,这种情况下可以不计较区域的评分,只要很多个区域都对应同一合焦位置,那么可以以该合焦位置实现对焦操作。
本实施例中的方法整合了上述多个实施例中的方案,本实施例中未详细描述的部分,可以参见上述实施例,此处不再赘述。
本实施例提供的对焦控制方法,可以通过对比度和峰值数目对区域进行打分,其中,通过对多个区域中每个区域的对比度变化进行分析评分,可以减少低对比度的区域的权重,避免对焦单调物体,通过对多个区域中的每个区域的峰值进行分析评分,可以减少多峰区域的干扰影响;通过连通域算法可以检测出细长物体,防止漏掉细长的电线,满足行业应用需求,让对焦目标的选择更加符合用户意图。
通过上述各实施例提供的技术方案,可以实现无需用户手动干预,自动完成对焦过程。在一些场景下,也可以允许用户点击屏幕,根据用户点击的位置,可以确定用户期望对焦的感兴趣区域,例如以用户点击位置为中心点选择预设边长的方形区域作为感兴趣区域,将所述感兴趣区域进一步划分为多个区域,并按照前述各实施例提供的方案选择符合要求的区域进行对焦操作,从而满足用户的个性化需求。
实施例七
图11为本发明实施例七提供的一种对焦控制装置的结构示意图。所述对焦控制装置可以执行上述图1所对应的对焦控制方法,参考附图11所示,所述对焦控制装置可以包括:
存储器11,用于存储计算机程序;
处理器12,用于运行所述存储器中存储的计算机程序以实现:
获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件;其中,相对对比度是依据至少一滤波器对所述物体对应的图像区域进行滤波处理而得到的输出结果来确定的;
若所述物体对应的图像区域的相对对比度满足预设条件,则对所述物体对应的图像区域进行对焦处理。
可选的,该对焦控制装置的结构中还可以包括通信接口13,用于与其他设备或通信网络通信。
在一个可实施的方式中,所述相对对比度满足预设条件包括:所述物体在各帧图像之间对应的图像区域的对比度变化满足第一预设条件,和/或,所述物体在每帧图像中对应的图像区域通过多个滤波器滤波得到的多个对比度之间的变化满足第二预设条件。
在一个可实施的方式中,所述待处理的图像中玻璃、墙、天空对应的图像区域的相对对比度不满足预设条件。
在一个可实施的方式中,在确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件时,所述处理器12具体用于:
根据待处理的图像确定图像中多个区域的识别结果,其中,每个区域的识别结果包括所述区域在每一帧图像中对应的对比度;
根据所述多个区域的识别结果,分别判断每个区域的相对对比度是否满足第三预设条件;
若存在相对对比度满足第三预设条件的区域,则确定所述多帧待处理的图像中存在一物体,所述物体对应的图像区域的相对对比度满足预设条件;
所述若所述物体对应的图像区域的相对对比度满足预设条件,则对所述物体对应的图像区域进行对焦处理,所述处理器12具体用于:对所述满足第三预设条件的区域进行对焦处理。
在一个可实施的方式中,在根据待处理的图像确定图像中多个区域的识别结果时,所述处理器12具体用于:
对待处理的每一帧图像进行如下处理:通过多个滤波器分别对所述图像进行滤波,得到所述图像的多个区域中每个区域的对比度合集,其中,每个区域的对比度合集包括通过所述多个滤波器中的每一滤波器对所述图像进行滤波后得到的所述区域的对比度。
在一个可实施的方式中,在根据所述多个区域的识别结果,判断每个区域的相对对比度是否满足所述第三预设条件时,所述处理器12具体用于:
针对每一帧图像,根据所述图像中所述多个区域的对比度合集,对每个区域进行评分;
针对每个区域,根据所述区域在各帧图像中的评分,确定所述区域的相对对比度是否满足所述第三预设条件。
在一个可实施的方式中,在根据所述图像中所述多个区域的对比度合集,对每个区域进行评分时,所述处理器12具体用于:
针对每个区域,在所述区域对应的对比度合集中,根据各个对比度之间的差距,对所述区域进行评分。
在一个可实施的方式中,所述多个滤波器包括高频滤波器和低频滤波器;
在根据所述图像中所述多个区域的对比度合集,对每个区域进行评分时,所述处理器12具体用于:
针对每个区域,分别利用所述高频滤波器和所述低频滤波器进行滤波处理;以及根据通过所述高频滤波器得到的对比度与通过所述低频滤波器得到的对比度的比值,对所述区域进行评分。
在一个可实施的方式中,在根据所述区域在各帧图像中的评分,确定所述区域的相对对比度是否满足所述第三预设条件时,所述处理器12具体用于:
根据所述区域在各帧图像中的评分,确定所述区域的综合评分;
若所述综合评分大于第一阈值,则确定所述区域的相对对比度满足所述第三预设条件。
在一个可实施的方式中,在根据所述多个区域的识别结果,分别判断每个区域的相对对比度是否满足第三预设条件时,所述处理器12具体用于:
针对每一个区域,根据所述区域在每一帧图像中的对比度,确定所述区域在对焦电机移动过程中的对比度曲线;
根据所述对比度曲线,判断所述区域的相对对比度是否满足所述第三预设条件。
在一个可实施的方式中,在根据所述对比度曲线,判断所述区域的相对对比度是否满足第三预设条件时,所述处理器12具体用于:
确定所述对比度曲线的峰值;
根据所述对比度曲线的峰值,判断所述区域的相对对比度是否满足第三预设条件。
在一个可实施的方式中,在根据所述对比度曲线的峰值,判断所述区域的相对对比度是否满足第三预设条件时,所述处理器12具体用于:
根据所述对比度曲线的峰值数目和/或峰值大小,对所述区域进行评分;
根据所述区域的评分,判断所述区域的相对对比度是否满足所述第三预设条件;
若所述区域的评分大于第二阈值,则所述区域的相对对比度满足所述第三预设条件。
在一个可实施的方式中,确定关于峰值数目和评分分值的对应关系的映射表;
根据所述对比度曲线的峰值数目,在所述映射表中确定所述区域的评分分值。
在一个可实施的方式中,在根据所述对比度曲线的峰值大小,对所述区域进行评分时,所述处理器12具体用于:
若所述对比度曲线的峰值有多个,则根据各个峰值的大小确定主峰;
从所述主峰以外的其它峰值中确定有效峰值,其中,所述有效峰值为与主峰峰值的比值超过预设值的峰值;
根据所述对比度曲线中的有效峰值的数目,确定所述区域的评分。
在一个可实施的方式中,在对所述满足第三预设条件的区域进行对焦处理时,所述处理器12具体用于:
根据所述满足所述第三预设条件的区域的识别结果,确定所述满足第三预设条件的区域中每个区域对应的合焦位置;
根据所述每个区域对应的合焦位置,确定至少一个连通域;
若存在满足所述第三预设条件的连通域,则所述连通域为所述物体所在的图像区域,以及所述物体为所述连通域包含的物体;
其中,若任意相邻的两个区域的合焦位置相同或者任意相邻的两个区域的合焦位置之间的距离小于预设距离,则所述两个区域属于同一连通域。
图11所示对焦控制装置可以执行图1-图7所示实施例的方法,本实施例未详细描述的部分,可参考对图1-图7所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1-图7所示实施例中的描述,在此不再赘述。
实施例八
图12为本发明实施例八提供的一种对焦控制装置的结构示意图。所述对焦控制装置可以执行上述图8所对应的对焦控制方法,参考附图12所示,所述对焦控制装置可以包括:
存储器21,用于存储计算机程序;
处理器22,用于运行所述存储器中存储的计算机程序以实现:
获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
若所述待处理的图像中存在细长物体,且所述细长物体满足预设要求,则以所述细长物体为目标进行对焦处理。
可选的,该对焦控制装置的结构中还可以包括通信接口23,用于与其他设备或通信网络通信。
在一个可实施的方式中,若物体的长度与宽度的比值超过预设比值,则所述物体为细长物体。
在一个可实施的方式中,所述细长物体包括电线。
在一个可实施的方式中,在若所述待处理的图像中存在细长物体,且所述细长物体满足预设要求,则以所述细长物体为目标进行对焦处理时,所述处理器22具体用于:
根据所述待处理的图像,确定所述图像的多个区域中每个区域对应的合焦位置;
根据所述多个区域对应的合焦位置,确定至少一个连通域;
若存在满足预设要求的连通域,则以所述连通域为目标进行对焦处理;
其中,若任意相邻的两个区域的合焦位置满足预设位置要求,则所述两个区域属于同一连通域。
在一个可实施的方式中,在确定所述图像的多个区域中每个区域对应的合焦位置时,所述处理器22具体用于:
确定所述图像中相对对比度满足预设条件的多个区域中每个区域的合焦位置。
在一个可实施的方式中,在根据所述待处理的图像,确定所述图像的多个区域中每个区域对应的合焦位置时,所述处理器22具体用于:
根据所述待处理的图像,确定所述图像的多个区域的识别结果,每个区域的识别结果包括所述区域在每一帧图像中对应的对比度;
针对每个区域,根据对应的识别结果,确定所述区域对应的合焦位置。
在一个可实施的方式中,在根据对应的识别结果,确定所述区域对应的合焦位置时,所述处理器22具体用于:
根据所述区域在各帧图像中的对比度变化,确定所述区域对应的合焦位置。
在一个可实施的方式中,在根据所述多个区域对应的合焦位置,确定至少一个连通域时,所述处理器22具体用于:若任意相邻的两个区域的合焦位置相同,则确定所述两个区域属于同一连通域;
或者,若任意相邻的两个区域的合焦位置之间的距离小于预设距离,则确定所述两个区域属于同一连通域。
在一个可实施的方式中,在若存在满足预设要求的连通域,则以所述连通域为目标进行对焦处理时,所述处理器22具体用于:
若所述连通域的个数为多个,则通过各个连通域的面积对所述各个连通域进行筛选;
在通过筛选的连通域中,选择满足预设要求的连通域为目标进行对焦处理。
在一个可实施的方式中,在通过各个连通域的面积对所述各个连通域进行筛选时,所述处理器22具体用于:
针对每一个连通域,若所述连通域的面积大于预设面积,或者,所述连通域的面积与其它面积的比值大于预设面积比值,则所述连通域通过筛选,其中,所述其它面积为除所述连通域以外的其它连通域的面积之和。
在一个可实施的方式中,在通过筛选的连通域中,选择满足预设要求的连通域为目标进行对焦处理时,所述处理器22具体用于:
在通过筛选的连通域中,选择位于前景的连通域作为目标进行对焦处理。
在一个可实施的方式中,所述处理器22还用于:
若没有连通域通过筛选,则确定所述图像的安全区域内的多个区域对应的合焦位置;
根据所述多个区域对应的合焦位置,对所述多个区域进行分组,将同一合焦位置的区域分为一组;
根据区域数量最多的一组对应的合焦位置,进行对焦处理。
在一个可实施的方式中,在通过筛选的连通域中,选择满足预设要求的连通域为目标进行对焦处理时,所述处理器22具体用于:
识别通过筛选的连通域中的各区域的类别;
选择类别满足预设要求的区域作为目标进行对焦处理。
在一个可实施的方式中,在选择类别满足预设要求的区域作为目标进行对焦处理时,所述处理器22具体用于:
若所述各区域的类别中,存在预设类别,则以所述预设类别的区域为目标进行对焦处理。
在一个可实施的方式中,所述装置应用于巡检设备,所述预设类别为所述巡检设备的巡检目标对应的类别。
在一个可实施的方式中,所述巡检设备为电塔巡检设备,所述预设类别为电塔。
在一个可实施的方式中,所述处理器22还用于:
确定设备当前所处的工作状态;
根据所述工作状态,确定所述预设类别。
在一个可实施的方式中,所述工作状态包括下述任意一项:巡检状态、导航状态、跟随状态、待机状态。
图12所示对焦控制装置可以执行图8-图10所示实施例的方法,本实施例未详细描述的部分,可参考对图8-图10所示实施例的相关说明。该技术方案的执行过程和技术效果参见图8-图10所示实施例中的描述,在此不再赘述。
实施例九
图13为本发明实施例九提供的一种对焦控制装置的结构示意图。参考附图13所示,本实施例提供的对焦控制装置可以包括:
第一图像获取电路1301,用于获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
第一确定电路1302,用于确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件;其中,相对对比度是依据至少一滤波器对所述物体对应的图像区域进行滤波处理而得到的输 出结果来确定的;
第一对焦处理电路1303,用于在所述物体对应的图像区域的相对对比度满足预设条件时,对所述物体对应的图像区域进行对焦处理。
其中,所述对焦控制装置用于执行图1-图7所示实施例的方法。图1-图7所示实施例的方法,可以通过硬件电路来实现。例如,对图像进行滤波,可以通过滤波电路来实现;对区域进行加分或者减分,可以通过加法器或者减法器等来实现;判断评分是否满足要求,可以通过比较器等来实现;进行对焦处理,可以通过向对焦电机输出步进信号来实现。
本实施例未详细描述的部分,可参考对图1-图7所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1-图7所示实施例中的描述,在此不再赘述。
实施例十
图14为本发明实施例十提供的一种对焦控制装置的结构示意图。参考附图14所示,本实施例提供的对焦控制装置可以包括:
第二图像获取电路1401,用于获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
第二对焦处理电路1402,用于在所述待处理的图像中存在细长物体,且所述细长物体满足预设要求时,以所述细长物体为目标进行对焦处理。
其中,所述对焦控制装置可以执行图8-图10所示实施例的方法。图8-图10所示实施例的方法,可以通过硬件电路来实现。本实施例未详细描述的部分,可参考对图8-图10所示实施例的相关说明。该技术方案的执行过程和技术效果参见图8-图10所示实施例中的描述,在此不再赘述。
本发明实施例还提供一种拍摄设备,包括上述任一实施例所述的对焦控制装置。
可选的,所述拍摄设备还可以包括镜筒、镜头、对焦电机和图像传感器。其中,所述对焦电机用于驱动所述镜头相对于镜筒移动,以改变物距或像距。所述图像传感器用于将经过所述镜头的光信号转换为电信号,以形成图像。
可选的,所述拍摄设备可以为巡检设备。
所述拍摄设备中各部件的结构、功能、执行过程和技术效果可以参见前述实施例中的描述,在此不再赘述。
本发明实施例还提供一种可移动平台,包括以上所述的拍摄设备。所述 可移动平台可以为无人机、无人车或者云台等。所述可移动平台还可以包括机体和动力系统。所述拍摄设备和所述动力系统设于所述机体上,所述动力系统用于为所述可移动平台提供动力。
所述可移动平台中各部件的结构、功能、执行过程和技术效果可以参见前述实施例中的描述,在此不再赘述。
另外,本发明实施例提供了一种存储介质,该存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,程序指令用于实现上述图1-图7所示实施例中的对焦控制方法。
本发明实施例还提供了一种存储介质,该存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,程序指令用于实现上述图8-图10所示实施例中的对焦控制方法。
以上各个实施例中的技术方案、技术特征在与本相冲突的情况下均可以单独,或者进行组合,只要未超出本领域技术人员的认知范围,均属于本发明保护范围内的等同实施例。
在本发明所提供的几个实施例中,应该理解到,所揭露的相关遥控装置和方法,可以通过其它的方式实现。例如,以上所描述的遥控装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,遥控装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本 发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得计算机处理器(processor)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read_Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁盘或者光盘等各种可以存储程序代码的介质。
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (74)

  1. 一种对焦控制方法,其特征在于,包括:
    获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
    确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件;其中,相对对比度是依据至少一滤波器对所述物体对应的图像区域进行滤波处理而得到的输出结果来确定的;
    若所述物体对应的图像区域的相对对比度满足预设条件,则对所述物体对应的图像区域进行对焦处理。
  2. 根据权利要求1所述的方法,其特征在于,所述相对对比度满足预设条件包括:所述物体在各帧图像之间对应的图像区域的对比度变化满足第一预设条件,和/或,所述物体在每帧图像中对应的图像区域通过多个滤波器滤波得到的多个对比度之间的变化满足第二预设条件。
  3. 根据权利要求1所述的方法,其特征在于,所述待处理的图像中玻璃、墙、天空对应的图像区域的相对对比度不满足预设条件。
  4. 根据权利要求1所述的方法,其特征在于,确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件,包括:
    根据待处理的图像确定图像中多个区域的识别结果,其中,每个区域的识别结果包括所述区域在每一帧图像中对应的对比度;
    根据所述多个区域的识别结果,分别判断每个区域的相对对比度是否满足第三预设条件;
    若存在相对对比度满足第三预设条件的区域,则确定所述多帧待处理的图像中存在一物体,所述物体对应的图像区域的相对对比度满足预设条件;
    所述若所述物体对应的图像区域的相对对比度满足预设条件,则对所述物体对应的图像区域进行对焦处理,包括:对所述满足第三预设条件的区域进行对焦处理。
  5. 根据权利要求4所述的方法,其特征在于,根据待处理的图像确定图像中多个区域的识别结果,包括:
    对待处理的每一帧图像进行如下处理:通过多个滤波器分别对所述图像 进行滤波,得到所述图像的多个区域中每个区域的对比度合集,其中,每个区域的对比度合集包括通过所述多个滤波器中的每一滤波器对所述图像进行滤波后得到的所述区域的对比度。
  6. 根据权利要求5所述的方法,其特征在于,根据所述多个区域的识别结果,判断每个区域的相对对比度是否满足所述第三预设条件,包括:
    针对每一帧图像,根据所述图像中所述多个区域的对比度合集,对每个区域进行评分;
    针对每个区域,根据所述区域在各帧图像中的评分,确定所述区域的相对对比度是否满足所述第三预设条件。
  7. 根据权利要求6所述的方法,其特征在于,根据所述图像中所述多个区域的对比度合集,对每个区域进行评分,包括:
    针对每个区域,在所述区域对应的对比度合集中,根据各个对比度之间的差距,对所述区域进行评分。
  8. 根据权利要求6所述的方法,其特征在于,所述多个滤波器包括高频滤波器和低频滤波器;
    根据所述图像中所述多个区域的对比度合集,对每个区域进行评分,包括:
    针对每个区域,分别利用所述高频滤波器和所述低频滤波器进行滤波处理;以及根据通过所述高频滤波器得到的对比度与通过所述低频滤波器得到的对比度的比值,对所述区域进行评分。
  9. 根据权利要求6所述的方法,其特征在于,根据所述区域在各帧图像中的评分,确定所述区域的相对对比度是否满足所述第三预设条件,包括:
    根据所述区域在各帧图像中的评分,确定所述区域的综合评分;
    若所述综合评分大于第一阈值,则确定所述区域的相对对比度满足所述第三预设条件。
  10. 根据权利要求4所述的方法,其特征在于,根据所述多个区域的识别结果,分别判断每个区域的相对对比度是否满足第三预设条件,包括:
    针对每一个区域,根据所述区域在每一帧图像中的对比度,确定所述区域在对焦电机移动过程中的对比度曲线;
    根据所述对比度曲线,判断所述区域的相对对比度是否满足所述第三预设条件。
  11. 根据权利要求10所述的方法,其特征在于,根据所述对比度曲线,判断所述区域的相对对比度是否满足第三预设条件,包括:
    确定所述对比度曲线的峰值;
    根据所述对比度曲线的峰值,判断所述区域的相对对比度是否满足第三预设条件。
  12. 根据权利要求11所述的方法,其特征在于,根据所述对比度曲线的峰值,判断所述区域的相对对比度是否满足第三预设条件,包括:
    根据所述对比度曲线的峰值数目和/或峰值大小,对所述区域进行评分;
    根据所述区域的评分,判断所述区域的相对对比度是否满足所述第三预设条件;
    若所述区域的评分大于第二阈值,则所述区域的相对对比度满足所述第三预设条件。
  13. 根据权利要求12所述的方法,其特征在于,确定关于峰值数目和评分分值的对应关系的映射表;
    根据所述对比度曲线的峰值数目,在所述映射表中确定所述区域的评分分值。
  14. 根据权利要求12所述的方法,其特征在于,根据所述对比度曲线的峰值大小,对所述区域进行评分,包括:
    若所述对比度曲线的峰值有多个,则根据各个峰值的大小确定主峰;
    从所述主峰以外的其它峰值中确定有效峰值,其中,所述有效峰值为与主峰峰值的比值超过预设值的峰值;
    根据所述对比度曲线中的有效峰值的数目,确定所述区域的评分。
  15. 根据权利要求4所述的方法,其特征在于,对所述满足第三预设条件的区域进行对焦处理,包括:
    根据所述满足所述第三预设条件的区域的识别结果,确定所述满足第三预设条件的区域中每个区域对应的合焦位置;
    根据所述每个区域对应的合焦位置,确定至少一个连通域;
    若存在满足所述第三预设条件的连通域,则所述连通域为所述物体所在的图像区域,以及所述物体为所述连通域包含的物体;
    其中,若任意相邻的两个区域的合焦位置相同或者任意相邻的两个区域的合焦位置之间的距离小于预设距离,则所述两个区域属于同一连通域。
  16. 一种对焦控制方法,其特征在于,包括:
    获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
    若所述待处理的图像中存在细长物体,且所述细长物体满足预设要求,则以所述细长物体为目标进行对焦处理。
  17. 根据权利要求16所述的方法,其特征在于,若物体的长度与宽度的比值超过预设比值,则所述物体为细长物体。
  18. 根据权利要求16所述的方法,其特征在于,所述细长物体包括电线。
  19. 根据权利要求16所述的方法,其特征在于,若所述待处理的图像中存在细长物体,且所述细长物体满足预设要求,则以所述细长物体为目标进行对焦处理,包括:
    根据所述待处理的图像,确定所述图像的多个区域中每个区域对应的合焦位置;
    根据所述多个区域对应的合焦位置,确定至少一个连通域;
    若存在满足预设要求的连通域,则以所述连通域为目标进行对焦处理;
    其中,若任意相邻的两个区域的合焦位置满足预设位置要求,则所述两个区域属于同一连通域。
  20. 根据权利要求19所述的方法,其特征在于,确定所述图像的多个区域中每个区域对应的合焦位置,包括:
    确定所述图像中相对对比度满足预设条件的多个区域中每个区域的合焦位置。
  21. 根据权利要求19所述的方法,其特征在于,根据所述待处理的图像,确定所述图像的多个区域中每个区域对应的合焦位置,包括:
    根据所述待处理的图像,确定所述图像的多个区域的识别结果,每个区域的识别结果包括所述区域在每一帧图像中对应的对比度;
    针对每个区域,根据对应的识别结果,确定所述区域对应的合焦位置。
  22. 根据权利要求21所述的方法,其特征在于,根据对应的识别结果,确定所述区域对应的合焦位置,包括:
    根据所述区域在各帧图像中的对比度变化,确定所述区域对应的合焦位置。
  23. 根据权利要求19所述的方法,其特征在于,根据所述多个区域对应的合焦位置,确定至少一个连通域,包括:
    若任意相邻的两个区域的合焦位置相同,则确定所述两个区域属于同一连通域;
    或者,若任意相邻的两个区域的合焦位置之间的距离小于预设距离,则确定所述两个区域属于同一连通域。
  24. 根据权利要求19所述的方法,其特征在于,若存在满足预设要求的连通域,则以所述连通域为目标进行对焦处理,包括:
    若所述连通域的个数为多个,则通过各个连通域的面积对所述各个连通域进行筛选;
    在通过筛选的连通域中,选择满足预设要求的连通域为目标进行对焦处理。
  25. 根据权利要求24所述的方法,其特征在于,通过各个连通域的面积对所述各个连通域进行筛选,包括:
    针对每一个连通域,若所述连通域的面积大于预设面积,或者,所述连通域的面积与其它面积的比值大于预设面积比值,则所述连通域通过筛选,其中,所述其它面积为除所述连通域以外的其它连通域的面积之和。
  26. 根据权利要求24所述的方法,其特征在于,在通过筛选的连通域中,选择满足预设要求的连通域为目标进行对焦处理,包括:
    在通过筛选的连通域中,选择位于前景的连通域作为目标进行对焦处理。
  27. 根据权利要求24所述的方法,其特征在于,还包括:
    若没有连通域通过筛选,则确定所述图像的安全区域内的多个区域对应的合焦位置;
    根据所述多个区域对应的合焦位置,对所述多个区域进行分组,将同一合焦位置的区域分为一组;
    根据区域数量最多的一组对应的合焦位置,进行对焦处理。
  28. 根据权利要求24所述的方法,其特征在于,在通过筛选的连通域中,选择满足预设要求的连通域为目标进行对焦处理,包括:
    识别通过筛选的连通域中的各区域的类别;
    选择类别满足预设要求的区域作为目标进行对焦处理。
  29. 根据权利要求28所述的方法,其特征在于,选择类别满足预设要求 的区域作为目标进行对焦处理,包括:
    若所述各区域的类别中,存在预设类别,则以所述预设类别的区域为目标进行对焦处理。
  30. 根据权利要求29所述的方法,其特征在于,所述方法应用于巡检设备,所述预设类别为所述巡检设备的巡检目标对应的类别。
  31. 根据权利要求30所述的方法,其特征在于,所述巡检设备为电塔巡检设备,所述预设类别为电塔。
  32. 根据权利要求29所述的方法,其特征在于,还包括:
    确定设备当前所处的工作状态;
    根据所述工作状态,确定所述预设类别。
  33. 根据权利要求32所述的方法,其特征在于,所述工作状态包括下述任意一项:巡检状态、导航状态、跟随状态、待机状态。
  34. 一种对焦控制装置,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于运行所述存储器中存储的计算机程序以实现:
    获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
    确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件;其中,相对对比度是依据至少一滤波器对所述物体对应的图像区域进行滤波处理而得到的输出结果来确定的;
    若所述物体对应的图像区域的相对对比度满足预设条件,则对所述物体对应的图像区域进行对焦处理。
  35. 根据权利要求34所述的装置,其特征在于,所述相对对比度满足预设条件包括:所述物体在各帧图像之间对应的图像区域的对比度变化满足第一预设条件,和/或,所述物体在每帧图像中对应的图像区域通过多个滤波器滤波得到的多个对比度之间的变化满足第二预设条件。
  36. 根据权利要求34所述的装置,其特征在于,所述待处理的图像中玻璃、墙、天空对应的图像区域的相对对比度不满足预设条件。
  37. 根据权利要求34所述的装置,其特征在于,在确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足 预设条件时,所述处理器具体用于:
    根据待处理的图像确定图像中多个区域的识别结果,其中,每个区域的识别结果包括所述区域在每一帧图像中对应的对比度;
    根据所述多个区域的识别结果,分别判断每个区域的相对对比度是否满足第三预设条件;
    若存在相对对比度满足第三预设条件的区域,则确定所述多帧待处理的图像中存在一物体,所述物体对应的图像区域的相对对比度满足预设条件;
    所述若所述物体对应的图像区域的相对对比度满足预设条件,则对所述物体对应的图像区域进行对焦处理,所述处理器具体用于:对所述满足第三预设条件的区域进行对焦处理。
  38. 根据权利要求37所述的装置,其特征在于,在根据待处理的图像确定图像中多个区域的识别结果时,所述处理器具体用于:
    对待处理的每一帧图像进行如下处理:通过多个滤波器分别对所述图像进行滤波,得到所述图像的多个区域中每个区域的对比度合集,其中,每个区域的对比度合集包括通过所述多个滤波器中的每一滤波器对所述图像进行滤波后得到的所述区域的对比度。
  39. 根据权利要求38所述的装置,其特征在于,在根据所述多个区域的识别结果,判断每个区域的相对对比度是否满足所述第三预设条件时,所述处理器具体用于:
    针对每一帧图像,根据所述图像中所述多个区域的对比度合集,对每个区域进行评分;
    针对每个区域,根据所述区域在各帧图像中的评分,确定所述区域的相对对比度是否满足所述第三预设条件。
  40. 根据权利要求39所述的装置,其特征在于,在根据所述图像中所述多个区域的对比度合集,对每个区域进行评分时,所述处理器具体用于:
    针对每个区域,在所述区域对应的对比度合集中,根据各个对比度之间的差距,对所述区域进行评分。
  41. 根据权利要求39所述的装置,其特征在于,所述多个滤波器包括高频滤波器和低频滤波器;
    在根据所述图像中所述多个区域的对比度合集,对每个区域进行评分时,所述处理器具体用于:
    针对每个区域,分别利用所述高频滤波器和所述低频滤波器进行滤波处理;以及根据通过所述高频滤波器得到的对比度与通过所述低频滤波器得到的对比度的比值,对所述区域进行评分。
  42. 根据权利要求39所述的装置,其特征在于,在根据所述区域在各帧图像中的评分,确定所述区域的相对对比度是否满足所述第三预设条件时,所述处理器具体用于:
    根据所述区域在各帧图像中的评分,确定所述区域的综合评分;
    若所述综合评分大于第一阈值,则确定所述区域的相对对比度满足所述第三预设条件。
  43. 根据权利要求37所述的装置,其特征在于,在根据所述多个区域的识别结果,分别判断每个区域的相对对比度是否满足第三预设条件时,所述处理器具体用于:
    针对每一个区域,根据所述区域在每一帧图像中的对比度,确定所述区域在对焦电机移动过程中的对比度曲线;
    根据所述对比度曲线,判断所述区域的相对对比度是否满足所述第三预设条件。
  44. 根据权利要求43所述的装置,其特征在于,在根据所述对比度曲线,判断所述区域的相对对比度是否满足第三预设条件时,所述处理器具体用于:
    确定所述对比度曲线的峰值;
    根据所述对比度曲线的峰值,判断所述区域的相对对比度是否满足第三预设条件。
  45. 根据权利要求44所述的装置,其特征在于,在根据所述对比度曲线的峰值,判断所述区域的相对对比度是否满足第三预设条件时,所述处理器具体用于:
    根据所述对比度曲线的峰值数目和/或峰值大小,对所述区域进行评分;
    根据所述区域的评分,判断所述区域的相对对比度是否满足所述第三预设条件;
    若所述区域的评分大于第二阈值,则所述区域的相对对比度满足所述第三预设条件。
  46. 根据权利要求45所述的装置,其特征在于,确定关于峰值数目和评分分值的对应关系的映射表;
    根据所述对比度曲线的峰值数目,在所述映射表中确定所述区域的评分分值。
  47. 根据权利要求45所述的装置,其特征在于,在根据所述对比度曲线的峰值大小,对所述区域进行评分时,所述处理器具体用于:
    若所述对比度曲线的峰值有多个,则根据各个峰值的大小确定主峰;
    从所述主峰以外的其它峰值中确定有效峰值,其中,所述有效峰值为与主峰峰值的比值超过预设值的峰值;
    根据所述对比度曲线中的有效峰值的数目,确定所述区域的评分。
  48. 根据权利要求37所述的装置,其特征在于,在对所述满足第三预设条件的区域进行对焦处理时,所述处理器具体用于:
    根据所述满足所述第三预设条件的区域的识别结果,确定所述满足第三预设条件的区域中每个区域对应的合焦位置;
    根据所述每个区域对应的合焦位置,确定至少一个连通域;
    若存在满足所述第三预设条件的连通域,则所述连通域为所述物体所在的图像区域,以及所述物体为所述连通域包含的物体;
    其中,若任意相邻的两个区域的合焦位置相同或者任意相邻的两个区域的合焦位置之间的距离小于预设距离,则所述两个区域属于同一连通域。
  49. 一种对焦控制装置,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于运行所述存储器中存储的计算机程序以实现:
    获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
    若所述待处理的图像中存在细长物体,且所述细长物体满足预设要求,则以所述细长物体为目标进行对焦处理。
  50. 根据权利要求49所述的装置,其特征在于,若物体的长度与宽度的比值超过预设比值,则所述物体为细长物体。
  51. 根据权利要求49所述的装置,其特征在于,所述细长物体包括电线。
  52. 根据权利要求49所述的装置,其特征在于,在若所述待处理的图像中存在细长物体,且所述细长物体满足预设要求,则以所述细长物体为目标进行对焦处理时,所述处理器具体用于:
    根据所述待处理的图像,确定所述图像的多个区域中每个区域对应的合焦位置;
    根据所述多个区域对应的合焦位置,确定至少一个连通域;
    若存在满足预设要求的连通域,则以所述连通域为目标进行对焦处理;
    其中,若任意相邻的两个区域的合焦位置满足预设位置要求,则所述两个区域属于同一连通域。
  53. 根据权利要求52所述的装置,其特征在于,在确定所述图像的多个区域中每个区域对应的合焦位置时,所述处理器具体用于:
    确定所述图像中相对对比度满足预设条件的多个区域中每个区域的合焦位置。
  54. 根据权利要求52所述的装置,其特征在于,在根据所述待处理的图像,确定所述图像的多个区域中每个区域对应的合焦位置时,所述处理器具体用于:
    根据所述待处理的图像,确定所述图像的多个区域的识别结果,每个区域的识别结果包括所述区域在每一帧图像中对应的对比度;
    针对每个区域,根据对应的识别结果,确定所述区域对应的合焦位置。
  55. 根据权利要求54所述的装置,其特征在于,在根据对应的识别结果,确定所述区域对应的合焦位置时,所述处理器具体用于:
    根据所述区域在各帧图像中的对比度变化,确定所述区域对应的合焦位置。
  56. 根据权利要求52所述的装置,其特征在于,在根据所述多个区域对应的合焦位置,确定至少一个连通域时,所述处理器具体用于:若任意相邻的两个区域的合焦位置相同,则确定所述两个区域属于同一连通域;
    或者,若任意相邻的两个区域的合焦位置之间的距离小于预设距离,则确定所述两个区域属于同一连通域。
  57. 根据权利要求52所述的装置,其特征在于,在若存在满足预设要求的连通域,则以所述连通域为目标进行对焦处理时,所述处理器具体用于:
    若所述连通域的个数为多个,则通过各个连通域的面积对所述各个连通域进行筛选;
    在通过筛选的连通域中,选择满足预设要求的连通域为目标进行对焦处理。
  58. 根据权利要求57所述的装置,其特征在于,在通过各个连通域的面积对所述各个连通域进行筛选时,所述处理器具体用于:
    针对每一个连通域,若所述连通域的面积大于预设面积,或者,所述连通域的面积与其它面积的比值大于预设面积比值,则所述连通域通过筛选,其中,所述其它面积为除所述连通域以外的其它连通域的面积之和。
  59. 根据权利要求57所述的装置,其特征在于,在通过筛选的连通域中,选择满足预设要求的连通域为目标进行对焦处理时,所述处理器具体用于:
    在通过筛选的连通域中,选择位于前景的连通域作为目标进行对焦处理。
  60. 根据权利要求57所述的装置,其特征在于,所述处理器还用于:
    若没有连通域通过筛选,则确定所述图像的安全区域内的多个区域对应的合焦位置;
    根据所述多个区域对应的合焦位置,对所述多个区域进行分组,将同一合焦位置的区域分为一组;
    根据区域数量最多的一组对应的合焦位置,进行对焦处理。
  61. 根据权利要求57所述的装置,其特征在于,在通过筛选的连通域中,选择满足预设要求的连通域为目标进行对焦处理时,所述处理器具体用于:
    识别通过筛选的连通域中的各区域的类别;
    选择类别满足预设要求的区域作为目标进行对焦处理。
  62. 根据权利要求61所述的装置,其特征在于,在选择类别满足预设要求的区域作为目标进行对焦处理时,所述处理器具体用于:
    若所述各区域的类别中,存在预设类别,则以所述预设类别的区域为目标进行对焦处理。
  63. 根据权利要求62所述的装置,其特征在于,所述装置应用于巡检设备,所述预设类别为所述巡检设备的巡检目标对应的类别。
  64. 根据权利要求63所述的装置,其特征在于,所述巡检设备为电塔巡检设备,所述预设类别为电塔。
  65. 根据权利要求62所述的装置,其特征在于,所述处理器还用于:
    确定设备当前所处的工作状态;
    根据所述工作状态,确定所述预设类别。
  66. 根据权利要求65所述的装置,其特征在于,所述工作状态包括下述任意一项:巡检状态、导航状态、跟随状态、待机状态。
  67. 一种对焦控制装置,其特征在于,包括:
    第一图像获取电路,用于获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
    第一确定电路,用于确定所述多帧待处理的图像中是否存在一物体,所述物体对应的图像区域的相对对比度是否满足预设条件;其中,相对对比度是依据至少一滤波器对所述物体对应的图像区域进行滤波处理而得到的输出结果来确定的;
    第一对焦处理电路,用于在所述物体对应的图像区域的相对对比度满足预设条件时,对所述物体对应的图像区域进行对焦处理。
  68. 一种对焦控制装置,其特征在于,包括:
    第二图像获取电路,用于获取多帧待处理的图像,所述多帧待处理的图像包括在对焦电机移动过程中镜头拍摄的多帧图像;
    第二对焦处理电路,用于在所述待处理的图像中存在细长物体,且所述细长物体满足预设要求时,以所述细长物体为目标进行对焦处理。
  69. 一种拍摄设备,其特征在于,包括:权利要求34-48中任一项所述的对焦控制装置。
  70. 一种拍摄设备,其特征在于,包括:权利要求49-66中任一项所述的对焦控制装置。
  71. 一种可移动平台,其特征在于,包括:权利要求69所述的拍摄设备。
  72. 一种可移动平台,其特征在于,包括:权利要求70所述的拍摄设备。
  73. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有程序指令,所述程序指令用于实现权利要求1-15中任意一项所述的对焦控制方法。
  74. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有程序指令,所述程序指令用于实现权利要求16-33中任意一项所述的对焦控制方法。
PCT/CN2020/084800 2020-04-14 2020-04-14 对焦控制方法、装置、设备、可移动平台和存储介质 WO2021207945A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080004951.XA CN112640425A (zh) 2020-04-14 2020-04-14 对焦控制方法、装置、设备、可移动平台和存储介质
PCT/CN2020/084800 WO2021207945A1 (zh) 2020-04-14 2020-04-14 对焦控制方法、装置、设备、可移动平台和存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/084800 WO2021207945A1 (zh) 2020-04-14 2020-04-14 对焦控制方法、装置、设备、可移动平台和存储介质

Publications (1)

Publication Number Publication Date
WO2021207945A1 true WO2021207945A1 (zh) 2021-10-21

Family

ID=75291244

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/084800 WO2021207945A1 (zh) 2020-04-14 2020-04-14 对焦控制方法、装置、设备、可移动平台和存储介质

Country Status (2)

Country Link
CN (1) CN112640425A (zh)
WO (1) WO2021207945A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114245023A (zh) * 2022-02-24 2022-03-25 浙江华创视讯科技有限公司 一种聚焦处理方法及装置、摄像装置和存储介质

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339347A (zh) * 2007-07-06 2009-01-07 鸿富锦精密工业(深圳)有限公司 自动对焦系统及自动对焦方法
CN101950063A (zh) * 2009-07-10 2011-01-19 佛山普立华科技有限公司 自动对焦系统及自动对焦方法
CN102387303A (zh) * 2010-09-02 2012-03-21 奥林巴斯株式会社 图像处理装置、图像处理方法以及摄像装置
CN102890329A (zh) * 2011-07-21 2013-01-23 奥林巴斯映像株式会社 对焦控制装置
CN103108128A (zh) * 2013-02-18 2013-05-15 广东欧珀移动通信有限公司 一种自动对焦的方法、系统及移动终端
CN104460184A (zh) * 2014-11-17 2015-03-25 天津三星通信技术研究有限公司 在拍摄装置中进行对焦的方法和设备
CN105629628A (zh) * 2014-10-30 2016-06-01 展讯通信(上海)有限公司 自动对焦方法及装置
CN106412423A (zh) * 2016-09-19 2017-02-15 珠海格力电器股份有限公司 一种对焦方法及装置
CN106707674A (zh) * 2015-11-17 2017-05-24 深圳市绎立锐光科技开发有限公司 投影设备的自动对焦方法及投影设备
CN107018320A (zh) * 2016-01-18 2017-08-04 奥林巴斯株式会社 焦点调节装置和焦点调节方法
CN109510936A (zh) * 2017-09-14 2019-03-22 展讯通信(上海)有限公司 连续自动对焦方法及系统
CN110033418A (zh) * 2019-04-15 2019-07-19 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备
CN110248096A (zh) * 2019-06-28 2019-09-17 Oppo广东移动通信有限公司 对焦方法和装置、电子设备、计算机可读存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6274794B2 (ja) * 2013-09-12 2018-02-07 株式会社ミツトヨ 情報処理装置、情報処理方法、プログラム、及び画像測定装置
CN108076278B (zh) * 2016-11-10 2021-03-19 斑马智行网络(香港)有限公司 一种自动对焦方法、装置及电子设备

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339347A (zh) * 2007-07-06 2009-01-07 鸿富锦精密工业(深圳)有限公司 自动对焦系统及自动对焦方法
CN101950063A (zh) * 2009-07-10 2011-01-19 佛山普立华科技有限公司 自动对焦系统及自动对焦方法
CN102387303A (zh) * 2010-09-02 2012-03-21 奥林巴斯株式会社 图像处理装置、图像处理方法以及摄像装置
CN102890329A (zh) * 2011-07-21 2013-01-23 奥林巴斯映像株式会社 对焦控制装置
CN103108128A (zh) * 2013-02-18 2013-05-15 广东欧珀移动通信有限公司 一种自动对焦的方法、系统及移动终端
CN105629628A (zh) * 2014-10-30 2016-06-01 展讯通信(上海)有限公司 自动对焦方法及装置
CN104460184A (zh) * 2014-11-17 2015-03-25 天津三星通信技术研究有限公司 在拍摄装置中进行对焦的方法和设备
CN106707674A (zh) * 2015-11-17 2017-05-24 深圳市绎立锐光科技开发有限公司 投影设备的自动对焦方法及投影设备
CN107018320A (zh) * 2016-01-18 2017-08-04 奥林巴斯株式会社 焦点调节装置和焦点调节方法
CN106412423A (zh) * 2016-09-19 2017-02-15 珠海格力电器股份有限公司 一种对焦方法及装置
CN109510936A (zh) * 2017-09-14 2019-03-22 展讯通信(上海)有限公司 连续自动对焦方法及系统
CN110033418A (zh) * 2019-04-15 2019-07-19 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备
CN110248096A (zh) * 2019-06-28 2019-09-17 Oppo广东移动通信有限公司 对焦方法和装置、电子设备、计算机可读存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114245023A (zh) * 2022-02-24 2022-03-25 浙江华创视讯科技有限公司 一种聚焦处理方法及装置、摄像装置和存储介质

Also Published As

Publication number Publication date
CN112640425A (zh) 2021-04-09

Similar Documents

Publication Publication Date Title
CN110691193B (zh) 摄像头切换方法、装置、存储介质及电子设备
EP2549738B1 (en) Method and camera for determining an image adjustment parameter
WO2017107839A1 (zh) 摄像头快速自动聚焦方法及装置
US7957633B2 (en) Focus adjusting apparatus and focus adjusting method
CN108710192B (zh) 基于统计数据的自动对焦系统和方法
CN103763458B (zh) 一种场景变化检测方法及装置
WO2017107840A1 (zh) 自动聚焦控制方法和装置
CN103440662A (zh) Kinect深度图像获取方法与装置
CN110324536B (zh) 一种用于显微相机的图像变化自动感知对焦方法
JP5392198B2 (ja) 測距装置及び撮像装置
WO2021134179A1 (zh) 对焦方法、装置、拍摄设备、可移动平台和存储介质
JP2003156680A (ja) 被写体抽出装置及び撮影装置
WO2021207945A1 (zh) 对焦控制方法、装置、设备、可移动平台和存储介质
WO2017101292A1 (zh) 自动对焦的方法、装置和系统
CN103424953B (zh) 自动聚焦方法及装置
CN110062150B (zh) 一种自动对焦方法及装置
US8270755B2 (en) Method to evaluate contrast value for an image and applications thereof
JP3404803B2 (ja) 動画像記録媒体、静止画像抽出装置、動画像記録装置および静止画像自動抽出方法
JPH05300421A (ja) 自動焦点調節装置
JPH07236115A (ja) ショット検出方法および代表画像記録・表示装置
CN112689853A (zh) 图像处理方法、装置、拍摄设备、可移动平台和存储介质
US20190094656A1 (en) Imaging apparatus and control method of the same
WO2021237577A1 (zh) 图像处理方法、装置、可移动平台和存储介质
CN114283103A (zh) 一种载人航天器ait过程超高清全景图像多景深融合技术
WO2020215865A1 (zh) 目标跟踪系统及方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20930715

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20930715

Country of ref document: EP

Kind code of ref document: A1