Photographing method and apparatus

By storing captured images under constraints on camera motion parameters and determining the target image upon receiving instructions, the high resource consumption problem of delayed photography in existing technologies is solved, achieving efficient image processing for low-latency photography.

CN119545168BActive Publication Date: 2025-12-09GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies cannot effectively reduce system resource consumption when achieving low-latency photography.

Method used

By acquiring information about changes in the camera's motion parameters, a preset number of images are stored in a preset memory under certain constraints, and the target image is determined from the preset memory when a shooting command is received.

Benefits of technology

It achieves reduced system resource consumption while maintaining low latency in photography, thereby improving photography efficiency and image processing speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119545168B_ABST
    Figure CN119545168B_ABST
Patent Text Reader

Abstract

The application discloses a photographing method and device, wherein, change information of motion parameters of a camera is acquired; in the case that the change information of the motion parameters meets a first constraint condition, a preset number of photographing images obtained by the camera are stored in a preset memory; in the case that a photographing instruction is acquired, a target photographing image is determined based on the preset number of photographing images in the preset memory. In the case that the change information of the motion parameters meets the first constraint condition, it is judged that the user is likely to take a photograph at this time, and the preset number of photographing images are stored in the preset memory at this time, so that the occupation of system resources caused by real-time storage of image frames can be avoided, and the occupation of system resources can be reduced. When the photographing instruction of the user is received, the target photographing image is directly selected from the preset number of photographing images, low-delay photographing can be realized, and therefore the occupation of system resources can be reduced in the case of realizing low-delay photographing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

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

[0002] In the current photographing scheme, there are mainly two categories of traditional photographing scheme and zero shutter lag (ZSL), and the common point of the two photographing schemes is that the storage of image data or the multi-frame buffering of whole frame data is still carried out, when there is a photographing request, the buffered 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 photographing image; but when storing and transmitting, since each frame of data is stored, a large amount of system resources will be occupied.

[0003] That is, the prior art cannot reduce the occupation of system resources in the case of realizing low delay photographing. SUMMARY

[0004] The embodiment of the present application provides a photographing method and device, which can reduce the occupation of system resources in the case of realizing low delay photographing.

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

[0006] obtaining change information of motion parameters of a camera;

[0007] storing a preset number of photographing images obtained by the camera in a preset storage under the condition that the change information of the motion parameters meets a first constraint condition;

[0008] determining a target photographing image based on the preset number of photographing images in the preset storage under the condition that a photographing instruction is obtained.

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

[0010] an obtaining module configured to obtain change information of motion parameters of a camera;

[0011] a storage module configured to store a preset number of photographing images obtained by the camera in a preset storage under the condition that the change information of the motion parameters meets a first constraint condition;

[0012] a determination module configured to determine a target photographing image based on the preset number of photographing images in the preset storage under the condition that 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. The processor is configured to execute the computer program stored in the memory, so as 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. The instructions are adapted to be loaded by a processor, so as 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. When the computer program or instructions are executed by a processor, the steps in the photographing method provided in the present application are implemented.

[0016] In the present application, compared with the related art, the change information of the motion parameter of the camera is acquired. In the case that the change information of the motion parameter meets a first constraint condition, the preset number of photographed images captured by the camera are stored in a preset memory. In the case that a photographing instruction is acquired, a target photographed image is determined based on the preset number of photographed images in the preset memory. In the present application, the change information of the motion of the camera is acquired. In the case that the change information of the motion parameter meets the first constraint condition, it is determined that the user is likely to take a photograph at this time. At this time, the preset number of photographed images captured by the camera are stored in the preset memory. The occupation of the system resources caused by the real-time storage of the image frames can be avoided. Therefore, the occupation of the system resources can be reduced. When the photographing instruction of the user is received, the target photographed image is directly selected from the preset number of photographed images. The target photographed image can be quickly provided to the user. The low-delay photographing is implemented. Therefore, the occupation of the system resources can be reduced in the case of implementing the low-delay photographing. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application. Other drawings can also be obtained by those skilled in the art without any creative effort.

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

