Camera focusing method, electronic equipment and storage medium

By recording and analyzing the changing trend of the focal length value of the sub-window block of the camera, sub-window blocks that meet the focusing characteristics are screened out, which solves the problem of inaccurate focus position in the existing technology and improves image clarity.

CN118741306APending Publication Date: 2024-10-01HANGZHOU KUANGYUN JINZHI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410757090.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In existing camera automatic focusing methods, the focus position is often inaccurate, resulting in poor clarity of the captured image, which is easily affected by light brightness, light source type, and the subject being photographed.

Method used

By recording multiple candidate focus positions and the focal length value of the sub-window block under each candidate focus position, the changing trend of each sub-window block at all candidate focus positions is determined, and effective sub-window blocks that meet the camera focus characteristics requirements are screened out, and then Accurately determine target focus position.

Benefits of technology

It improves the accuracy of the focus position and reduces the influence of light brightness, light source type and shooting object on the focus, making the captured images clearer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118741306A_ABST
    Figure CN118741306A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a focusing method of a camera, electronic equipment and a storage medium, and the method comprises the steps: recording a plurality of candidate focusing positions and FV values of N sub-window blocks under each candidate focusing position, a shooting picture of the camera is divided into the N sub-window blocks, and N is greater than or equal to 2; according to the FV values of the N sub-window blocks in each candidate focusing position, determining the change trend of the FV values of each sub-window block in all the candidate focusing positions, and obtaining N change trends; according to the N change trends, effective sub-window blocks are screened from the N sub-window blocks, and the form of the change trend corresponding to the effective sub-window blocks meets the focusing characteristic requirement of the camera; and determining a target focusing position from the plurality of candidate focusing positions according to the FV value of the effective sub-window block under each candidate focusing position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine vision technology, and in particular to a focusing method of a camera, an electronic device and a storage medium. Background Art

[0002] With the continuous development of machine vision technology, the functions of cameras are becoming more and more abundant, and cameras are widely used in many fields. Autofocus is one of the core functions of modern cameras. It has become a technical indicator in more advanced cameras. At the same time, autofocus is also a key issue in the field of computer vision and is crucial to the development of camera technology and other digital image processing technologies. The goal of the autofocus method is to maximize the performance of the camera to obtain a clear image.

[0003] At present, the camera auto focus usually uses the clarity operator "Focus Value" (FV) provided by the Software Development Kit (SDK) as a quantitative value of whether the focus is clear. Although the relevant technology can determine the focus position based on the FV value to a certain extent, the determined focus position is often inaccurate, resulting in poor clarity of the captured image. Summary of the invention

[0004] The embodiments of the present application provide a focusing method of a camera, an electronic device and a storage medium to solve the technical problem that a focusing position is inaccurate when the camera is automatically focusing.

[0005] According to a first aspect of the present application, a focusing method of a camera is disclosed, the method comprising:

[0006] Recording a plurality of candidate focus positions and FV values ​​of N sub-window blocks under each of the candidate focus positions, wherein the shooting picture of the camera is divided into the N sub-window blocks, N≥2;

[0007] According to the FV values ​​of the N sub-window blocks at each of the candidate focus positions, determining a change trend of the FV values ​​of each of the sub-window blocks at all candidate focus positions to obtain N change trends;

[0008] According to the N change trends, screening effective sub-window blocks from the N sub-window blocks, wherein the shape of the change trend corresponding to the effective sub-window block meets the focusing characteristic requirement of the camera;

[0009] A target focus position is determined from the plurality of candidate focus positions according to the FV value of the valid sub-window block under each of the candidate focus positions.

[0010] According to a second aspect of the present application, a focusing device for a camera is disclosed, the device comprising:

[0011] A recording module, used for recording a plurality of candidate focus positions and FV values ​​of N sub-window blocks under each of the candidate focus positions, wherein the shooting picture of the camera is divided into the N sub-window blocks, N≥2;

[0012] A first determining module, configured to determine, according to the FV values ​​of the N sub-window blocks at each of the candidate focus positions, a change trend of the FV value of each of the sub-window blocks at all the candidate focus positions, to obtain N change trends;

[0013] A screening module, used for screening effective sub-window blocks from the N sub-window blocks according to the N change trends, wherein the form of the change trend corresponding to the effective sub-window block meets the focus characteristic requirement of the camera;

[0014] The second determining module is used to determine a target focus position from the multiple candidate focus positions according to the FV value of the valid sub-window block under each of the candidate focus positions.

[0015] According to a third aspect of the present application, an electronic device is disclosed, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the focusing method of a camera as in the first aspect.

[0016] According to a fourth aspect of the present application, a computer-readable storage medium is disclosed, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the focusing method of the camera in the first aspect is implemented.

[0017] According to a fifth aspect of the present application, a computer program product is disclosed, comprising a computer program / instruction, which implements the focusing method of a camera in the first aspect when executed by a processor.

[0018] In an embodiment of the present application, multiple candidate focus positions and FV values ​​of N sub-window blocks under each candidate focus position are recorded, wherein the shooting picture of the camera is divided into N sub-window blocks, N≥2; according to the FV values ​​of the N sub-window blocks under each candidate focus position, the change trend of the FV value of each sub-window block at all candidate focus positions is determined to obtain N change trends; according to the N change trends, effective sub-window blocks are screened from the N sub-window blocks, wherein the form of the change trend corresponding to the effective sub-window block meets the focus characteristic requirements of the camera; since the effective sub-window blocks are screened based on the focus characteristic requirements of the camera, the influence of light brightness, light source type and shooting object in the shooting scene can be avoided, so that according to the FV value of the effective sub-window block under each candidate focus position, the target focus position can be accurately determined from multiple candidate focus positions, thereby making the clarity of the image captured when shooting based on the target focus position relatively high. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is an example diagram of a focusing method of a camera provided by the related art;

