CN114363514B - Camera application control method and device and storage medium - Google Patents
Camera application control method and device and storage medium Download PDFInfo
- Publication number
- CN114363514B CN114363514B CN202111638228.XA CN202111638228A CN114363514B CN 114363514 B CN114363514 B CN 114363514B CN 202111638228 A CN202111638228 A CN 202111638228A CN 114363514 B CN114363514 B CN 114363514B
- Authority
- CN
- China
- Prior art keywords
- application
- camera
- preset
- scene
- control method
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/61—Control of cameras or camera modules based on recognised objects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/61—Control of cameras or camera modules based on recognised objects
- H04N23/611—Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/62—Control of parameters via user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Studio Devices (AREA)
Abstract
The invention relates to the technical field of electronics, and discloses a camera application control method and device and a storage medium. A camera application control method, comprising: when a connection request of a second application is received in a state that a camera is connected with a first application, judging whether a preset switching condition is met currently, if so, disconnecting the camera from the first application, and controlling the camera to be connected with the second application. The embodiment of the invention disconnects the first application from the camera and connects the camera with the second application on the premise that the preset switching condition is met currently, so as to realize the preemption of the camera. Thus, the diversified use requirements of the user can be met, and the application of the camera is more flexible and convenient.
Description
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a method and apparatus for controlling camera applications, and a storage medium.
Background
The existing Android architecture can only be opened and used by one application at the same time, and when other applications want to open the camera, the camera is prompted to be occupied, so that the opening fails, namely the current process cannot be preempted. For example: in the process of the WeChat video call, the camera is being used, and at the moment, a user wants to open the camera to take a picture, the camera is prompted to be occupied, and the purpose of free photographing cannot be achieved.
Disclosure of Invention
The invention aims to provide a camera application control method and device and a storage medium, so as to solve the problem that a camera cannot be preempted by other applications in the current application use process.
To achieve the purpose, the invention adopts the following technical scheme:
a camera application control method, comprising:
when a connection request of a second application is received in a state that a camera is connected with a first application, judging whether a preset switching condition is met currently, if so, disconnecting the camera from the first application, and controlling the camera to be connected with the second application.
Optionally, the preset switching condition includes: the current application scene meets the preset scene requirement; the parameters of the preset scene requirements include: at least one of connection request occurrence time, connection request occurrence place, user expression or action.
Optionally, the method for judging whether the current scene meets the preset scene requirement comprises the following steps:
intercepting a current video and/or image picture of the camera;
analyzing the current video and/or image picture, and identifying the current application scene characteristics;
comparing the current application scene characteristics with preset standard application scene characteristics to obtain a comparison result;
and judging whether the current application scene meets the preset scene requirement according to the comparison result.
Optionally, the method further comprises: corresponding preset scene requirements are set for each application according to the type of each application in advance;
and for the second application, when judging whether the current preset switching condition is met or not, specifically judging whether the current application scene meets the preset scene requirement corresponding to the second application or not.
Optionally, the preset switching conditions at least include: the second application has a higher priority than the first application and/or the second application has been blacklisted in a preset camera application white list and/or the second application has not been blacklisted in a preset camera application black list.
Optionally, the method further comprises: and restoring the connection of the first application and the camera when the second application is disconnected from the camera.
Optionally, the method further comprises: before disconnecting the camera from the first application and controlling the camera to be connected with the second application, displaying a switching reminding popup window on a display interface for inquiring whether a user accepts that the camera is preempted by the second application.
Optionally, the method further comprises:
when a connection request of a third application is received in a state that the camera is connected with the second application, judging whether the preset switching condition is met, if so, disconnecting the camera from the second application, and controlling the camera to be connected with the third application;
and directly restoring the connection of the first application and the camera when the third application is disconnected from the camera.
A camera application control apparatus comprising a memory and a processor;
the memory is used for storing instructions;
the processor is configured to load the instructions in the memory to execute the camera application control method described in any one of the above.
A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the camera application control method of any of the above.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the embodiment of the invention disconnects the first application from the camera and connects the camera with the second application on the premise that the preset switching condition is met currently, so as to realize the preemption of the camera. Thus, the diversified use requirements of the user can be met, and the application of the camera is more flexible and convenient.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained from these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a flowchart of a camera application control method according to an embodiment of the present invention.
Detailed Description
In order to make the embodiments of the present invention better understood by those skilled in the art, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the embodiments of the present invention.
The terms "comprises" and "comprising," and any variations thereof, in the description of embodiments of the invention and in the claims and above-described figures, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
In order to solve the problem that other applications cannot preempt a camera in the process of using the camera by the current application in the prior art, the invention provides a camera application control method, which comprises the following steps:
when a connection request of a second application is received in a state that the camera is connected with the first application, judging whether a preset switching condition is met currently, if so, disconnecting the camera from the first application, and controlling the camera to be connected with the second application.
In order to meet different application requirements, the invention disconnects the first application from the camera and connects the camera from the second application on the premise that preset switching conditions are met currently, so as to realize preemption of the camera. Thus, the diversified use requirements of the user can be met, and the application of the camera is more flexible and convenient.
Referring to fig. 1, an embodiment of the present invention provides a camera application control method, including the steps of:
step 101, receiving a connection request of a second application on the premise that the first application and the camera keep a connection state.
Step 102, judging whether the current application scene meets the preset scene requirement, if yes, executing step 103, and if not, executing step 104.
Step 103, disconnecting the camera from the first application and controlling the camera to connect with the second application.
Step 104, rejecting the connection request of the second application, and continuing to keep the first application connected with the camera.
In the embodiment of the invention, the preset switching conditions are set as follows: the current application scene meets the preset scene requirement. And when the preset scene requirement is met, preempting the camera by the second application is executed.
It should be noted that, the application scenario may specifically refer to: the current time when the second application initiates the connection request (may be referred to as the connection request occurrence time), and/or the place where the terminal device including the camera is currently located (may be referred to as the connection request occurrence place), and may also include aspects of user expression/action, and the like. Based on the above, the embodiment of the invention can limit the time and/or place and the like for executing the preemption of other applications to the camera, thereby meeting various personalized requirements of users.
In an alternative embodiment, in the case that the application scene is set as the location, the method for judging whether the current scene meets the preset scene requirement (for example, indoor/outdoor, public/private) may include:
intercepting a current video and/or image picture of a camera;
analyzing the current video and/or image picture, and identifying the characteristics of the current application scene;
comparing the current application scene characteristics with preset standard application scene characteristics to obtain a comparison result;
and judging whether the current application scene meets the preset scene requirement according to the comparison result.
Taking the setting of the preset scene requirement as an indoor place as an example, when the method is implemented, part of indoor environment characteristics can be extracted from the indoor environment in advance to serve as standard application scene characteristics, and the current application scene characteristics are directly compared with the standard application scene characteristics to judge whether the current application scene meets the preset scene requirement or not.
The second application is allowed to have the risk of exposing privacy or unsafe in certain environments, so that the embodiment of the invention adopts a control mode of limiting places, and can meet the requirement of guaranteeing good privacy and safety to a certain extent. Meanwhile, the identification mode of the current scene is a mode of automatically analyzing and processing the current video and/or image pictures acquired in real time based on the camera, so that the identification accuracy is high, convenience and quickness are realized, and the use experience of a user can be effectively improved.
In another optional implementation manner, the above method may also be adopted to determine whether the current scene meets the preset scene requirement when the application scene is set as the user expression/action, where the difference is that the compared features are specifically as follows: the current user expression/motion features obtained from the current video and/or image frames are identical to the standard user expression/motion features. Based on the method, the user can directly make a preset expression or action (such as smile and gesture) facing the camera while starting the second application, so that the second application can be permitted to preempt the camera, and the user operation is convenient and quick.
It should be noted that the specific types of the first application and the second application are not limited in the present invention, and the first application and the second application are only used for identification of different applications. In fact, there may be other applications (e.g., a third application) in addition to the second application that require preempting the camera.
In order to increase flexibility, the method for controlling camera application provided by the embodiment of the invention may further include: and respectively setting corresponding preset scene requirements for each application according to the type of each application in advance. Based on the above, for the second application, when judging whether the preset switching condition is met currently, specifically judging whether the current application scene meets the preset scene requirement corresponding to the second application. Therefore, personalized application scene limitation can be carried out according to the application types of each application, and the application scene limitation is closer to the use requirements of users.
In addition, the preset switching conditions may also include: the second application has a higher priority than the first application and/or the second application has been blacklisted in a preset camera application white list and/or the second application has not been blacklisted in a preset camera application white list.
It can be understood that in practical application, various different switching conditions may be applied separately, or may be applied in combination in any manner, which is not limited in the embodiment of the present invention.
In still another optional implementation manner, the camera application control method provided by the embodiment of the present invention may further include:
restoring the connection of the first application and the camera when the second application is disconnected from the camera;
and/or, before disconnecting the camera from the first application and controlling the camera to connect with the second application, may further include: displaying a switching reminding popup window on the display interface for inquiring whether the user accepts the preemption of the camera by the second application;
and/or when a connection request of the third application is received in a state that the camera is connected with the second application, judging whether a preset switching condition is met, if so, disconnecting the camera from the second application, and controlling the camera to be connected with the third application; based on the above, when the third application is disconnected from the camera, the connection between the first application and the camera can be directly restored, and the connection between the first application and the camera can be restored step by step.
Based on the same inventive concept, the embodiment of the invention also provides a camera application control device, which further comprises a memory and a processor; the memory is used for storing instructions; the processor is configured to load the instructions in the memory to perform the camera application control method according to any one of the above.
The camera application device can be any equipment with a camera, such as a mobile phone, a notebook computer and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the camera application control method described above may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present invention further provides a storage medium storing a plurality of instructions that can be loaded by a processor to perform the steps in the sensor control method provided by the embodiment of the present invention.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (9)
1. A camera application control method, characterized by comprising:
when a connection request of a second application is received in a state that a camera is connected with a first application, judging whether a preset switching condition is met currently, if so, disconnecting the camera from the first application, and controlling the camera to be connected with the second application;
when a connection request of a third application is received in a state that the camera is connected with the second application, judging whether the preset switching condition is met, if so, disconnecting the camera from the second application, and controlling the camera to be connected with the third application;
and directly restoring the connection of the first application and the camera when the third application is disconnected from the camera.
2. The camera application control method according to claim 1, wherein the preset switching condition includes: the current application scene meets the preset scene requirement; the parameters of the preset scene requirements include: at least one of connection request occurrence time, connection request occurrence place, user expression or action.
3. The camera application control method according to claim 2, wherein the method of judging whether the current scene satisfies a preset scene requirement comprises:
intercepting a current video and/or image picture of the camera;
analyzing the current video and/or image picture, and identifying the current application scene characteristics;
comparing the current application scene characteristics with preset standard application scene characteristics to obtain a comparison result;
and judging whether the current application scene meets the preset scene requirement according to the comparison result.
4. The camera application control method according to claim 2, characterized by further comprising: corresponding preset scene requirements are set for each application according to the type of each application in advance;
and for the second application, when judging whether the current preset switching condition is met or not, specifically judging whether the current application scene meets the preset scene requirement corresponding to the second application or not.
5. The camera application control method according to claim 1, wherein the preset switching conditions include at least: the second application has a higher priority than the first application and/or the second application has been blacklisted in a preset camera application white list and/or the second application has not been blacklisted in a preset camera application black list.
6. The camera application control method according to claim 1, characterized by further comprising: and restoring the connection of the first application and the camera when the second application is disconnected from the camera.
7. The camera application control method according to claim 1, characterized by further comprising: before disconnecting the camera from the first application and controlling the camera to be connected with the second application, displaying a switching reminding popup window on a display interface for inquiring whether a user accepts that the camera is preempted by the second application.
8. A camera application control apparatus comprising a memory and a processor;
the memory is used for storing instructions;
the processor is configured to load the instructions in the memory to perform the camera application control method of any one of claims 1 to 7.
9. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps in the camera application control method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111638228.XA CN114363514B (en) | 2021-12-29 | 2021-12-29 | Camera application control method and device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111638228.XA CN114363514B (en) | 2021-12-29 | 2021-12-29 | Camera application control method and device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114363514A CN114363514A (en) | 2022-04-15 |
CN114363514B true CN114363514B (en) | 2024-03-12 |
Family
ID=81102456
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111638228.XA Active CN114363514B (en) | 2021-12-29 | 2021-12-29 | Camera application control method and device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114363514B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020159032A1 (en) * | 2019-01-30 | 2020-08-06 | 삼성전자 주식회사 | Electronic device for providing images obtained by camera to plurality of applications, and method for operating same |
CN111614891A (en) * | 2020-04-24 | 2020-09-01 | 深圳传音控股股份有限公司 | Camera application function switching method, terminal and computer readable storage medium |
WO2021169125A1 (en) * | 2020-02-24 | 2021-09-02 | 聚好看科技股份有限公司 | Display device and control method |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8284267B2 (en) * | 2009-03-11 | 2012-10-09 | O2Micro Inc. | Virtual camera for sharing a physical camera |
US20180146139A1 (en) * | 2016-11-18 | 2018-05-24 | Microsoft Technology Licensing, Llc | Dynamically switching control sharing of camera resources |
CN109144728B (en) * | 2018-08-22 | 2020-11-06 | Oppo广东移动通信有限公司 | Occupancy control method and device for camera application |
CN112352239A (en) * | 2019-01-23 | 2021-02-09 | 华为技术有限公司 | Application permission management method and electronic equipment |
-
2021
- 2021-12-29 CN CN202111638228.XA patent/CN114363514B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020159032A1 (en) * | 2019-01-30 | 2020-08-06 | 삼성전자 주식회사 | Electronic device for providing images obtained by camera to plurality of applications, and method for operating same |
WO2021169125A1 (en) * | 2020-02-24 | 2021-09-02 | 聚好看科技股份有限公司 | Display device and control method |
CN111614891A (en) * | 2020-04-24 | 2020-09-01 | 深圳传音控股股份有限公司 | Camera application function switching method, terminal and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114363514A (en) | 2022-04-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20220092296A1 (en) | Method for updating data, electronic device, and storage medium | |
KR100654783B1 (en) | Image distribution method | |
CN110049324B (en) | Video encoding method, system, device, and computer-readable storage medium | |
CN107094094B (en) | Application networking method and device and terminal | |
US10142414B2 (en) | Method and device for sharing picture | |
US20200026837A1 (en) | Face authentication system, face authentication method, biometrics authentication system, biometrics authentication method, and storage medium | |
EP3125615A1 (en) | Method, apparatus and system for smart device to access router | |
EP3382527A1 (en) | Method and apparatus for managing a shared storage system | |
CN114371896B (en) | Prompting method, device, equipment and medium based on document sharing | |
CN112217990B (en) | Task scheduling method, task scheduling device and storage medium | |
US20180343346A1 (en) | Method and device for communication processing, and storage medium | |
CN115361184A (en) | Privacy protection method and related product | |
CN114363514B (en) | Camera application control method and device and storage medium | |
CN107404616B (en) | Photographing method for adjusting light sensitivity of camera, mobile terminal and storage device | |
EP3863330A1 (en) | Network switching to a target wireless access network capable of establishing a connection with an ims network | |
CN111567034A (en) | Exposure compensation method, device and computer readable storage medium | |
EP3641463A1 (en) | Method and apparatus for transmitting cache state | |
US11089537B2 (en) | Method and device for broadcasting system information for supporting network communication of terminal | |
US20170220401A1 (en) | Method, device, and computer-readable storage medium for calling a process | |
CN109491655B (en) | Input event processing method and device | |
CN113934331A (en) | Information processing method, device and storage medium | |
CN111263104A (en) | Window display method and device and storage medium | |
CN107483605B (en) | File downloading method and device and storage medium | |
CN112989934B (en) | Video analysis method, device and system | |
CN112492568B (en) | Network information processing method, device, mobile terminal and storage medium |
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 |