[0019] Figure 2 is a flow schematic diagram of one embodiment of the photographing method provided in the embodiments of the present application;

[0020] Figure 3 is a flow schematic diagram of another embodiment of the photographing method provided in the embodiments of the present application;

[0021] Figure 4is a structural schematic diagram of a photographing device provided by an embodiment of the present application.

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

[0023] It should be noted that the principles of the present application are exemplified by being implemented in a suitable operating environment. The following description is based on the exemplified embodiments of the present application, which should not be regarded as limiting other embodiments of the present application not described in detail.

[0024] In the following description of the present application, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0025] In the following description of the present application, the terms "first\second\third" are only to distinguish similar objects, and do not represent a specific order of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

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

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

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

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

[0030] The electronic device 100 can be any device configured with a processor and having processing capability, such as a smart phone, a tablet computer, a palm computer, a notebook computer, a smart speaker, or a mobile electronic device having a processor, or a desktop computer, a television, a server, an industrial device, or a stationary electronic device having a processor.

[0031] In addition, as shown in Figure 1 The photographing system can further include a memory 200 configured to store raw data, intermediate data, and result data.

[0032] In an embodiment of the present application, the memory 200 can be a cloud memory. Cloud storage is a new concept extending and developing from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system in which a large number of storage devices (storage devices are also referred to as storage nodes) of various types are collected and cooperatively work together to provide data storage and business access functions to the outside through the functions of cluster application, grid technology, and distributed storage file system.

[0033] At present, the storage method of the storage system is as follows: a logical volume is created, and a physical storage space is allocated to each logical volume when the logical volume is created. The physical storage space can be a disk of a certain storage device or a disk group of several storage devices. A client stores data on a certain logical volume, that is, stores the data on a file system. The file system divides the data into many parts, each part being an object. The object contains not only data but also additional information such as an ID entity. The file system writes each object to the physical storage space of the logical volume, and records the storage location information of each object. Thus, when a client requests to access data, the file system can enable the client to access the data according to the storage location information of each object.

[0034] The process of allocating a physical storage space to a logical volume by the storage system is as follows: the physical storage space is divided into sections in advance according to the capacity estimation of the objects stored in the logical volume (the estimation often has a large margin relative to the actual capacity of the objects to be stored) and the group of redundant arrays of independent disks (RAID). A logical volume can be understood as a section, so that the logical volume is allocated with a physical storage space.

[0035] It should be noted that, Figure 1The scene diagram of the illustrated photographing system is merely an example. The photographing system and the scene described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, as the photographing system evolves and new business scenarios appear, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0036] The following will be described in detail. It should be noted that the serial numbers of the following embodiments do not constitute a limitation on the preferred order of the embodiments.

[0037] Please refer to Figure 2 , Figure 2 is a flowchart of one embodiment of the photographing method provided by the embodiments of the present application, as Figure 2 indicated, the flow of the photographing method provided by the present application is as follows:

[0038] 201, obtaining change information of motion parameters of a camera.

[0039] In the embodiments of the present application, the camera can be a mobile phone camera, an industrial camera, or the like, which can be set according to specific conditions.

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

[0041] 202, in the case where the change information of the motion parameters meets a first constraint condition, storing a preset number of photographing images obtained by the camera in a preset storage.

[0042] The first constraint condition is a constraint condition set in advance.

[0043] In one specific embodiment, the first constraint condition includes that the variance of the multiple angular velocities of the camera within the preset historical time period is lower than a first preset threshold, and the variance of the multiple accelerations of the camera within the preset historical time period is lower than a second preset threshold. In other embodiments, the first constraint condition can also be that the variance of the multiple angular velocities of the camera within the preset historical time period is lower than the first preset threshold, or the variance of the multiple accelerations of the camera within the preset historical time period is lower than the second preset threshold, which can be set according to specific conditions.

