CN113676670B - Photographing method, electronic device, chip system and storage medium - Google Patents

Photographing method, electronic device, chip system and storage medium Download PDF

Info

Publication number
CN113676670B
CN113676670B CN202110990401.6A CN202110990401A CN113676670B CN 113676670 B CN113676670 B CN 113676670B CN 202110990401 A CN202110990401 A CN 202110990401A CN 113676670 B CN113676670 B CN 113676670B
Authority
CN
China
Prior art keywords
image frame
photographing
photo
content
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110990401.6A
Other languages
Chinese (zh)
Other versions
CN113676670A (en
Inventor
胡坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110990401.6A priority Critical patent/CN113676670B/en
Publication of CN113676670A publication Critical patent/CN113676670A/en
Application granted granted Critical
Publication of CN113676670B publication Critical patent/CN113676670B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

The application discloses a photographing method, electronic equipment, a chip system and a storage medium, wherein the photographing method comprises the following steps: receiving a first operation of a user, and displaying a preview interface of a camera application program, wherein the preview interface comprises a first photographing object; receiving a second operation of the user, wherein the second operation is used for taking the first picture; acquiring a first image frame after the first picture is taken; acquiring a second image frame, wherein the generation time of the first image frame is earlier than that of the second image frame; the first photographing object is determined to change according to the first image frame and the second image frame, the second picture is automatically photographed, the manual photographing link of a user is omitted, and the problem that the number of user operations is large in the photographing process is solved. And when the first photographing object is determined to be changed, the second picture is automatically photographed, the photographing time interval does not need to be set, the speed of the user for moving the first photographing object does not need to be concerned, and the intelligent degree is improved.

Description

Photographing method, electronic device, chip system and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a photographing method, an electronic device, a chip system, and a storage medium.
Background
With the increasing photographing capability of electronic devices, the electronic devices are applied in various fields, and users can take pictures, record videos, and the like by using a camera in the electronic devices, for example, a paper document can be photographed by the camera to be converted into a photo, which is convenient for transmission and storage. When the camera shoots and records videos, a user opens the camera, adjusts the camera to aim at a shooting object, and then the user manually clicks the shooting control to shoot, so that the user operation is increased, and the intelligent degree is low.
Disclosure of Invention
The photographing method, the electronic device, the chip system and the storage medium solve the problems of multiple user operations and low intelligent degree in the photographing process.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, the present application provides a method of taking a picture, the method comprising: receiving a first operation of a user, and displaying a preview interface of a camera application program, wherein the preview interface comprises a first photographing object; receiving a second operation of the user, wherein the second operation is used for taking the first picture; acquiring a first image frame after the first picture is taken; acquiring a second image frame, wherein the generation time of the first image frame is earlier than that of the second image frame; and determining that the first photographing object changes according to the first image frame and the second image frame, and automatically photographing a second photo, wherein the first photo is different from the second photo.
In the embodiment, the first photographing object is determined to be changed according to the first image frame and the second image frame, the second photo is automatically photographed, a manual photographing link of a user is omitted, and the problem that the number of user operations is large in the photographing process is solved. And the second picture is automatically shot when the first photographing object is determined to be changed, the photographing time interval does not need to be set, the speed of the user for operating the first photographing object does not need to be concerned, and the intelligent degree is improved.
The first photo object is changed by the content of the first photo object itself, for example, the camera is switched from a first region aligned with the first photo object to a second region of the first photo object, or the content of the aligned region of the camera is changed by the operation of the user on the first photo object, for example, the content is changed along with the movement or turning over of the first photo object by the user, for example, the user adds content (such as writing characters and the like) to the first photo object.
Optionally, the method further includes: acquiring a third image frame, wherein the generation time of the third image frame is earlier than that of the second image frame; and determining that the first photographing object is in a static state according to the second image frame and the third image frame, and triggering to acquire the first image frame, wherein the first image frame and the second image frame are obtained when the first photographing object is in the static state.
The present embodiment acquires the first image frame when it is determined that the first photographic subject is in a stationary state from the second image frame and the third image frame to determine whether the first photographic subject has changed from the first image frame and the second image frame. When the first photographing object is in the static state, the first photographing object is stable, and if the first photographing object is switched from the motion state to the static state, photographing of the first photographing object in the motion process can be eliminated, so that the content in the second photo is clearer, and the photographing accuracy is improved. For example, in the process of moving or turning over the first photo-object by the user, if the second photo is taken, the content in the second photo may be blurred or lost, so that in this embodiment, it is determined whether the first photo-object is changed when the first photo-object is in a static state, and the second photo is automatically taken when the first photo-object is in a static state and is changed, thereby improving the accuracy of photo-taking.
Optionally, the determining that the first photographic subject changes according to the first image frame and the second image frame, and automatically taking the second picture includes: and determining that the content of the first photographic object changes but the type of the first photographic object does not change according to the first image frame and the second image frame, and automatically taking a second picture. And further controlling the automatic shooting in combination with the type to improve the shooting accuracy. The fact that the type of the first photographic subject is not changed means that the first photographic subject is still photographed, but the content of the first photographic subject changes, for example, the first photographic subject changes along with the operation of the user, for example, the user moves the first photographic subject. When the first photographed object is a document, the user can turn the document, and the operations can change the content of the first photographed object.
Optionally, the method further includes: and determining to switch from the first photographic subject to a second photographic subject according to the first image frame and the second image frame, and forbidding photographing. The second photographic subject can be other photographic subjects except the first photographic subject, and can also be blank (namely, the first photographic subject is removed), in this case, the shooting can be prohibited, and the intelligent degree is improved.
Optionally, the determining that the first photographic subject changes according to the first image frame and the second image frame, and automatically taking the second picture includes: and determining to switch from the first photo object to a second photo object according to the first image frame and the second image frame, wherein the type of the second photo object is a preset type, and automatically shooting a second photo. In the embodiment, automatic shooting is controlled through a preset type, and if the first shooting object is switched to a second shooting object of which the type is the preset type, automatic shooting can be performed, so that the intelligent degree is improved, and the operation of a user is reduced. Wherein the preset type can be a document, a certificate, etc.
Optionally, the method further includes: and determining that the type of the second photographic object is not the preset type according to the first image frame and the second image frame, and forbidding shooting.
In this embodiment, the content of the first photographic subject is changed and the first photographic subject is switched to the second photographic subject, for example, the content of the first photographic subject is determined to be changed according to the first image frame and the second image frame, and the second photo is automatically taken; for another example, the second photo is automatically taken by determining that the first photo object is switched to the second photo object according to the first image frame and the second image frame, and the type of the second photo object is a preset type; but it is determined from the first image frame and the second image frame that the switching from the first photographic subject to the second photographic subject and the type of the second photographic subject is not a preset type, the photographing is prohibited.
Optionally, the method further includes: and when the second picture is automatically shot, prompting in a first prompting mode. The first prompting mode can be sound or light, and the second picture is automatically shot through prompting of the first prompting mode.
Optionally, the method further includes: the state discrimination module acquires a third image frame from the first memory, wherein the generation time of the third image frame is earlier than that of the second image frame; when the state distinguishing module determines that the first photographing object is in a static state according to the second image frame and the third image frame, the state distinguishing module sends the second image frame to a content distinguishing module, the content distinguishing module is used for acquiring the first image frame from the first memory, determining that the first photographing object changes according to the first image frame and the second image frame, and automatically photographing a second picture; the first image frame and the second image frame are image frames obtained when the first photographic subject is in a stationary state.
Optionally, the method further includes: the content discrimination module stores the second image frame in the first memory; and the content judging module stores the second photo in a second memory, wherein the storage time length of the photo in the second memory is longer than that of the image frame in the first memory. In the embodiment, the second image frame and the second photo are respectively stored in different memories, the second photo is not influenced by the reuse of the second image frame, the storage time length of the second photo relative to the second image frame is longer, and the user can manually delete the second photo. For example, the first memory may be a buffer memory, the second memory may be an external memory, and the read-write speed of the buffer memory is greater than that of the external memory, so that the image frames can be acquired more quickly and the processing progress is accelerated.
When the first memory stores the first image frame to the third image frame, the first memory can allocate a first memory space and a second memory space, the first memory space stores the first image frame and the second image frame, and the second memory space stores the second image frame and the third image frame. The state distinguishing module extracts image frames from the second storage space, the content distinguishing module extracts image frames from the first storage space, and deletes the first image frames in the first storage space after one distinguishing is completed, the second image frames in the first storage space are used as the first image frames, the third image frames in the second storage space are deleted, and the second image frames in the second storage space are used as the third image frames for the next distinguishing. The state distinguishing module is started again to obtain a fourth image frame when the state distinguishing module is used for distinguishing the state, the state distinguishing module is used for distinguishing the state according to the fourth image frame and the third image frame stored in the second storage space, and if the first photographing object is determined to be in a static state according to the fourth image frame and the third image frame stored in the second storage space, the fourth image frame is used as the second image frame and is sent to the content distinguishing module; if the first photographing object is determined to be in the static state according to the fourth image frame and the third image frame stored in the second storage space, the state judging module continues to acquire other image frames for state judgment, and sends the other image frames to the content judging module when the first photographing object is determined to be in the static state. The content distinguishing module can store the received image frame in the first storage space and is used for determining whether the first photographing object changes next time. The first memory may further assign tags to the first through third image frames as an attribute of the image frames, such that the state discrimination module and the content discrimination module extract the image frames according to the tags.
Optionally, the method further includes: and the state judging module or the content judging module detects that the type of the first photographing object switched to the second photographing object or the second photographing object is not a preset type, and the photographing is forbidden.
In a second aspect, the present application provides an electronic device comprising: the processor is used for receiving a first operation of a user and displaying a preview interface of a camera application program, wherein the preview interface comprises a first photographing object; receiving a second operation of the user, wherein the second operation is used for taking the first picture; acquiring a first image frame after the first picture is taken; acquiring a second image frame, wherein the generation time of the first image frame is earlier than that of the second image frame; determining that the first photographing object changes according to the first image frame and the second image frame, and automatically photographing a second photo, wherein the first photo and the second photo are different; a memory for storing the first photograph and the second photograph.
In the embodiment, the first photographing object is determined to be changed according to the first image frame and the second image frame, the second picture is automatically photographed, the manual photographing link of a user is omitted, and the problem that the user has many operations in the photographing process is solved. And the second picture is automatically shot when the first photographing object is determined to be changed, the photographing time interval does not need to be set, the speed of the user for operating the first photographing object does not need to be concerned, and the intelligent degree is improved.
The change of the first photographic object is a content change of the first photographic object, for example, the camera is switched from a first region aligned with the first photographic object to a second region of the first photographic object, or the content of the aligned region of the camera is changed under the operation of the user on the first photographic object, for example, the content is changed along with the movement or turning over of the first photographic object by the user, for example, the user adds content (such as written characters and the like) into the first photographic object.
Optionally, the processor is further configured to acquire a third image frame, where a generation time of the third image frame is earlier than a generation time of the second image frame; and determining that the first photographing object is in a static state according to the second image frame and the third image frame, and triggering to acquire the first image frame, wherein the first image frame and the second image frame are obtained when the first photographing object is in the static state.
The present embodiment acquires the first image frame when it is determined that the first photographic subject is in a stationary state from the second image frame and the third image frame to determine whether the first photographic subject has changed from the first image frame and the second image frame. When the first photographing object is in the static state, the first photographing object is stable, and if the first photographing object is switched from the motion state to the static state, photographing of the first photographing object in the motion process can be eliminated, so that the content in the second photo is clearer, and the photographing accuracy is improved. For example, in the process of moving or turning over the first photo-object by the user, if the second photo is taken, the content in the second photo may be blurred or lost, so that in this embodiment, it is determined whether the first photo-object is changed when the first photo-object is in a static state, and the second photo is automatically taken when the first photo-object is in a static state and is changed, thereby improving the accuracy of photo-taking.
Optionally, the processor is configured to determine that the content of the first photographic subject changes but the type of the first photographic subject does not change according to the first image frame and the second image frame, and automatically take the second picture. And further controlling the automatic shooting in combination with the type to improve the shooting accuracy. The fact that the type of the first photographic subject does not change means that the first photographic subject is still photographed, but the content of the first photographic subject itself changes, for example, the first photographic subject changes along with the user operation, for example, the user moves the first photographic subject. When the first photographed object is a document, the user can turn the document, and the operations can change the content of the first photographed object.
Optionally, the processor is further configured to determine to switch from the first photo-object to the second photo-object according to the first image frame and the second image frame, and prohibit the shooting. The second photographic subject can be other photographic subjects except the first photographic subject, and can also be blank (namely, the first photographic subject is removed), in this case, the shooting can be prohibited, and the intelligent degree is improved.
Optionally, the processor is configured to determine, according to the first image frame and the second image frame, to switch from the first photo object to a second photo object, where a type of the second photo object is a preset type, and automatically take a second photo. In the embodiment, automatic shooting is controlled through a preset type, and if the first shooting object is switched to a second shooting object of which the type is the preset type, automatic shooting can be performed, so that the intelligent degree is improved, and the operation of a user is reduced. Wherein the preset type can be a document, a certificate, etc.
Optionally, the processor is further configured to determine, according to the first image frame and the second image frame, that the type of the second photographic subject is not the preset type, and prohibit shooting.
In this embodiment, the content of the first photographic subject is changed and the first photographic subject is switched to the second photographic subject, for example, the content of the first photographic subject is determined to be changed according to the first image frame and the second image frame, and the second picture is automatically taken; for another example, the second photo is automatically taken after the first photo object is switched to the second photo object according to the first image frame and the second image frame and the type of the second photo object is a preset type; but it is determined from the first image frame and the second image frame that the switching from the first photographic subject to the second photographic subject and the type of the second photographic subject is not a preset type, the photographing is prohibited.
Optionally, the processor is configured to prompt in a first prompt manner when the second picture is automatically taken. The first prompting mode can be sound or light, and the second picture is automatically shot through prompting of the first prompting mode.
Optionally, the processor includes: a state discrimination module and a content discrimination module; the state discrimination module is used for acquiring a third image frame from the first memory, wherein the generation time of the third image frame is earlier than that of the second image frame; the state judging module is used for sending the second image frame to the content judging module when the first photographing object is determined to be in a static state according to the second image frame and the third image frame; the content distinguishing module is used for acquiring the first image frame from the first memory, determining that the first photographing object changes according to the first image frame and the second image frame, and automatically photographing a second picture; the first image frame and the second image frame are image frames obtained when the first photographic subject is in a stationary state. The state discrimination module and the content discrimination module are two functional modules in the processor, and the state discrimination and the content discrimination are realized by writing program codes in the state discrimination module and the content discrimination module.
Optionally, the memory includes a first memory and a second memory; the content distinguishing module is further configured to store the second image frame in the first memory, and store the second photo in a second memory, where a storage duration of the photo in the second memory is longer than a storage duration of the image frame in the first memory. In this embodiment, the second image frame and the second photo are stored in different memories, the second photo is not affected by the reuse of the second image frame, and the storage time of the second photo relative to the second image frame is longer, so that the user can delete the second photo manually. For example, the first memory may be a buffer memory, the second memory may be an external memory, and the read-write speed of the buffer memory is greater than the read-write speed of the external memory, so that the image frames can be acquired more quickly and the processing progress is accelerated.
When the first memory stores the first image frame to the third image frame, the first memory can allocate a first memory space and a second memory space, the first memory space stores the first image frame and the second image frame, and the second memory space stores the second image frame and the third image frame. The state distinguishing module extracts image frames from the second storage space, the content distinguishing module extracts image frames from the first storage space, and deletes the first image frames in the first storage space after one distinguishing is completed, the second image frames in the first storage space are used as the first image frames, the third image frames in the second storage space are deleted, and the second image frames in the second storage space are used as the third image frames for the next distinguishing. The state distinguishing module is started again to obtain a fourth image frame when the state distinguishing module is used for distinguishing the state, the state distinguishing module is used for distinguishing the state according to the fourth image frame and the third image frame stored in the second storage space, and if the first photographing object is determined to be in a static state according to the fourth image frame and the third image frame stored in the second storage space, the fourth image frame is used as the second image frame and is sent to the content distinguishing module; if the first photographing object is determined to be in the static state according to the fourth image frame and the third image frame stored in the second storage space, the state judging module continues to acquire other image frames for state judgment, and sends the other image frames to the content judging module when the first photographing object is determined to be in the static state. The content distinguishing module can store the received image frame in the first storage space and is used for determining whether the first photographing object changes next time. The first memory may further assign tags to the first through third image frames as an attribute of the image frames, such that the state discrimination module and the content discrimination module extract the image frames according to the tags.
Optionally, the state determination module or the content determination module is further configured to detect that the type of the first photo object switched to the second photo object or the second photo object is not a preset type, and prohibit the shooting.
In a third aspect, the present application provides a chip system, comprising: the system comprises at least one processor and an interface, wherein the interface is used for receiving code instructions and transmitting the code instructions to the at least one processor; the at least one processor executes the code instructions to implement the above-described photographing method.
In a fourth aspect, the present application provides a computer storage medium, which includes computer instructions, when the computer instructions are run on an electronic device, the electronic device executes the above photographing method.
It should be appreciated that the description of technical features, solutions, benefits, or similar language in this application does not imply that all of the features and advantages may be realized in any single embodiment. Rather, it should be appreciated that any discussion of a feature or advantage is meant to encompass a particular feature, aspect, or advantage in at least one embodiment. Therefore, the descriptions of technical features, technical solutions or advantages in the present specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and advantages described in the present embodiments may also be combined in any suitable manner. One skilled in the relevant art will recognize that an embodiment may be practiced without one or more of the specific features, aspects, or advantages of a particular embodiment. In other embodiments, additional features and advantages may be recognized in certain embodiments that may not be present in all embodiments.
Drawings
Fig. 1 is a diagram illustrating an exemplary composition of an electronic device provided in the present application;
FIG. 2 is a first schematic diagram illustrating a user taking a picture using an electronic device according to the present application;
FIG. 3 is a second schematic diagram of a user taking a picture using an electronic device according to the present application;
FIG. 4 is a schematic diagram of the operation of the components of the electronic device provided in the present application;
FIG. 5 is a flow chart of the state discrimination provided by the present application;
fig. 6 is a flowchart of content discrimination provided in the present application.
Detailed Description
The terms "first," "second," and "third," etc. in the description and claims of the present application and the description of the drawings are used for distinguishing between different objects and not for limiting a particular order.
In the embodiments of the present application, the words "exemplary" or "such as" are used herein to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the application, a user can take pictures, record videos and the like by using a camera in the electronic equipment, for example, a paper file can be taken pictures and converted into a picture by using the camera, so that the transmission and the storage are convenient. The electronic device may be a mobile phone, a tablet Computer, a desktop Computer, a laptop Computer, a notebook Computer, an Ultra-mobile Personal Computer (UMPC), a handheld Computer, a netbook, a Personal Digital Assistant (PDA), a wearable electronic device, an intelligent watch, and the like, and the specific form of the electronic device is not particularly limited in the present application. In this embodiment, the electronic device may have a structure as shown in fig. 1, and the electronic device may include a processor 110, an external memory interface 120, a buffer memory 130, a camera 140, a display 150, and the like. It is to be understood that the illustrated structure of the present embodiment does not constitute a specific limitation to the electronic device. In other embodiments, an electronic device may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors. For example, in the present application, the processor 110 may control the camera 140 to take a picture and control the display 105 to display a picture obtained by the camera 140, and so on.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that have just been used or recycled by the processor 110, such as a device profile that stores the router. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc., the processor 110 may be coupled to other devices using one or more interfaces, e.g., the processor may be coupled to an audio device via the I2C interface.
The external memory interface 120 may be used to connect an external memory, such as a Micro SD card, to extend the storage capability of the electronic device. The external memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving files such as music, video, etc. in the external memory. The buffer memory 130 is a temporary storage area in the electronic device, and stores temporary files, such as temporary image frames, which are used for detecting the status of the photographic subject. For example, the photographing object is a book, the user can turn pages, and the camera 140 can obtain some image frames when the user turns the pages, and detect whether the document is turning the pages or has finished turning the pages through the image frames.
The electronic device may implement a shooting function through the ISP, the camera 140, the video codec, the GPU, the display 150, and the application processor, etc. The ISP is used to process the data fed back by the camera 140. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 140.
The camera 140 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device may include 1 or N cameras 140, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device selects a frequency point, the digital signal processor is used for performing fourier transform and the like on the frequency point energy.
Video codecs are used to compress or decompress digital video. The electronic device may support one or more video codecs. In this way, the electronic device can play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The electronic device implements display functions via the GPU, the display screen 150, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 150 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 150 is used to display images, video, and the like. The display screen 150 includes a display panel. The display panel may be a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-OLED, a quantum dot light-emitting diode (QLED), or the like.
A series of Graphical User Interfaces (GUIs) may be displayed on the display screen 150, which are the main screens of the electronic device. Generally, the size of the display 150 is fixed, and only a limited number of controls can be displayed in the display 150. A control is a GUI element, which is a software component contained in an application program and controls all data processed by the application program and interactive operations related to the data, and a user can interact with the control through direct manipulation (direct manipulation) to read or edit information related to the application program. Generally, a control may include a visual interface element such as an icon, button, menu, tab, text box, dialog box, status bar, navigation bar, Widget, and the like. For example, in an embodiment of the present application, the display screen 150 may display a preview interface of a camera application.
In addition, an operating system runs on the above components. For example, the iOS os developed by apple, the Android open source os developed by google, the hong meng os (harmony os) developed by hua corporation, the Windows operating system developed by microsoft, and the like. A running application may be installed on the operating system.
In this embodiment, a user can take a picture by using a camera in the electronic device. Taking a mobile phone as an example, a schematic diagram of taking a picture by a user using the mobile phone is shown in fig. 2, the user opens a camera of the mobile phone (starts a camera application), the mobile phone is in a preview mode, and the user adjusts the camera to align with a picture-taking object (such as a book in fig. 2); a user holds the mobile phone with one hand to align the book, turns pages with the other hand, and turns pages from the first page and the second page to the third page and the fourth page; then, the user clicks the photographing control in the preview interface to photograph, and the mobile phone stores the photographed photo in an external memory connected with an external memory interface, so that the user operation is increased, and the intelligent degree is low.
For another example, a photographing time interval is preset in the mobile phone, for example, a photograph is taken every n seconds, where n is a numerical value greater than 0, and the value of n is not limited in this embodiment. The user opens the camera of the mobile phone, the mobile phone is in a preview mode, and the user adjusts the camera to align the book; a user holds the mobile phone with one hand to align the book, turns pages with the other hand, and turns pages from the first page and the second page to the third page and the fourth page; the mobile phone starts a timer to time in a preview mode, and the mobile phone takes a picture when the time reaches the picture taking interval. However, when the mobile phone is used for photographing, a user may be turning pages or may not turn pages yet, so that the photographing accuracy and the intelligence degree are low. And the page turning speed of different users may be different, the camera is controlled to automatically shoot at the shooting time interval, the possibility of shooting and missed shooting in the page turning process exists, and therefore the shooting accuracy is reduced, and the intelligent degree is also reduced.
In order to solve the above problem, the present embodiment provides a photographing method, wherein the photographing method can automatically control a camera to photograph by detecting a state of a photographic object. As shown in fig. 3, the user fixes the mobile phone on a stand, opens the camera, and adjusts the position of the mobile phone on the stand or adjusts the stand so that the mobile phone is directed at the object to be photographed (e.g., a book in fig. 3). The mobile phone can detect the state of the book according to the image frame obtained in the preview mode, so as to determine whether the book is in page turning, waiting for page turning, or completing page turning. If the mobile phone monitors that the page turning is completed, the mobile phone controls the camera to automatically take a picture. If the processor of the mobile phone sends a photographing instruction to the camera, the camera responds to the photographing instruction to take a picture.
For another example, after a user turns to a page of a book, the user may move the book upward, downward, leftward, and rightward, so that the focusing area of the camera changes, for example, the focusing area of the camera can move from the first area to the second area of the page, the mobile phone can also detect the state of the book, and then the mobile phone controls the camera to take a picture automatically. If the book is detected to be in motion, for example, the focusing area of the camera is changing due to the movement of the book, the mobile phone prohibits the camera from taking pictures; if the book is detected to be in a static state and the content in the focusing area of the camera is detected to be changed, the mobile phone controls the camera to take a picture, and an intelligent picture taking mode is provided.
For another example, the user writes characters, symbols, pictures and the like on the book, the operations change the content of the book, and the embodiment can detect whether the book is in the writing state of the user or has finished writing through the image frame, and if the writing is finished, the camera is controlled to take a picture.
Therefore, according to the photographing method provided by the embodiment, if the mobile phone detects that the photographing content changes, the camera is controlled to automatically photograph, and the intelligent degree is improved. The mobile phone can also detect the state of the photographed object, and if the photographed object is in a moving state, the mobile phone can prohibit the detection of whether the photographed content changes, so that the photographed object can be photographed when stable, for example, when the photographed object is in a static state, for example, the book can be excluded from being in page turning through the state detection, thereby improving the accuracy of photographing. Similarly, no matter how fast the page turning speed of the user is or whether the page turning speed of the user changes in the page turning process, the mobile phone executing the photographing method provided by the embodiment can exclude the book from being in the page turning process through state detection, and photograph the book after the page turning is completed, so that the photographing accuracy is improved.
If books are in upper and lower, left and right removal in-process, the cell-phone also can control the camera and shoot after books are static, if books are static and the content changes, control the camera and shoot, also improved the degree of accuracy and the intelligent degree of shooing.
The photographing method provided by the embodiment can also be applied to a video recording scene, the photographing time of the camera can be preset, different photographing time can be set according to different types of photographing objects, or the state of the photographing object can be detected during photographing, and photographing can be stopped if the state changes; for example, in the process of shooting by a camera, if the mobile phone is detected to move and the user operates on the mobile phone to change the content displayed by the mobile phone, shooting is stopped when at least one state change is detected. In addition, the mobile phone can utilize the front camera or the rear camera to shoot and pick up a picture, and can utilize the front camera or the rear camera to shoot and can prompt through flashing lights or sounds when shooting or picking up a picture. For example, when the mobile phone takes a picture and takes a video in the manner shown in fig. 3, if the mobile phone takes a picture and takes a video with the front camera, the display screen of the mobile phone faces away from the user, and the user cannot see the content on the display screen, then the user cannot check the picture or video process with the camera in real time, so the embodiment can prompt in the form of flashing lights or sounds, etc. to inform the user that the camera takes a picture or takes a video at present.
In this embodiment, an operation schematic diagram of each component in the electronic device is shown in fig. 4, where the processor includes a state determination module and a content determination module, the state determination module determines a state of the photographic subject, and the content determination module determines whether content of the photographic subject changes. Still taking the above fig. 3 as an example, if the book is in the page turning process, it is described that the photo object is in the motion state; the state judging module can continuously judge the state of the photographed object until the photographed object is in a static state (such as finishing page turning). After the state discrimination module discriminates that the photographed object is in a static state, the content discrimination module is triggered to identify the content of the photographed object so as to detect whether the content of the photographed object changes.
Whether the content of the photographed object changes or not is detected because the book is not turned over and is turned over, the book is in a static state, but the content of the book cannot change when the page of the book is not turned over, the content of the book can change when the page of the book is turned over, and the situation that the same page is photographed for multiple times can occur if the book is detected to be in the static state for photographing. Although the scenes that the books are in page turning can be eliminated, the scenes that the books are not in page turning cannot be eliminated only by the condition that the books are in a static state, so that the cameras take pictures of the same page for multiple times, and the storage space is wasted. Based on the image frames obtained in different time periods, the content judging module in the embodiment can judge whether the book content changes, so as to judge whether the page of the book turns. When the content changes, the camera may not photograph the photographed object yet, and in this case, the content determination module may control the camera to photograph. As shown in fig. 4, the content determination module sends a photographing signal to the camera, the camera responds to the photographing signal to photograph to obtain a picture of the photographed object, and the processor receives the picture of the photographed object and stores the picture in the external memory.
The state distinguishing module distinguishes states based on image frames input by the camera, the corresponding content distinguishing module also distinguishes whether the content of the object to be photographed changes based on the image frames input by the camera, but the image frames used by the state distinguishing module and the content distinguishing module are different, the image frames used by the content distinguishing module are the image frames sent to the content distinguishing module by the state distinguishing module, and the image frames sent when the state distinguishing module judges that the object to be photographed is in a static state. The image frames used by the state discrimination module and the content discrimination module are temporarily stored in a buffer memory, for the purpose of discrimination, the image frames used by the state discrimination module are called as comparison frames for short, the image frames used by the content discrimination module are called as stabilization frames for short, and the buffer memory can allocate independent storage spaces for the comparison frames and the stabilization frames and record the storage spaces as a first storage space and a second storage space.
The first storage space stores a current comparison frame and a previous comparison frame, the current comparison frame is an image frame obtained from a camera at the current moment, the previous comparison frame is an image frame obtained from the camera at the moment before the current comparison frame, the obtaining time of the previous comparison frame and the current comparison frame are adjacent, and the adjacent means that no other image frame is obtained in the time interval of obtaining two image frames. The state discrimination module can discriminate the state of the object to be photographed based on the current comparison frame and the previous comparison frame, after the state discrimination is completed based on the current comparison frame and the previous comparison frame, the previous comparison frame is deleted from the first storage space, the current comparison frame is adjusted to be the previous comparison frame, the current comparison frame is continuously obtained from the camera, and the state discrimination module is triggered to continuously discriminate the state. In this embodiment, the time interval of the current comparison frame input to the state determination module by the camera is not limited in this embodiment.
The second storage space stores a current stable frame and a previous stable frame, the current stable frame is a comparison frame which is judged by the state judging module when the photographic subject is in a static state, the previous stable frame is a comparison frame which is judged by the state judging module when the photographic subject is in the static state last time, the state judging module uses the current comparison frame and the previous comparison frame when the state is judged, and the current comparison frame is used as the stable frame when the photographic subject is in the static state. The last stable frame and the current stable frame are obtained adjacent in time, and the adjacent indicates that no other image frame is obtained in the time interval of obtaining two image frames. The content judging module can judge whether the content of the photographed object changes or not based on the current stable frame and the last stable frame, and after the judgment of whether the content changes or not is completed based on the current stable frame and the last stable frame, the last stable frame is deleted from the second storage space, the current stable frame is adjusted to be the last stable frame, the current stable frame is continuously obtained from the state judging module, and the content judging module is triggered to continuously judge whether the content changes or not.
In this embodiment, a flow of the status determination performed by the status determination module is shown in fig. 5, and may include the following steps:
101. the camera inputs the current comparison frame to the state discrimination module.
102. The state discrimination module stores the current comparison frame to a first storage area of the buffer memory, the purpose of storing the current comparison frame is to discriminate the next state, and the current comparison frame is used as the previous comparison frame in the next state discrimination.
103. The state discrimination module obtains the last pair of frames from the first storage area of the buffer memory to input the last pair of frames to the state discrimination module.
104. And the state discrimination module performs difference processing on the current comparison frame and the previous comparison frame to obtain a difference result.
105. The state discrimination module compares the difference result with a threshold value, wherein the threshold value is an optional condition for judging whether the photographic subject is in a static state. For example, in this embodiment, the gray values of the same pixel in the current comparison frame and the previous comparison frame may be subtracted to obtain the absolute value of the gray difference of each pixel, and the absolute values of the gray differences of the pixels are accumulated, so that the threshold is the maximum absolute value of the gray difference.
106. And the state discrimination module judges that the differential result meets the condition, takes the current comparison frame as a current stable frame, and stores the current stable frame into a second storage area of the buffer memory. For example, when the accumulation result of the absolute value of the gray level difference of the pixel point is larger than the threshold value, the photographing object is determined to be in a motion state; and in addition, the state discrimination module replaces the previous comparison frame with the current comparison frame to prepare for next state discrimination. Here, this is merely an example, and the means used when the threshold and the state determination module perform the state determination is not limited in this embodiment.
In this embodiment, a flowchart of content determination by the content determination module is shown in fig. 6, and may include the following steps:
201. the state discrimination module inputs the current stable frame to the content discrimination module.
202. And the content discrimination module is used for extracting the characteristics of the current stable frame to generate the characteristic vector of the current stable frame.
203. The content discrimination module obtains the last stable frame from the second storage area of the buffer memory to input the last stable frame to the content discrimination module.
204. And the content discrimination module is used for extracting the characteristics of the last stable frame to generate the characteristic vector of the last stable frame.
205. And the content judging module compares the feature vector of the current stable frame with the feature vector of the last stable frame to obtain a comparison result.
206. And the content judging module judges that the comparison result meets the condition and outputs a photographing signal to the camera so as to trigger the camera to photograph.
The content discrimination module may extract the feature from the stable frame to generate a feature vector of the key point. And comparing every two key points of the current stable frame with the key points of the last stable frame to match whether different key points exist between the current stable frame and the last stable frame. For example, the content determination module compares the feature vector of each key point in the current stable frame with the feature vector of each key point in the previous stable frame, so as to determine whether the key point of the current stable frame is the key point of the previous stable frame. If the key point of the current stable frame is not the key point of the previous stable frame, the key point is unique to the current stable frame and is not found in the previous stable frame, so that the fact that the content of the current stable frame changes relative to the content of the previous stable frame is determined, and the content judging module can output a photographing signal to the camera.
In this embodiment, the key points may be points that do not disappear due to illumination, scale, rotation, and other factors in the image frame, such as corner points, edge points, bright points in a dark area, and dark points in a bright area, where the dark area and the bright area are determined according to the brightness of the areas, and this embodiment is not limited how to distinguish the dark area from the bright area. And (4) searching the positions of the interest points in all scale spaces by extracting the key points, and identifying the interest points with unchanged scales and rotations as the key points.
Each key point possesses three information of position, scale and direction. A descriptor is established for each key point, and the key point is described by a group of vectors, so that the key point is not changed along with various changes, such as illumination change, visual angle change and the like. This descriptor contains not only the keypoints but also the pixels around the keypoints that contribute to them, and should be highly unique in order to increase the probability of correct matching of feature points. For example, the feature vector of each keypoint includes three information, i.e., the position, the scale, and the direction of the keypoint, and also includes the position, the scale, and the direction of other pixel points around the keypoint, which contribute to the keypoint, and the embodiment is not limited to the extraction of the keypoint and the feature vector of the keypoint.
The points to be explained here are: when the electronic device takes the first photo, the last stable frame based on which the content determination module is based may be empty, so that the user may manually control the camera to take the photo when taking the first photo, or after the state determination module inputs the current stable frame to the content determination module, the content determination module directly sends a photo signal to the camera, and the process of sending the photo signal again by the content determination module may be based on the process shown in fig. 6.
In this embodiment, the buffer memory may also store the contrast frame and the stable frame in other forms. For example, the buffer memory may store the contrast frame and the stable frame in the same storage space, and the contrast frame and the stable frame in the same storage space are distinguished by the tag. For example, a first label is assigned to the comparison frame, a second label is assigned to the stable frame, the first label and the second label may be any one or more combinations of numbers, letters, characters, and the like, and the first label and the second label are used as an attribute of the comparison frame and the stable frame. In this storage mode, the state discrimination module and the content discrimination module may extract the image frame from the buffer memory according to the attribute of the image frame, and assign a matching tag to the image frame as the attribute of the image frame when storing the image frame.
According to the photographing method provided by the embodiment, if the change of the content of the photographing object is detected, the camera is controlled to automatically photograph, and the intelligent degree is improved. The electronic equipment can also detect the state of the photographic object, and if the photographic object is in a moving state, the electronic equipment can prohibit the detection on whether the content changes, so that the photographic object can be photographed when in a static state, for example, the book can be excluded from being in page turning through state detection, and the photographing accuracy is improved. In addition, the state and the content of the photographed object are judged through image frame comparison, photographing can be performed after at least two stable frames, the influence of environments such as light rays on judgment is reduced, and accuracy is improved.
In addition, in the shooting process of the camera, a user may change a shooting object, for example, when shooting a book, the user moves the book out of a focusing area of the camera, and no object can be shot in the focusing area of the camera; for example, the user can change the book into an identity card. For this case, the electronic device can also identify the type of the photographic subject. For example, at least one of the state determination module and the content determination module can identify the type of the photo object, and if it is identified that the type of the photo object changes or the type of the photo object changes but the type of the photo object does not belong to a preset type, the camera is prohibited from taking a picture, and the electronic device exits the preview mode, where the preset type may be a document, a certificate, or the like, and the preset type is not limited in this embodiment.
The following description will take the electronic device as an example to scan a document, where the electronic device scans the document and takes a picture of the document to obtain an electronic version of the document, thereby facilitating the transmission and storage of the document. In the document scanning and photographing process, the state recognition module can judge the state of the document, and if the document is judged to be in motion (such as page turning, camera alignment and the like), the state recognition module can continue to acquire a comparison frame from the camera and continue to recognize the state.
If the state identification module identifies that the document is in a static state, the state identification module sends the current stable frame to the content identification module, and the content identification module judges whether the content changes; if the content is not changed, the document is not turned, the camera does not need to take a picture of the current content, and the content identification module does not send a picture taking signal to the camera; if the content changes, the document is turned over, the camera needs to take a picture of the current content, and the content identification module sends a picture taking signal to the camera.
In this scenario, the electronic device may further set other photographing conditions, for example, a type of the photographing object is used as the photographing condition, and if the type of the photographing object changes, the photographing is prohibited, for example, the content recognition module determines that the document is changed into the identification card, and the photographing is prohibited. For another example, if the type of the photographed object does not belong to the preset type, photographing is prohibited, if the preset type comprises a document and an identity card, and if the photographed object is changed from the document to the identity card, photographing is continued; and if the document is changed into a cup, shooting is forbidden. According to the embodiment, the shooting times of the camera are reduced by combining the type of the shot object, so that the occupation of the image frame on the storage space of the external memory is reduced.
Taking the case that the state recognition module recognizes the type of the photographic object, the state recognition module can recognize the type of the photographic object while recognizing the state of the photographic object, if the type of the photographic object is recognized to be changed or the type of the photographic object is recognized to be changed but the type of the photographic object is not a preset type, the state recognition module does not send a stable frame to the content judgment module any more, and can indicate that the content judgment module is in a closed state, such as indicating that the content judgment module is powered off, indicating that the content judgment module is in a low power consumption state, and indicating that the content judgment module is in a dormant state, thereby realizing automatic control of the state of the content judgment module, and saving resource consumption.
The content determination module may be in a state from the off state to the on state, where the type of the photographed object is a preset type or the camera is restarted, for example, the content determination module is awakened or powered on to be turned on, and the on condition of the content determination module is not limited in this embodiment, so that the content determination module can not only control automatic photographing, but also control the state of the content determination module according to the photographed object.
An optional structure of the electronic device is shown in fig. 1, and the electronic device may include: the processor is used for receiving a first operation of a user and displaying a preview interface of a camera application program, wherein the preview interface comprises a first photographing object; receiving a second operation of the user, wherein the second operation is used for taking the first picture; acquiring a first image frame after the first picture is taken; acquiring a second image frame, wherein the generation time of the first image frame is earlier than that of the second image frame; determining that the first photographing object changes according to the first image frame and the second image frame, and automatically photographing a second picture, wherein the first picture is different from the second picture; a memory for storing the first photograph and the second photograph.
In the embodiment, the first photographing object is determined to be changed according to the first image frame and the second image frame, the second photo is automatically photographed, a manual photographing link of a user is omitted, and the problem that the number of user operations is large in the photographing process is solved. And when the first photographing object is determined to be changed, the second picture is automatically photographed, the photographing time interval does not need to be set, the speed of the user for operating the first photographing object does not need to be concerned, and the intelligent degree is improved.
The first photo object is changed by the content of the first photo object itself, for example, the camera is switched from a first region aligned with the first photo object to a second region of the first photo object, or the content of the aligned region of the camera is changed by the operation of the user on the first photo object, for example, the content is changed along with the movement or turning over of the first photo object by the user, for example, the user adds content (such as writing characters and the like) to the first photo object.
In some examples, the processor is further configured to acquire a third image frame, a generation time of the third image frame being earlier than a generation time of the second image frame; and determining that the first photographic object is in a static state according to the second image frame and the third image frame, and triggering to acquire the first image frame, wherein the first image frame and the second image frame are obtained when the first photographic object is in the static state.
The present embodiment acquires the first image frame when it is determined that the first photographic subject is in a stationary state from the second image frame and the third image frame to determine whether the first photographic subject has changed from the first image frame and the second image frame. When the first photographing object is in the static state, the first photographing object is stable, and if the first photographing object is switched from the motion state to the static state, photographing of the first photographing object in the motion process can be eliminated, so that the content in the second photo is clearer, and the photographing accuracy is improved. For example, in the process of moving or turning over the first photo-object by the user, if the second photo is taken, the content in the second photo may be blurred or lost, so that in this embodiment, it is determined whether the first photo-object is changed when the first photo-object is in a static state, and the second photo is automatically taken when the first photo-object is in a static state and is changed, thereby improving the accuracy of photo-taking.
In some examples, a processor is configured to automatically take a second picture based on the first image frame and the second image frame determining that the content of the first photographic subject has changed but the type of the first photographic subject has not changed. And further controlling the automatic shooting in combination with the type to improve the shooting accuracy. The fact that the type of the first photographic subject is not changed means that the first photographic subject is still photographed, but the content of the first photographic subject changes, for example, the first photographic subject changes along with the operation of the user, for example, the user moves the first photographic subject. When the first photographed object is a document, the user can turn the document, and the operations can change the content of the first photographed object.
In some examples, the processor is further configured to determine to switch from the first photographic subject to the second photographic subject based on the first image frame and the second image frame, and inhibit the photographing. The second photographic subject can be other photographic subjects except the first photographic subject, and can also be blank (namely, the first photographic subject is removed), in this case, the shooting can be prohibited, and the intelligent degree is improved.
In some examples, the processor is configured to automatically take the second picture based on the first image frame and the second image frame determining that the first photographic subject is switched to the second photographic subject and that the type of the second photographic subject is a preset type. In the embodiment, automatic shooting is controlled through a preset type, and if the first shooting object is switched to a second shooting object of which the type is the preset type, automatic shooting can be performed, so that the intelligent degree is improved, and the operation of a user is reduced. Wherein the preset type can be a document, a certificate, etc.
In some examples, the processor is further configured to determine from the first image frame and the second image frame that the type of the second photographic subject is not a preset type, and inhibit photographing.
In this embodiment, the content of the first photographic subject is changed and the first photographic subject is switched to the second photographic subject, for example, the content of the first photographic subject is determined to be changed according to the first image frame and the second image frame, and the second photo is automatically taken; for another example, the second photo is automatically taken after the first photo object is switched to the second photo object according to the first image frame and the second image frame and the type of the second photo object is a preset type; but it is determined from the first image frame and the second image frame that the switching from the first photographic subject to the second photographic subject is made and the type of the second photographic subject is not a preset type, the photographing is prohibited.
In some examples, the processor is configured to prompt in a first prompting mode when automatically taking the second picture. The first prompting mode can be sound or light, and the second picture is automatically shot through prompting of the first prompting mode.
In some examples, a processor includes: a state discrimination module and a content discrimination module; the state distinguishing module is used for acquiring a third image frame from the first memory, and the generation time of the third image frame is earlier than that of the second image frame; the state judging module is used for sending the second image frame to the content judging module when the first photographing object is determined to be in a static state according to the second image frame and the third image frame; the content distinguishing module is used for acquiring a first image frame from the first storage, determining that a first photographing object changes according to the first image frame and a second image frame, and automatically photographing a second picture; the first image frame and the second image frame are image frames obtained when the first photographic subject is in a stationary state. The state discrimination module and the content discrimination module are two functional modules in the processor, and the state discrimination and the content discrimination are realized by writing program codes in the state discrimination module and the content discrimination module.
In some examples, the memory includes a first memory and a second memory; the content distinguishing module is also used for storing the second image frame in the first memory and the second photo in the second memory, and the storage time length of the photo in the second memory is longer than that of the image frame in the first memory. In this embodiment, the second image frame and the second photo are stored in different memories, the second photo is not affected by the reuse of the second image frame, and the storage time of the second photo relative to the second image frame is longer, so that the user can delete the second photo manually. For example, the first memory may be a buffer memory, the second memory may be an external memory, and the read-write speed of the buffer memory is greater than that of the external memory, so that the image frames can be acquired more quickly and the processing progress is accelerated.
In some examples, the state determination module or the content determination module is further configured to prohibit the photographing when the type of the switch from the first photographic subject to the second photographic subject or the second photographic subject is not the preset type.
It should be noted that all relevant contents of the steps involved in the above method embodiments may be referred to in the functional description of the processor, and are not described herein again.
The present embodiment further provides a chip system, including: the interface is used for receiving the code instruction and transmitting the code instruction to the at least one processor; at least one processor runs the code instructions to implement the above-described photographing method.
The embodiment also provides a computer-readable storage medium, which includes instructions that, when run on an electronic device, cause the electronic device to execute the above-mentioned photographing method.
The embodiment also provides a computer program product containing instructions, which when run on an electronic device, causes the electronic device to execute the above-mentioned photographing method.
The present embodiment also provides a control apparatus, which includes one or more processors, and a memory, where the memory is used to store one or more computer program codes, and the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the control apparatus executes the above-mentioned photographing method. The control device may be an integrated circuit IC or may be a system on chip SOC. The integrated circuit can be a general integrated circuit, a Field Programmable Gate Array (FPGA) or an Application Specific Integrated Circuit (ASIC).
Through the description of the foregoing embodiments, it will be clear to those skilled in the art that, for convenience and simplicity of description, only the division of the functional modules is illustrated, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the apparatus may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
In the several embodiments provided in this embodiment, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, each functional unit in each embodiment of the present embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present embodiment essentially or partially contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the method described in the embodiments. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (22)

1. A method of taking a picture, the method comprising:
receiving a first operation of a user, and displaying a preview interface of a camera application program, wherein the preview interface comprises a first photographing object;
receiving a second operation of the user, wherein the second operation is used for taking the first picture;
acquiring a first image frame after the first picture is taken;
acquiring a second image frame, wherein the generation time of the first image frame is earlier than that of the second image frame, and the first image frame and the second image frame are obtained when the first photographing object is in a static state;
and determining that the first photographing object changes according to the first image frame and the second image frame, and automatically photographing a second photo, wherein the first photo is different from the second photo.
2. The method of claim 1, further comprising:
acquiring a third image frame, wherein the generation time of the third image frame is earlier than that of the second image frame;
and determining that the first photographing object is in a static state according to the second image frame and the third image frame, and triggering to acquire a first image frame.
3. The method of claim 1 or 2, wherein said determining from said first image frame and said second image frame that said first photographic subject has changed, automatically taking a second photograph comprises:
and determining that the content of the first photographic object changes but the type of the first photographic object does not change according to the first image frame and the second image frame, and automatically taking a second picture.
4. The method of claim 3, further comprising: and determining to switch from the first photographic subject to a second photographic subject according to the first image frame and the second image frame, and forbidding photographing.
5. The method of claim 1 or 2, wherein said determining from said first image frame and said second image frame that said first photographic subject has changed, automatically taking a second photograph comprises:
and determining to switch from the first photographic object to a second photographic object according to the first image frame and the second image frame, wherein the type of the second photographic object is a preset type, and automatically shooting a second picture.
6. The method of claim 5, further comprising: and determining that the type of the second photographic object is not the preset type according to the first image frame and the second image frame, and prohibiting photographing.
7. The method according to claim 1 or 2, characterized in that the method further comprises: and when the second picture is automatically shot, prompting in a first prompting mode.
8. The method of claim 1, further comprising:
the state discrimination module acquires a third image frame from the first memory, wherein the generation time of the third image frame is earlier than that of the second image frame;
when the state distinguishing module determines that the first photographing object is in a static state according to the second image frame and the third image frame, the state distinguishing module sends the second image frame to a content distinguishing module, the content distinguishing module is used for acquiring the first image frame from the first memory, determining that the first photographing object changes according to the first image frame and the second image frame, and automatically photographing a second picture; the first image frame and the second image frame are image frames obtained when the first photographic subject is in a stationary state.
9. The method of claim 8, further comprising:
the content discrimination module stores the second image frame in the first memory;
and the content judging module stores the second photo in a second memory, wherein the storage time length of the photo in the second memory is longer than that of the image frame in the first memory.
10. The method according to claim 8 or 9, characterized in that the method further comprises:
and the state judging module or the content judging module detects that the type of the first photographing object switched to the second photographing object or the second photographing object is not a preset type, and the photographing is forbidden.
11. An electronic device, characterized in that the electronic device comprises:
the processor is used for receiving a first operation of a user and displaying a preview interface of a camera application program, wherein the preview interface comprises a first photographing object; receiving a second operation of the user, wherein the second operation is used for taking the first picture; acquiring a first image frame after the first picture is taken; acquiring a second image frame, wherein the generation time of the first image frame is earlier than that of the second image frame, and the first image frame and the second image frame are obtained when the first photographing object is in a static state; determining that the first photographing object changes according to the first image frame and the second image frame, and automatically photographing a second photo, wherein the first photo and the second photo are different;
a memory for storing the first photograph and the second photograph.
12. The electronic device of claim 11, wherein the processor is further configured to acquire a third image frame, wherein a generation time of the third image frame is earlier than a generation time of the second image frame; and determining that the first photographing object is in a static state according to the second image frame and the third image frame, and triggering to acquire a first image frame.
13. The electronic device of claim 11 or 12, wherein the processor is configured to automatically take a second picture based on the first image frame and the second image frame determining that the content of the first subject has changed but the type of the first subject has not changed.
14. The electronic device of claim 13, wherein the processor is further configured to determine to switch from the first subject to the second subject based on the first image frame and the second image frame, and to disable capture.
15. The electronic device of claim 11 or 12, wherein the processor is configured to automatically take a second picture based on the first image frame and the second image frame determining that the first photographic subject is switched to a second photographic subject and the type of the second photographic subject is a preset type.
16. The electronic device of claim 15, wherein the processor is further configured to determine from the first image frame and the second image frame that the type of the second photographic subject is not the preset type, and to prohibit the photographing.
17. The electronic device of claim 11 or 12, wherein the processor is configured to prompt in a first prompting manner when the second picture is automatically taken.
18. The electronic device of claim 11, wherein the processor comprises: a state discrimination module and a content discrimination module;
the state distinguishing module is used for acquiring a third image frame from the first memory, and the generation time of the third image frame is earlier than that of the second image frame;
the state judging module is used for sending the second image frame to the content judging module when the first photographing object is determined to be in a static state according to the second image frame and the third image frame;
the content distinguishing module is used for acquiring the first image frame from the first memory, determining that the first photographing object changes according to the first image frame and the second image frame, and automatically photographing a second picture; the first image frame and the second image frame are image frames obtained when the first photographic subject is in a stationary state.
19. The electronic device of claim 18, wherein the memory comprises a first memory and a second memory;
the content distinguishing module is further configured to store the second image frame in the first memory, and store the second photo in a second memory, where a storage duration of the photo in the second memory is longer than a storage duration of the image frame in the first memory.
20. The electronic device of claim 18 or 19, wherein the status determination module or the content determination module is further configured to detect that the type of switching from the first photo-object to the second photo-object or the second photo-object is not a preset type, and prohibit the photographing.
21. A chip system, comprising: the system comprises at least one processor and an interface, wherein the interface is used for receiving code instructions and transmitting the code instructions to the at least one processor; the at least one processor executes the code instructions to implement the method of taking a picture of any of claims 1 to 10.
22. A computer storage medium, characterized in that it comprises computer instructions which, when run on an electronic device, cause the electronic device to perform the photographing method according to any one of claims 1 to 10.
CN202110990401.6A 2021-08-26 2021-08-26 Photographing method, electronic device, chip system and storage medium Active CN113676670B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110990401.6A CN113676670B (en) 2021-08-26 2021-08-26 Photographing method, electronic device, chip system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110990401.6A CN113676670B (en) 2021-08-26 2021-08-26 Photographing method, electronic device, chip system and storage medium

Publications (2)

Publication Number Publication Date
CN113676670A CN113676670A (en) 2021-11-19
CN113676670B true CN113676670B (en) 2022-09-27

Family

ID=78546852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110990401.6A Active CN113676670B (en) 2021-08-26 2021-08-26 Photographing method, electronic device, chip system and storage medium

Country Status (1)

Country Link
CN (1) CN113676670B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106488128A (en) * 2016-10-27 2017-03-08 成都西纬科技有限公司 A kind of method and device of automatic camera
CN107241552A (en) * 2017-06-30 2017-10-10 广东欧珀移动通信有限公司 A kind of image acquiring method, device, storage medium and terminal
CN109117748A (en) * 2018-07-23 2019-01-01 安徽淘云科技有限公司 Page turning detection method and device
CN110443224A (en) * 2019-08-14 2019-11-12 广东小天才科技有限公司 Page turning detection method, device, electronic equipment and storage medium
CN112487888A (en) * 2020-11-16 2021-03-12 支付宝(杭州)信息技术有限公司 Image acquisition method and device based on target object

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5816511B2 (en) * 2011-10-04 2015-11-18 オリンパス株式会社 Image processing apparatus, endoscope apparatus, and operation method of image processing apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106488128A (en) * 2016-10-27 2017-03-08 成都西纬科技有限公司 A kind of method and device of automatic camera
CN107241552A (en) * 2017-06-30 2017-10-10 广东欧珀移动通信有限公司 A kind of image acquiring method, device, storage medium and terminal
CN109117748A (en) * 2018-07-23 2019-01-01 安徽淘云科技有限公司 Page turning detection method and device
CN110443224A (en) * 2019-08-14 2019-11-12 广东小天才科技有限公司 Page turning detection method, device, electronic equipment and storage medium
CN112487888A (en) * 2020-11-16 2021-03-12 支付宝(杭州)信息技术有限公司 Image acquisition method and device based on target object

Also Published As

Publication number Publication date
CN113676670A (en) 2021-11-19

Similar Documents

Publication Publication Date Title
US11743571B2 (en) Electronic device and operating method thereof
CN108513069B (en) Image processing method, image processing device, storage medium and electronic equipment
WO2020038087A1 (en) Method and apparatus for photographic control in super night scene mode and electronic device
WO2010128579A1 (en) Electron camera, image processing device, and image processing method
EP4135310A1 (en) Photographing method and device
WO2016004819A1 (en) Shooting method, shooting device and computer storage medium
CN108574803B (en) Image selection method and device, storage medium and electronic equipment
CN108259767B (en) Image processing method, image processing device, storage medium and electronic equipment
CN108259769B (en) Image processing method, image processing device, storage medium and electronic equipment
CN113051950A (en) Multi-code identification method and related equipment
CN108492266B (en) Image processing method, image processing device, storage medium and electronic equipment
CN117201930B (en) Photographing method and electronic equipment
US10373329B2 (en) Information processing apparatus, information processing method and storage medium for determining an image to be subjected to a character recognition processing
CN113676670B (en) Photographing method, electronic device, chip system and storage medium
CN108495038B (en) Image processing method, image processing device, storage medium and electronic equipment
KR20140134844A (en) Method and device for photographing based on objects
CN108769527B (en) Scene identification method and device and terminal equipment
CN108259768B (en) Image selection method and device, storage medium and electronic equipment
KR100648350B1 (en) Apparatus reversing character image and character image reversing method
CN117097985B (en) Focusing method, electronic device and computer readable storage medium
CN115623319B (en) Shooting method and electronic equipment
CN113749614B (en) Skin detection method and apparatus
CN117156293B (en) Photographing method and related device
CN115988339B (en) Image processing method, electronic device, storage medium, and program product
KR20100098117A (en) Method and apparatus for classifying an image using face recognition

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant