Photographing method and device

By obtaining the change information of camera motion parameters and storing the photo image when the preset conditions are met, the problem of high system resource occupation in the existing technology is solved, and the combination of resource conservation and low-latency photography is achieved.

CN119545168AActive Publication Date: 2025-02-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

Application Number
CN202311097206.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-28
Publication Date
2025-02-28
Estimated Expiration
2043-08-28

AI Technical Summary

Technical Problem

The prior art cannot reduce the use of system resources while achieving lower latency photography.

Method used

By acquiring the change information of the motion parameters of the camera, a preset number of photographic images is stored in the preset memory only when the preset constraint condition is satisfied, and a target photographic image is determined from the memory when the photographic instruction is received.

Benefits of technology

It effectively reduces the occupation of system resources, achieves low latency photography, and reduces the demand for system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119545168A_ABST
    Figure CN119545168A_ABST
Patent Text Reader

Abstract

The invention discloses a photographing method and device, and the method comprises the steps: obtaining the change information of a motion parameter of a camera; under the condition that the change information of the motion parameters meets a first constraint condition, storing a preset number of shot images shot by the camera in a preset memory; and under the condition that a photographing instruction is obtained, determining a target photographed image based on the preset number of photographed images in the preset memory. Under the condition that the change information of the motion parameters meets the first constraint condition, it is judged that the user is likely to take photos at the moment, the preset number of shot images are stored in the preset memory at the moment, occupation of system resources caused by real-time storage of the image frames can be avoided, the occupation of the system resources can be reduced, and the user experience is improved. And when the photographing instruction of the user is received, the target photographing image is directly selected from the preset number of photographing images, and low-delay photographing can be realized, so that occupation of system resources can be reduced under the condition of realizing relatively low-delay photographing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of photographing technology, and in particular to a photographing method and device. Background Art

[0002] The current photography solutions are mainly divided into two categories: traditional photography solutions and zero shutterlag (ZSL). The common point of the two photography solutions is that the storage of image data is still multi-frame caching of whole frame data. When there is a photo request, the cached data frame is transmitted to the back-end for frame selection processing, and the appropriate image frame is selected for subsequent image processing to generate the final photographed image; but during access and transmission, since each frame of data is stored, it will occupy a large amount of system resources.

[0003] That is, the existing technology cannot reduce the occupation of system resources while achieving low-delay photography. Summary of the invention

[0004] The embodiments of the present application provide a photographing method and device, which can reduce the occupation of system resources while achieving low-latency photographing.

[0005] In the first aspect, the photographing method provided by the present application comprises:

[0006] Get the change information of the camera's motion parameters;

[0007] When the change information of the motion parameter satisfies the first constraint condition, storing a preset number of photographic images taken by the camera in a preset memory;

[0008] When a photographing instruction is obtained, a target photographing image is determined based on a preset number of photographing images in the preset memory.

[0009] In a second aspect, the photographing device provided by the present application includes:

[0010] An acquisition module is used to obtain the change information of the camera's motion parameters;

[0011] A storage module, configured to store a preset number of photographic images captured by the camera in a preset memory when the change information of the motion parameter satisfies a first constraint condition;

[0012] The determination module is used to determine a target photographic image based on a preset number of photographic images in the preset memory when a photographing instruction is obtained.

[0013] In a third aspect, the electronic device provided in the present application includes a memory and a processor, the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the steps in the photographing method provided in the present application.

[0014] In a fourth aspect, the computer-readable storage medium provided in the present application stores a plurality of instructions, which are suitable for loading by a processor to implement the steps in the photographing method provided in the present application.

[0015] In a fifth aspect, the computer program product provided in the present application includes a computer program or instructions, which, when executed by a processor, implement the steps in the photographing method provided in the present application.

[0016] In the present application, compared with the related art, the change information of the motion parameters of the camera is obtained; when the change information of the motion parameters meets the first constraint condition, a preset number of photographic images taken by the camera are stored in a preset memory; when a photographing instruction is obtained, a target photographic image is determined based on the preset number of photographic images in the preset memory. The present application obtains the change information of the motion of the camera, and when the change information of the motion parameters meets the first constraint condition, it is determined that the user is likely to take a photo at this time, and only then will the preset number of photographic images taken by the camera be stored in the preset memory, which can avoid the occupation of system resources caused by real-time storage of image frames, thereby reducing the occupation of system resources, and directly selects the target photographic image from the preset number of photographic images when receiving the user's photographing instruction, which can provide the target photographic image to the user more quickly, and realize low-latency photographing, so it can reduce the occupation of system resources when realizing low-latency photographing. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 is a schematic diagram of a scene of a photographing system provided in an embodiment of the present application;