[0044] In the embodiment of the present application, when the change information of the motion parameter meets the first constraint condition, the preset number of photographed images captured by the camera are stored in the preset memory.

[0045] The preset memory is a cache. The cache is a high-speed memory with a faster access speed than a general random access memory (RAM). The cache is usually not used with a dynamic random access memory (DRAM) technology like the system main memory, but is used with a static random access memory (SRAM) technology which is more expensive but faster. The cache is an important factor for the high performance of all modern computer systems. 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 meets the first constraint condition, the plurality of photographed images captured by the camera at the preset frequency are sequentially stored in the preset memory. When the number of the photographed images in the preset memory reaches the preset number, the photographed image stored in the preset memory for the earliest time is removed from the preset memory. The preset frequency can be 25 HZ, 10 HZ, etc., and can be set according to the specific situation.

[0047] 203、In the case where the photographed instruction is acquired, the target photographed image is determined based on the preset number of photographed images in the preset memory.

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

[0049] In a specific embodiment, in the case where the photographed instruction is acquired, the time when the photographed instruction is issued is acquired, and the photographed image with the closest time between the photographed time and the time when the photographed instruction is issued among the preset number of photographed images in the preset memory is determined as the target photographed image.

[0050] In another specific embodiment, in the case where the photographed instruction is acquired, the time when the photographed instruction is issued is acquired, the time difference between the photographed time and the time when the photographed instruction is issued among the preset number of photographed images in the preset memory is acquired, the definition of the preset number of photographed images is acquired, the photographed score of the photographed image is determined based on the time difference and the definition, and the photographed image with the highest photographed score among the preset number of photographed images is determined as the target photographed image. The smaller the time difference is, the higher the photographed score is. The higher the definition is, the higher the photographed score is.

[0051] In the prior art, zero-time shooting is mainly to reduce the shooting delay caused by the traditional shooting mode, so that the user can obtain the image at the shooting moment as the shooting data for processing. When the camera starts previewing, the image sensor starts outputting data frames, and generally the latest several frames are stored in the memory as frame data. When the application user takes a picture, a shooting instruction is triggered, the system calculates the actual shooting time and sends the relevant shooting 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-processing algorithm for shooting data processing.

[0052] The prior art zero-time shooting will store the data frames in real time, which will occupy a large system resource, and cannot reduce the occupation of system resource in the case of realizing low-time shooting. The application obtains the change information of the motion parameters of the camera, and in the case that the change information of the motion parameters meets the first constraint condition, it is determined that the user is likely to take a picture at this time, and at this time, the preset number of shooting images taken by the camera are stored in the preset memory, which can avoid the occupation of system resource caused by real-time storage of image frames, so as to reduce the occupation of system resource, and when the shooting instruction of the user is received, the target shooting image is selected from the preset number of shooting images, which can quickly provide the target shooting image to the user, realize low-time shooting, and thus reduce the occupation of system resource in the case of realizing low-time shooting

[0053] Further, please refer to Figure 3 , Figure 3 is another embodiment of the shooting method provided by the application. As shown in Figure 3 , the flow of the shooting method provided by the application is as follows:

[0054] 301. Obtain change information of motion parameters of a camera.

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

[0056] The motion parameters of the camera can include the angular velocity, acceleration, etc. of the camera, which can be determined according to specific conditions. The change information of the motion parameters can 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 the multiple angular velocities of the camera within a preset historical time period, and the variance of the multiple accelerations of the camera within the preset historical time period. The preset historical time period can be within 3s, within 2s, etc., which can be set according to specific conditions.

[0057] In one specific embodiment, before obtaining the change information of the motion parameters of the camera, the method comprises:

[0058] (1) Obtain an original image collected by an image sensor of a camera.

