Image pickup control method and apparatus, electronic device, and computer-readable storage medium

CN117201927BActive Publication Date: 2026-09-11HUIZHOU TCL MOBILE COMM CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210635395.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-06
Publication Date
2026-09-11
Estimated Expiration
2042-06-06

AI Technical Summary

Technical Problem

[0003]但是,由于拍摄场景中存在运动的物体,或者,用户在手持终端进行拍摄时手部难以持续保持较好的稳定性,因此,最终成像的效果较差,影响用户体验

Benefits of technology

[0039] The shooting device in this embodiment generates a preview image upon recognizing a shooting start command and calculates the data change results between two adjacent preview images. When the data change results meet preset conditions, the preview image is used as a candidate image. After responding to the user's shooting command, an image is selected from the candidate images as the target image for shooting. By calculating the data change results between two adjacent preview images, it is easier to filter out candidate images that meet the preset conditions. By using the candidate images as the target images for shooting instead of the actual captured images, the problem of poor image quality due to object movement in the scene or poor user hand stability after the user presses the shooting button is avoided, thus improving the quality of the final image presented to the user.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117201927B_ABST
    Figure CN117201927B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a photographing control method and device, electronic equipment and a computer readable storage medium. The method comprises: generating a preview picture when a photographing starting instruction is recognized; calculating a data change result of two adjacent preview pictures; taking the preview picture as a candidate picture when the data change result meets a preset condition; and selecting a target picture for photographing from the candidate picture in response to a photographing instruction of a user. Through calculation of the data change result of the two adjacent preview pictures, the candidate picture meeting the preset condition is conveniently selected. The candidate picture is taken as the target picture for photographing to replace the picture obtained by actual photographing, thereby avoiding the problem that the quality of the actual photographing picture is poor due to movement of objects in a scene or poor stability of a hand of the user after the user presses a photographing key, and the user demand cannot be met, and the quality of the picture finally presented to the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a camera control method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] Currently, mobile devices generally support taking photos, and with the continuous development of computer technology, camera processing technology is also constantly being optimized, improving image quality and the photography experience.

[0003] However, due to the presence of moving objects in the shooting scene, or the difficulty for users to maintain good hand stability when shooting with a handheld device, the final image quality is poor, affecting the user experience. Summary of the Invention

[0004] This application provides a camera control method, apparatus, electronic device, and computer-readable storage medium, which can improve the image quality of captured images.

[0005] In a first aspect, embodiments of this application provide a camera control method, including:

[0006] When the camera start command is detected, a preview image is generated;

[0007] Calculate the data change results of the preview images in two adjacent frames;

[0008] When the data change results meet the preset conditions, the preview image is used as the candidate image;

[0009] In response to the user's shooting command, a target image is selected from the candidate images.

[0010] Secondly, embodiments of this application also provide a camera control device, including:

[0011] The generation module is used to generate a preview image when a camera start command is detected;

[0012] The calculation module is used to calculate the data change results of the preview images in two adjacent frames;

[0013] The determination module is used to select the preview image as a candidate image when the data change result meets the preset conditions.

[0014] The selection module is used to select a target image from the candidate images in response to the user's shooting command.

[0015] In some embodiments of this application, the selected modules include:

[0016] The generation unit is used to generate the captured image in response to the user's shooting command;

[0017] The selection unit is used to select a target image from the candidate images based on the similarity to the captured image.

[0018] In some embodiments of this application, the computing module includes:

[0019] A partitioning unit is used to divide the preview image into several sub-regions based on the size data of the preview image;

[0020] The comparison unit is used to compare the similarity of several sub-regions of two adjacent preview images to obtain the comparison result of each sub-region.

[0021] The first acquisition unit is used to obtain data change results based on several comparison results.

[0022] In some embodiments of this application, the comparison unit includes:

[0023] Selecting a sub-unit is used to select a reference pixel from each sub-region in the preview image;