[0019] Figure 2 It is a flowchart of an embodiment of the photographing method provided by the embodiment of the present application;

[0020] Figure 3 is a flowchart of another embodiment of the photographing method provided in the embodiment of the present application;

[0021] Figure 4is a schematic diagram of the structure of a photographing device provided in an embodiment of the present application;

[0022] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] It should be noted that the principles of the present application are illustrated by implementing them in an appropriate computing environment. The following description is based on the illustrated specific embodiments of the present application and should not be considered as limiting other specific embodiments of the present application that are not described in detail herein.

[0024] In the following description of the present application, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0025] In the following description of the present application, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0027] In order to improve the effect of taking photos, the embodiments of the present application provide a photo taking method, a photo taking device, an electronic device, a computer readable storage medium and a computer program product. The photo taking method can be executed by the photo taking device or by an electronic device integrated with the photo taking device.

[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0029] Please refer to Figure 1 , the present application also provides a camera system, such as Figure 1 As shown, the photographing system includes an electronic device 100, and the photographing device provided by the present application is integrated in the electronic device 100.

[0030] Among them, the electronic device 100 can be any device equipped with a processor and has processing capabilities, such as mobile electronic devices with processors such as smart phones, tablet computers, PDAs, laptops, smart speakers, or fixed electronic devices with processors such as desktop computers, televisions, servers, industrial equipment, etc.

[0031] In addition, if Figure 1 As shown, the photographing system may further include a memory 200 for storing original data, intermediate data and result data.

[0032] In the embodiment of the present application, the memory 200 can be a cloud storage. Cloud storage is a new concept extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as the storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.

[0033] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, ID entity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.

[0034] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0035] It should be noted that Figure 1The scene diagram of the camera system shown is only an example. The camera system and scene described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the camera system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.

[0036] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0037] Please refer to Figure 2 , Figure 2 FIG. 1 is a flow chart of an embodiment of a photographing method provided in an embodiment of the present application. Figure 2 As shown, the process of the photo taking method provided by this application is as follows:

[0038] 201. Obtain change information of the camera's motion parameters.

[0039] In the embodiment of the present application, the camera can be a mobile phone camera, an industrial camera, etc., and can be set according to the specific situation.

[0040] The motion parameters of the camera may include the angular velocity, acceleration, etc. of the camera, which may be determined according to the specific situation. The change information of the motion parameters may include the variance of the motion parameters of the camera within a preset time period. Specifically, the change information of the motion parameters includes the variance of multiple angular velocities of the camera within a preset historical time period, and the variance of multiple accelerations of the camera within a preset historical time period. The preset historical time period may be within 3 s of history, within 2 s of history, etc., which may be set according to the specific situation.

[0041] 202. When the change information of the motion parameter satisfies the first constraint condition, store a preset number of photographic images captured by the camera in a preset memory.

[0042] The first constraint condition is a preset constraint condition.

[0043] In a specific embodiment, the first constraint condition includes: the variance of multiple angular velocities of the camera within a preset historical time period is lower than a first preset threshold, and the variance of multiple accelerations of the camera within a preset historical time period is lower than a second preset threshold. In other embodiments, the first constraint condition may also be that the variance of multiple angular velocities of the camera within a preset historical time period is lower than the first preset threshold, or the variance of multiple accelerations of the camera within a preset historical time period is lower than the second preset threshold, depending on the specific setting.

[0044] In the embodiment of the present application, when the change information of the motion parameters satisfies the first constraint condition, a preset number of photographic images taken by the camera are stored in a preset memory.

[0045] Among them, the preset memory is a cache. The original meaning of cache refers to a high-speed memory with faster access speed than general random access memory (RAM). Usually, it does not use DRAM (dynamic random access memory) technology like the system main memory, but uses expensive but faster SRAM (static random access memory) technology. The setting of cache is one of the important factors for all modern computer systems to exert high performance. Of course, in other embodiments, the preset memory can also be a random access memory or other memory.