[0059] An image sensor is a functional device that converts a light image on a light-sensitive surface into an electrical signal in a corresponding proportional relationship by using the photoelectric conversion function of a photoelectric device. Compared with a "point" light source photosensitive element such as a photosensitive diode and a photosensitive triode, the image sensor divides the light image on its light-receiving surface into many small units and converts them into usable electrical signals. The image sensor is divided into a photoconductive camera tube and a solid-state image sensor. Compared with the photoconductive camera tube, the solid-state image sensor has the characteristics of small size, light weight, high integration, high resolution, low power consumption, long service life, and low price. Therefore, it has been widely used in various industries.

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

[0061] In the embodiments of the present application, the first preset image processing strategy includes at least one of automatic exposure control (Automatic Exposure, AE), automatic focus control (Automatic Focus, AF), and automatic white balance control (Automatic White Balance, AWB). The automatic exposure control can automatically adjust the brightness of the image, the automatic focus control can automatically adjust the focal length of the image, and the automatic white balance can make the color of the image under the classical light source. The process of automatic focusing is the process of evaluating the imaging clarity: the image clarity is low when the focusing is inaccurate; the image clarity is high when the focusing is accurate, and the contrast is high. The most popular understanding of white balance is to make the image of a white object display white, and the images of other scenes will approach the color visual habit of the human eye. Common methods include gray world method, perfect reflection method, and automatic threshold method.

[0062] In the embodiments of the present application, the camera is opened, the working mode and parameters of the camera are configured, the image sensor of the camera starts to collect the original image, the original image is processed to obtain the preview image for the user to preview. The shooting mode of the camera is obtained, and the first constraint condition and the second constraint condition are determined based on the shooting mode of the camera. 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 that the variance of a plurality of angular velocities of the camera in a preset historical time period is lower than a first preset threshold, and the variance of a plurality of accelerations of the camera in the preset historical time period is lower than a second preset threshold. The second constraint condition includes that the variance of the area of the focusing area on a plurality of preview images is less than a third preset threshold; the variance of the position of the focusing area on the plurality of preview images is less than a fourth preset threshold; and the variance of the proportion of the focal plane object in the image on the plurality of preview images is less than a fifth preset threshold.

[0064] The different photographing modes correspond to different first constraint conditions and second constraint conditions. Specifically, the photographing modes of the camera include a zero-time photographing mode and a non-zero-time photographing mode. In the zero-time photographing mode, each preset threshold in the first constraint condition and the second constraint condition is greater than each preset threshold in the first constraint condition and the second constraint condition in the non-zero-time photographing mode. That is, if the motion parameters and the shooting parameters of the camera meet the first constraint condition and the second constraint condition in the non-zero-time photographing mode, the motion parameters and the shooting parameters of the camera must meet the first constraint condition and the second constraint condition in the zero-time photographing mode. For the zero-time photographing mode, because the demand for preferentially ensuring zero-time photographing is considered, the threshold triggered to relax relatively can be relaxed to some extent, so that the photographing image captured by the camera can be stored in the preset memory as much as possible to meet the demand for zero-time photographing.

[0065] 302. In a case where the change information of the motion parameters meets the first constraint condition, a preview image captured by the camera is acquired.

[0066] In the embodiment of the application, in a case where the change information of the motion parameters meets the first constraint condition, each frame of the preview image captured by the camera can be acquired. In other embodiments, the preview image captured by the camera can also be acquired every first preset frame number. The first preset frame number can be 2, 3, 4, etc., which can be set according to specific conditions.

[0067] 303. Change information of a shooting parameter of the preview image is acquired.

[0068] In the embodiment of the application, the shooting parameter can include at least one of an area of a focus region, a position of the focus region, a position of a focal plane object, and a proportion of the focal plane object in the image. The change information of the shooting parameter of the preview image can include a variance of the area of the focus region on a plurality of preview images, a variance of the position of the focus region on the plurality of preview images, a variance of the proportion of the focal plane object in the image on the plurality of preview images, and a variance of the position of the focal plane object on the plurality of preview images.