[0024] The sub-unit is used to obtain the comparison result of the two sub-regions based on the pixel values ​​of parameter pixels in the two sub-regions corresponding to the two adjacent preview images.

[0025] In some embodiments of this application, the acquisition subunit is specifically used for:

[0026] When the pixel values ​​of reference pixels in two sub-regions are the same, the comparison result of the two sub-regions is taken as the same.

[0027] When the pixel values ​​of reference pixels in two sub-regions are inconsistent, the pixel values ​​of each pixel in the two sub-regions are compared to obtain the number of pixels with consistent pixel values.

[0028] When the number of pixels is greater than or equal to a preset threshold, the comparison result of the two sub-regions is taken as the same.

[0029] When the number of pixels is less than a preset threshold, the difference between the two sub-regions is taken as the comparison result of the two sub-regions.

[0030] In some embodiments of this application, the preset condition includes less than a change threshold, and the device further includes a change threshold setting module, which includes:

[0031] The second acquisition unit is used to acquire historical shooting information, which includes actual captured images and actual selected images taken by the user at a historical time.

[0032] The first determining unit is used to determine a similarity ratio based on the actual captured image and the actual selected image;

[0033] The second determining unit is used to determine the change threshold based on several similarity ratios.

[0034] In some embodiments of this application, the second determining unit includes:

[0035] The processing subunit is used to perform high-pass filtering on several similarity ratios to obtain several processed pixel ratios.

[0036] A sub-unit is defined, which is used to take the result of the squared average of the ratio of several processed pixels as the change threshold.

[0037] Thirdly, embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the above-described camera control method.

[0038] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the above-described camera control method.

[0039] The shooting device in this embodiment generates a preview image upon recognizing a shooting start command and calculates the data change results between two adjacent preview images. When the data change results meet preset conditions, the preview image is used as a candidate image. After responding to the user's shooting command, an image is selected from the candidate images as the target image for shooting. By calculating the data change results between two adjacent preview images, it is easier to filter out candidate images that meet the preset conditions. By using the candidate images as the target images for shooting instead of the actual captured images, the problem of poor image quality due to object movement in the scene or poor user hand stability after the user presses the shooting button is avoided, thus improving the quality of the final image presented to the user. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1This is a schematic diagram of a scene for the camera control method provided in the embodiments of this application;

[0042] Figure 2 This is a schematic flowchart of the camera control method provided in the embodiments of this application;

[0043] Figure 3 This is a flowchart illustrating the mobile terminal camera control method provided in an embodiment of this application;

[0044] Figure 4 This is a schematic diagram of the camera control device provided in the embodiments of this application;

[0045] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0046] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0047] This application provides a camera control method, apparatus, electronic device, and computer-readable storage medium. Specifically, this application provides a camera control apparatus suitable for electronic devices, wherein the electronic device includes a terminal device, which can be a mobile phone, camera, or tablet, or other device with camera functionality.

[0048] Please see Figure 1 Taking the camera control method executed by the terminal device as an example, the specific execution process of the camera control method is as follows:

[0049] When the terminal device 10 recognizes that it has received a photo-taking start command, it starts the photo-taking function and obtains a preview image for the actual scene. Then, it calculates the data change results of two adjacent preview images. When the data change results meet the preset conditions, it uses the preview image as a candidate image. After responding to the user's shooting command, it selects the target image from the candidate images and uses the target image as the shooting result image for this shooting.

[0050] In this embodiment of the application, the calculation of the data change results of two adjacent preview images can also be performed by the server to improve the data calculation efficiency and reduce the computing burden on the terminal.

[0051] In this embodiment, the shooting device generates a preview image upon recognizing a photo-taking start command and calculates the data change results between two adjacent preview images. When the data change results meet preset conditions, the preview image is used as a candidate image. After responding to the user's shooting command, an image is selected from the candidate images as the target image for shooting. By calculating the data change results between two adjacent preview images, candidate images that meet the preset conditions are easily selected. By using the candidate images as the target images instead of the actual captured images, the problem of poor image quality due to object movement in the scene or poor user hand stability after the user presses the shutter button is avoided, thus improving the quality of the final image presented to the user.