[0046] In the embodiment of the present application, when the change information of the motion parameter satisfies the first constraint condition, multiple frames of photographic images automatically taken by the camera at a preset frequency are sequentially stored in a preset memory, and when the number of photographic images in the preset memory reaches a preset number, the photographic image with the earliest storage time in the preset memory is removed from the preset memory. The preset frequency can be 25HZ, 10HZ, etc., which can be set according to the specific situation.

[0047] 203. When a photographing instruction is obtained, determine a target photographing image based on a preset number of photographing images in a preset memory.

[0048] The preset number of photographic images in the preset memory include photographic images before and after the photographic instruction is issued.

[0049] In a specific embodiment, when a photographing instruction is obtained, the issuing time of the photographing instruction is obtained, and the photographing image with the closest photographing time and issuing time among a preset number of photographing images in a preset memory is determined as the target photographing image.

[0050] In another specific embodiment, when a photographing instruction is obtained, the issuing time of the photographing instruction is obtained, the time difference between the photographing time and the issuing time in a preset number of photographing images in a preset memory is obtained, the clarity of the preset number of photographing images is obtained, the photographing scores of the photographing images are determined based on the time difference and the clarity, and the photographing image with the highest photographing score among the preset number of photographing images is determined as the target photographing image. The smaller the time difference, the higher the photographing score; the higher the clarity, the higher the photographing score.

[0051] In the prior art, zero-delay photography is mainly used to reduce the photography delay caused by traditional photography methods, so that users can obtain the image at the moment of photography as photography data for processing. When the camera starts previewing, the image sensor starts to output data frames. Generally speaking, the latest frames will be stored in the memory as frame data. When the application user takes a photo, the photo command will be triggered, and the system will calculate the actual photo time and send the relevant photo parameters to the underlying processing module; find the corresponding image data frame cached in the memory, and then return the selected frame data to the post-photography processing algorithm to process the photo data.

[0052] The existing zero-delay photography technology will store data frames in real time, which will occupy a large amount of system resources and cannot reduce the occupation of system resources while achieving low-delay photography. However, the present application obtains the change information of the camera's motion, and when the change information of the motion parameters meets the first constraint condition, it determines that the user is likely to take a photo at this time. Only then will the preset number of photographic images taken by the camera be stored in the preset memory, which can avoid the occupation of system resources caused by the real-time storage of image frames, thereby reducing the occupation of system resources, and when receiving the user's photography instruction, directly select the target photographic image from the preset number of photographic images, which can provide the user with the target photographic image faster and achieve low-delay photography. Therefore, it can reduce the occupation of system resources while achieving low-delay photography.

[0053] For further information, please refer to Figure 3 , Figure 3 FIG. 1 is a flow chart of another embodiment of the photographing method provided in the embodiment of the present application. Figure 3 As shown, the process of the photo taking method provided by this application is as follows:

[0054] 301. Obtain change information of the camera's motion parameters.

[0055] In the embodiment of the present application, the camera can be a mobile phone camera, an industrial camera, etc., and can be set according to the specific situation.

[0056] The motion parameters of the camera may include the angular velocity, acceleration, etc. of the camera, which may be determined according to the specific situation. The change information of the motion parameters may include the variance of the motion parameters of the camera within a preset time period. Specifically, the change information of the motion parameters includes the variance of multiple angular velocities of the camera within a preset historical time period, and the variance of multiple accelerations of the camera within a preset historical time period. The preset historical time period may be within 3 s of history, within 2 s of history, etc., which may be set according to the specific situation.

[0057] In a specific embodiment, before obtaining the change information of the motion parameters of the camera, the following steps are included:

[0058] (1) Obtain the original image captured by the camera's image sensor.

[0059] Image sensors use the photoelectric conversion function of photoelectric devices to convert the light image on the photosensitive surface into an electrical signal that is proportional to the light image. Compared with photosensitive elements such as photodiodes and phototransistors, which are "point" light sources, image sensors are functional devices that divide the light image on its light-receiving surface into many small units and convert them into usable electrical signals. Image sensors are divided into photoconductive camera tubes and solid-state image sensors. Compared with photoconductive camera tubes, solid-state image sensors have the characteristics of small size, light weight, high integration, high resolution, low power consumption, long life, and low price. Therefore, they have been widely used in various industries.

