Zoom detection method and device
By using zoom detection methods in electronic devices, multi-frame image and image detection technology are used to detect picture offset during camera zooming, the picture offset problem caused by camera switching in multi-camera systems is solved, and the shooting experience and imaging effect are improved.
Patent Information
- Application Number
- CN202311094567.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-02-28
AI Technical Summary
In multi-camera systems, the problem of picture offset often occurs when camera switches, affecting the user's shooting experience.
By acquiring the multi-frame images obtained by the electronic device taking the preset image board during the camera zooming process, the image detection technology is used to determine the image coordinates of at least two detection tiles on the image, and then the panel coordinates of the target point of the image on the preset image board are determined. Based on the difference in the coordinates of the panels of adjacent frame images, the zoom detection results are calculated.
Effectively detect and evaluate the center offset of the picture during zooming, objectively evaluate the zoom fluency of electronic devices, provide a basis for the optimization of imaging algorithms, and improve shooting experience and effect.
Smart Images

Figure CN119545165A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of electronic equipment, and in particular to a zoom detection method and device. Background Art
[0002] With the development of mobile imaging technology, the imaging system of mobile terminals is often equipped with multiple cameras, such as ultra-wide-angle cameras, wide-angle cameras, telephoto cameras, etc. During zoom preview or shooting, the algorithm will switch different cameras to achieve better imaging effects.
[0003] Due to the differences in the spatial position and hardware characteristics of each camera in a multi-camera system, picture offset problems often occur during the multi-camera zoom switching process, affecting the user's shooting experience. Summary of the invention
[0004] In order to detect the offset of a captured image during zooming, the embodiments of the present disclosure provide a zoom detection method, device, electronic device and storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a zoom detection method, comprising:
[0006] Acquire multiple frames of images obtained by shooting a preset image plate by the electronic device during camera zooming, wherein the preset image plate includes at least two detection blocks;
[0007] For each frame of the multiple frames of images, determining the board coordinates of the target point of the image on the preset board according to the image coordinates of at least two detection blocks on the image;
[0008] The zoom detection result of the electronic device is determined based on the difference in the image board coordinates between any two adjacent frames of the multiple frames.
[0009] In some implementations, determining the board coordinates of the target point of the image on the preset board according to the image coordinates of at least two detection blocks on the image includes:
[0010] Performing image detection on the image to determine first image coordinates of a first detection block and second image coordinates of a second detection block included in the image;
[0011] Determine a distance mapping relationship between the image and the preset image board according to the first image coordinates, the second image coordinates, and a pre-configured positional relationship between each detection block on the preset image board;
[0012] Based on the image coordinates and the board coordinates of any detection block on the image, and the distance mapping relationship, the board coordinates of the target point of the image on the preset board are determined.
[0013] In some implementations, determining the distance mapping relationship between the image and the preset image board according to the first image coordinates, the second image coordinates, and the pre-configured positional relationship between the detection blocks on the preset image board includes:
[0014] Determining an image distance between the first detection block and the second detection block according to the first image coordinates and the second image coordinates;
[0015] Determine a board distance between the first detection block and the second detection block on the preset board based on the position relationship;
[0016] According to the ratio of the board distance to the image distance, a distance mapping relationship between the image and the preset board is determined.
[0017] In some implementations, the target point includes a center point of the image, and determining the board coordinates of the target point of the image on the preset board based on the image coordinates and board coordinates of any detection block on the image and the distance mapping relationship includes:
[0018] Performing image detection on the image to determine the image coordinates of any detection block on the image, and determining the board coordinates of the detection block on a preset board according to the positional relationship;
[0019] Determining the image coordinates of the center point of the image based on the resolution size of the image;
[0020] The board coordinates of the center point of the image on the preset board are determined according to the image coordinates of the center point of the image, the board coordinates of the detection block, and the distance mapping relationship.
[0021] In some embodiments, the detection blocks on the preset board are arranged divergently from the center to the periphery, and the area occupied by the detection blocks gradually increases from the center to the periphery;
[0022] The performing image detection on the image to determine the first image coordinates of the first detection block included in the image and the second image coordinates of the second detection block include:
[0023] Performing image detection on the image, determining all detection blocks included in the image, and determining the detection block with the largest area and the second largest area as the first detection block and the second detection block respectively;
[0024] The coordinates of the center point of the first detection block are determined as the first image coordinates, and the coordinates of the center point of the second detection block are determined as the second image coordinates.
[0025] In some implementations, determining the zoom detection result of the electronic device based on the difference in the image board coordinates between any two adjacent image frames in the multiple image frames includes:
[0026] For any two adjacent frames of images in the multiple frames of images, determining an offset parameter according to a difference in the plate coordinates of the target points of the two frames of images;
[0027] The zoom detection result of the electronic device is determined according to the offset parameter.
[0028] In some implementations, the offset parameter includes a lateral offset parameter and a longitudinal offset parameter; and determining the zoom detection result of the electronic device according to the offset parameter includes:
[0029] In response to the circumstance that both the lateral offset parameter and the longitudinal offset parameter are not greater than a preset offset threshold, it is determined that the zoom detection result of the electronic device is a detection pass.
[0030] In some implementations, the step of acquiring multiple frames of images obtained by the electronic device shooting a preset image board during camera zooming includes:
[0031] Using the electronic device to shoot the preset image board at a fixed position, and controlling the electronic device to zoom at a constant speed during the shooting process;
[0032] The shooting process of the electronic device is recorded to obtain a video sequence, wherein the video sequence includes the multiple frames of images.
[0033] In some embodiments, the electronic device includes a display module, and the display module is used to display a preview window when the electronic device is shooting, and the multiple frames of images are preview window images when the electronic device zooms and shoots a preset image board.
[0034] In a second aspect, an embodiment of the present disclosure provides a zoom detection device, comprising:
[0035] An image acquisition module is configured to acquire multiple frames of images obtained by the electronic device shooting a preset image plate during camera zooming, wherein the preset image plate includes at least two detection blocks;
[0036] A coordinate determination module is configured to determine, for each frame of the multiple frames of images, the image coordinates of the target point of the image on the preset image board according to the image coordinates of at least two detection blocks on the image;
[0037] The zoom detection module is configured to determine the zoom detection result of the electronic device based on the difference in the image board coordinates of any two adjacent frames of the multiple frames.
[0038] In some embodiments, the coordinate determination module is configured to:
[0039] Performing image detection on the image to determine first image coordinates of a first detection block and second image coordinates of a second detection block included in the image;
[0040] Determine a distance mapping relationship between the image and the preset image board according to the first image coordinates, the second image coordinates, and a pre-configured positional relationship between each detection block on the preset image board;
[0041] Based on the image coordinates and the board coordinates of any detection block on the image, and the distance mapping relationship, the board coordinates of the target point of the image on the preset board are determined.
[0042] In some embodiments, the coordinate determination module is configured to:
[0043] Determining an image distance between the first detection block and the second detection block according to the first image coordinates and the second image coordinates;
[0044] Determine a board distance between the first detection block and the second detection block on the preset board based on the position relationship;
[0045] According to the ratio of the board distance to the image distance, a distance mapping relationship between the image and the preset board is determined.
[0046] In some implementations, the target point includes a center point of the image, and the coordinate determination module is configured to:
[0047] Performing image detection on the image to determine the image coordinates of any detection block on the image, and determining the board coordinates of the detection block on a preset board according to the positional relationship;
[0048] Determining the image coordinates of the center point of the image based on the resolution size of the image;
[0049] The board coordinates of the center point of the image on the preset board are determined according to the image coordinates of the center point of the image, the board coordinates of the detection block, and the distance mapping relationship.
[0050] In some implementations, the detection blocks on the preset board are arranged divergently from the center to the periphery, and the area occupied by the detection blocks gradually increases from the center to the periphery; the coordinate determination module is configured as follows:
[0051] The performing image detection on the image to determine the first image coordinates of the first detection block included in the image and the second image coordinates of the second detection block include:
[0052] Performing image detection on the image, determining all detection blocks included in the image, and determining the detection block with the largest area and the second largest area as the first detection block and the second detection block respectively;
[0053] The coordinates of the center point of the first detection block are determined as the first image coordinates, and the coordinates of the center point of the second detection block are determined as the second image coordinates.
[0054] In some implementations, the zoom detection module is configured to:
[0055] For any two adjacent frames of images in the multiple frames of images, determining an offset parameter according to a difference in the plate coordinates of the target points of the two frames of images;
[0056] The zoom detection result of the electronic device is determined according to the offset parameter.
[0057] In some implementations, the offset parameter includes a lateral offset parameter and a longitudinal offset parameter; and the zoom detection module is configured to:
[0058] In response to the circumstance that both the lateral offset parameter and the longitudinal offset parameter are not greater than a preset offset threshold, it is determined that the zoom detection result of the electronic device is a detection pass.
[0059] In some embodiments, the image acquisition module is configured to:
[0060] Using the electronic device to shoot the preset image board at a fixed position, and controlling the electronic device to zoom at a constant speed during the shooting process;
[0061] The shooting process of the electronic device is recorded to obtain a video sequence, wherein the video sequence includes the multiple frames of images.
[0062] In some embodiments, the electronic device includes a display module, and the display module is used to display a preview window when the electronic device is shooting, and the multiple frames of images are preview window images when the electronic device zooms and shoots a preset image board.
[0063] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0064] Processor; and
[0065] A memory storing computer instructions, wherein the computer instructions are used to enable a processor to execute the method described in any embodiment of the first aspect.
[0066] In a fourth aspect, an embodiment of the present disclosure provides a storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in any embodiment of the first aspect.
[0067] The zoom detection method of the disclosed embodiment includes obtaining multiple frames of images obtained by shooting a preset image board by an electronic device during camera zooming, and for each frame of the image, determining the image board coordinates of a target point of the image on the preset image board according to the image coordinates of at least two detection blocks on the image, and determining the zoom detection result of the electronic device based on the difference in the image board coordinates of any two adjacent frames of the image in the multiple frames. In the disclosed embodiment of the present invention, by detecting the zoom process of the electronic device and determining the zoom detection result based on the difference in the image board coordinates of adjacent frames of the image, the center offset of the picture that occurs during the zooming process can be effectively detected, thereby objectively evaluating the zoom smoothness of the electronic device, providing an objective basis for the optimization of the imaging algorithm, and improving the shooting experience and effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0069] Figure 1 It is a schematic diagram of preview images in a multi-camera switching scenario in the related art.
[0070] Figure 2 It is a schematic diagram of application scenarios in some implementation modes of the present disclosure.
[0071] Figure 3 It is a schematic diagram of a preset drawing board in some embodiments of the present disclosure.
[0072] Figure 4 is a flowchart of a zoom detection method according to some implementations of the present disclosure.
[0073] Figure 5 It is a schematic diagram of a zoom detection method according to some implementation modes of the present disclosure.
[0074] Figure 6 is a flowchart of a zoom detection method according to some implementations of the present disclosure.
[0075] Figure 7 is a flowchart of a zoom detection method according to some implementations of the present disclosure.
[0076] Figure 8is a flowchart of a zoom detection method according to some implementations of the present disclosure.
[0077] Fig. 9 is a flowchart of a zoom detection method according to some implementations of the present disclosure.
[0078] Fig.10 is a flowchart of a zoom detection method according to some implementations of the present disclosure.
[0079] Fig.11 is a flowchart of a zoom detection method according to some implementations of the present disclosure.
[0080] Fig.12 It is a structural block diagram of a zoom detection device in some embodiments of the present disclosure.
[0081] Fig.13 It is a structural block diagram of an electronic device according to some implementations of the present disclosure. DETAILED DESCRIPTION
[0082] The technical solution of the present disclosure will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described implementation is a part of the implementation of the present disclosure, rather than all the implementations. Based on the implementation in the present disclosure, all other implementations obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure. In addition, the technical features involved in the different implementations of the present disclosure described below can be combined with each other as long as they do not conflict with each other.
[0083] With the development of mobile imaging technology, the imaging system of mobile terminals is often equipped with multiple cameras. A typical multi-camera system may include an ultra-wide-angle camera (ultra wide), a wide-angle camera (wide), and a telephoto camera (tele). Many new algorithms have been implemented in the field of computational photography around multi-camera systems to enrich consumers' photo-taking experience, such as dual-camera blur, multi-camera fusion, optical zoom, etc.
[0084] At the same time, due to the different positions and hardware characteristics (such as focal length, pixel size, field of view, etc.) of cameras with different focal lengths in a multi-camera system, even for the same scene, the image signals received by the image sensors of different cameras are different, resulting in images of different scales or positions.
[0085] For example, in a zoom preview scenario, the imaging algorithm will switch different cameras according to the change in focal length to improve the imaging effect at different shooting distances. This results in the screen preview being offset when switching from camera 1 to camera 2 due to the different positions and hardware characteristics of camera 1 and camera 2, and the screen transition is not smooth enough, affecting the user's shooting experience.
[0086] For example Figure 1 In the scene, Figure 1 (a) is the image taken by camera 1. Figure 1 (b) is the image taken by camera 2. It can be seen that due to the inconsistency in the spatial positions of camera 1 and camera 2, the preview screen is offset when switching from camera 1 to camera 2 during the camera zoom shooting process, and the zoom preview screen seen by the user changes suddenly.
[0087] It can be seen that for a multi-camera system, the image shifts when the camera switches, resulting in an unsmooth image transition, which is a very bad experience for users when taking photos, previewing photos, or recording videos. Therefore, it is particularly important to detect image shift during zooming.
[0088] Based on this, the embodiments of the present disclosure provide a zoom detection method, device, electronic device and storage medium, which aim to detect the image offset of the electronic device during zoom shooting, objectively evaluate the zoom smoothness, provide an objective basis for the optimization of the imaging algorithm, and improve the shooting experience and effect.
[0089] In a first aspect, an embodiment of the present disclosure provides a zoom detection method, which is mainly used to detect the image offset during the zoom process of an electronic device. The electronic device can be any type of device suitable for implementation, such as a smart phone, a tablet computer, a wearable device, etc., and the present disclosure does not impose any restrictions on this.
[0090] It is worth noting that the electronic device described in the present disclosure includes a camera module, and the camera module includes at least two cameras. For example, the electronic device takes a smartphone as an example, and the camera module of the smartphone may include an ultra-wide-angle camera, a wide-angle camera, and a telephoto camera. During zoom shooting, the imaging algorithm switches between the cameras of the camera module to achieve better imaging effects.
[0091] Figure 2 A schematic diagram of a scenario of the method of the embodiment of the present disclosure is shown below. Figure 2 The application scenario of the zoom detection method disclosed in the present invention is described.
[0092] like Figure 2 As shown, the electronic device takes a smart phone as an example. In the disclosed example, it is necessary to use the electronic device to zoom and shoot a preset image plate. The preset image plate is a pre-set camera calibration plate, and a plurality of detection blocks are arranged on the preset image plate.
[0093] For example, in one example, the preset board can be Figure 3 As shown, a plurality of detection blocks are set on the preset board, that is, each black rectangular block on the board is a detection block. Figure 3In the example, the detection blocks on the preset board are arranged divergently from the center to the periphery, and the area occupied by the detection blocks gradually increases from the center to the periphery, that is, the closer to the center of the board, the smaller the detection blocks are, and the closer to the periphery of the board, the larger the detection blocks are.
[0094] Of course, those skilled in the art will appreciate that the configuration of the preset drawing board is not limited to Figure 3 For example, other board styles may also be used, which are described below in the present disclosure.
[0095] In addition, for the convenience of the following description, some technical terms in the present disclosure are defined and explained here:
[0096] 1) Image coordinates refer to the pixel coordinates of a point on an image. The origin of the image coordinate system can be, for example, the upper left corner of the image, so that the image coordinates of each point on the image can be determined based on the number of pixels in the horizontal and vertical directions.
[0097] 2) Board coordinates refer to the coordinates in the board coordinate system. The origin of the board coordinate system can be, for example, the upper left corner of the board, so that the board coordinates of each point on the board can be determined according to the actual distance in the horizontal and vertical directions.
[0098] Understandably, Figure 3 Taking the preset plate shown as an example, the plate coordinates of the detection block can be determined according to the actual distance, that is, the plate coordinates of each detection plate on the preset plate are known, so the actual distance between any two detection blocks is also known.
[0099] In the example scenario of the present disclosure, when zooming and shooting a preset image board using an electronic device, the preview window of the electronic device can cover the entire preset image board at the minimum zoom ratio, and then the zoom ratio can be evenly enlarged with the camera in a fixed position until the zoom ratio reaches the maximum. Of course, those skilled in the art can understand that the zoom shooting process can also be achieved by gradually reducing the maximum zoom ratio to the minimum zoom ratio, and the present disclosure does not limit this.
[0100] It is understandable that as the zoom ratio changes, for electronic devices with multi-camera systems, during the entire zoom shooting process, the imaging algorithm will switch between different cameras. When the camera switches, the preview window may be significantly offset, which is manifested as the detection block originally located in the center of the screen suddenly shifting to other positions. Therefore, the zoom detection method of the embodiment of the present disclosure can detect the zoom offset based on the above scenario. Figure 4 Provide explanation.
[0101] like Figure 4 As shown, in some embodiments, the zoom detection method of the present disclosure example includes:
[0102] S410, obtaining multiple frames of images obtained by the electronic device shooting a preset image board during a camera zoom process.
[0103] In the disclosed embodiment, the electronic device may be used to zoom in and shoot a preset image board, and the change in zoom ratio may trigger the camera of the electronic device to switch.
[0104] For example, in some embodiments, combined with Figure 2 and Figure 3 As shown, a tripod, a gimbal or the like can be used to assist the electronic device in shooting a preset image board at a fixed position. At the minimum zoom ratio, the preview window of the electronic device can cover the entire preset image board, and then the electronic device can be controlled to uniformly enlarge the zoom ratio until the zoom ratio is maximum.
[0105] During the zoom shooting process, the camera system can acquire multiple frames of zoom images. The multiple frames of images can be video stream images or single frame images acquired by continuous triggering.
[0106] For example, in one example, the electronic device still uses Figure 2 Taking the smartphone shown as an example, the screen recording software of the smartphone can be used to record the preview window video during zoom shooting, thereby obtaining a video sequence during zoom shooting, and the video sequence includes the multiple frame images described in the present disclosure.
[0107] For example, in another example, other electronic devices with shooting functions can be used to shoot the screen preview window when the mobile phone zooms in to shoot a preset picture panel, thereby using other electronic devices to shoot a video sequence, which includes the multiple frames of images described in the present disclosure.
[0108] For example, in another example, the electronic device can be controlled to capture an image every time the zoom ratio is changed to a certain level during the zoom process. For example, a frame of image is captured every time the zoom ratio increases or decreases by 0.5x, thereby obtaining multiple frames of images that are continuously triggered and captured.
[0109] For example, in another example, the camera function of the electronic device can be used to capture a video sequence in the zoom shooting process, and the video sequence includes the multiple frames of images described in the present disclosure.
[0110] Those skilled in the art will appreciate that there are many other ways to obtain multiple frames of images during the zooming process, and the present disclosure does not limit this.
[0111] It can be understood that the multi-frame images described in the present disclosure can be a video sequence composed of multiple continuous frames of images. For example, in one example, the multi-frame images can be a video sequence obtained by an electronic device uniformly magnifying and shooting a preset image board. In the implementation mode of the present disclosure, zoom detection can be performed on the image offset of the zoom process based on the acquired multi-frame images.
[0112] S420. For each frame of the multiple frames of images, determine the board coordinates of the target point of the image on the preset board according to the image coordinates of at least two detection blocks on the image.
[0113] It can be understood that for each frame image in a video sequence, the image may include multiple detection blocks. In the embodiment of the present disclosure, the image coordinates of at least two detection blocks on the image can be detected by using image detection technology.
[0114] For example, in an example scenario, the i-th frame image in the video sequence can be Figure 5 As shown in (a), the i+1th frame image can be Figure 5 As shown in (b), that is, Figure 5 (a) and (b) are two adjacent frames in the video sequence.
[0115] by Figure 5 Taking the i-th frame image shown in (a) as an example, it can be seen that the image includes multiple detection blocks, so the image coordinates of each detection block can be detected using the image detection algorithm. For example, taking detection block 83 as an example, the image coordinates of detection block 83 are the pixel coordinates of detection block 83 on the i-th frame image.
[0116] In addition, it can be understood that since the detection block on the image itself occupies a certain image area, the center point coordinates of the detection block can be used as the image coordinates of the detection block, and the present disclosure will not elaborate on this.
[0117] In the disclosed embodiments, it is necessary to determine the distance mapping relationship between the image coordinate system and the board coordinate system at the zoom factor of the i-th frame image based on the image coordinates of the detected image block. The distance mapping relationship can be understood as the actual distance between a pixel on the i-th frame image and the board coordinate system.
[0118] It can be known that a straight line can be determined according to any two points in space, so for multiple detection blocks on the i-th frame image, only two detection blocks need to be selected.
[0119] In some implementations, two detection blocks may be randomly selected from a plurality of detection blocks included in the i-th frame image.
[0120] In some other implementations, the two detection blocks with the largest and second largest areas may be selected from the multiple detection blocks included in the i-th frame image. Figure 3 In the preset image board of the example, a number is pre-configured for each detection block, and the larger the area of the detection block, the larger the corresponding number. Therefore, when selecting two detection blocks, image detection technology can be used to identify the numbers in each detection block, and the two detection blocks with the largest and second largest numbers can be selected.
[0121] For example Figure 5 In the i-th frame image shown in (a), the detection block 88 can be selected as the first detection block, and the detection block 83 can be selected as the second detection block.
[0122] It can be understood that the image coordinates of the first detection block 88 and the second detection block 83 can be obtained through image detection, so that the image distance between the first detection block 88 and the second detection block 83 can be calculated. At the same time, the actual distance between the first detection block 88 and the second detection block 83 on the preset board is known, so the distance mapping relationship between the image coordinate system of the i-th frame image and the board coordinate system can be calculated.
[0123] In the embodiment of the present disclosure, the target point may be, for example, the center point of an image. Taking the i-th frame image as an example, the center point O of the i-th frame image is i The image coordinates are Wherein, width represents the horizontal resolution of the image, and height represents the vertical resolution of the image. When the image resolution is known, the image coordinates of the center point of the image are also known. Therefore, the image coordinates of the first detection block 88, the image coordinates of the second detection block 83, the image coordinates of the center point of the image, and the distance mapping relationship can be used to determine the center point of the image. i The coordinates of the drawing board in the drawing board coordinate system. The specific calculation process is described in the following of this disclosure and will not be described in detail here.
[0124] The above takes the i-th frame image as an example to illustrate the process of calculating the plate coordinates of the image target point. For each frame image in the video sequence, the above method process is executed in sequence to obtain the plate coordinates of the center point of each frame image.
[0125] S430, determining a zoom detection result of the electronic device based on a difference in image plate coordinates between any two adjacent image frames in the multiple image frames.
[0126] It is understandable that in the process of zooming and shooting a preset image board at a fixed position, in order to prevent the preview image from being significantly shifted, the center point of the preview image should always remain at the same position without shifting. Therefore, for two adjacent frames in a video sequence, the image board coordinates of the center points of the two frames should be the same or very close.
[0127] For example, Figure 5 Taking the i-th frame image and the i+1-th frame image as examples, when switching from the i-th frame image to the i+1-th frame image, if the board coordinates of the center point of the i-th frame image are the same or close to the board coordinates of the center point of the i+1-th frame image, the preview image observed by the user is that the center of the image remains unchanged and the zoom ratio changes evenly. If the board coordinates of the center point of the i-th frame image are very different from the board coordinates of the center point of the i+1-th frame image, the center of the preview image observed by the user shifts suddenly, and the zoom process is not smooth enough.
[0128] Based on this, in an embodiment of the present disclosure, after obtaining the image board coordinates of the center point of each frame image in the video sequence through the aforementioned method process, the image board coordinate difference can be calculated for any two adjacent frames of images, and the zoom detection result for the electronic device can be determined based on the image board coordinate difference.
[0129] If the plate coordinate difference between two adjacent frames in the entire video sequence meets the offset requirement, it means that the center of the picture has not shifted during the entire zoom process, and the zoom process is relatively smooth, and the zoom test result can be determined to be passed. On the contrary, if the plate coordinate difference between any two frames in the entire video sequence does not meet the offset requirement, it means that the picture has a sudden shift during the entire zoom process, and the zoom test result can be determined to be failed. The shift is caused by camera switching, and the camera switching algorithm needs to be optimized.
[0130] From the above, it can be seen that in the embodiments of the present disclosure, by detecting the zoom process of the electronic device and determining the zoom detection result based on the difference in the image plate coordinates of adjacent frame images, it is possible to effectively detect the center offset of the picture during the zoom process, thereby objectively evaluating the zoom smoothness of the electronic device, providing an objective basis for the optimization of the imaging algorithm, and improving the shooting experience and effect.
[0131] In the following embodiments of the present disclosure, the electronic device will be Figure 2 As an example, the default image board will be Figure 2 , Figure 3 Taking the shown board style as an example, the zoom detection method disclosed in the present invention is explained.
[0132] Combination Figure 2 It can be understood that a smart phone includes a display module, which is the screen module of the phone. The display module can display a preview window during the shooting process, and the user can preview the imaging effect through the preview window.
[0133] In this public example, the preset image board can be photographed by zooming in a smartphone, and then a video sequence is obtained by recording the video in the preview window. Figure 6Provide explanation.
[0134] like Figure 6 As shown, in some implementations, the zoom detection method of the example of the present disclosure, the process of acquiring a video sequence includes:
[0135] S421, using an electronic device to shoot a preset image board at a fixed position, and controlling the electronic device to zoom at a uniform speed during the shooting process.
[0136] S422: Record the shooting process of the electronic device to obtain a video sequence.
[0137] For example Figure 2 In the example scenario, you can use auxiliary equipment such as a tripod or gimbal to fix the position of the mobile phone, then turn on the mobile phone screen recording function, and then use the mobile phone camera to shoot the preset picture board. During the shooting process, you can change the zoom ratio from the minimum to the maximum at a uniform speed, or from the maximum to the minimum at a uniform speed.
[0138] It can be understood that during the process of uniform zoom shooting of the preset image board, the preview window of the mobile phone can present the preview picture during the zoom process in real time, and the screen recording function can be used to record the changes in the preview picture to obtain a video sequence during the zoom shooting process.
[0139] In the above example, the video sequence is captured by the screen recording function of the mobile phone. In other implementations, other means can be used to capture the video sequence. For example, other devices can be used to shoot the preview window of the mobile phone's zoom process to obtain the video sequence. For example, the video recording function can be used to capture the video sequence of the zoom process. Those skilled in the art can undoubtedly understand and fully implement it, and the present disclosure will not elaborate on this.
[0140] After obtaining the video sequence, the coordinates of the target point in each frame can be determined by detecting the video sequence. Figure 7 Provide explanation.
[0141] like Figure 7 As shown, in some embodiments, the zoom detection method of the present disclosure example, the process of determining the plate coordinates of the target point of each frame image includes:
[0142] S710: Perform image detection on an image to determine first image coordinates of a first detection block and second image coordinates of a second detection block included in the image.
[0143] In this public example, Figure 5 Taking the i-th frame image in the video sequence shown in (a) as an example, the process of determining the plate coordinates of the center point of the image is explained.
[0144] like Figure 8 As shown, in some embodiments, the zoom detection method of the present disclosure example, the process of determining the first image coordinates and the second image coordinates includes:
[0145] S711 , performing image detection on the image, determining all detection blocks included in the image, and determining the detection blocks with the largest area and the second largest area as the first detection block and the second detection block, respectively.
[0146] S712: Determine the coordinates of the center point of the first detection block as the first image coordinates, and determine the coordinates of the center point of the second detection block as the second image coordinates.
[0147] See also Figure 5 In the i-th frame image shown in (a), it can be seen that the i-th frame image includes multiple detection blocks, so that image detection can be performed on the i-th frame image to obtain all the detection blocks included in the i-th frame image.
[0148] In the example disclosed in the present invention, the detection blocks included in the i-th frame image have different sizes of area, and the detection blocks closer to the periphery of the image have larger areas. In the implementation of the present invention, the detection block with the largest area can be selected as the first detection block, and the detection block with the second largest area can be selected as the second detection block. The advantage of this is that the larger the detection block, the closer it is to the periphery of the image, so that the distance between the first detection block and the second detection block is farther, and the error in calculating the distance mapping relationship is smaller.
[0149] In addition, it is worth noting that in the example disclosed in the present invention, in order to further speed up the calculation, different numbers can be set for each detection block on the preset board, and the larger the area of the detection block, the larger the number corresponding to it. Therefore, when determining the first detection block and the second detection block, it is only necessary to compare the numerical sizes of the detection blocks on the i-th frame image, and select the detection blocks with the largest and second largest numbers, that is, the detection blocks with the largest and second largest areas.
[0150] For example Figure 5 In the i-th frame image shown in (a), it can be determined that the numbers 88 and 83 are the largest and second largest numbers, so the corresponding detection block 88 is the first detection block, and the detection block 83 is the second detection block.
[0151] After determining the first detection block 88 and the second detection block 83, the center point coordinates of the first detection block 88 on the i-th frame image can be determined, and the center point coordinates are the first image coordinates of the first detection block 88. Similarly, the second image coordinates of the second detection block 83 are determined according to the center point coordinates of the second detection block 83.
[0152] For example Figure 5 In this example, the first image coordinates of the first detection block 88 are (x88 ,y 88 ), the second image coordinates of the second detection block 83 are (x 83 ,y 83 ).
[0153] S720. Determine a distance mapping relationship between the image and the preset board according to the first image coordinates, the second image coordinates, and the positional relationship between each detection block on the pre-configured preset board.
[0154] Combined with the above, we can know that the distance mapping relationship between the i-th frame image and the preset image board is Pixel length , which represents the mapping relationship between the image coordinate system of the i-th frame image and the board coordinate system, can be understood as the mapping relationship between a pixel on the i-th frame image and the actual distance on the preset board.
[0155] The positional relationship of the preset board refers to the board coordinates of each detection block on the preset board. For example, for any two detection blocks, the actual distance between the two on the board can be calculated based on their board coordinates.
[0156] In the embodiment of the present disclosure, the board distance between the first detection block and the second detection block can be determined according to the position relationship of the preset board, and the image distance between the first detection block and the second detection block can be determined according to the image coordinates of the first detection block and the second detection block. Then, the distance mapping relationship can be obtained according to the board distance and the image distance. Fig. 9 Provide explanation.
[0157] like Fig. 9 As shown, in some implementations, the zoom detection method of the example of the present disclosure, the process of determining the distance mapping relationship includes:
[0158] S721. Determine an image distance between a first detection block and a second detection block according to the first image coordinates and the second image coordinates.
[0159] S722. Determine a board distance between the first detection block and the second detection block on a preset board based on the position relationship.
[0160] S723. Determine the distance mapping relationship between the image and the preset board according to the ratio of the board distance to the image distance.
[0161] In this disclosed example, Figure 5 As shown in (a), the first image coordinate (x 88 ,y 88 ), and the second image coordinates (x 83 ,y 83), determine the image distance between the first detection block 88 and the second detection block 83 on the i-th frame image.
[0162] Then, according to the position relationship of the preset board, the board coordinates of the first detection block 88 and the second detection block 83 are known, and the board distance Length between the two can be calculated. 88-83 , and then the distance mapping relationship pixel is obtained length It can be expressed as:
[0163]
[0164] S730. Based on the image coordinates and the board coordinates of any detection block on the image, as well as the distance mapping relationship, determine the board coordinates of the target point of the image on the preset board.
[0165] In the embodiment of the present disclosure, the target point is the center point O of the i-th frame image. i For example, the image coordinates of any detection block on the i-th frame image are known, the coordinates of the board are known, and the distance mapping relationship pixel is obtained through the above method process length After that, the center point O of the i-th frame image can be obtained by combining the image coordinates and the board coordinates of any detection block. i The coordinates of the board are combined below Fig.10 Provide explanation.
[0166] like Fig.10 As shown, in some embodiments, the zoom detection method of the present disclosure example, the process of determining the plate coordinates of the center point of the image includes:
[0167] S731. Perform image detection on the image to determine the image coordinates of any detection block on the image, and determine the board coordinates of the detection block on the preset board based on the position relationship.
[0168] S732. Determine the image coordinates of the center point of the image based on the resolution size of the image.
[0169] S733. Determine the board coordinates of the center point of the image on the preset board according to the image coordinates of the center point of the image, the board coordinates of the detection block, and the distance mapping relationship.
[0170] by Figure 5 Taking the i-th frame image shown in (a) as an example, a detection block can be arbitrarily selected from the i-th frame image. For ease of understanding, the second detection block 83 is taken as an example. As can be seen from the foregoing, the image coordinates of the second detection block 83 are (x 83 ,y 83 ), according to the position relationship of the preset board, the board coordinates of the second detection block 83 are (X 83 , Y83 ), the distance mapping relationship between the i-th frame image and the image board is pixel length .
[0171] The center point O of the i-th frame image i The image coordinates can be determined according to the resolution size of the image, which is expressed as Among them, width represents the horizontal resolution of the image, height represents the vertical resolution of the image, and when the image resolution is known, the center point O of the image i The image coordinates of are also known.
[0172] Then, the center point O of the i-th frame image i Board coordinates FOV on the preset board Oi It can be expressed as:
[0173]
[0174] Thus, according to the above formula, the center point O of the i-th frame image can be calculated i Board coordinates FOV on the preset board Oi .
[0175] The above only takes the i-th frame image as an example to calculate the center point O i The board coordinate FOV Oi The process is described. For each frame image in the video sequence, the above method process is repeated in sequence to obtain the plate coordinates of the center point of each frame image, which will not be repeated in this disclosure.
[0176] like Fig.11 As shown, in some implementations, the zoom method of the present disclosure example, the process of determining the zoom detection result includes:
[0177] S431. For any two adjacent frames of images in the multiple frames of images, an offset parameter is determined according to the difference in the image board coordinates of the target points of the two frames of images.
[0178] S432: Determine a zoom detection result of the electronic device according to the offset parameter.
[0179] In the disclosed example, two adjacent frames of images in the multiple frames are Figure 5 As shown, Figure 5 (a) is the i-th frame image, Figure 5 (b) is the i+1th frame image adjacent to the i-th frame image. Figure 5 Take this as an example to illustrate.
[0180] Through the above method, the center point O of the i-th frame image can be calculated. i The board coordinates are FOV Oi, the center point O of the i+1th frame image i+1 The board coordinates are FOV Oi+1 According to the above, in order to ensure smooth image without offset and mutation during zooming, the center point coordinates of two consecutive frames of images should be the same or very close.
[0181] Therefore, in some embodiments of the present disclosure, the FOV coordinates of the center point of the i-th frame image can be calculated based on the image board coordinates. Oi The FOV of the image board coordinates of the center point of the i+1th frame image Oi+1 The difference between them determines the lateral offset parameter X shift and the longitudinal offset parameter Y shift , expressed as:
[0182]
[0183] In formula (2), Represents the plate coordinates of the center point of the i-th frame image, Represents the plate coordinates of the center point of the i+1th frame image, It represents the distance mapping relationship of the i+1th frame image, and width and height represent the horizontal resolution and vertical resolution of the image respectively.
[0184] The offset parameters of the image board coordinates between the center point of the i-th frame image and the center point of the i+1-th frame image can be calculated by the above formula (2). The offset parameters include the above-mentioned lateral offset parameter X shift and the longitudinal offset parameter Y shift .
[0185] In the embodiment of the present disclosure, an offset threshold may be preset, and the offset threshold represents a critical value of the zoom offset. If the offset parameter between two adjacent frames is greater than the preset offset threshold, it means that a sudden change in the center offset occurs between the two frames, and the zoom detection result is determined to be failed. On the contrary, if the offset parameter between any two adjacent frames is not greater than the preset offset threshold, it means that there are no two frames of images with a sudden change in the center offset during the zoom process, and the zoom detection result is determined to be passed.
[0186] In the above embodiment, the offset parameter includes the above-mentioned lateral offset parameter X shift and the longitudinal offset parameter Y shift , so that the lateral offset parameter X shift and the longitudinal offset parameter Y shift They are compared with the preset offset thresholds. If the lateral offset parameter X shift and the longitudinal offset parameter Y shiftIf any one of the lateral offset parameter X is greater than the preset offset threshold, it is determined that the zoom detection result fails. shift and the longitudinal offset parameter Y shift If both are not greater than the preset offset threshold, it is determined that the zoom detection result is a passed detection.
[0187] It is understandable that the above is only Figure 5 The example of two frames of images is used for explanation. For multiple frames of images included in a video sequence, the above method process is performed for any two frames of images until all adjacent frames of images are detected and passed, and then the zoom detection result of the electronic device can be determined to be passed. On the contrary, if any two adjacent frames of images are stored and the detection fails, it can be determined that the zoom detection result of the electronic device fails. Those skilled in the art can understand this, and this disclosure will not elaborate on it.
[0188] From the above, it can be seen that in the embodiments of the present disclosure, by detecting the zoom process of the electronic device and determining the zoom detection result based on the difference in the image plate coordinates of adjacent frame images, it is possible to effectively detect the center offset of the picture during the zoom process, thereby objectively evaluating the zoom smoothness of the electronic device, providing an objective basis for the optimization of the imaging algorithm, and improving the shooting experience and effect.
[0189] In a second aspect, an embodiment of the present disclosure provides a zoom detection device, which can be used in an electronic device. The electronic device can be any type of device suitable for implementation, such as a smart phone, a tablet computer, a wearable device, etc., and the present disclosure does not limit this.
[0190] like Fig.12 As shown, in some embodiments, the zoom detection device of the example of the present disclosure includes:
[0191] The image acquisition module 10 is configured to acquire multiple frames of images obtained by the electronic device shooting a preset image plate during camera zooming, wherein the preset image plate includes at least two detection blocks;
[0192] The coordinate determination module 20 is configured to determine, for each frame of the multiple frames of images, the image coordinates of the target point of the image on the preset image board according to the image coordinates of at least two detection blocks on the image;
[0193] The zoom detection module 30 is configured to determine the zoom detection result of the electronic device based on the difference in the image board coordinates of any two adjacent frames of the multiple frames of images.
[0194] In some embodiments, the coordinate determination module 20 is configured to:
[0195] Performing image detection on the image to determine first image coordinates of a first detection block and second image coordinates of a second detection block included in the image;
[0196] Determine a distance mapping relationship between the image and the preset image board according to the first image coordinates, the second image coordinates, and a pre-configured positional relationship between each detection block on the preset image board;
[0197] Based on the image coordinates and the board coordinates of any detection block on the image, and the distance mapping relationship, the board coordinates of the target point of the image on the preset board are determined.
[0198] In some embodiments, the coordinate determination module 20 is configured to:
[0199] Determining an image distance between the first detection block and the second detection block according to the first image coordinates and the second image coordinates;
[0200] Determine a board distance between the first detection block and the second detection block on the preset board based on the position relationship;
[0201] According to the ratio of the board distance to the image distance, a distance mapping relationship between the image and the preset board is determined.
[0202] In some implementations, the target point includes a center point of the image, and the coordinate determination module 20 is configured to:
[0203] Performing image detection on the image to determine the image coordinates of any detection block on the image, and determining the board coordinates of the detection block on a preset board according to the positional relationship;
[0204] Determining the image coordinates of the center point of the image based on the resolution size of the image;
[0205] The board coordinates of the center point of the image on the preset board are determined according to the image coordinates of the center point of the image, the board coordinates of the detection block, and the distance mapping relationship.
[0206] In some implementations, the detection blocks on the preset board are arranged divergently from the center to the periphery, and the area occupied by the detection blocks gradually increases from the center to the periphery; the coordinate determination module 20 is configured as follows:
[0207] The performing image detection on the image to determine the first image coordinates of the first detection block included in the image and the second image coordinates of the second detection block include:
[0208] Performing image detection on the image, determining all detection blocks included in the image, and determining the detection block with the largest area and the second largest area as the first detection block and the second detection block respectively;
[0209] The coordinates of the center point of the first detection block are determined as the first image coordinates, and the coordinates of the center point of the second detection block are determined as the second image coordinates.
[0210] In some implementations, the zoom detection module 30 is configured to:
[0211] For any two adjacent frames of images in the multiple frames of images, determining an offset parameter according to a difference in the plate coordinates of the target points of the two frames of images;
[0212] The zoom detection result of the electronic device is determined according to the offset parameter.
[0213] In some implementations, the offset parameter includes a lateral offset parameter and a longitudinal offset parameter; the zoom detection module 30 is configured as follows:
[0214] In response to the circumstance that both the lateral offset parameter and the longitudinal offset parameter are not greater than a preset offset threshold, it is determined that the zoom detection result of the electronic device is a detection pass.
[0215] In some embodiments, the image acquisition module 10 is configured to:
[0216] Using the electronic device to shoot the preset image board at a fixed position, and controlling the electronic device to zoom at a constant speed during the shooting process;
[0217] The shooting process of the electronic device is recorded to obtain a video sequence, wherein the video sequence includes the multiple frames of images.
[0218] In some embodiments, the electronic device includes a display module, and the display module is used to display a preview window when the electronic device is shooting, and the multiple frames of images are preview window images when the electronic device zooms and shoots a preset image board.
[0219] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0220] Processor; and
[0221] A memory stores computer instructions, wherein the computer instructions are used to enable a processor to execute the method described in any of the above embodiments.
[0222] In a fourth aspect, an embodiment of the present disclosure provides a storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in any of the aforementioned embodiments.
[0223] Fig.13 The structure block diagram of the electronic device in some embodiments of the present disclosure is shown in FIG. The electronic device may be any electronic device in the aforementioned embodiments. Fig.13 The principles related to electronic devices and storage media in some embodiments of the present disclosure are described.
[0224] Reference Fig.13 , the electronic device 1800 may include one or more of the following components: a processing component 1802 , a memory 1804 , a power component 1806 , a multimedia component 1808 , an audio component 1810 , an input / output (I / O) interface 1812 , a sensor component 1816 , and a communication component 1818 .
[0225] The processing component 1802 generally controls the overall operation of the electronic device 1800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1802 may include one or more processors 1820 to execute instructions. In addition, the processing component 1802 may include one or more modules to facilitate interaction between the processing component 1802 and other components. For example, the processing component 1802 may include a multimedia module to facilitate interaction between the multimedia component 1808 and the processing component 1802. For another example, the processing component 1802 may read executable instructions from a memory to implement electronic device related functions.
[0226] The memory 1804 is configured to store various types of data to support operations on the electronic device 1800. Examples of such data include instructions for any application or method operating on the electronic device 1800, contact data, phone book data, messages, pictures, videos, etc. The memory 1804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0227] The power supply component 1806 provides power to the various components of the electronic device 1800. The power supply component 1806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1800.
[0228] The multimedia component 1808 includes a display screen that provides an output interface between the electronic device 1800 and the user. In some embodiments, the multimedia component 1808 includes a front camera and / or a rear camera. When the electronic device 1800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0229] The audio component 1810 is configured to output and / or input audio signals. For example, the audio component 1810 includes a microphone (MIC), and when the electronic device 1800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1804 or sent via the communication component 1818. In some embodiments, the audio component 1810 also includes a speaker for outputting audio signals.
[0230] I / O interface 1812 provides an interface between processing component 1802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0231] The sensor assembly 1816 includes one or more sensors for providing various aspects of status assessment for the electronic device 1800. For example, the sensor assembly 1816 can detect the open / closed state of the electronic device 1800, the relative positioning of components, such as the display and keypad of the electronic device 1800, and the sensor assembly 1816 can also detect the position change of the electronic device 1800 or a component of the electronic device 1800, the presence or absence of user contact with the electronic device 1800, the orientation or acceleration / deceleration of the electronic device 1800, and the temperature change of the electronic device 1800. The sensor assembly 1816 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1816 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1816 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0232] The communication component 1818 is configured to facilitate wired or wireless communication between the electronic device 1800 and other devices. The electronic device 1800 can access a wireless network based on a communication standard, such as Wi-Fi, 2G, 3G, 4G, 5G or 6G, or a combination thereof. In an exemplary embodiment, the communication component 1818 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1818 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0233] In an exemplary embodiment, the electronic device 1800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.
[0234] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the embodiments. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.
Claims
1. A zoom detection method, characterized in that: include: Acquire multiple frames of images obtained by shooting a preset image plate by the electronic device during camera zooming, wherein the preset image plate includes at least two detection blocks; For each frame of the multiple frames of images, determining the board coordinates of the target point of the image on the preset board according to the image coordinates of at least two detection blocks on the image; The zoom detection result of the electronic device is determined based on the difference in the image board coordinates between any two adjacent frames of the multiple frames.
2. The method according to claim 1, characterized in that The step of determining the board coordinates of the target point of the image on the preset board according to the image coordinates of at least two detection blocks on the image includes: Performing image detection on the image to determine first image coordinates of a first detection block and second image coordinates of a second detection block included in the image; Determine a distance mapping relationship between the image and the preset image board according to the first image coordinates, the second image coordinates, and a pre-configured positional relationship between each detection block on the preset image board; Based on the image coordinates and the board coordinates of any detection block on the image, and the distance mapping relationship, the board coordinates of the target point of the image on the preset board are determined.
3. The method according to claim 2, characterized in that The determining of the distance mapping relationship between the image and the preset image board according to the first image coordinates, the second image coordinates and the pre-configured positional relationship between the detection blocks on the preset image board comprises: Determining an image distance between the first detection block and the second detection block according to the first image coordinates and the second image coordinates; Determine a board distance between the first detection block and the second detection block on the preset board based on the position relationship; According to the ratio of the board distance to the image distance, a distance mapping relationship between the image and the preset board is determined.
4. The method according to claim 2, characterized in that: The target point includes the center point of the image, and the determining the board coordinates of the target point of the image on the preset board based on the image coordinates and the board coordinates of any detection block on the image and the distance mapping relationship includes: Performing image detection on the image to determine the image coordinates of any detection block on the image, and determining the board coordinates of the detection block on a preset board according to the positional relationship; Determining the image coordinates of the center point of the image based on the resolution size of the image; The board coordinates of the center point of the image on the preset board are determined according to the image coordinates of the center point of the image, the board coordinates of the detection block, and the distance mapping relationship.
5. The method according to claim 2, characterized in that: The detection blocks on the preset board are arranged divergently from the center to the periphery, and the area occupied by the detection blocks gradually increases from the center to the periphery; The performing image detection on the image to determine the first image coordinates of the first detection block included in the image and the second image coordinates of the second detection block include: Performing image detection on the image, determining all detection blocks included in the image, and determining the detection block with the largest area and the second largest area as the first detection block and the second detection block respectively; The coordinates of the center point of the first detection block are determined as the first image coordinates, and the coordinates of the center point of the second detection block are determined as the second image coordinates.
6. The method according to claim 1, characterized in that The step of determining the zoom detection result of the electronic device based on the difference of the image board coordinates between any two adjacent image frames in the multiple image frames includes: For any two adjacent frames of images in the multiple frames of images, determining an offset parameter according to a difference in the plate coordinates of the target points of the two frames of images; The zoom detection result of the electronic device is determined according to the offset parameter.
7. The method according to claim 6, characterized in that The offset parameters include a lateral offset parameter and a longitudinal offset parameter; and determining the zoom detection result of the electronic device according to the offset parameters includes: In response to the circumstance that both the lateral offset parameter and the longitudinal offset parameter are not greater than a preset offset threshold, it is determined that the zoom detection result of the electronic device is a detection pass.
8. The method according to claim 1, characterized in that: The method of acquiring multiple frames of images obtained by shooting a preset image board by the electronic device during the camera zooming process includes: Using the electronic device to shoot the preset image board at a fixed position, and controlling the electronic device to zoom at a constant speed during the shooting process; The shooting process of the electronic device is recorded to obtain a video sequence, wherein the video sequence includes the multiple frames of images.
9. The method according to claim 1, characterized in that: The electronic device comprises a display module, and the display module is used to display a preview window when the electronic device is shooting. The multiple frames of images are preview window images when the electronic device zooms and shoots a preset picture plate.
10. A zoom detection device, characterized in that: include: An image acquisition module is configured to acquire multiple frames of images obtained by the electronic device shooting a preset image plate during camera zooming, wherein the preset image plate includes at least two detection blocks; A coordinate determination module is configured to determine, for each frame of the multiple frames of images, the image coordinates of the target point of the image on the preset image board according to the image coordinates of at least two detection blocks on the image; The zoom detection module is configured to determine the zoom detection result of the electronic device based on the difference in the image board coordinates of any two adjacent frames of the multiple frames.
11. An electronic device, characterized in that: include: processor; as well as A memory storing computer instructions, wherein the computer instructions are used to enable a processor to execute the method according to any one of claims 1 to 9.
12. A storage medium, characterized in that: Computer instructions are stored, and the computer instructions are used to make a computer execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Automatic zoom lens calibration device and calibration method
CN104408704A
Zoom camera calibration method and device, terminal equipment and storage medium
CN113538590A
Zoom effect determination method and device, electronic equipment and storage medium
CN115714911A
Camera calibration device and camera calibration program
JP2018189580A
Automatic calibration of pan / tilt / zoom cameras
WO2001076261A2