CN114363514A - Camera application control method and device and storage medium - Google Patents

Camera application control method and device and storage medium Download PDF

Info

Publication number
CN114363514A
CN114363514A CN202111638228.XA CN202111638228A CN114363514A CN 114363514 A CN114363514 A CN 114363514A CN 202111638228 A CN202111638228 A CN 202111638228A CN 114363514 A CN114363514 A CN 114363514A
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.)
Granted
Application number
CN202111638228.XA
Other languages
Chinese (zh)
Other versions
CN114363514B (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.)
Shanghai Chuanggong Telecom Technology Co Ltd
Original Assignee
Shanghai Chuanggong Telecom Technology 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 Shanghai Chuanggong Telecom Technology Co Ltd filed Critical Shanghai Chuanggong Telecom Technology Co Ltd
Priority to CN202111638228.XA priority Critical patent/CN114363514B/en
Publication of CN114363514A publication Critical patent/CN114363514A/en
Application granted granted Critical
Publication of CN114363514B publication Critical patent/CN114363514B/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/61Control of cameras or camera modules based on recognised objects
    • 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/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • 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

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, whether a preset switching condition is met or not is judged, if yes, the connection between the camera and the first application is disconnected, and the connection between the camera and the second application is controlled. According to the embodiment of the invention, on the premise that the preset switching condition is met currently, the connection between the first application and the camera is disconnected, and the camera is connected with the second application, so that the camera is seized. Therefore, the diversified use requirements of the user can be met, and the application of the camera is more flexible and convenient.

Description