[0060] (2) Processing the original image based on a first preset image processing strategy to obtain a preview image.

[0061] In an embodiment of the present application, the first preset image processing strategy includes at least one of automatic exposure control (AutomaticExposure, AE), automatic focus control (AutomaticFocus, AF), and automatic white balance control (AutomaticWhiteBalance, AWB). Automatic exposure control can automatically adjust the brightness of the image, automatic focus control can automatically adjust the focal length of the image, and automatic white balance can make the image image the color under the classic light source. The process of automatic focusing is the process of evaluating the clarity of the image: if the focus is inaccurate, the clarity of the captured image is low; if the focus is accurate, the image clarity is high and the contrast is high. The most popular understanding of white balance is to make the image of a white object appear white, and the images of other scenes will be close to the color vision habits of the human eye. Commonly used methods include the gray world method, the perfect reflection method, the automatic threshold method, and the like.

[0062] In the embodiment of the present application, the camera is turned on, the camera working mode and parameters are configured, the image sensor of the camera starts to collect the original image, the original image is processed, and a preview image is obtained for the user to preview. The camera shooting mode is obtained, and the first constraint condition and the second constraint condition are determined based on the camera shooting mode. The first constraint condition is used to constrain the motion parameters of the camera, and the second constraint condition is used to constrain the shooting parameters of the camera.

[0063] The first constraint condition includes: the variance of multiple angular velocities of the camera in a preset historical time period is lower than a first preset threshold, and the variance of multiple accelerations of the camera in a preset historical time period is lower than a second preset threshold. The second constraint condition includes: the variance of the area of ​​the focus area on multiple preview images is lower than a third preset threshold; the variance of the position of the focus area on multiple preview images is lower than a fourth preset threshold; the variance of the proportion of the focus plane object in the image on multiple preview images is lower than a fifth preset threshold.

[0064] Among them, different photo modes correspond to different first constraints and second constraints. Specifically, the camera's photo modes include a zero-delay photo mode and a non-zero-delay photo mode. Among them, each preset threshold in the first constraint and the second constraint in the zero-delay photo mode is greater than each preset threshold in the first constraint and the second constraint in the non-zero-delay photo mode. That is, if the camera's motion parameters and shooting parameters meet the first constraint and the second constraint in the non-zero-delay photo mode, then the camera's motion parameters and shooting parameters must meet the first constraint and the second constraint in the zero-delay photo mode. For the zero-delay photo mode, considering the need to give priority to zero-delay photo requirements, the threshold can be relatively relaxed for triggering, so that the camera images taken can be stored in the preset memory as much as possible to meet the need for zero-delay photo.

[0065] 302. When the change information of the motion parameter satisfies the first constraint condition, obtain a preview image captured by the camera.

[0066] In the embodiment of the present application, when the change information of the motion parameter satisfies the first constraint condition, each frame of the preview image captured by the camera can be obtained. In other embodiments, the preview image captured by the camera can also be obtained at intervals of a first preset number of frames, and the first preset number of frames can be 2, 3, 4, etc., which can be set according to the specific situation.

[0067] 303. Obtain change information of shooting parameters of the preview image.

[0068] In the embodiment of the present application, the shooting parameter may include at least one of the area of ​​the focus area, the position of the focus area, the position of the focus plane object, and the proportion of the focus plane object in the image. The change information of the shooting parameter of the preview image may include the variance of the area of ​​the focus area on multiple preview images, the variance of the position of the focus area on multiple preview images, the variance of the proportion of the focus plane object in the image on multiple preview images, and the variance of the position of the focus plane object on multiple preview images.

[0069] 304. When the change information of the shooting parameters of the preview image satisfies the second constraint condition, perform scene detection on the preview image to obtain a scene category of the preview image.

[0070] In the embodiment of the present application, a pre-trained scene detection model is used to perform scene detection on the current preview image to obtain the scene category of the preview image. The scene category can be a portrait scene, a children scene, a landscape scene, etc.