[0052] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.

[0053] Please see Figure 2 , Figure 2 This is a schematic flowchart of a camera control method provided in an embodiment of this application. The specific flow of the camera control method can be as follows:

[0054] 101. When the camera start command is detected, a preview image is generated.

[0055] In this embodiment, the photo-taking start command is generated by the user's corresponding operation on the application on the shooting device. For example, the user initiates the shooting operation through the application on the shooting device, and a photo-taking start command is generated on the shooting device. When the shooting device receives the photo-taking start command, it calls the camera to capture the scene and obtain image information of the scene.

[0056] In this embodiment of the application, before the user presses the shooting confirmation button, the scene image is an image that dynamically changes with the camera's capture range. This image is a preview image after the camera is started and before the actual shooting confirmation. Each preview image can be obtained based on each preview image.

[0057] Because there is a certain time between when the user starts shooting and when the user actually confirms the shooting, the shooting device will generate multiple consecutive preview images during this time.

[0058] 102. Calculate the data change results of the preview images in two adjacent frames.

[0059] In this embodiment of the application, the data change result includes the difference result between two frames of images, for example, the result that the two frames of images have different pixels.

[0060] In this embodiment of the application, the data change results of two adjacent preview images can be obtained by analyzing the changes in the data of the two preview images. For example, in this embodiment of the application, the data change results of the two preview images can be obtained by comparing each pixel of the two preview images.

[0061] In this embodiment of the application, the data change result reflects the degree of difference between two preview images. The degree of difference may include the same, slight difference, large difference, or completely different. Different degrees of difference can be classified according to the number of differences in pixels and the range of the difference.

[0062] In this embodiment, when comparing images, the large image size and numerous pixels pose a significant challenge to data processing and computation. Therefore, this embodiment divides the image into multiple sub-regions and compares each sub-region separately to improve the efficiency of calculating data change results. Optionally, in this embodiment, the step "calculating the data change results of two adjacent preview images" includes:

[0063] The preview image is divided into several sub-regions based on its size data.

[0064] The similarity of several sub-regions in two adjacent preview images is compared to obtain the comparison result of each sub-region;

[0065] Based on the comparison results described above, the data change results are obtained.

[0066] By dividing an image into multiple sub-regions and comparing these sub-regions, the overall data changes of the image can be obtained. Since each sub-region is smaller in size and number of pixels compared to the entire image, comparison results can be generated quickly for each sub-region.

[0067] In this embodiment, to further improve the efficiency of generating data change results, a small number of sub-regions can be filtered out to reduce the number of pixels to be compared and improve the generation effect of data change results. Since only a small number of sub-regions are filtered out, the accuracy of the data change results can be guaranteed to a certain extent.

[0068] In this embodiment of the application, when comparing each sub-region, reference pixels can be selected from each sub-region, and the comparison result of the entire sub-region can be reflected based on the comparison of the reference pixels. That is, optionally, in this embodiment of the application, the step "performing similarity comparison on several sub-regions of two adjacent preview images to obtain the comparison result of each sub-region" includes:

[0069] For each sub-region in the preview image, a reference pixel is selected from the sub-region;

[0070] The comparison result of the two sub-regions is obtained based on the pixel values ​​of the parameter pixels in the two sub-regions corresponding to the two adjacent preview images.

[0071] In this embodiment, the reference pixel is a pixel in the sub-region, which can be any pixel or a pixel located at a specific position in the sub-region selected according to the selection criteria.

[0072] By using the comparison result of reference pixels in a sub-region as the comparison result of two sub-regions, the number of pixels used for comparison is reduced, which significantly improves the comparison efficiency of sub-regions and the generation efficiency of comparison results.

[0073] In this embodiment of the application, the comparison result may include whether the pixel values ​​of the pixels are the same or different. Accordingly, in this embodiment of the application, the step "obtaining the comparison result of the two sub-regions based on the pixel values ​​of the parameter pixels in the two sub-regions corresponding to the two adjacent preview images" includes:

[0074] When the pixel values ​​of reference pixels in two sub-regions are the same, the comparison result of the two sub-regions is taken as the same.

[0075] When the pixel values ​​of reference pixels in two sub-regions are inconsistent, the pixel values ​​of each pixel in the two sub-regions are compared to obtain the number of pixels with consistent pixel values.

[0076] When the number of pixels is greater than or equal to a preset threshold, the comparison result of the two sub-regions is taken as the same.

[0077] When the number of pixels is less than a preset threshold, the difference between the two sub-regions is taken as the comparison result of the two sub-regions.

[0078] Specifically, by directly using the same pixel value as the comparison result when the two sub-regions are identical, the comparison efficiency of the two sub-regions is improved. When the pixel value comparison results of the two sub-regions are inconsistent, the accuracy of the sub-region comparison result is improved by comparing each other pixel value in the sub-region.

[0079] When comparing pixels within a sub-region, the similarity between two sub-regions is determined by counting the number of pixels with identical values ​​and comparing this count with a preset threshold. If the similarity meets a certain threshold ratio, the two sub-regions can still be treated as the same region. The preset threshold can be set based on empirical parameters or optimized using historical data; the specific value of the preset threshold is not limited here.

[0080] 103. When the data change result meets the preset conditions, the preview image is used as a candidate image.

[0081] In this embodiment, the preset conditions can be predefined based on user needs or industry standards. By using preview images whose data change results meet the preset conditions as candidate images, all selected candidate images meet the requirements, facilitating the user's selection of candidate images after actual shooting and ensuring that the selected image meets the user's needs.

[0082] In this embodiment of the application, the preset conditions may include the comparison results with the change threshold. For example, when the data change result is less than the change threshold, the preview image is used as a candidate image; or, when the data change result is greater than or equal to the change threshold, the preview images in this part are filtered out, that is, preview images with data change results greater than or equal to the change threshold are rejected as candidate images.

[0083] In this embodiment of the application, when the data change result is less than the change threshold, it indicates that the change between two consecutive preview images is small, which means that there are no moving objects in the scene. By calculating the image change data, it is determined whether there are moving objects in the scene. This solves the problem of users relying too much on their eyes to analyze whether objects in the scene are moving during the user's photography process, reduces the requirements for the user's analytical and judgmental abilities, and improves the user's photography experience.

[0084] By using preview images of stationary objects as candidate images, the system captures static scenes, eliminating the need for users to frequently refocus, observe moving objects, or maintain hand stability during the photo-taking process. This enhances the photo-taking experience and reduces the difficulty of taking photos.

[0085] In this embodiment of the application, either one of the two preview images that meet the data change result conditions can be used as a candidate image, or the second preview image can be used as a candidate image to improve the display effect of the candidate image.

[0086] In this embodiment, the change threshold can be set based on historical shooting data. For example, by using shooting data from historical periods, the similarity between the selected image after each shooting and the actual shot image is determined to establish a preset condition. Optionally, in some embodiments of this application, the preset condition includes a value less than the change threshold. The step "when the data change result meets the preset condition, the preview image is used as a candidate image" includes:

[0087] Obtain historical shooting information, which includes actual captured images and actual selected images taken by the user at historical times;

[0088] The similarity ratio is determined based on the actual captured images and the actual selected images;

[0089] The change threshold is determined based on several similarity ratios.

[0090] In this embodiment, the difference between selected images from historical periods and actual captured images is used as a selection criterion for candidate images. This allows the selection of candidate images to reference the selection results from historical periods, providing a basis for selection. Furthermore, the difference between the selected images and the actual captured images is used as a method to obtain the change threshold, making the selection of candidate images more accurate. Specifically, the closer the selected images are to the actual captured images, the smaller the data change between the two preview images corresponding to the candidate images.