[0020] Figure 2 is a flow chart of a camera focusing method provided in an embodiment of the present application;

[0021] Figure 3 is a flowchart of an implementation of step 201 provided in an embodiment of the present application;

[0022] Figure 4 This is an example diagram of an implementation of step 201 provided in an embodiment of the present application;

[0023] Figure 5 is an example diagram of the change trend of the FV values ​​of the 9 sub-window blocks at all candidate focus positions provided by the embodiment of the present application;

[0024] Figure 6 is a flowchart of an implementation of step 202 provided in an embodiment of the present application;

[0025] Figure 7 is an example diagram of a reference plane provided in an embodiment of the present application;

[0026] Figure 8 is an example diagram of a focusing method of a camera provided in an embodiment of the present application;

[0027] Fig. 9 is a structural schematic diagram of a focusing device of a camera provided in an embodiment of the present application;

[0028] Fig.10 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0030] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0031] In recent years, research on computer vision, deep learning, machine learning, image processing, image recognition and other technologies based on artificial intelligence has made important progress. Artificial Intelligence (AI) is an emerging science and technology that studies and develops theories, methods, technologies and application systems for simulating and extending human intelligence. Artificial intelligence is a comprehensive discipline involving many types of technologies such as chips, big data, cloud computing, the Internet of Things, distributed storage, deep learning, machine learning, neural networks, etc. Computer vision, as an important branch of artificial intelligence, specifically allows machines to recognize the world. Computer vision technology usually includes face recognition, liveness detection, fingerprint recognition and anti-counterfeiting verification, biometric recognition, face detection, pedestrian detection, target detection, pedestrian recognition, image processing, image recognition, image semantic understanding, image retrieval, text recognition, video processing, video content recognition, 3D reconstruction, virtual reality, augmented reality, simultaneous positioning and map construction, computational photography, robot navigation and positioning and other technologies. With the research and advancement of artificial intelligence technology, this technology has been applied in many fields, such as security, urban management, traffic management, building management, park management, facial access, facial attendance, logistics management, warehouse management, robots, intelligent marketing, computational photography, mobile phone imaging, cloud services, smart homes, wearable devices, unmanned driving, automatic driving, smart medical care, facial payment, facial unlocking, fingerprint unlocking, identity verification, smart screens, smart TVs, cameras, mobile Internet, live streaming, beauty, makeup, medical beauty, and smart temperature measurement.

[0032] To facilitate understanding, some relevant concepts and application scenarios involved in the embodiments of the present application are first introduced below.

[0033] 1. Related concepts

[0034] Focus Value (FV) is used to measure the clarity of an image.

[0035] Image segmentation is a technique and process that divides an image into several specific regions with unique properties and proposes objects of interest. It is a key step from image processing to image analysis. Image segmentation methods are mainly divided into the following categories: threshold-based segmentation methods, region-based segmentation methods, edge-based segmentation methods, and segmentation methods based on specific theories. From a mathematical point of view, image segmentation is the process of dividing a digital image into non-intersecting regions. The image segmentation process is also a labeling process, that is, pixels belonging to the same region are assigned the same number.

[0036] Object distance refers to the distance from the subject to the focal plane of the lens (optical center of the lens), and is usually represented by the lowercase English letter u. In a sense, object distance refers to the shooting distance from the subject to the center of the lens.

[0037] 2. Application Scenarios

[0038] Autofocus is one of the core functions of modern cameras. It has become a technical indicator in more advanced cameras. At the same time, autofocus is also a key issue in the field of computer vision and is crucial to the development of camera technology and other digital image processing technologies. The goal of the autofocus method is to maximize the performance of the camera to obtain a clear image. At present, the camera autofocus usually uses the clarity operator "Focus Value" (FV) provided by the Software Development Kit (SDK) as a quantitative value of whether the focus is clear.

[0039] In the related art, the camera's shooting screen is divided into multiple sub-window blocks, and the FV values ​​of all sub-window blocks in the shooting screen are weighted averaged through a block weight table to obtain a weighted average FV value, wherein the block weight table records the mapping relationship between each sub-window block and the weight value. In the same scene, the camera moves the focusing lens to different positions, records the FV value, and the position corresponding to the point with the largest FV value is used as the focus point.

[0040] For example, Figure 1 As shown, a gun-type camera 10 is set on the wall, and a shooting picture 11 of the gun-type camera 10 is divided into 9 sub-window blocks, namely sub-window block A1, sub-window block A2, sub-window block A3, sub-window block A4, sub-window block A5, sub-window block A6, sub-window block A7, sub-window block A8 and sub-window block A9, and the focusing lens of the gun-type camera 10 is moved to different focusing positions, such as focusing position 1, focusing position 2 and focusing position 3.

[0041] Get the FV value FV of the sub-window block A1 under the focus position 1 11, FV value FV of sub-window block A2 12 、FV value of sub-window block A3 13 、FV value of sub-window block A4 14 、FV value of sub-window block A5 15 、FV value of sub-window block A6 16 、FV value of sub-window block A7 17 、FV value FV of sub-window block A8 18 and the FV value FV of the subwindow block A9 19 Calculate the weighted average FV value M1 at focus position 1 = (FV 11 *b1+FV 12 *b2+…+FV 19 *b9) / (b1+b2+…+b9), where b i Represents the weight value of the i-th sub-window block.

[0042] Get the FV value FV of the sub-window block A1 under the focus position 2 21 、FV value of sub-window block A2 22 、FV value of sub-window block A3 23 、FV value of sub-window block A4 24 、FV value of sub-window block A5 25 、FV value of sub-window block A6 26 、FV value of sub-window block A7 27 、FV value FV of sub-window block A8 28 and the FV value FV of the subwindow block A9 29 ; Calculate the weighted average FV value M2 at focus position 2 = (FV 21 *b1+FV 22 *b2+…+FV 29 *b9) / (b1+b2+…+b9), where b i Represents the weight value of the i-th sub-window block.