[0069] 304. In a case where the change information of the shooting parameter of the preview image meets a second constraint condition, scene detection is performed on the preview image to obtain a scene category of the preview image.

[0070] In the embodiment of the 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 child scene, a landscape scene, etc.

[0071] 305. A third constraint condition is determined based on the scene category of the preview image.

[0072] The different scene categories correspond to different third constraint conditions. The third constraint condition is different from the first constraint condition and the second constraint condition.

[0073] In a specific embodiment, if the scene category of the preview image is a child scene, since children generally move more frequently, the judgment of the focus area can be relaxed, and the focus can be placed on the motion parameters of the camera and the judgment of the depth information of the child area corresponding to the current image. Whether it is possible to trigger the shooting is determined by these information. For example, if the scene category of the preview image is a child scene, the third constraint condition includes that the variance of the area of the focus area on the plurality of preview images is less than a seventh preset threshold, where the seventh preset threshold is greater than the third preset threshold; the variance of the position of the focus area on the plurality of preview images is less than an eighth preset threshold, where the eighth preset threshold is greater than the fourth preset threshold; and the variance of the position of the focal plane object on the plurality of preview images is less than a sixth preset threshold.

[0074] 306、In the case where the change information of the motion parameter and the change information of the shooting parameter satisfy the third constraint condition, it is judged whether the definition of the preview image is higher than a preset definition.

[0075] In the embodiments of the present application, in the case where the change information of the motion parameter and the change information of the shooting parameter satisfy the third constraint condition, the shooting image is determined based on the preview image. In order to ensure the image quality, before the shooting image is determined based on the preview image, it is judged whether the definition of the preview image is higher than a preset definition, and in the case where the definition of the preview image is higher than the preset definition, the shooting image corresponding to the preview image is determined based on the preview image. The preset definition can be set according to specific conditions.

[0076] In the embodiments of the present application, in the case where the change information of the motion parameter and the change information of the shooting parameter satisfy the third constraint condition, the preview image is processed based on a second preset image strategy to obtain the shooting image corresponding to the preview image.

[0077] 307、The preview image is processed based on a second preset image strategy to obtain the shooting image corresponding to the preview image.

[0078] In the 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 shooting image corresponding to the preview image.

[0079] The second preset image strategy can include BLC (Black level Correction), LSC (Lens Shading Correction), BPC (Bad Pixel Correction), noise removal, etc. The present application does not limit this.

[0080] Black Level is used to define the signal level corresponding to the image data of 0. Due to the influence of dark current, the actual raw data output by the sensor is not the black balance we need. Therefore, in order to reduce the influence of dark current on image signal, an effective method that can be used is to subtract the reference dark current signal from the obtained image signal. Generally, in the sensor, the actual pixels are more than the effective pixels, and the first few rows of the pixel area are used as non-photosensitive area for automatic black level correction, and the average value is used as the correction value. Then, the pixels in the following area are all subtracted by this correction value, so that the black level correction can be completed.

[0081] Due to the physical properties of the lens itself, the brightness around the image gradually decreases relative to the center brightness, and due to the image light shining on the pixel through the lens, the focal angle at the corner is larger than the focal angle at the center, causing the corner to lose light. The effect shown 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 around the periphery, correction needs to be performed. The correction method is to calculate the brightness correction value corresponding to each pixel according to a certain algorithm, so as to compensate for the decaying brightness around the periphery.

[0082] Bad points are white points in the output image under full black environment and black points in the output image under high light environment. Generally, the RGB signal should have a linear response relationship with the brightness of the scene, but due to the poor output signal of some pixels of the image sensor, white or black points appear. There are usually two methods for bad point repair: one is to automatically detect bad points and automatically repair, and the other is to establish a bad point pixel linked list for fixed position bad pixel repair.