[0071] 305. Determine a third constraint condition based on the scene category of the preview image.

[0072] Different scene categories correspond to different third constraints, and the third constraint is different from both the first constraint and the second constraint.

[0073] In a specific embodiment. If the scene category of the preview image is a children's scene, since children generally move frequently, the judgment of the focus area can be relaxed, and the focus can be placed on the camera's motion parameters and the depth information of the children's area corresponding to the current image, so as to determine whether the photo may be triggered. For example, if the scene category of the preview image is a children's scene, the third constraint condition includes that the variance of the area of ​​the focus area on multiple preview images is less than the seventh preset threshold, wherein the seventh preset threshold is greater than the third preset threshold; the variance of the position of the focus area on multiple preview images is less than the eighth preset threshold, wherein the eighth preset threshold is greater than the fourth preset threshold; the variance of the position of the focal plane object on multiple preview images is less than the sixth preset threshold.

[0074] 306. When the change information of the motion parameter and the change information of the shooting parameter meet the third constraint condition, determine whether the definition of the preview image is higher than a preset definition.

[0075] In the embodiment of the present application, when the change information of the motion parameters and the change information of the shooting parameters meet the third constraint condition, the photographed image is determined based on the preview image. In order to ensure the image quality, before determining the photographed image based on the preview image, it is determined whether the clarity of the preview image is higher than the preset clarity. If the clarity of the preview image is higher than the preset clarity, the photographed image is determined based on the preview image. The preset clarity can be set according to the specific situation.

[0076] In the embodiment of the present application, when the change information of the motion parameters and the change information of the shooting parameters meet the third constraint condition, the preview image is processed based on the second preset image strategy to obtain a photographed image corresponding to the preview image.

[0077] 307. Process the preview image based on the second preset image strategy to obtain a photographed image corresponding to the preview image.

[0078] When the definition of the preview image is higher than the preset definition, the preview image is processed based on the second preset image strategy to obtain a photographed image corresponding to the preview image.

[0079] Among them, the second preset image strategy may include BLC (Black level Correction), LSC (Lens Shading Correction), BPC (Bad Pixel Correction), denoising and other algorithms, which are not limited in this application.

[0080] Black Level is used to define the signal level corresponding to the image data being 0. Due to the influence of dark current, the actual raw data from the sensor is not the black balance we need. Therefore, in order to reduce the influence of dark current on the image signal, an effective method that can be used is to subtract the reference dark current signal from the acquired image signal. Generally, in a sensor, there are more actual pixels than effective pixels. The first few rows of the pixel area are used as insensitive areas for automatic black level correction. The average value is used as the correction value, and then the pixels in the following area are subtracted from this correction value, so that the black level can be corrected.

[0081] Due to the physical properties of the lens itself, the brightness of the image periphery gradually decreases relative to the brightness of the center. Also, when the image light shines on the pixel through the lens, the focus angle at the corner is greater than the center focus angle, causing light loss at the corner. The effect on the image is that the brightness gradually decays from the center of the image to the periphery, and the farther away from the center of the image, the darker the brightness. In order to compensate for the brightness of the surroundings, correction is required. The correction method is to calculate the brightness correction value corresponding to each pixel according to a certain algorithm, thereby compensating for the brightness attenuation of the periphery.

[0082] Bad pixels are white dots in the output image under a completely dark environment and black dots in the output image under a bright environment. Generally, the RGB signal should have a linear response relationship with the brightness of the scene, but due to the defective pixels of some image sensors, the output signal is abnormal, resulting in white dots or black dots. There are usually two methods for repairing bad pixels: one is to automatically detect bad pixels and automatically repair them, and the other is to establish a bad pixel list to repair bad pixels at fixed positions.

[0083] When using image sensors to acquire images, illumination and sensor problems are the main factors that generate a lot of noise in the image. These noises will make the image blurry as a whole and lose a lot of details, so the image needs to be denoised. Traditional methods for spatial denoising include mean filtering, Gaussian filtering, etc. However, general Gaussian filtering mainly considers the spatial distance relationship between pixels when sampling, and does not consider the similarity between pixel values. Therefore, the blurred result obtained in this way is usually a blurry picture. Therefore, nonlinear denoising algorithms are generally used, such as bilateral filters. When sampling, not only the relationship between pixels in spatial distance is considered, but also the similarity between pixels is considered, so that the general block division of the original image can be maintained, thereby maintaining the edge.