[0043] Get the FV value FV of the sub-window block A1 under the focus position 3 31 , FV value FV of sub-window block A2 32 、FV value of sub-window block A3 33 、FV value of sub-window block A4 34 、FV value of sub-window block A5 35 、FV value of sub-window block A6 36 、FV value of sub-window block A7 37 、FV value FV of sub-window block A8 38 and the FV value FV of the subwindow block A9 39Calculate the weighted average FV value M3 at focus position 3 = (FV 31 *b1+FV 32 *b2+…+FV 39 *b9) / (b1+b2+…+b9), where b i Represents the weight value of the i-th sub-window block.

[0044] The maximum value among M1, M2 and M3 is selected, for example, the maximum value is M3, and the focus position 3 corresponding to M3 is determined as the final focus position.

[0045] However, the above method is easily affected by the brightness of light, the type of light source and the object in the shooting scene. The reason is that: when the camera is constantly moving the focusing lens to find the best focusing position, the focusing characteristic of the camera is essentially a process from defocusing to focusing and then to defocusing. The FV value of each sub-window block is small when defocusing, and the FV value of each sub-window block is large when focusing. Under normal circumstances, the FV value of each sub-window block should show a single-peak trend, that is, the FV value increases continuously from defocusing to focusing until the focusing is completed, and then the FV value decreases continuously from focusing to defocusing. The focus position corresponding to the vertex of the single-peak trend is the focusing position, and this position is determined as the final focus position.

[0046] For example, in shooting scenes with few details or low light brightness such as at night, the FV value is small regardless of whether it is in focus or out of focus, resulting in unclear FV value trend, which easily leads to deviation in the overall focus position. For another example, in shooting scenes with high light source power, the FV value is not only large when in focus, but also large when out of focus, resulting in a double peak phenomenon in the FV value trend. At this time, the focus position with the largest FV value is not the clearest point. For another example, in shooting scenes with moving objects, if an object is stationary, that is, there is no moving object, it is equivalent to having a trend of first out of focus and then in focus, which is equivalent to a trend of climbing like a mountain peak. If a moving object appears in the middle at that time, it will cause the picture to change. It may have been in focus, but this object is in the way, which is equivalent to the image of this object being unclear. The camera will think that it has not been in focus. At this time, the FV value may suddenly decrease. Then, as the object continues to move, the picture becomes clear again, and then the FV value will increase again. Therefore, this process is not a very good linear relationship, and the FV value will jitter, resulting in out of focus.

[0047] It can be seen that although the related technology can determine the focus position based on the FV value to a certain extent, the determined focus position is often inaccurate, resulting in poor clarity of the captured image. In order to solve the above technical problems, the embodiments of the present application provide a camera focusing method, electronic device and storage medium.

[0048] A focusing method for a camera provided in an embodiment of the present application is introduced below in conjunction with the accompanying drawings.

[0049] It should be noted that the focusing method provided in the embodiment of the present application is applicable to a camera. In practical applications, the camera may be a gun-type camera or other types of cameras, and the embodiment of the present application does not limit this.

[0050] Figure 2 is a flow chart of a focusing method for a camera provided in an embodiment of the present application, such as Figure 2 As shown, the method may include the following steps: step 201, step 202, step 203 and step 204;

[0051] In step 201, a plurality of candidate focus positions and FV values ​​of N sub-window blocks under each candidate focus position are recorded, wherein the shooting picture of the camera is divided into N sub-window blocks, and N≥2.

[0052] In the embodiment of the present application, in order to facilitate calculation and management, the camera's captured image can be divided into N sub-window blocks of the same size, wherein each sub-window block includes a plurality of pixels, and each sub-window block corresponds to an FV value. Figure 1 As shown, the camera's captured image is divided into 9 sub-window blocks of the same size.

[0053] It can be understood that the smaller the granularity of the sub-window block division is, the more accurate the target focus position that is ultimately determined is.

[0054] In the embodiment of the present application, the candidate focus positions refer to the various focus positions to which the focus lens of the camera is continuously moved in the process of determining the best focus position.

[0055] Exemplarily, the camera's captured image is divided into 9 sub-window blocks of the same size, and there are 8 candidate focus positions. The FV values ​​of these 8 candidate focus positions and all sub-window blocks under these 8 candidate focus positions are recorded, and a total of 8*9=72 FV values ​​are obtained.

[0056] In some embodiments, Figure 3 As shown, the above step 201 may include the following steps: step 2011, step 2012, step 2013 and step 2014;

[0057] In step 2011, the focus range, focus direction, focus step length and initial focus position are obtained.

[0058] In the embodiments of the present application, the focusing range refers to the range within which the focusing lens of the camera can move. The focusing direction refers to the direction in which the focusing lens of the camera can move. The focusing step length refers to the distance that the focusing lens of the camera can move each time. The initial focusing position refers to the initial position of the focusing lens of the camera.

[0059] For example, Figure 4 As shown, the relationship between the focusing lens, focusing range, focusing direction, focusing step length and initial focusing position of the camera is shown.

[0060] It can be understood that the larger the focusing range, the smaller the focusing step, the greater the number of candidate focusing positions, and the more accurate the target focusing position ultimately determined.

[0061] In step 2012, the FV values ​​of the N sub-window blocks at the initial focus position are recorded.

[0062] In step 2013, the next focus position is determined according to the focus direction, the focus step length and the initial focus position.

[0063] In step 2014, it is determined whether the boundary of the focusing range is reached according to the next focusing position and the focusing range. If the boundary of the focusing range is not reached, the focusing lens of the camera is moved to the next focusing position, and the FV values ​​of the N sub-window blocks and the corresponding focusing positions are recorded. The above process is repeated until the boundary of the focusing range is reached, and multiple candidate focusing positions and the FV values ​​of the N sub-window blocks under each candidate focusing position are obtained.