[0091] In this embodiment of the application, multiple similarity ratios can be obtained through multiple shots in a historical period, and a change threshold can be calculated based on these multiple similarity ratios. Optionally, in some embodiments of this application, the step "determining the change threshold based on several of the aforementioned similarity ratios" includes:

[0092] A high-pass filter is applied to several of the aforementioned similarity ratios to obtain several processed pixel ratios.

[0093] The result of averaging the ratios of several processed pixels is used as the change threshold.

[0094] In this embodiment, high-pass filtering includes first-order high-pass filtering, a filtering method where high-frequency signals can pass normally, while low-frequency signals below a set threshold are blocked or attenuated. However, the degree of blocking or attenuation varies depending on the frequency and the filtering procedure (purpose). It is sometimes also called low-cut filter. High-pass filtering is the opposite of low-pass filtering.

[0095] High-pass filtering removes extreme values ​​from the ratios of multiple pixels, avoiding occasional anomalies that deviate from normal operations. This makes the selection of candidate images more accurate. At the same time, removing these extreme values ​​reduces the complexity of data processing and improves computational efficiency.

[0096] 104. In response to the user's shooting instruction, select the target image from the candidate images as the shooting target image.

[0097] In this embodiment of the application, the user's shooting instruction is generated after the user performs an actual shooting confirmation operation on the shooting device. For example, the user touches the shooting button on the shooting device to generate a shooting instruction.

[0098] In this embodiment, after a user touches the shooting button, they expect to obtain an image of the current scene. Upon receiving the user's shooting instruction, the system selects a target image from the candidate images and uses this target image as the shooting result image, replacing the actual image captured by the camera.

[0099] In this case, because there are moving objects in the scene after the user triggers the shooting button, or the user's hand is prone to shaking when holding the shooting device, the actual shooting picture may be blurry or have a blurry image. The alternative picture is a picture that meets the preset conditions. Therefore, using the alternative picture instead of the actual shooting picture as the shooting result picture improves the display effect of the image presented to the user to a certain extent and enhances the user's shooting experience.

[0100] In this embodiment of the application, to ensure that the selected candidate images better meet the user's needs, the candidate images can also be filtered based on their similarity to the actual captured images. Optionally, in this embodiment, the step "in response to the user's shooting instruction, selecting the target image from the candidate images" includes:

[0101] Responding to the user's shooting command, generate the captured image;

[0102] Based on the similarity to the captured image, the target image is selected from the candidate images.

[0103] In this embodiment, the captured image is the actual image generated by the shooting device after the user triggers the shooting confirmation button, which is the result of the user's manual operation. In this embodiment, the target image is selected from the candidate images based on the similarity of the captured image, so that the selected target image is close to the image actually taken by the user. Since the candidate images meet the preset conditions, the candidate images are used as the captured image, which improves the image imaging effect and meets the user's needs for specific scene content.

[0104] The shooting device in this embodiment generates a preview image upon recognizing a shooting start command and calculates the data change results between two adjacent preview images. When the data change results meet preset conditions, the preview image is used as a candidate image. After responding to the user's shooting command, an image is selected from the candidate images as the target image for shooting. By calculating the data change results between two adjacent preview images, it is easier to filter out candidate images that meet the preset conditions. By using the candidate images as the target images for shooting instead of the actual captured images, the problem of poor image quality due to object movement in the scene or poor user hand stability after the user presses the shooting button is avoided, thus improving the quality of the final image presented to the user.

[0105] Please see Figure 3 , Figure 3 This is a flowchart illustrating a mobile terminal camera control method provided in an embodiment of this application. The specific steps of the mobile terminal camera control method include:

[0106] 111. When the mobile terminal detects that the camera has been started, obtain the current settings information;

[0107] 112. If the current settings correspond to the automatic photo-taking function, proceed to step 113;

[0108] 113. Obtain the preview image;

[0109] 114. Detect whether the change in data between two adjacent frames is less than a set threshold. If so, proceed to step 115.

[0110] 115. Activate the automatic photo-taking function to obtain multiple alternative images;

[0111] 116. When the system detects that the user has pressed the shutter button, select the image with the highest similarity to the photo taken by the user from multiple candidate images as the final image.

[0112] In this embodiment of the application, automatic photography includes continuous shooting, which is a continuous shooting during the time before the user starts taking photos and triggers the shooting confirmation button. This continuous shooting is a process in which the camera takes photos autonomously, which is different from the time when the user takes photos according to their wishes.

[0113] In this process, after the camera takes multiple shots, images with data changes less than a set threshold are selected from the automatically captured images as candidate images. This ensures that the selection of candidate images meets the data change requirements. Furthermore, if the data change is less than the set threshold, it is assumed that the objects in the scene did not move during the shooting process.

[0114] In this embodiment, the scene is automatically captured to obtain scene images, and by analyzing two adjacent frames, images containing objects in the scene that are not moving are obtained, thereby realizing the acquisition of images of objects in the scene that are not moving.

[0115] In this embodiment of the application, the final image is the result image of the mobile terminal after this shooting. That is, by using the selected alternative image to replace the actual shooting image obtained by the user, the problem of the high shooting difficulty caused by the user needing to observe the scene with the naked eye and make timely and stable shooting operations is solved, thereby achieving the acquisition of a stable image and improving the imaging effect of the final image.

[0116] In this embodiment of the application, the automatic photo-taking function is activated when the change in data between two adjacent frames is less than a set threshold. This is because, in actual use, the mobile terminal is small and its stability is not high when held in the user's hand. The method in this application automatically captures and saves the image by obtaining the preview image and determining that the change in data between two adjacent frames is less than a set threshold.

[0117] In this embodiment of the application, the data changes between two adjacent preview images can be obtained in the following ways, specifically including:

[0118] The system determines the current photo setting size. If the size is large, the preview image is divided. A point is randomly selected in each segmented area for comparison. The result of the comparison represents that segment. If the results are the same, all pixels in that segment are considered the same. If the results are different, the pixels in that segment are further compared. This process reduces the comparison time. For smaller photo settings, the comparison can still be performed one by one.

[0119] In this embodiment of the application, the threshold for comparing data change results can be set based on historical shooting data, and may specifically include:

[0120] Record the percentage difference between the final selected photo and the photo taken by the user each time a photo is taken;

[0121] The average of the most recent several ratios is used as the set threshold;

[0122] The process of setting a threshold using the average of the most recent several ratios also includes the following steps:

[0123] Perform a first-order high-pass filter on the values ​​obtained from these multiple iterations.

[0124] The new threshold value is obtained by averaging the squared values ​​after the first-order high-pass filtering.

[0125] The threshold processing can avoid occasional abnormalities compared to normal operation, making the timing of automatic photo taking more stable and reducing resource waste.

[0126] This method involves obtaining the current settings when a photo-taking function is detected. If the current setting is automatic photo taking, a preview image is retrieved. If the data change between two adjacent frames is less than a set threshold, automatic photo taking is initiated. Once automatic photo taking is initiated, if the user presses the shutter button, the automatically taken image with the highest similarity to the user's photo is selected as the final photo. When a photo-taking function is used in a mobile terminal, the user can ensure the stability of the state of objects that may be moving in the photo, while also ensuring the requirements of the photo itself, thus improving the user experience and bringing convenience.

[0127] To facilitate better implementation of the camera control method of this application, this application also provides a camera control device based on the above-described camera control method. The meaning of the third target term is the same as in the above-described camera control method; specific implementation details can be found in the description of the method embodiments.

[0128] Please see Figure 4 , Figure 4 This application provides a schematic diagram of the structure of a camera control device, wherein the camera control device may include:

[0129] The generation module 201 is used to generate a preview image when a photo-taking start command is detected;

[0130] Calculation module 202 is used to calculate the data change results of the preview images in two adjacent frames;

[0131] The determining module 203 is used to select the preview image as a candidate image when the data change result meets the preset conditions;