[0084] Considering that the application needs to perform partial image processing on the cached preview image in advance while the preview frame is cached, the frame selection operation can be moved forward to the same time as the preview image is cached, that is, the algorithm preprocessing is only performed on the selected preview image. This not only saves the frame selection time after triggering the photo shooting, but also reduces the number of frames processed by the algorithm preprocessing, reducing the impact on system power consumption.

[0085] 308. Store a preset number of photographic images captured by the camera in a preset memory.

[0086] The photographic images captured by the camera are sequentially stored in a preset memory to obtain a preset number of photographic images.

[0087] 309. Determine whether a photo taking instruction is obtained.

[0088] 310. Select an initial photographic image from a preset number of photographic images based on a preset selection strategy.

[0089] When a photographing instruction is obtained, an initial photographing image is selected from a preset number of photographing images based on a preset selection strategy.

[0090] In a specific embodiment, when a photographing instruction is obtained, the issuing time of the photographing instruction is obtained, and the photographing image with the closest photographing time and issuing time among a preset number of photographing images in a preset memory is determined as the initial photographing image.

[0091] In another specific embodiment, when a photographing instruction is obtained, the issuing time of the photographing instruction is obtained, the time difference between the photographing time and the issuing time in a preset number of photographing images in a preset memory is obtained, the clarity of the preset number of photographing images is obtained, the photographing scores of the photographing images are determined based on the time difference and the clarity, and the photographing image with the highest photographing score among the preset number of photographing images is determined as the initial photographing image. The smaller the time difference, the higher the photographing score; the higher the clarity, the higher the photographing score.

[0092] 311. Process the initial photographic image based on a third image processing strategy to obtain a target photographic image.

[0093] In the embodiment of the present application, the third image processing strategy may include inserting tag information and thumbnails, beautification, filters, format conversion, etc. For example, converting a YUV format image to a JPEG format image. The tag information includes information such as the width and height of the image and exposure parameters, etc.

[0094] Further, after acquiring the target photographed image, the process returns to execution 301. When the change information of the motion parameters does not satisfy the first constraint condition, or when the change information of the shooting parameters of the preview image satisfies the second constraint condition, or when the change information of the motion parameters and the change information of the shooting parameters satisfy the third constraint condition, the preview image is stopped from being processed based on the second preset image strategy, thereby reducing the system load.

[0095] Further, when the information about the change of the motion parameters and the information about the change of the shooting parameters meet the third constraint condition, the preview image captured by the camera is obtained at intervals of the first preset number of frames, and the preview image is processed based on the second preset image strategy to obtain the photographed image corresponding to the preview image, and the photographed image corresponding to the preview image is sequentially stored in the preset memory. When the information about the change of the motion parameters does not meet the first constraint condition, or when the information about the change of the shooting parameters of the preview image meets the second constraint condition, or when the information about the change of the motion parameters and the information about the change of the shooting parameters meet the third constraint condition, the preview image captured by the camera is obtained at intervals of the second preset number of frames, and the preview image is processed based on the second preset image strategy to obtain the photographed image corresponding to the preview image, and the photographed image corresponding to the preview image is sequentially stored in the preset memory. Among them, the first preset number of frames is less than the second preset number of frames. For example, the first preset number of frames is 1, and the second preset number of frames is 3, which can be set according to the specific situation. That is, if it is judged that the possibility of the user taking a photo is small, the number of frames with a larger interval is cached, thereby reducing the number of caches.

[0096] Further, when the information about the change of the motion parameters does not satisfy the first constraint, or when the information about the change of the shooting parameters of the preview image satisfies the second constraint, or when the information about the change of the motion parameters and the change of the shooting parameters satisfy the third constraint, the preset number is reduced to the preset number value. That is, if it is determined that the user is less likely to take a photo, the number of caches is reduced, thereby reducing the memory usage.

[0097] In order to better implement the photographing method provided in the embodiment of the present application, the embodiment of the present application also provides a photographing device based on the above photographing method. The meanings of the terms are the same as those in the above photographing method. For specific implementation details, please refer to the description in the above method embodiment.