[0064] Exemplarily, S2.1, set the focus range [pos_min, pos_max], focus direction dir, focus step step and initial focus position pos_start; S2.2, record the FV value of each sub-window block of the picture and the corresponding focus position value focusPosCur; S2.3, move to the next focus position focusPosNext = focusPosCur + dir*step; S2.4, determine whether the focus range boundary, i.e., focusPosNext, has been reached<pos_min||focusPos> pos_max; S2.5, if the boundary of the focus range has not been reached, jump to S2.3 until the boundary of the focus range is reached.

[0065] It can be seen that in the embodiment of the present application, the focusing range, focusing direction, focusing step and initial focusing position can be flexibly set according to needs, and the FV values ​​of multiple candidate focusing positions and N sub-window blocks under each candidate focusing position are recorded one by one according to the focusing direction and focusing step. Since they are recorded according to certain rules, the continuity of multiple candidate focusing positions can be ensured, thereby improving the accuracy of the target focusing position finally determined.

[0066] In step 202, according to the FV values ​​of the N sub-window blocks at each candidate focus position, the change trend of the FV value of each sub-window block at all candidate focus positions is determined to obtain N change trends.

[0067] In the embodiment of the present application, the changing trend of the FV value may include: a monotonic trend, a bimodal trend and a unimodal trend, wherein the monotonic trend includes a monotonically increasing trend and a trend of first increasing and then oscillating at a high level. The bimodal trend refers to a trend of two peaks, that is, a trend of first increasing and then decreasing and then increasing and then decreasing. The unimodal trend refers to a trend of one peak, that is, a trend of first increasing and then decreasing.

[0068] In an embodiment of the present application, for each sub-window block of the camera's shooting picture, the sub-window block has an FV value at each candidate focus position, and there will be multiple FV values ​​at multiple candidate focus positions. With the candidate focus position as the horizontal coordinate axis and the FV value as the vertical coordinate axis, the change trend of the FV value of the sub-window block at all candidate focus positions can be generated.

[0069] For example, Figure 1 As shown, the camera's captured image is divided into 9 sub-window blocks of the same size, namely, sub-window block A1, sub-window block A2, ..., sub-window block A8 and sub-window block A9. Figure 5 As shown, the changing trend of the FV value corresponding to the sub-window block A1, the changing trend of the FV value corresponding to the sub-window block A2, ..., the changing trend of the FV value corresponding to the sub-window block A8 and the changing trend of the FV value corresponding to the sub-window block A9 are generated respectively, for a total of 9 changing trends.

[0070] Taking the variation trend of the FV value corresponding to the sub-window A1 as an example, the horizontal coordinate of the coordinate system where the curve of the variation trend is located is the candidate focus position, and the vertical coordinate is the FV value, wherein the horizontal coordinates "649", "654" and "659" all refer to the values ​​of the candidate focus positions, and the vertical coordinates "125", "175", "225" and "275" all refer to the values ​​of the FV value. It can be seen that the variation trend of the FV value corresponding to the sub-window A1 is a monotonic trend.

[0071] In some embodiments, Figure 6As shown, the above step 202 may include the following steps: step 2021, step 2022 and step 2023;

[0072] In step 2021, according to the FV values ​​of the N sub-window blocks at each candidate focus position, the trend line of the FV value of each sub-window block at all candidate focus positions is fitted to obtain N trend lines.

[0073] Considering that continuous and smooth lines can more accurately and intuitively represent the changing trend than a series of discrete points, in an embodiment of the present application, the trend lines of the FV values ​​of each sub-window block at all candidate focus positions can be fitted according to the FV values ​​of the N sub-window blocks at each candidate focus position to obtain N trend lines.

[0074] In the embodiment of the present application, the original lines of the FV values ​​of each sub-window block at all candidate focus positions can be generated according to the FV values ​​of the N sub-window blocks at each candidate focus position; each original line is filtered to obtain N trend lines. By filtering the original lines, some interfering noise points are filtered out, making the trend lines smoother, wherein a filtering algorithm such as Kalman filtering or average filtering can be used to filter the original lines.

[0075] In step 2022, the number of convex points and the number of concave points on each trend line are counted.

[0076] In the embodiment of the present application, the number of convex points is used to determine whether there is a crest on the line, the number of concave points is used to determine whether there is a trough on the line, and the crests and troughs are used to determine the changing trend.

[0077] In step 2023, the change trend of each trend line is determined according to the number of convex points and the number of concave points on each trend line, wherein the change trend includes: single peak, multi-peak and monotonic.

[0078] It can be seen that in the embodiment of the present application, a series of discrete FV values ​​can be fitted into a continuous and smooth trend line, and the change trend of the FV value of each sub-window block at all candidate focus positions can be intuitively and accurately determined based on the trend line.

[0079] In step 203, effective sub-window blocks are screened from the N sub-window blocks according to the N change trends, wherein the shape of the change trend corresponding to the effective sub-window block meets the focus characteristic requirement of the camera.

[0080] In the embodiment of the present application, the focusing characteristic requirement of the camera refers to the process in which the camera continuously moves the focusing lens to find the best focusing position, which is essentially a process from defocusing to focusing and then to defocusing, wherein the FV value of each sub-window block is smaller when defocusing, and the FV value of each sub-window block is larger when focusing. Under normal circumstances, if the focusing lens moves to enough positions, the FV value of each sub-window block should be a single-peak trend, that is, the FV value continuously increases in the process from defocusing to focusing until the focusing is completed, and then the FV value continuously decreases in the process from focusing to defocusing.

[0081] In the embodiment of the present application, the effective sub-window blocks refer to the sub-window blocks that meet the focusing characteristic requirements of the camera. These effective sub-window blocks can reduce the influence of light brightness, light source type and shooting object in the shooting scene.