[0132] The selection module 204 is used to select a target image from the candidate images in response to the user's shooting command.

[0133] In some embodiments of this application, the selection module 204 includes:

[0134] The generation unit is used to generate the captured image in response to the user's shooting command;

[0135] The selection unit is used to select a target image from the candidate images based on the similarity to the captured image.

[0136] In some embodiments of this application, the computing module 202 includes:

[0137] A partitioning unit is used to divide the preview image into several sub-regions based on the size data of the preview image;

[0138] The comparison unit is used to compare the similarity of several sub-regions of two adjacent preview images to obtain the comparison result of each sub-region.

[0139] The first acquisition unit is used to obtain data change results based on several comparison results.

[0140] In some embodiments of this application, the comparison unit includes:

[0141] Selecting a sub-unit is used to select a reference pixel from each sub-region in the preview image;

[0142] The sub-unit is used to obtain the comparison result of the two sub-regions based on the pixel values ​​of parameter pixels in the two sub-regions corresponding to the two adjacent preview images.

[0143] In some embodiments of this application, the acquisition subunit is specifically used for:

[0144] When the pixel values ​​of reference pixels in two sub-regions are the same, the comparison result of the two sub-regions is taken as the same.

[0145] When the pixel values ​​of reference pixels in two sub-regions are inconsistent, the pixel values ​​of each pixel in the two sub-regions are compared to obtain the number of pixels with consistent pixel values.

[0146] When the number of pixels is greater than or equal to a preset threshold, the comparison result of the two sub-regions is taken as the same.

[0147] When the number of pixels is less than a preset threshold, the difference between the two sub-regions is taken as the comparison result of the two sub-regions.

[0148] In some embodiments of this application, the preset condition includes less than a change threshold, and the device further includes a change threshold setting module, which includes:

[0149] The second acquisition unit is used to acquire historical shooting information, which includes actual captured images and actual selected images taken by the user at a historical time.

[0150] The first determining unit is used to determine a similarity ratio based on the actual captured image and the actual selected image;

[0151] The second determining unit is used to determine the change threshold based on several similarity ratios.

[0152] In some embodiments of this application, the second determining unit includes:

[0153] The processing subunit is used to perform high-pass filtering on several similarity ratios to obtain several processed pixel ratios.

[0154] A sub-unit is defined, which is used to take the result of the squared average of the ratio of several processed pixels as the change threshold.

[0155] In this embodiment, when the generation module 201 recognizes the shooting start command, it generates a preview image. Then, the calculation module 202 calculates the data change results of the preview images in two adjacent frames. Subsequently, when the data change results meet the preset conditions, the determination module 203 selects the preview image as a candidate image. Then, in response to the user's shooting command, the selection module 204 selects the target image from the candidate images as the shooting target image.

[0156] In this embodiment, the shooting device generates a preview image upon recognizing a photo-taking start command and calculates the data change results between two adjacent preview images. When the data change results meet preset conditions, the preview image is used as a candidate image. After responding to the user's shooting command, an image is selected from the candidate images as the target image for shooting. By calculating the data change results between two adjacent preview images, candidate images that meet the preset conditions are easily selected. By using the candidate images as the target images instead of the actual captured images, the problem of poor image quality due to object movement in the scene or poor user hand stability after the user presses the shutter button is avoided, thus improving the quality of the final image presented to the user.

[0157] In addition, this application also provides an electronic device, such as Figure 5 As shown, it illustrates the structural diagram of the electronic device involved in this application, specifically:

[0158] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0159] The processor 401 is the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It executes software programs and / or modules stored in the memory 402, and calls data stored in the memory 402, to perform various functions and process data. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.

[0160] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0161] The electronic device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0162] The electronic device may also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0163] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, thereby implementing the steps in any of the camera control methods provided in this application.