Camera application control method and device and storage medium
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a camera application control method and apparatus, and a storage medium.
Background
The current Android architecture can only open one camera for use 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 opening failure is caused, namely the current process cannot be preempted. For example: in the WeChat video call process, the camera is being used, and at the moment, if a user wants to open the camera to take a snapshot, the camera is prompted to be occupied, and the purpose of free shooting cannot be achieved.
Disclosure of Invention
The invention aims to provide a camera application control method, a camera application control device and a storage medium, which are used for solving the problem that a camera cannot be preempted by other applications in the use process of the current application.
In order 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, whether a preset switching condition is met or not is judged, if yes, the connection between the camera and the first application is disconnected, and the connection between the camera and the second application is controlled.
Optionally, the preset switching condition includes: the current application scene meets the preset scene requirement; the parameters required by the preset scene comprise: at least one of a connection request occurrence time, a connection request occurrence place, a user expression or an action.
Optionally, the method for determining whether the current scene meets the preset scene requirement includes:
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 features with preset standard application scene features to obtain comparison results;
and judging whether the current application scene meets the preset scene requirement or not according to the comparison result.
Optionally, the method further includes: presetting corresponding preset scene requirements for each application according to the type of each application;
and specifically judging whether the current application scene meets the preset scene requirement corresponding to the second application or not when judging whether the current application meets the preset switching condition or not.
Optionally, the preset switching condition at least includes: the priority of the second application is higher than that of the first application, and/or the second application is already listed in a preset camera application white list, and/or the second application is not listed in a preset camera application black list.
Optionally, the method further includes: restoring the connection of the first application to the camera when the second application is disconnected from the camera.
Optionally, the method further includes: 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 the camera to be preempted by the second application.
Optionally, the method further includes:
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;
directly restoring the connection of the first application with the camera when the third application is disconnected from the camera.
A camera application control apparatus includes a memory and a processor;
the memory to store instructions;
the processor is configured to load the instructions in the memory to perform any one of the above camera application control methods.
A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of any of the above camera application control methods.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
according to the embodiment of the invention, on the premise that the preset switching condition is met currently, the connection between the first application and the camera is disconnected, and the camera is connected with the second application, so that the camera is seized. Therefore, 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 present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
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 technical solutions of the embodiments of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without any creative efforts shall fall within the protection scope of the embodiments of the present invention.
The terms "comprises" and "comprising," and any variations thereof, in the description and claims of embodiments of the present invention and the above-described drawings, are intended to cover non-exclusive inclusions, 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, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In order to solve the problem that other applications cannot seize 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, whether a preset switching condition is met or not is judged, if yes, the connection between the camera and the first application is disconnected, and the connection between the camera and the second application is controlled.
In order to meet different application requirements, the method and the device disconnect the first application from the camera and connect the camera with the second application on the premise that the preset switching condition is currently met, so that the camera is seized. Therefore, 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:
step 101, receiving a connection request of a second application on the premise that a first application and a camera are kept in a connection state.
And 102, judging whether the current application scene meets the preset scene requirement, if so, executing a step 103, and otherwise, executing a step 104.
And 103, disconnecting the camera from the first application and controlling the camera to be connected with the second application.
And 104, rejecting the connection request of the second application, and continuously keeping the connection of the first application and the camera.
In the embodiment of the present invention, the preset switching condition is set as: the current application scene meets the preset scene requirement. And when the preset scene requirement is met, the second application seizes the camera.
It should be noted that the application scenario may specifically refer to: the time when the second application initiates the connection request (which may be referred to as the connection request occurrence time) and/or the location where the terminal device including the camera is currently located (which may be referred to as the connection request occurrence location), and may also include various aspects such as user expressions/actions. Based on this, the embodiment of the present invention may limit the time and/or place and the like that other applications can execute to preempt the camera, so as to meet various personalized requirements of the user.
In an alternative embodiment, in a case that the application scene is set as a location, the method for determining whether the current scene meets a preset scene requirement (e.g., 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 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 or not according to the comparison result.
Taking the preset scene requirement as an indoor place as an example, part of indoor environment features can be extracted from an indoor environment in advance as standard application scene features during specific implementation, and then the current application scene features are directly compared with the standard application scene features to judge whether the current application scene meets the preset scene requirement.
Since the second application is allowed to apply the camera in some environments, the risk of privacy exposure or insecurity exists, the embodiment of the invention adopts a control mode of limiting the place, and can ensure good privacy and security to a certain extent. Meanwhile, the recognition mode of the current scene is a mode of carrying out automatic analysis processing on the current video and/or image picture acquired in real time based on the camera, so that the recognition accuracy is high, convenience and rapidness are realized, and the use experience of a user can be effectively improved.
In another optional implementation, in a case that the application scene is set to the user expression/action, the foregoing method may also be used to determine whether the current scene meets the preset scene requirement, where the difference is that the comparison features specifically are: the current user expression/action characteristics obtained from the current video and/or image frame, and the standard user expression/action characteristics. Based on this, the user can directly make a preset expression or action (for example, smiling or gesture) facing the camera while opening the second application, and the second application can be permitted to preempt the camera, so that the user operation is convenient and fast.
It should be noted that the present invention does not limit the specific types of the first application and the second application, and the first application and the second application are only used for identification of different applications. Indeed, there may be other applications (e.g., a third application) that need to preempt the camera in addition to the second application.
In order to increase flexibility, the camera application control method provided in the embodiment of the present invention may further include: and respectively setting corresponding preset scene requirements for each application in advance according to the type of each application. Based on this, for the second application, when judging whether the current application meets the preset switching condition, whether the current application scene meets the preset scene requirement corresponding to the second application is specifically judged. Therefore, personalized application scene limitation can be performed according to the application type of each application, and the application scene limitation is closer to the use requirements of users.
In addition, the preset switching condition may also include: the priority of the second application is higher than the priority of the first application, and/or the second application has been listed in a preset camera application white list, and/or the second application has not been listed in a preset camera application black list.
It can be understood that, in practical application, various different switching conditions may be applied individually, or may be applied in combination in any manner, and this is not limited in the embodiment of the present invention.
In another optional implementation manner, the method for controlling a camera application provided in the embodiment of the present invention may further include:
restoring the connection of the first application with 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 be connected with the second application, the method may further include: displaying a switching reminding popup window on a display interface, and inquiring whether the user accepts the camera to be seized by the second application;
and/or judging whether a preset switching condition is met or not when a connection request of a third application is received in a state that the camera is connected with the second application, if so, disconnecting the camera from the second application and controlling the camera to be connected with the third application; therefore, 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 previous application and the camera can also 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 to store instructions; the processor is configured to load the instructions in the memory to perform the camera application control method as described in 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.
It will be understood by those skilled in the art that all or part of the steps of the camera application control method described above may be implemented by instructions or by instructions controlling associated hardware, and the instructions may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present invention further provide a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in the sensor control method provided by the embodiments of the present invention.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. 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, whether a preset switching condition is met or not is judged, if yes, the connection between the camera and the first application is disconnected, and the connection between the camera and the second application is controlled.
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 required by the preset scene comprise: at least one of a connection request occurrence time, a connection request occurrence place, a user expression or an action.
3. The camera application control method according to claim 2, wherein the method for determining whether the current scene meets the preset scene requirement includes:
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 features with preset standard application scene features to obtain comparison results;
and judging whether the current application scene meets the preset scene requirement or not according to the comparison result.
4. The camera application control method according to claim 2, further comprising: presetting corresponding preset scene requirements for each application according to the type of each application;
and specifically judging whether the current application scene meets the preset scene requirement corresponding to the second application or not when judging whether the current application meets the preset switching condition or not.
5. The camera application control method according to claim 1, wherein the preset switching condition at least includes: the priority of the second application is higher than that of the first application, and/or the second application is already listed in a preset camera application white list, and/or the second application is not listed in a preset camera application black list.
6. The camera application control method according to claim 1, further comprising: restoring the connection of the first application to the camera when the second application is disconnected from the camera.
7. The camera application control method according to claim 1, 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 the camera to be preempted by the second application.
8. The camera application control method according to claim 1, further comprising:
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;
directly restoring the connection of the first application with the camera when the third application is disconnected from the camera.
9. The camera application control device is characterized by comprising a memory and a processor;
the memory to store instructions;
the processor, configured to load the instructions in the memory to perform the camera application control method of any one of claims 1 to 8.
10. 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 according to any one of claims 1 to 8.
CN202111638228.XA 2021-12-29 2021-12-29 Camera application control method and device and storage medium Active CN114363514B (en)

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 true CN114363514A (en) 2022-04-15
CN114363514B 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 (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100231754A1 (en) * 2009-03-11 2010-09-16 Wang Shaolan 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
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
US20210153130A1 (en) * 2018-08-22 2021-05-20 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Occupation Control Method for Camera Application, Terminal Device, and Storage Medium
WO2021169125A1 (en) * 2020-02-24 2021-09-02 聚好看科技股份有限公司 Display device and control method
US20210390171A1 (en) * 2019-01-23 2021-12-16 Huawei Technologies Co., Ltd. Method for Managing Application Permission and Electronic Device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100231754A1 (en) * 2009-03-11 2010-09-16 Wang Shaolan 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
US20210153130A1 (en) * 2018-08-22 2021-05-20 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Occupation Control Method for Camera Application, Terminal Device, and Storage Medium
US20210390171A1 (en) * 2019-01-23 2021-12-16 Huawei Technologies Co., Ltd. Method for Managing Application Permission and Electronic Device
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
CN114363514B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
US20180348999A1 (en) Method and Apparatus for Taking Screenshot of Screen of Application in Mobile Terminal
CN109408207B (en) Microservice access control method, microservice access control device and storage medium
CN107133352B (en) Photo display method and device
US11232180B2 (en) Face authentication system, face authentication method, biometrics authentication system, biometrics authentication method, and storage medium
WO2022007854A1 (en) Screen recording method and screen recording system
CN111240817A (en) Resource scheduling method, resource scheduling apparatus, and storage medium
EP3647970A1 (en) Method and apparatus for sharing information
CN115361184A (en) Privacy protection method and related product
CN112083988A (en) Screen refresh rate control method, mobile terminal and computer readable storage medium
CN107404616B (en) Photographing method for adjusting light sensitivity of camera, mobile terminal and storage device
CN114363514A (en) Camera application control method and device and storage medium
CN111567034A (en) Exposure compensation method, device and computer readable storage medium
CN110809166B (en) Video data processing method and device and electronic equipment
CN113934331A (en) Information processing method, device and storage medium
CN109491655B (en) Input event processing method and device
CN112333541A (en) Method, device and equipment for controlling startup and shutdown of display terminal and readable storage medium
CN114501136B (en) Image acquisition method, device, mobile terminal and storage medium
CN111164569B (en) Filter switching method and filter switching system based on intelligent terminal
CN112118414B (en) Video session method, electronic device, and computer storage medium
CN106910448B (en) Display screen refresh rate control method and system based on mobile terminal
CN110221813A (en) Data connection establishing method, device, storage medium and the electronic equipment of application
CN113938742B (en) Control method, system, equipment and storage medium for automatic screen-throwing content playing
CN115611105A (en) Big data-based user management analysis system and method
CN113126741B (en) Mobile terminal frame rate control method, device, computer equipment and storage medium
US20220053077A1 (en) Method for detecting the completion of a telephone call initiated from a web browser of a mobile communication device

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