[0082] In some embodiments, the above step 203 may include the following steps: step 2031;

[0083] In step 2031, it is determined whether there is a unimodal trend among the N change trends. If there is a unimodal trend, the sub-window block corresponding to the unimodal trend among the N sub-window blocks is determined as a valid sub-window block.

[0084] In the embodiment of the present application, considering that the "single-peak trend" is the most ideal trend in the focusing characteristic requirements of the camera, the sub-window block corresponding to the single-peak trend among the N sub-window blocks is determined as a valid sub-window block.

[0085] In some embodiments, the above step 203 may further include the following steps: step 2032;

[0086] In step 2032, it is determined whether there is a monotonic trend among the N changing trends. If there is a monotonic trend, the sub-window block corresponding to the monotonic trend among the N sub-window blocks is determined as a valid sub-window block.

[0087] In the embodiment of the present application, if the focus lens does not move enough positions, that is, it only experiences the process from defocus to focus, and has not yet experienced the process from focus to defocus, at this time, the change trend of the FV value may be a monotonic trend. Although the change trend of the FV value is a monotonic trend, this situation also meets the focusing characteristic requirements of the camera, but it is not an ideal form. Therefore, the sub-window block corresponding to the monotonic trend in the N sub-window blocks is determined as a valid sub-window block.

[0088] For example, Figure 5As shown, there are 9 changing trends of the FV value corresponding to the sub-window A1 block, the changing trend of the FV value corresponding to the sub-window A2 block, ..., the changing trend of the FV value corresponding to the sub-window A8 block, and the changing trend of the FV value corresponding to the sub-window A9 block, a total of 9 changing trends. Based on the above screening criteria of "single peak trend" and "monotonic trend", since the changing trend of the FV value corresponding to the sub-window A1 block is a monotonic trend, the changing trend of the FV value corresponding to the sub-window A7 block is a monotonic trend, and the changing trend of the FV value corresponding to the sub-window A9 block is a single peak trend, the sub-window A1 block, the sub-window A7 block, and the sub-window A9 block are determined as valid sub-window blocks.

[0089] In some embodiments, considering that for monotonic trends, judging solely from the numerical dimension of the FV value may result in misjudgment, in order to reduce misjudgment, auxiliary judgment is made based on the object distance of the pixel points in the sub-window block. Accordingly, the above step 2032 may include the following steps: step 20321 and step 20322;

[0090] In step 20321, the object distance of each pixel point in the sub-window block corresponding to the monotonic trend in the N sub-window blocks is determined according to the picture content of the camera shooting picture.

[0091] In an embodiment of the present application, the captured image can be segmented according to the image content of the camera to obtain M image blocks, wherein each image block contains at least one sub-window block, 2≤M<N; the candidate focusing position with the largest FV value of the sub-window block corresponding to the monotonic trend in each image block is counted; the candidate focusing position with the largest FV value of the sub-window block corresponding to the monotonic trend is linearly mapped to the object distance of each pixel point in the corresponding image block, to obtain the object distance of each pixel point in the sub-window block corresponding to the monotonic trend.

[0092] In an embodiment of the present application, an edge segmentation algorithm or a deep learning-based segmentation algorithm may be used to perform image segmentation on the captured image.

[0093] For example, first, according to the image content of the current shooting picture, the current shooting picture is segmented to obtain at least one image picture block; it is assumed that the object distance of each pixel point on each image picture block should be roughly uniform in horizontal and vertical directions, and the object distance at the intersection of different pictures should be basically the same. Then, according to D=1-∑(N j *(N j -1)) / (N(N-1)) formula is used to calculate the diversity of plane object distance of each image block, where N jis the number of the jth object distance in the plane, and N is the number of all object distances in the plane. After that, the plane where the image block with a small D value is located is taken as the reference plane, so that the planes where other image blocks are located intersect with the reference plane as much as possible; the object distance distribution of the plane intersecting with the reference plane should satisfy the following formula: y=kx+b in the horizontal direction and y=kx+b in the vertical direction, such as Figure 7 As shown, the spatial position relationship between the reference plane and other planes 1 to 4, wherein the arrow directions are the horizontal and vertical change directions.

[0094] In step 20322, determine whether the object distance of each pixel point in the sub-window block corresponding to the monotonic trend meets the object distance requirement. If the object distance requirement is met, the sub-window block corresponding to the monotonic trend is determined as a valid sub-window block; wherein the object distance requirement includes: the object distance of each pixel point in the sub-window block remains unchanged or changes linearly in the horizontal and vertical directions.

[0095] It can be seen that in the embodiments of the present application, the object distance of the pixel points in the sub-window block can be determined based on the actual picture content of the captured picture. Since the object distance can reduce the influence of the light brightness, light source type and captured object in the shooting scene to a certain extent, the sub-window block corresponding to the monotonic trend is auxiliary judged according to the object distance to judge whether it is a truly valid sub-window block. This can reduce the misjudgment rate of the valid sub-window block, thereby ensuring that the target focus position is accurately determined from multiple candidate focus positions.

[0096] In step 204, a target focus position is determined from a plurality of candidate focus positions according to the FV value of the valid sub-window block under each candidate focus position.

[0097] Different from the related art in which the target focus position is determined from multiple candidate focus positions based on the FV values ​​of all sub-window blocks under each candidate focus position, in the embodiment of the present application, the target focus position is determined from multiple candidate focus positions based on the FV value of the effective sub-window block under each candidate focus position. Since in the embodiment of the present application, the sub-window blocks that do not meet the focus characteristic requirements of the camera are eliminated, and only the effective sub-window blocks that meet the focus characteristic requirements of the camera are retained, the influence of the light brightness, light source type and shooting object in the shooting scene can be avoided, so that according to the FV value of the effective sub-window block under each candidate focus position, the target focus position can be accurately determined from multiple candidate focus positions, thereby making the clarity of the image captured when shooting based on the target focus position relatively high.