[0083] Using an image sensor to obtain an image, the degree of illumination and the sensor problem are the main factors that generate a large amount of noise in the generated image. These noises will make the image as a whole become blurred, and lose a lot of details, so the image needs to be denoised. The traditional method of spatial denoising includes mean filtering, Gaussian filtering, etc. However, the general Gaussian filtering mainly considers the spatial distance relationship between pixels when sampling, and does not consider the similarity degree between pixel values, so the blurring result obtained in this way is usually a blurred picture. Therefore, a nonlinear denoising algorithm is generally used, such as a bilateral filter, which not only considers the spatial distance relationship between pixels when sampling, but also considers the similarity degree between pixels, so that the original image can be generally blocked, and the edges can be maintained.

[0084] Considering that this application requires preliminary image processing of the cached preview images while the preview frames are being cached, the frame selection operation can be moved forward to the same time as the preview image caching, meaning that algorithmic preprocessing is only performed on the selected preview images. This not only saves frame selection time after triggering the capture, but also reduces the number of frames processed by the algorithm preprocessing, thus reducing the impact on system power consumption.

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

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

[0087] 309. Determine whether a photo-taking command has been received.

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

[0089] Upon receiving a photo-taking instruction, the system selects an initial photo from a preset number of photos based on a pre-defined selection strategy.

[0090] In one specific embodiment, when a photo-taking command is received, the time when the photo-taking command is issued is obtained, and the photo-taking image with the closest photo-taking time to the issuance time among a preset number of photo-taking images in the preset memory is determined as the initial photo-taking image.

[0091] In another specific embodiment, upon receiving a photo-taking command, the time of the command's issuance is obtained; the time difference between the photo-taking time and the issuance time of a preset number of photos stored in a preset memory is obtained; the resolution of the preset number of photos is obtained; a photo score is determined based on the time difference and resolution; and the photo with the highest score among the preset number of photos is selected as the initial photo. Specifically, a smaller time difference results in a higher photo score; higher resolution also results in a higher photo score.

[0092] 311. The initial captured image is processed based on the third image processing strategy to obtain the target captured image.

[0093] In this embodiment, 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. Tag information includes image width and height information, as well as exposure parameters, etc.

[0094] Further, after obtaining the target photographing image, return to perform 301. In a case where the change information of the motion parameter does not satisfy the first constraint condition, or in a case where the change information of the photographing parameter of the preview image satisfies the second constraint condition, or in a case where the change information of the motion parameter and the change information of the photographing parameter satisfy the third constraint condition, stop processing the preview image based on the second preset image strategy, thereby reducing system load.

[0095] Further, in a case where the change information of the motion parameter and the change information of the photographing parameter satisfy the third constraint condition, obtain the preview image captured by the camera every interval of a first preset frame number, and process the preview image based on the second preset image strategy to obtain a photographing image corresponding to the preview image, and sequentially store the photographing image corresponding to the preview image in a preset memory. In a case where the change information of the motion parameter does not satisfy the first constraint condition, or in a case where the change information of the photographing parameter of the preview image satisfies the second constraint condition, or in a case where the change information of the motion parameter and the change information of the photographing parameter satisfy the third constraint condition, obtain the preview image captured by the camera every interval of a second preset frame number, and process the preview image based on the second preset image strategy to obtain a photographing image corresponding to the preview image, and sequentially store the photographing image corresponding to the preview image in a preset memory. The first preset frame number is less than the second preset frame number. For example, the first preset frame number is 1, and the second preset frame number is 3, which can be set according to specific conditions. That is, if it is determined that the user's photographing possibility is small, a larger frame number is used for caching, thereby reducing the number of caches.

[0096] Further, in a case where the change information of the motion parameter does not satisfy the first constraint condition, or in a case where the change information of the photographing parameter of the preview image satisfies the second constraint condition, or in a case where the change information of the motion parameter and the change information of the photographing parameter satisfy the third constraint condition, reduce the preset number to a preset number value. That is, if it is determined that the user's photographing possibility is small, the number of caches is reduced, thereby reducing the occupation of the memory.