[0164] The shooting device in this embodiment generates a preview image upon recognizing a shooting start command and calculates the data change results between two adjacent preview images. When the data change results meet preset conditions, the preview image is used as a candidate image. After responding to the user's shooting command, an image is selected from the candidate images as the target image for shooting. By calculating the data change results between two adjacent preview images, it is easier to filter out candidate images that meet the preset conditions. By using the candidate images as the target images for shooting instead of the actual captured images, the problem of poor image quality due to object movement in the scene or poor user hand stability after the user presses the shooting button is avoided, thus improving the quality of the final image presented to the user.

[0165] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0166] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the camera control methods provided in this application.

[0167] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0168] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the camera control methods provided in this application, the beneficial effects that any of the camera control methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0169] The foregoing has provided a detailed description of a camera control method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An image pickup control method characterized by comprising: Applied to camera equipment, including: When the camera start command is detected, a preview image is generated; Calculate the data change results of the preview images in two adjacent frames; When the data change results meet the preset conditions, the preview image is used as the candidate image; In response to the user's shooting command, select the target image from the candidate images; The preset conditions include being less than a change threshold. Before using the preview image as a candidate image when the data change result meets the preset conditions, the method further includes: Obtain historical shooting information, which includes actual captured images and actual selected images taken by the user at historical times; The similarity ratio is determined based on the actual captured images and the actual selected images; The change threshold is determined based on several similarity ratios.

2. The method of claim 1, wherein, The step of selecting a target image from the candidate images in response to a user's shooting command includes: Responding to the user's shooting command, generate the captured image; Based on the similarity to the captured image, the target image is selected from the candidate images.

3. The method of claim 1, wherein, The calculation of the data change results between two adjacent preview images includes: The preview image is divided into several sub-regions based on its size data. The similarity of several sub-regions in two adjacent preview images is compared to obtain the comparison result of each sub-region; Based on the comparison results described above, the data change results are obtained.

4. The method according to claim 3, characterized in that, The similarity comparison of several sub-regions in two adjacent preview images is performed to obtain the comparison result of each sub-region, including: For each sub-region in the preview image, a reference pixel is selected from the sub-region; The comparison result of the two sub-regions is obtained based on the pixel values ​​of the parameter pixels in the two sub-regions corresponding to the two adjacent preview images.

5. The method according to claim 4, characterized in that, The step of obtaining the comparison result of the two sub-regions based on the pixel values ​​of parameter pixels in the two sub-regions corresponding to the two adjacent preview images includes: When the pixel values ​​of reference pixels in two sub-regions are the same, the comparison result of the two sub-regions is taken as the same. When the pixel values ​​of reference pixels in two sub-regions are inconsistent, the pixel values ​​of each pixel in the two sub-regions are compared to obtain the number of pixels with consistent pixel values. When the number of pixels is greater than or equal to a preset threshold, the comparison result of the two sub-regions is taken as the same. When the number of pixels is less than a preset threshold, the difference between the two sub-regions is taken as the comparison result of the two sub-regions.

6. The method according to claim 1, characterized in that, The step of determining the change threshold based on several similarity ratios includes: A high-pass filter is applied to several of the aforementioned similarity ratios to obtain several processed similarity ratios. The result of averaging the processed similarity ratios was used as the change threshold.

7. A camera control device, characterized in that, include: The generation module is used to generate a preview image when a camera start command is detected; The calculation module is used to calculate the data change results of the preview images in two adjacent frames; The determination module is used to select the preview image as a candidate image when the data change result meets the preset conditions. The selection module is used to select a target image from the candidate images in response to the user's shooting command; The preset conditions include being less than a change threshold. Before using the preview image as a candidate image when the data change result meets the preset conditions, the device further includes: Obtain historical shooting information, which includes actual captured images and actual selected images taken by the user at historical times; The similarity ratio is determined based on the actual captured images and the actual selected images; The change threshold is determined based on several similarity ratios.

8. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the camera control method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the camera control method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Photographing method and mobile terminal

    CN106161932A

  • Mobile terminal and photographing method thereof and computer readable storage medium

    CN107231522A

  • Image selection method and mobile terminal

    CN107659722A

  • Photographing control method and device

    CN112399073A