[0098] In some embodiments, the above step 204 may include the following steps: step 2041 and step 2024;

[0099] In step 2041, according to the mapping relationship between the weight value and the sub-window block, the weighted sum mean of the FV values ​​of all valid sub-window blocks under each candidate focus position is calculated.

[0100] In step 2042, the candidate focus position with the largest weighted sum mean is determined as the target focus position.

[0101] For example, Figure 1 As shown, a gun-type camera 10 is set on the wall, and the picture captured by the gun-type camera 10 is divided into 9 sub-window blocks, namely sub-window block A1, sub-window block A2, sub-window block A3, sub-window block A4, sub-window block A5, sub-window block A6, sub-window block A7, sub-window block A8 and sub-window block A9, and the focusing lens of the gun-type camera 10 is moved to different focusing positions, such as focusing position 1, focusing position 2 and focusing position 3.

[0102] According to the changing trend of the FV value corresponding to sub-window block A1, the changing trend of the FV value corresponding to sub-window block A2, the changing trend of the FV value corresponding to sub-window block A3, the changing trend of the FV value corresponding to sub-window block A4, the changing trend of the FV value corresponding to sub-window block A5, the changing trend of the FV value corresponding to sub-window block A6, the changing trend of the FV value corresponding to sub-window block A7, the changing trend of the FV value corresponding to sub-window block A8 and the changing trend of the FV value corresponding to sub-window block A9, valid sub-window blocks A1, A7 and A9 are screened out from sub-window blocks A1 to A9.

[0103] According to the relevant information of the effective sub-window blocks A1, A7 and A9, the weighted average FV value Z1 under the focus position 1 is calculated as (FV 11 *b1+FV 17 *b7+FV 19 *b9) / (b1+b7+b9), where FV 11 represents the FV value of the sub-window block A1 under focus position 1, FV 17 represents the FV value of the sub-window block A7 under focus position 1, FV 19 represents the FV value of the sub-window block A9 under focus position 1, b i Represents the weight value of the i-th sub-window block.

[0104] According to the relevant information of the effective sub-window blocks A1, A7 and A9, the weighted average FV value Z2 at focus position 2 is calculated as (FV 21 *b1+FV 27 *b7+FV 29 *b9) / (b1+b7+b9), where FV 21 represents the FV value of the sub-window block A1 under focus position 2, FV 27represents the FV value of the sub-window block A7 under focus position 2, FV 29 represents the FV value of the sub-window block A9 under focus position 2, b i Represents the weight value of the i-th sub-window block.

[0105] According to the relevant information of the effective sub-window blocks A1, A7 and A9, the weighted average FV value Z3 at the focus position 3 is calculated as (FV 31 *b1+FV 37 *b7+FV 39 *b9) / (b1+b7+b9), where FV 31 represents the FV value of the sub-window block A1 under focus position 3, FV 37 represents the FV value of the sub-window block A7 under focus position 3, FV 39 represents the FV value of the sub-window block A9 under focus position 3, b i Represents the weight value of the i-th sub-window block.

[0106] The maximum value among Z1, Z2 and Z3 is selected, for example, the maximum value is Z2, and the focus position 2 corresponding to Z2 is determined as the final focus position.

[0107] For example, Figure 8 As shown, the current shooting scene 80 is a light shooting scene, and the power of the light source is relatively large. When the focusing method in the related technology is adopted, the change trend 81 of the generated FV value presents a double-peak trend, which does not meet the focusing characteristic requirements of the camera; and when the focusing method in the embodiment of the present application is adopted, the change trend 82 of the generated FV value presents a single-peak trend, which meets the focusing characteristic requirements of the camera.

[0108] In the embodiment of the present application, after the target focus position is determined, the focus lens of the camera is moved to the target focus position to end the automatic focusing.

[0109] As can be seen from the above embodiment, in this embodiment, multiple candidate focus positions and FV values ​​of N sub-window blocks under each candidate focus position are recorded, wherein the shooting picture of the camera is divided into N sub-window blocks, N≥2; according to the FV values ​​of the N sub-window blocks under each candidate focus position, the change trend of the FV value of each sub-window block at all candidate focus positions is determined to obtain N change trends; according to the N change trends, effective sub-window blocks are screened from the N sub-window blocks, wherein the form of the change trend corresponding to the effective sub-window block meets the focus characteristic requirements of the camera; since the effective sub-window blocks are screened based on the focus characteristic requirements of the camera, the influence of the light brightness, light source type and shooting object in the shooting scene can be avoided, so that according to the FV value of the effective sub-window block under each candidate focus position, the target focus position can be accurately determined from multiple candidate focus positions, thereby making the clarity of the image captured when shooting based on the target focus position relatively high.

[0110] Fig. 9 is a schematic diagram of the structure of a focusing device of a camera provided in an embodiment of the present application, such as Fig. 9 As shown, the focusing device 900 of the camera may include: a recording module 901, a first determining module 902, a screening module 903 and a second determining module 904;

[0111] A recording module 901 is used to record a plurality of candidate focus positions and FV values ​​of N sub-window blocks under each of the candidate focus positions, wherein the shooting picture of the camera is divided into the N sub-window blocks, N≥2;

[0112] A first determining module 902 is used to determine the change trend of the FV value of each sub-window block at all candidate focus positions according to the FV values ​​of the N sub-window blocks at each candidate focus position, and obtain N change trends;

[0113] A screening module 903 is used to screen effective sub-window blocks from the N sub-window blocks according to the N change trends, wherein the change trend corresponding to the effective sub-window block meets the focus characteristic requirement of the camera;

[0114] The second determining module 904 is configured to determine a target focus position from the plurality of candidate focus positions according to the FV value of the valid sub-window block under each of the candidate focus positions.