[0097] To facilitate better implementation of the photographing method provided in the embodiments of the present application, the embodiments of the present application further provide a photographing device based on the above photographing method. The meanings of the terms are the same as those in the above photographing method, and specific implementation details are described with reference to the above method embodiments.

[0098] Please refer to Figure 4 , Figure 4 The photographing device provided in the embodiments of the present application can include an acquisition module 701, a storage module 702, and a determination module 703.

[0099] The acquisition module 701 is configured to acquire change information of a motion parameter of a camera.

[0100] store a preset number of photographed images captured by the camera in a preset memory in a case where the change information of the motion parameter satisfies a first constraint condition;

[0101] determine a target photographed image based on the preset number of photographed images in the preset memory in a case where a photographed instruction is acquired.

[0102] Optionally, the storing, in a case where the change information of the motion parameter satisfies a first constraint condition, a preset number of photographed images captured by the camera in a preset memory comprises:

[0103] acquiring a preview image captured by the camera in a case where the change information of the motion parameter satisfies a first constraint condition;

[0104] acquiring change information of a shooting parameter of the preview image;

[0105] storing, in a case where the change information of the shooting parameter of the preview image satisfies a second constraint condition, a preset number of photographed images captured by the camera in the preset memory.

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

[0107] performing scene detection on the preview image to obtain a scene category of the preview image in a case where the change information of the shooting parameter of the preview image satisfies a second constraint condition;

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

[0109] determining the photographed image based on the preview image in a case where the change information of the motion parameter and the change information of the shooting parameter satisfy a third constraint condition;

[0110] storing a preset number of photographed images captured by the camera in a preset memory.

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

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

[0113] Optionally, the determining the photographed image based on the preview image in the case that the change information of the motion parameter and the change information of the photographing parameter satisfy the third constraint condition comprises:

[0114] processing the preview image based on a second preset image strategy to obtain the photographed image corresponding to the preview image in the case that the change information of the motion parameter and the change information of the photographing parameter satisfy the third constraint condition.

[0115] Optionally, the determining the target photographed image based on the preset number of photographed images in the preset memory in the case that the photographing instruction is acquired comprises:

[0116] selecting an initial photographed image from the preset number of photographed images based on a preset selection strategy in the case that the photographing instruction is acquired;

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

[0118] Optionally, the first constraint condition comprises:

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

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

[0121] The specific implementation of each module can refer to the foregoing embodiments, which will not be described herein.

[0122] The embodiment of the present application further provides an electronic device comprising a memory and a processor, wherein the processor is configured to execute the steps in the photographing method provided by the embodiment by invoking the computer program stored in the memory.

[0123] Please refer to Figure 5 , Figure 5 for a structural schematic diagram of the electronic device provided by the embodiment of the present application.

[0124] The electronic device can comprise a processor 101 with one or more processing cores, a memory 102 with one or more computer readable storage media, a power supply 103, an input unit 104, and the like. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and can comprise more or fewer components than shown in the figure, or combine certain components, or different component arrangements. Among them:

[0125] The processor 101 is the control center of the electronic device, connects each part of the entire electronic device by various interfaces and lines, and performs 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 can include one or more processing cores; optionally, the processor 101 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 101.

[0126] The memory 102 can be used to store software programs and modules, and the processor 101 executes various function applications and data processing by running the software programs and modules stored in the memory 102. The memory 102 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc.; the data storage area can store data created according to the use of the electronic device, etc. In addition, the memory 102 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 102 can also include a memory controller to provide access for the processor 101 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 realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 103 can also include one or more than one direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power state indicator, etc. any component.

[0128] The electronic device can also include an input unit 104, which can 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 can also include a display unit, an image acquisition component, etc., which will not be described here. Specifically, in the present embodiment, the processor 101 in the electronic device will load one or more computer programs into the memory 102 according to the following instructions, and execute the steps in the photographing method provided by the present application by the processor 101, such as:

[0130] acquire change information of a motion parameter of the camera;

[0131] store a preset number of photographed images obtained by the camera in a preset memory in a case where the change information of the motion parameter satisfies a first constraint condition;

[0132] determine a target photographed image based on the preset number of photographed images in the preset memory in a case where a photographed instruction is acquired.

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

[0134] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor of an electronic device provided by the embodiments of the present application, causes the processor of the electronic device to execute the steps in the photographing method provided by the present application. The storage medium can 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 implementation manners of the photographing method.

[0136] The above provides a detailed introduction to the photographing method and device, and the principles and implementation manners of the present application are described by applying specific examples. The above embodiment is only used to help understand the method and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range will be changed, and the above description should not be understood as a limitation of the present application.

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

Claims

1. A photographing method, characterized by, The method comprises: obtaining change information of motion parameters of a camera; in a case where the change information of the motion parameters meets a first constraint condition, obtaining a preview image captured by the camera; obtaining change information of shooting parameters of the preview image; in a case where the change information of the shooting parameters of the preview image meets a second constraint condition, storing a preset number of photographed images captured by the camera in a preset storage; in a case where a photographing instruction is obtained, determining a target photographed image based on the preset number of photographed images in the preset storage.

2. The photographing method of claim 1, wherein, The method comprises: in a case where the change information of the shooting parameters of the preview image meets a second constraint condition, performing scene detection on the preview image to obtain a 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 constraint conditions; in a case where the change information of the motion parameters and the change information of the shooting parameters meet the third constraint condition, determining the photographed image based on the preview image; storing the preset number of photographed images captured by the camera in the preset storage.

3. The photographing method of claim 1, wherein, The method comprises: obtaining an original image captured by an image sensor of the camera; processing the original image based on a first preset image processing strategy to obtain the preview image.

4. The photographing method of claim 2, wherein, The method comprises: in a case where the change information of the motion parameters and the change information of the shooting parameters meet the third constraint condition, determining whether the clarity of the preview image is higher than a preset clarity; in a case where the clarity of the preview image is higher than the preset clarity, processing the preview image based on a second preset image processing strategy to obtain the photographed image corresponding to the preview image.

5. The photographing method of claim 1, wherein, The method comprises: in a case where the photographing instruction is obtained, selecting an initial photographed image from the preset number of photographed images based on a preset selection strategy; processing the initial photographed image based on a third image processing strategy to obtain the target photographed image.

6. The photographing method of claim 1, wherein, The first constraint condition comprises: variances of a plurality of angular velocities of the camera in a preset historical time period are lower than a first preset threshold value; or variances of a plurality of accelerations of the camera in a preset historical time period are lower than a second preset threshold value.

7. A photographing apparatus characterized by comprising: The method comprises: an obtaining module configured to obtain change information of motion parameters of a camera; a storage module configured to, in a case where the change information of the motion parameters meets a first constraint condition, obtain a preview image captured by the camera; obtaining change information of shooting parameters of the preview image; In a case where the change information of the shooting parameter of the preview image satisfies a second constraint condition, a preset number of photographed images obtained by the camera are stored in a preset memory; The determining module is configured to, in a case where a photographing instruction is acquired, determine a target photographed image based on the preset number of the photographed images in the preset memory.

8. An electronic device, comprising: The photographing method comprises the steps of: acquiring a photographing instruction; determining a target photographed image based on a preset number of photographed images in a preset memory; and outputting the target photographed image.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a plurality of instructions adapted to be loaded by a processor to execute the steps in the photographing method of any one of claims 1 to 6.

10. A computer program product comprising computer programs or instructions, characterized in that, The computer readable storage medium stores a plurality of instructions adapted to be loaded by a processor to execute the steps in the photographing method of any one of claims 1 to 6. The computer program or instructions, when executed by the processor, implement the steps in the photographing method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Video camera and photographing method therefor, and storage device

    CN107360369A

  • Photographing method and related equipment

    CN112689090A