[0098] Please refer to Figure 4 , Figure 4 The schematic diagram of the structure of the photographing device provided in the embodiment of the present application is as follows. The photographing device may include an acquisition module 701, a storage module 702, and a determination module 703, wherein:

[0099] An acquisition module 701 is used to acquire change information of motion parameters of a camera;

[0100] A storage module 702 is used to store a preset number of photographic images captured by the camera in a preset memory when the change information of the motion parameter satisfies a first constraint condition;

[0101] The determination module 703 is used to determine a target photographic image based on a preset number of photographic images in the preset memory when a photographing instruction is obtained.

[0102] Optionally, when the change information of the motion parameter satisfies the first constraint condition, storing a preset number of photographic images taken by the camera in a preset memory includes:

[0103] When the change information of the motion parameter satisfies a first constraint condition, obtaining a preview image captured by the camera;

[0104] Obtaining change information of shooting parameters of the preview image;

[0105] When the change information of the shooting parameters of the preview image meets the second constraint condition, a preset number of photographed images shot by the camera are stored in the preset memory.

[0106] Optionally, when the change information of the shooting parameters of the preview image satisfies the second constraint condition, storing a preset number of photographed images captured by the camera in the preset memory includes:

[0107] When the change information of the shooting parameters of the preview image satisfies the second constraint condition, performing scene detection on the preview image to obtain the scene category of the preview image;

[0108] determining a third constraint condition based on the scene category of the preview image, wherein different scene categories correspond to different third constraints;

[0109] determining the photographed image based on the preview image when the change information of the motion parameter and the change information of the shooting parameter meet a third constraint condition;

[0110] A preset number of photographic images captured by the camera are stored in a preset memory.

[0111] Optionally, obtaining the original image captured by the image sensor of the camera;

[0112] The original image is processed based on a first preset image processing strategy to obtain the preview image.

[0113] Optionally, when the change information of the motion parameter and the change information of the shooting parameter satisfy a third constraint condition, determining the photographed image based on the preview image includes:

[0114] When the change information of the motion parameters and the change information of the shooting parameters meet the third constraint condition, the preview image is processed based on a second preset image strategy to obtain the photographed image corresponding to the preview image.

[0115] Optionally, in the case where a photographing instruction is obtained, determining a target photographing image based on a preset number of photographing images in the preset memory includes:

[0116] When a photographing instruction is obtained, an initial photographing image is selected from a preset number of photographing images based on a preset selection strategy;

[0117] The initial photographed image is processed based on a third image processing strategy to obtain the target photographed image.

[0118] Optionally, the first constraint condition includes:

[0119] The variance of the multiple angular velocities of the camera in a preset historical time period is lower than a first preset threshold;

[0120] Alternatively, a variance of the plurality of accelerations of the camera within a preset historical time period is lower than a second preset threshold.

[0121] The specific implementation of each of the above modules can be found in the previous embodiments and will not be described in detail here.

[0122] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the processor is used to execute the steps in the photographing method provided in this embodiment by calling a computer program stored in the memory.

[0123] Please refer to Figure 5 , Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0124] The electronic device may include components such as a processor 101 with one or more processing cores, a memory 102 with one or more computer-readable storage media, a power supply 103, and an input unit 104. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0125] The processor 101 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 102, and calling data stored in the memory 102. Optionally, the processor 101 may include one or more processing cores; optionally, the processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 101.

[0126] The memory 102 can be used to store software programs and modules. The processor 101 executes various functional applications and data processing by running the software programs and modules stored in the memory 102. The memory 102 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an 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 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 102 may also include a memory controller to provide the processor 101 with access to the memory 102.

[0127] The electronic device also includes a power supply 103 for supplying power to each component. Optionally, the power supply 103 can be logically connected to the processor 101 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 103 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

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

[0129] Although not shown, the electronic device may also include a display unit, an image acquisition component, etc., which will not be described in detail here. Specifically in this embodiment, the processor 101 in the electronic device will load the executable code corresponding to one or more computer programs into the memory 102 according to the following instructions, and the processor 101 will execute the steps in the photographing method provided by the present application, such as:

[0130] Get the change information of the camera's motion parameters;