[0115] As can be seen from the above embodiment, in this embodiment, multiple candidate focus positions and FV values ​​of N sub-window blocks under each candidate focus position are recorded, wherein the shooting picture of the camera is divided into N sub-window blocks, N≥2; according to the FV values ​​of the N sub-window blocks under each candidate focus position, the change trend of the FV value of each sub-window block at all candidate focus positions is determined to obtain N change trends; according to the N change trends, effective sub-window blocks are screened from the N sub-window blocks, wherein the form of the change trend corresponding to the effective sub-window block meets the focus characteristic requirements of the camera; since the effective sub-window blocks are screened based on the focus characteristic requirements of the camera, the influence of the light brightness, light source type and shooting object in the shooting scene can be avoided, so that according to the FV value of the effective sub-window block under each candidate focus position, the target focus position can be accurately determined from multiple candidate focus positions, thereby making the clarity of the image captured when shooting based on the target focus position relatively high.

[0116] Optionally, as an embodiment, the screening module 903 may include:

[0117] The first determination submodule is used to determine whether there is a unimodal trend in the N change trends. If there is a unimodal trend, the sub-window block corresponding to the unimodal trend in the N sub-window blocks is determined as a valid sub-window block.

[0118] Optionally, as an embodiment, the screening module 903 may further include:

[0119] The second determination submodule is used to determine whether there is a monotonic trend in the N changing trends. If there is a monotonic trend, the sub-window block corresponding to the monotonic trend in the N sub-window blocks is determined as a valid sub-window block.

[0120] Optionally, as an embodiment, the second determining submodule may include:

[0121] A first determining unit, configured to determine, according to the picture content of the picture shot by the camera, the object distance of each pixel point in the sub-window block corresponding to the monotonic trend in the N sub-window blocks;

[0122] The second determination unit is used to determine whether the object distance of each pixel point in the sub-window block corresponding to the monotonic trend meets the object distance requirement. If the object distance requirement is met, the sub-window block corresponding to the monotonic trend is determined as a valid sub-window block; wherein the object distance requirement includes: the object distance of each pixel point in the sub-window block remains unchanged or changes linearly in the horizontal and vertical directions.

[0123] Optionally, as an embodiment, the first determining unit may include:

[0124] A segmentation subunit, used for performing image segmentation on the shooting picture of the camera according to the picture content of the shooting picture to obtain M image picture blocks, wherein each of the image picture blocks contains at least one sub-window block, 2≤M<N;

[0125] A statistical subunit, used for counting the candidate focus position with the largest FV value of the sub-window block corresponding to the monotonic trend in each of the image picture blocks;

[0126] The mapping subunit is used to linearly map the candidate focus position with the maximum FV value of the sub-window block corresponding to the monotonic trend to the object distance of each pixel point in the corresponding image picture block, so as to obtain the object distance of each pixel point in the sub-window block corresponding to the monotonic trend.

[0127] Optionally, as an embodiment, the second determining module 904 may include:

[0128] A calculation submodule, used for calculating the weighted sum mean of the FV values ​​of all valid sub-window blocks under each candidate focus position according to the mapping relationship between the weight value and the sub-window block;

[0129] The third determination submodule is configured to determine the candidate focus position with the largest weighted sum mean as the target focus position.

[0130] Optionally, as an embodiment, the recording module 901 may include:

[0131] An acquisition submodule is used to acquire a focus range, a focus direction, a focus step length, and an initial focus position;

[0132] A recording submodule, used for recording the FV values ​​of the N sub-window blocks at the initial focus position;

[0133] a fourth determination submodule, configured to determine a next focus position according to the focus direction, the focus step length and the initial focus position;

[0134] A loop submodule is used to determine whether the boundary of the focusing range is reached according to the next focusing position and the focusing range; if the boundary of the focusing range is not reached, the focusing lens of the camera is moved to the next focusing position, and the FV values ​​of the N sub-window blocks and the corresponding focusing positions are recorded, and the above process is repeated until the boundary of the focusing range is reached, so as to obtain multiple candidate focusing positions and the FV values ​​of the N sub-window blocks under each of the candidate focusing positions.

[0135] Optionally, as an embodiment, the first determining module 902 may include:

[0136] A fitting submodule, used for fitting the trend line of the FV value of each sub-window block at all candidate focus positions according to the FV values ​​of the N sub-window blocks at each candidate focus position, to obtain N trend lines;

[0137] A statistical submodule, used for counting the number of convex points and concave points on each of the trend lines;

[0138] The fifth determination submodule is used to determine the change trend of each trend line according to the number of convex points and the number of concave points on each trend line, wherein the change trend includes: single peak, multi-peak and monotonic.

[0139] Optionally, as an embodiment, the fitting submodule may include:

[0140] A generating unit, configured to generate an original line of the FV value of each of the sub-window blocks at all candidate focus positions according to the FV values ​​of the N sub-window blocks at each of the candidate focus positions;

[0141] The filtering unit is used to perform filtering processing on each of the original lines to obtain N trend lines.

[0142] Any step in the embodiment of the focusing method of the camera provided in the embodiment of the present application and the specific operation in any step can be completed by the corresponding modules in the focusing device of the camera. The process of the corresponding operation completed by each module in the focusing device of the camera refers to the process of the corresponding operation described in the embodiment of the focusing method of the camera.

[0143] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0144] Fig.10 1 is a block diagram of an electronic device according to an embodiment of the present application. The electronic device includes a processing component 1022, which further includes one or more processors, and a memory resource represented by a memory 1032 for storing instructions executable by the processing component 1022, such as an application. The application stored in the memory 1032 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1022 is configured to execute instructions to perform the above-mentioned camera focusing method.

[0145] The electronic device may also include a power supply component 1026 configured to perform power management of the electronic device, a wired or wireless network interface 1050 configured to connect the electronic device to a network, and an input / output (I / O) interface 1058. The electronic device may operate based on an operating system stored in the memory 1032, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or the like.

[0146] According to another embodiment of the present application, the present application further provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the steps in the focusing method of a camera as described in any of the above embodiments.

[0147] According to another embodiment of the present application, the present application further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps in the camera focusing method described in any of the above embodiments.

[0148] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0149] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0150] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0151] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0152] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0153] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0154] The above is a detailed introduction to a focusing method, electronic device and storage medium of a camera provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for a person skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A camera focusing method, It is characterized in that The method comprises: Recording a plurality of candidate focus positions and FV values ​​of N sub-window blocks under each of the candidate focus positions, wherein the shooting picture of the camera is divided into the N sub-window blocks, N≥2; According to the FV values ​​of the N sub-window blocks at each of the candidate focus positions, determining a change trend of the FV values ​​of each of the sub-window blocks at all candidate focus positions to obtain N change trends; According to the N change trends, screening effective sub-window blocks from the N sub-window blocks, wherein the shape of the change trend corresponding to the effective sub-window block meets the focusing characteristic requirement of the camera; A target focus position is determined from the plurality of candidate focus positions according to the FV value of the valid sub-window block under each of the candidate focus positions.

2. The method according to claim 1, It is characterized in that The step of selecting valid sub-window blocks from the N sub-window blocks according to the N change trends includes: Determine whether there is a unimodal trend in the N change trends; if there is a unimodal trend, determine a sub-window block corresponding to the unimodal trend in the N sub-window blocks as a valid sub-window block.

3. The method according to claim 2, It is characterized in that The method further comprises: Determine whether there is a monotonic trend among the N changing trends; if there is a monotonic trend, determine the sub-window block corresponding to the monotonic trend among the N sub-window blocks as a valid sub-window block.

4. The method according to claim 3, It is characterized in that The step of determining the sub-window block corresponding to the monotonic trend in the N sub-window blocks as a valid sub-window block comprises: Determine, according to the picture content of the shooting picture of the camera, the object distance of each pixel point in the sub-window block corresponding to the monotonic trend in the N sub-window blocks; Determine whether the object distance of each pixel point in the sub-window block corresponding to the monotonic trend meets the object distance requirement. If the object distance requirement is met, determine the sub-window block corresponding to the monotonic trend as a valid sub-window block; wherein the object distance requirement includes: the object distance of each pixel point in the sub-window block remains unchanged or changes linearly in the horizontal direction and the vertical direction.

5. The method according to claim 4, It is characterized in that The determining, according to the picture content of the picture shot by the camera, the object distance of each pixel point in the sub-window block corresponding to the monotonic trend comprises: According to the picture content of the picture taken by the camera, the picture is segmented to obtain M picture blocks, wherein each of the picture blocks contains at least one sub-window block, 2≤M<N; Counting the candidate focus position with the maximum FV value of the sub-window block corresponding to the monotonic trend in each of the image picture blocks; The candidate focus position with the maximum FV value of the sub-window block corresponding to the monotonic trend is linearly mapped to the object distance of each pixel point in the corresponding image picture block to obtain the object distance of each pixel point in the sub-window block corresponding to the monotonic trend.

6. The method according to claim 1, It is characterized in that Determining a target focus position from the plurality of candidate focus positions according to the FV value of the valid sub-window block under each of the candidate focus positions comprises: According to the mapping relationship between the weight value and the sub-window block, a weighted sum mean of the FV values ​​of all valid sub-window blocks under each candidate focus position is calculated; The candidate focus position with the largest weighted sum mean is determined as the target focus position.

7. The method according to claim 1, It is characterized in that The recording of a plurality of candidate focus positions and FV values ​​of N sub-window blocks under each of the candidate focus positions comprises: Obtain the focus range, focus direction, focus step and initial focus position; Recording the FV values ​​of the N sub-window blocks at the initial focus position; Determining a next focusing position according to the focusing direction, the focusing step length and the initial focusing position; According to the next focus position and the focus range, it is determined whether the boundary of the focus range is reached. If the boundary of the focus range is not reached, the focus lens of the camera is moved to the next focus position, and the FV values ​​of the N sub-window blocks and the corresponding focus positions are recorded. The above process is repeated until the boundary of the focus range is reached, and multiple candidate focus positions and the FV values ​​of the N sub-window blocks under each of the candidate focus positions are obtained.

8. The method according to claim 1, It is characterized in that The step of determining the change trend of the FV value of each sub-window block at all candidate focus positions according to the FV values ​​of the N sub-window blocks at each candidate focus position to obtain N change trends includes: According to the FV values ​​of the N sub-window blocks at each of the candidate focus positions, fitting the trend lines of the FV values ​​of each of the sub-window blocks at all candidate focus positions to obtain N trend lines; Counting the number of convex points and concave points on each of the trend lines; According to the number of convex points and concave points on each trend line, the change trend of each trend line is determined, wherein the change trend includes: single peak, multi-peak and monotonic.

9. The method according to claim 8, It is characterized in that The step of fitting the trend line of the FV value of each sub-window block at all candidate focus positions according to the FV values ​​of the N sub-window blocks at each candidate focus position to obtain N trend lines comprises: Generate an original line of the FV value of each sub-window block at all candidate focus positions according to the FV values ​​of the N sub-window blocks at each candidate focus position; Each of the original lines is filtered to obtain N trend lines.

10. An electronic device comprising a memory, a processor and a computer program stored in the memory, It is characterized in that The processor executes the computer program to implement the camera focusing method according to any one of claims 1 to 9.

11. A computer-readable storage medium having a computer program / instructions stored thereon, It is characterized in that When the computer program / instruction is executed by a processor, the focusing method of a camera according to any one of claims 1 to 9 is implemented.

12. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instruction is executed by a processor, the focusing method of a camera according to any one of claims 1 to 9 is implemented.