[0131] When the change information of the motion parameter satisfies the first constraint condition, storing a preset number of photographic images taken by the camera in a preset memory;

[0132] When a photographing instruction is obtained, a target photographing image is determined based on a preset number of photographing images in the preset memory.

[0133] It should be noted that the electronic device provided in the embodiment of the present application and the photographing method in the above embodiment belong to the same concept, and its specific implementation process is detailed in the above related embodiments and will not be repeated here.

[0134] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program stored therein is executed on a processor of an electronic device provided in an embodiment of the present application, the processor of the electronic device executes the steps in the photographing method provided in the present application. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0135] The present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes various optional implementations of the above-mentioned photographing method.

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

[0137] It should be noted that when the above embodiments of the present application are applied to specific products or technologies, the relevant data of the user is involved, and the user's permission or consent is required, and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

Claims

1. A photographing method, characterized in that: include: Get the change information of the camera's motion parameters; When the change information of the motion parameter satisfies the first constraint condition, storing a preset number of photographic images taken by the camera in a preset memory; When a photographing instruction is obtained, a target photographing image is determined based on a preset number of photographing images in the preset memory.

2. The photographing method according to claim 1, characterized in that: When the change information of the motion parameter satisfies the first constraint condition, storing a preset number of photographic images taken by the camera in a preset memory includes: When the change information of the motion parameter satisfies a first constraint condition, obtaining a preview image captured by the camera; Obtaining change information of shooting parameters of the preview image; When the change information of the shooting parameters of the preview image meets the second constraint condition, a preset number of photographed images shot by the camera are stored in the preset memory.

3. The photographing method according to claim 2, characterized in that: When the change information of the shooting parameters of the preview image satisfies the second constraint condition, storing a preset number of photographed images captured by the camera in the preset memory includes: When the change information of the shooting parameters of the preview image satisfies the second constraint condition, performing scene detection on the preview image to obtain the scene category of the preview image; determining a third constraint condition based on the scene category of the preview image, wherein different scene categories correspond to different third constraints; determining the photographed image based on the preview image when the change information of the motion parameter and the change information of the shooting parameter meet a third constraint condition; A preset number of photographic images captured by the camera are stored in a preset memory.

4. The photographing method according to claim 2, characterized in that: The photographing method comprises: Acquire the original image captured by the image sensor of the camera; The original image is processed based on a first preset image processing strategy to obtain the preview image.

5. The photographing method according to claim 3, characterized in that: The determining the photographed image based on the preview image when the change information of the motion parameter and the change information of the shooting parameter meet a third constraint condition includes: In the case where the change information of the motion parameter and the change information of the shooting parameter meet the third constraint condition, determining whether the definition of the preview image is higher than a preset definition; In a case where the definition of the preview image is higher than the preset definition, the preview image is processed based on a second preset image strategy to obtain the photographed image corresponding to the preview image.

6. The photographing method according to claim 1, characterized in that: The step of determining a target photographic image based on a preset number of photographic images in the preset memory when a photographic instruction is obtained includes: When a photographing instruction is obtained, an initial photographing image is selected from a preset number of photographing images based on a preset selection strategy; The initial photographed image is processed based on a third image processing strategy to obtain the target photographed image.

7. The photographing method according to claim 1, characterized in that: The first constraint condition includes: The variance of the multiple angular velocities of the camera in a preset historical time period is lower than a first preset threshold; Alternatively, a variance of the plurality of accelerations of the camera within a preset historical time period is lower than a second preset threshold.

8. A photographing device, characterized in that: include: An acquisition module is used to obtain the change information of the camera's motion parameters; A storage module, configured to store a preset number of photographic images captured by the camera in a preset memory when the change information of the motion parameter satisfies a first constraint condition; The determination module is used to determine a target photographic image based on a preset number of photographic images in the preset memory when a photographing instruction is obtained.

9. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the steps in the photographing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the photographing method according to any one of claims 1 to 7.

11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps in the photographing method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Image shooting system

    CN104285432A

  • Video camera and photographing method therefor, and storage device

    CN107360369A

  • Photographing method and related equipment

    CN112689090A

  • Image processor and image processing method

    JP2008294524A

Cited By

  • Image processing method and device, electronic equipment and readable storage medium

    CN120547433A