Nothing Special   »   [go: up one dir, main page]

CN109068059A - Method for invoking camera, mobile terminal and storage medium - Google Patents

Method for invoking camera, mobile terminal and storage medium Download PDF

Info

Publication number
CN109068059A
CN109068059A CN201810980731.5A CN201810980731A CN109068059A CN 109068059 A CN109068059 A CN 109068059A CN 201810980731 A CN201810980731 A CN 201810980731A CN 109068059 A CN109068059 A CN 109068059A
Authority
CN
China
Prior art keywords
camera
information
calling
mobile terminal
application program
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
CN201810980731.5A
Other languages
Chinese (zh)
Other versions
CN109068059B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810980731.5A priority Critical patent/CN109068059B/en
Publication of CN109068059A publication Critical patent/CN109068059A/en
Application granted granted Critical
Publication of CN109068059B publication Critical patent/CN109068059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Studio Devices (AREA)
  • Telephone Function (AREA)

Abstract

The application is applicable to the technical field of communication, and provides a method for calling a camera, a mobile terminal and a computer readable storage medium, wherein the method comprises the following steps: monitoring whether an application program sends a calling request for calling a camera or not in the mobile terminal, if so, generating first information based on the calling request, wherein the data frame format of the first information is a data frame format supported by the camera of the mobile terminal, and sending the first information to the camera to indicate the camera to return a corresponding preview image according to the first information.

Description

A kind of method, mobile terminal and storage medium calling camera
Technical field
The application belongs to field of communication technology more particularly to a kind of method, mobile terminal and computer for calling camera can Read storage medium.
Background technique
Android 5.0 starts to application programming interface of taking pictures (Application Programming Interface, API) completely new design has been carried out, the function that android system is taken pictures not only greatly improved in newly-increased API, The photo of RAW format can also be supported to export, even allow for focal modes, exposure mode, the shutter etc. of application program adjustment camera It takes pictures parameter.
However, the API with camera upgrades, the framework of camera is also updated, thus will appear on mobile terminal There is incompatible problem when the API for calling camera carries out image preview or takes pictures in the application program of installation.
Summary of the invention
In view of this, the embodiment of the present application provides and a kind of call the method for camera, terminal device and computer-readable deposit Storage media, to solve the problems, such as that current application program is incompatible when calling camera to carry out image preview or take pictures.
The first aspect of the embodiment of the present application provides a kind of method for calling camera, comprising:
Whether monitor has application program to issue the call request for calling camera in the mobile terminal;
If monitoring to there is application program to issue the call request for calling camera in the mobile terminal, it is based on the calling Request generates the first information, the data frame lattice that the data frame format of the first information is supported by the camera of the mobile terminal Formula;
The first information is sent to the camera, to indicate that the camera returns accordingly according to the first information Preview image.
The second aspect of the embodiment of the present application provides a kind of mobile terminal, comprising:
Call request monitoring unit, for monitoring the tune for whether thering is application program to issue calling camera in the mobile terminal With request;
First information generation unit, if the tune for monitoring to there is application program to issue calling camera in the mobile terminal With request, then the first information is generated based on the call request, the data frame format of the first information is the mobile terminal The data frame format supported of camera;
First information transmission unit, for the first information to be sent to the camera, with indicate the camera according to The first information returns to corresponding preview image.
The third aspect of the embodiment of the present application provides a kind of mobile terminal, including memory, processor and is stored in In the memory and the computer program that can run on the processor, when the processor executes the computer program The step of realizing the method that the embodiment of the present application first aspect provides.
The fourth aspect of the embodiment of the present application provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and the computer program realizes the embodiment of the present application when being executed by one or more processors On the one hand the step of the method provided.
5th aspect of the embodiment of the present application provides a kind of computer program product, and the computer program product includes Computer program, the computer program realize that the embodiment of the present application first aspect provides when being executed by one or more processors The method the step of.
The embodiment of the present application provides a kind of method for calling camera, is to monitor in the mobile terminal to be using middleware No to have application program to issue the call request for calling camera, if monitoring, having application program to issue in the mobile terminal calls phase The call request of machine, then generate the first information based on the call request, and the data frame format of the first information is the shifting The data frame format that the camera of dynamic terminal is supported, is sent to the camera for the first information, to indicate the camera root Return to corresponding preview image according to the first information, due to middleware provided by the embodiments of the present application can monitor it is described There is application program to issue the call request for calling camera in mobile terminal, converts the movement for the call request of application program The first information that the camera of terminal is supported indicates that the camera returns accordingly according to the first information by the first information Preview image, so even if after camera system upgraded, may the interface after upgrading can not identify some application programs hairs Call request out, however, it is possible to which converting the camera for the unrecognized call request of camera system by middleware can The first information of identification, so that camera system can return to corresponding preview image according to the first information, to solve The application program problem incompatible when calling camera to carry out image preview or take pictures after the system upgrade of camera.
Detailed description of the invention
It in order to more clearly explain the technical solutions in the embodiments of the present application, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only some of the application Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is a kind of implementation process schematic diagram of method for calling camera provided by the embodiments of the present application;
Fig. 2 is the implementation process schematic diagram of another method for calling camera provided by the embodiments of the present application;
Fig. 3 is the implementation process schematic diagram of another method for calling camera provided by the embodiments of the present application;
Fig. 4 is a kind of schematic block diagram of mobile terminal provided by the embodiments of the present application;
Fig. 5 is the schematic block diagram of another mobile terminal provided by the embodiments of the present application.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, so as to provide a thorough understanding of the present application embodiment.However, it will be clear to one skilled in the art that there is no these specific The application also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, so as not to obscure the description of the present application with unnecessary details.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " instruction is described special Sign, entirety, step, operation, the presence of element and/or component, but be not precluded one or more of the other feature, entirety, step, Operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this present specification merely for the sake of description specific embodiment And be not intended to limit the application.As present specification and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in present specification and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In order to illustrate technical solution described herein, the following is a description of specific embodiments.
Fig. 1 is a kind of implementation process schematic diagram of method for calling camera provided by the embodiments of the present application, as shown in the figure should Method may comprise steps of:
Whether step S101, monitoring has application program to issue the call request for calling camera in the mobile terminal.
In the embodiment of the present application, multiple applications for having and calling camera permission may be mounted in the mobile terminals such as mobile phone Program, for example, some application programs with barcode scanning function, also some application programs with U.S. face camera function, these For application program in order to, be required to call in actual use the camera in mobile terminal, the camera of mobile terminal includes hard Part mould group and software systems, after the software systems of camera are upgraded, possible some API can also change accordingly, in this way, It is possible to some application programs occur after the software system updating of camera camera or application program can not be called to want to continue Camera can be called just to need to upgrade itself in order to which camera can be called.However, the publisher of some application programs May not without the software systems of time update itself, so, it is necessary to middleware is provided, by middleware, even if not risen The application program of grade can also call the camera after upgrading.In order to realize the above functions, middleware needs to monitor described mobile whole Whether there is application program to issue the call request for calling camera in end.
Step S102, if monitoring to there is application program to issue the call request for calling camera, base in the mobile terminal The first information is generated in the call request, the data frame format of the first information is supported by the camera of the mobile terminal Data frame format.
In the embodiment of the present application, if monitoring there is application program to issue the calling for calling camera in the mobile terminal Request, then can intercept the call request, can also be without intercepting, for example, judging the number of the call request Whether the data frame format supported according to the camera of frame format and the mobile terminal consistent, if unanimously, without intercept, also without The first information for needing middleware to be supported the camera that call request is converted into the mobile terminal can be into if inconsistent Row intercepts, and generates the first information based on the call request, and certainly, the data format of the first information of generation is the movement The data frame format that the camera of terminal is supported.
The first information is sent to the camera by step S103, to indicate the camera according to the first information Return to corresponding preview image.
In the embodiment of the present application, the middleware convert that the camera can be supported for the call request After one information, so that it may replace call request to be sent to the camera first information, camera is receiving can identify the After one information, so that it may return to corresponding preview image according to the first information, camera can return to the preview image To the middleware, the preview image is returned to the application program for calling the camera, application program by the middleware again Side is after receiving the preview image, so that it may carry out the relevant operations such as barcode scanning identification, U.S. face processing.Certainly, it actually answers In, the preview image can also be directly returned to the currently application program in front stage operation by the camera, thus without Need middleware that the preview image is indirectly sent to the application program for calling the camera as transfer.
Middleware provided by the embodiments of the present application can have application program to issue calling in monitoring the mobile terminal The call request of camera, the first information that the camera that the call request of application program is converted into the mobile terminal is supported, Indicate that the camera returns to corresponding preview image according to the first information by the first information, so even if camera system into After row upgrading, the interface after may upgrading can not identify the call request that some application programs issue, however, it is possible in passing through Between part by the unrecognized call request of camera system convert the identifiable first information of the camera, thus camera system energy It is enough that corresponding preview image is returned to according to the first information, it is being adjusted to solve application program after the system upgrade of camera Incompatible problem when being carried out image preview with camera or taken pictures.
Fig. 2 is the implementation process schematic diagram of another method for calling camera provided by the embodiments of the present application, as shown in the figure This method may comprise steps of:
Whether step S201, monitoring has application program to issue the call request for calling camera in the mobile terminal.
Step S201 is consistent with the content of step S101, specifically can refer to the description of step S101, details are not described herein.
Step S202 is obtained if monitoring to have application program to issue the call request for calling camera in the mobile terminal The configuration file for issuing the application program of the call request is taken, and the application program and institute are determined based on the configuration file Whether the camera for stating mobile terminal is compatible with.
Step S203 is based on the call request if the application program and the camera of the mobile terminal are incompatible Generate the first information.
In the embodiment of the present application, embodiment illustrated in fig. 1 describe can by comparing call request data frame format The data frame format supported with the camera, to determine whether to convert call request to the first information, the embodiment of the present application The configuration file of the application program of the call request can be issued by obtaining, and is answered based on described in configuration file determination It is whether compatible with program with the camera of the mobile terminal, without converting the first information for call request if compatible.If no It is compatible, then it needs to generate the first information based on the call request.
Certainly, in practical application, there can also be the configuration file for the application program for calling camera permission with periodic scanning, it is raw At the application list for needing to convert call request to the first information, can once be updated at interval of preset time. In this way, determining if monitoring to there is application program to issue the call request for calling camera in the mobile terminal and issuing the calling The application program of request whether in described the application list can, be if issuing the application program of the call request It is no that the call request is then generated into the first information in described the application list, if in lists, not then being not necessarily to described Call request is handled, and camera can identify the call request.
It is described to include: based on the call request generation first information as the another embodiment of the application
Based on the call request, from obtaining preset shooting in the call request of the application program or in configuration file Parameter, and the first information is generated according to the preset acquisition parameters, the first information is used to indicate the camera according to institute The hardware parameter that preset acquisition parameters modify the camera is stated, and is returned and the matched preview image of preset acquisition parameters.
In the embodiment of the present application, since different application programs is based on respective functional requirement, it may be desirable to which setting is different Acquisition parameters, for example, the acquisition parameters of the acquisition parameters of barcode scanning software and U.S. face software will be different, these acquisition parameters are logical It is often stored in configuration file, corresponding acquisition parameters can also be coded into call request by some application programs.Middleware It can be from obtaining preset acquisition parameters in the call request of the application program or in configuration file, and according to described preset Acquisition parameters generate the first information, and certainly, the data frame format for containing the first information of preset acquisition parameters is also required to accord with Close the data frame format that the camera is supported.
The first information is sent to the camera by step S204, to indicate the camera according to the first information Return to corresponding preview image.
In the embodiment of the present application, after obtaining the first information comprising preset acquisition parameters, so that it may will include The first information of preset acquisition parameters is sent to the camera, and the camera is after receiving the first information, Ke Yigen The hardware parameter of the camera is modified according to the preset acquisition parameters, and preview is acquired by the camera after modification hardware parameter Image, the preview image for being equivalent to return are and the preset matched image of acquisition parameters.
In practical application, camera can also go to apply accordingly after receiving the first information according to the first information It goes to obtain preset acquisition parameters in the configuration file of program.Then, the camera is modified according to the preset acquisition parameters Hardware parameter, and by modification hardware parameter after camera acquire preview image.
Fig. 3 is the implementation process schematic diagram of another method for calling camera provided by the embodiments of the present application, as shown in the figure This method may comprise steps of:
Whether step S301, monitoring has application program to issue the call request for calling camera in the mobile terminal.
Step S302, if monitoring to there is application program to issue the call request for calling camera, base in the mobile terminal In the call request, from obtaining preset acquisition parameters in the call request of the application program or in configuration file.
Step S301 and step S302 can refer to the associated description in Fig. 1 and embodiment illustrated in fig. 2, and details are not described herein.
Step S303 generates first information queue according to the preset acquisition parameters, and by the first information queue In the first information be successively sent to the camera at predetermined intervals, to indicate the camera according to each of receiving The first information returns and the matched preview image of preset acquisition parameters.
In the embodiment of the present application, it in order to simplify the communication between middleware and the application program, can be set to, root Generate first information queue according to the preset acquisition parameters, that is, what is generated is multiple first information, by multiple first information with Preset time interval is successively sent to the camera, and the camera often receives a first information, is returned to a preview Image.Once continual preview image will be obtained by middleware in this way, application program starts to call the camera.This Sample, user is in application program side it is seen that real-time preview image.Include in the first information sent at this time is pre- If acquisition parameters, it is understood that be application initialization acquisition parameters.
Certainly, in the actual use of application program, it is also possible to equipped with can based on the demand of user modify acquisition parameters Function, application program may issue acquisition parameters modification request;The software that U.S. face is taken pictures is also possible to wish to obtain incessantly Preview image also wants to obtain photo of taking pictures, so, application program may also issue the request of taking pictures for taking pictures;Certainly, such as The first information in fruit first information queue continual can be sent to the camera, will continual return preview image, Application program is also possible to have the request for stopping preview.Relevant explanation is carried out by above-mentioned citing separately below.
Step S304 is requested corresponding to be repaired if monitoring the modification request of the acquisition parameters based on the modification The acquisition parameters changed regenerate first information queue, and by the first information in the first information queue between the preset time Every being successively sent to the camera, the hardware of the camera is modified to indicate the camera according to the acquisition parameters to be modified Parameter, and returned and the matched preview image of modified acquisition parameters according to each first information.
In the embodiment of the present application, user may modify some acquisition parameters in the interface of application program, for example, adjusting Whole focal length, unlatching virtualization function etc..If middleware monitors the modification request of the acquisition parameters, mean that user may want to The acquisition parameters of initialization are revised as to the acquisition parameters of demands of individuals, are denoted as acquisition parameters to be modified, middleware according to The acquisition parameters of modification regenerate first information queue, and original first information queue (acquisition parameters comprising initialization) is just It can be emptied.The first information in the first information queue that acquisition parameters to be modified generate will be currently based on to continue with preset Time interval is successively sent to the camera, to indicate that the camera modifies the camera according to the acquisition parameters to be modified Hardware parameter, and according to each first information return with the matched preview image of modified acquisition parameters.
It should be noted that often monitoring the modification request of the primary acquisition parameters, it is necessary to according to current to be modified Acquisition parameters regenerate first information queue, and original first information queue is deleted, two storages skies can be distributed Between, first memory space stores first information queue, and the first information in first memory space is sent to the phase Machine is given birth to according to acquisition parameters to be modified in second memory space again if monitoring the modification request of the acquisition parameters It is after second memory space generates the first information of the first preset quantity, the second storage is empty at first information queue Between first information queue cover the first information queue of the first memory space, the first letter in the message queue of the first memory space The quantity of breath continues to generate the first information in the first memory space after less than the second preset quantity.
Step S305 is based on if monitoring the request of taking pictures for calling the application program of the camera to issue for taking pictures The request of taking pictures generates the second information, and second information is sent to the camera, the data frame of second information The data frame format and second information that format is supported by the camera of the mobile terminal include that the camera is requested to return Image format parameter, the priority of second information is greater than the first information.
In the embodiment of the present application, if middleware monitors the bat for calling the application program of the camera to issue for taking pictures According to request, then the second information can be generated, the second information is to increase the request camera on the basis of first information to return Image format parameter, that is, wish obtain what format photo, so that it may first request in increase one piece of data, this section Data include the format parameter for the image for requesting the camera to return, it will usually default a kind of picture format, middleware is being supervised It measures after calling the application program of the camera to issue the request of taking pictures for taking pictures, generates second information, the second information It is the format parameter that image is increased on the basis of the first information.Camera is after receiving the second information, so that it may return The image of one specific format.Certainly, the priority of the second information is greater than the first information, i.e., once generating the meeting of the second information preferentially The camera is sent in next first information to be sent.
Step S306, if monitoring the exit instruction for calling the application program of the camera or the instruction for stopping preview, Then terminate the transmission of the first information.
In the embodiment of the present application, if middleware monitors to call the exit instruction of the application program of the camera or stop The only instruction of preview indicates that user no longer needs using camera.Due to taking pictures, to request corresponding second information be infobit It sends, the return of single photo, and the corresponding first information of call request is continual transmission, continual return, if with Family no longer needs then to need to terminate the transmission of the first information using camera, will not thus return again to preview image.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present application constitutes any limit It is fixed.
Fig. 4 is that the schematic block diagram for the mobile terminal that one embodiment of the application provides only is shown and this Shen for ease of description It please the relevant part of embodiment.
The mobile terminal 4 can be the software unit being built in the mobile terminals such as mobile phone, tablet computer, notebook, hard Part unit or the unit of soft or hard combination can also be used as independent pendant and be integrated into the mobile phone, tablet computer, notebook etc. In mobile terminal.The middleware in above method embodiment is integrated in the mobile terminal.
The mobile terminal 4 includes:
Whether call request monitoring unit 41 has application program to issue calling camera for monitoring in the mobile terminal Call request;
First information generation unit 42, if for monitoring that having application program to issue in the mobile terminal calls camera Call request, then generate the first information based on the call request, and the data frame format of the first information is described mobile whole The data frame format that the camera at end is supported;
First information transmission unit 43, for the first information to be sent to the camera, to indicate the camera root Corresponding preview image is returned according to the first information.
Optionally, the first information generation unit 42 includes:
Configuration file obtains module, if the tune for monitoring to have application program to issue calling camera in the mobile terminal With request, then the configuration file for issuing the application program of the call request is obtained, and based on described in configuration file determination Whether application program is compatible with the camera of the mobile terminal;
First information generation module is based on if incompatible for the application program and the camera of the mobile terminal The call request generates the first information.
Optionally, the first information generation unit 42 is also used to:
Based on the call request, from obtaining preset shooting in the call request of the application program or in configuration file Parameter, and the first information is generated according to the preset acquisition parameters, the first information is used to indicate the camera according to institute The hardware parameter that preset acquisition parameters modify the camera is stated, and is returned and the matched preview image of preset acquisition parameters.
Optionally, the first information generation unit 42 is also used to:
First information queue is generated according to the preset acquisition parameters;
Correspondingly, the first information transmission unit 43 is also used to:
The first information in the first information queue is successively sent to the camera at predetermined intervals, to refer to Show that the camera returns and the matched preview image of preset acquisition parameters according to each first information received.
Optionally, the mobile terminal 4 further include:
Acquisition parameters modify unit 44, if being based on the modification for monitoring that the modification of the acquisition parameters is requested Corresponding acquisition parameters to be modified are requested to regenerate first information queue, and by the first information in the first information queue It is sent to the camera, successively at predetermined intervals to indicate that the camera is modified according to the acquisition parameters to be modified The hardware parameter of the camera, and returned and the matched preview image of modified acquisition parameters according to each first information.
Optionally, the mobile terminal 4 further include:
Second information transmitting unit 45, if for monitoring the bat for calling the application program sending of the camera for taking pictures According to request, then the second information is generated based on the request of taking pictures, and second information is sent to the camera, described second The data frame format and second information that the data frame format of information is supported by the camera of the mobile terminal include request The priority of the format parameter for the image that the camera returns, second information is greater than the first information.
Optionally, the mobile terminal 4 further include:
First information stop unit 46, if the exit instruction of the application program for monitoring to call the camera or stopping The only instruction of preview then terminates the transmission of the first information.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of the mobile terminal is divided into different functional unit or module, to complete All or part of function described above.Each functional unit in embodiment, module can integrate in one processing unit, It is also possible to each unit to physically exist alone, can also be integrated in one unit with two or more units, above-mentioned collection At unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function Unit, module specific name be also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above-mentioned shifting The specific work process for moving unit in terminal, module, can refer to corresponding processes in the foregoing method embodiment, no longer superfluous herein It states.
Fig. 5 is the schematic block diagram for the mobile terminal that the another embodiment of the application provides.As shown in figure 5, the shifting of the embodiment Dynamic terminal 5 includes: one or more processors 50, memory 51 and is stored in the memory 51 and can be in the processing The computer program 52 run on device 50.The processor 50 realizes above-mentioned each calling phase when executing the computer program 52 Step in the embodiment of the method for machine, such as step S101 to S103 shown in FIG. 1.Alternatively, the processor 50 execute it is described The function of each module/unit in above-mentioned mobile terminal embodiment, such as module 41 to 43 shown in Fig. 4 are realized when computer program 52 Function.
Illustratively, the computer program 52 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 51, and are executed by the processor 50, to complete the application.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 52 in the mobile terminal 5 is described.For example, the computer program 52 can be divided It is cut into call request monitoring unit, first information generation unit, first information transmission unit.
Whether the call request monitoring unit has application program to issue calling camera for monitoring in the mobile terminal Call request;
The first information generation unit, if for monitoring that having application program to issue in the mobile terminal calls camera Call request, then the first information is generated based on the call request, the data frame format of the first information is the movement The data frame format that the camera of terminal is supported;
The first information transmission unit, for the first information to be sent to the camera, to indicate the camera Corresponding preview image is returned according to the first information.
Other units or module can refer to the description in embodiment shown in Fig. 4, and details are not described herein.
The mobile terminal includes but are not limited to processor 50, memory 51.It will be understood by those skilled in the art that figure 5 be only an example of mobile terminal 5, does not constitute the restriction to mobile terminal 5, may include more more or less than illustrating Component, perhaps combine certain components or different components, for example, the mobile terminal can also include input equipment, it is defeated Equipment, network access equipment, bus etc. out.
The processor 50 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 51 can be the internal storage unit of the mobile terminal 5, such as the hard disk or interior of mobile terminal 5 It deposits.The memory 51 is also possible to the External memory equipment of the mobile terminal 5, such as be equipped on the mobile terminal 5 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Further, the memory 51 can also both include the storage inside list of the mobile terminal 5 Member also includes External memory equipment.The memory 51 is for storing needed for the computer program and the mobile terminal Other programs and data.The memory 51 can be also used for temporarily storing the data that has exported or will export.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed Scope of the present application.
In embodiment provided herein, it should be understood that disclosed mobile terminal and method can pass through it Its mode is realized.For example, mobile terminal embodiment described above is only schematical, for example, the module or list Member division, only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or Component can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point is shown The mutual coupling or direct-coupling or communication connection shown or discussed can be through some interfaces, between device or unit Coupling or communication connection are connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the application realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and Telecommunication signal.
Embodiment described above is only to illustrate the technical solution of the application, rather than its limitations;Although referring to aforementioned reality Example is applied the application is described in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution should all Comprising within the scope of protection of this application.

Claims (10)

1. a kind of method for calling camera, which is characterized in that be applied to mobile terminal, which comprises
Whether monitor has application program to issue the call request for calling camera in the mobile terminal;
If monitoring to there is application program to issue the call request for calling camera in the mobile terminal, it is based on the call request Generate the first information, the data frame format that the data frame format of the first information is supported by the camera of the mobile terminal;
The first information is sent to the camera, to indicate that the camera returns to corresponding preview according to the first information Image.
2. calling the method for camera as described in claim 1, which is characterized in that if described monitor have in the mobile terminal Application program issues the call request for calling camera, then generates the first information based on the call request and include:
If monitoring to there is application program to issue the call request for calling camera in the mobile terminal, obtains and issue the calling The configuration file of the application program of request, and determine based on the configuration file phase of the application program with the mobile terminal Whether machine is compatible with;
If the application program and the camera of the mobile terminal are incompatible, the first information is generated based on the call request.
3. calling the method for camera as described in claim 1, which is characterized in that described to generate first based on the call request Information includes:
Based on the call request, join from preset shooting is obtained in the call request of the application program or in configuration file Number, and the first information is generated according to the preset acquisition parameters, the first information is used to indicate the camera according to Preset acquisition parameters modify the hardware parameter of the camera, and return and the matched preview image of preset acquisition parameters.
4. calling the method for camera as claimed in claim 3, which is characterized in that described raw according to the preset acquisition parameters Include: at the first information
First information queue is generated according to the preset acquisition parameters;
Correspondingly, described be sent to the camera for the first information, to indicate that the camera is returned according to the first information Returning corresponding preview image includes:
The first information in the first information queue is successively sent to the camera at predetermined intervals, to indicate Camera is stated to be returned and the matched preview image of preset acquisition parameters according to each first information received.
5. calling the method for camera as claimed in claim 4, which is characterized in that further include:
If monitoring the modification request of the acquisition parameters, corresponding acquisition parameters weight to be modified is requested based on the modification Newly-generated first information queue, and the first information in the first information queue is successively sent to institute at predetermined intervals Camera is stated, the hardware parameter of the camera is modified to indicate the camera according to the acquisition parameters to be modified, and according to every A first information returns and the matched preview image of modified acquisition parameters.
6. such as the method described in any one of claim 1 to 5 for calling camera, which is characterized in that further include:
If monitoring the request of taking pictures for calling the application program of the camera to issue for taking pictures, takes pictures and please seek survival based on described It is sent to the camera at the second information, and by second information, the data frame format of second information is the movement The data frame format and second information that the camera of terminal is supported include the format ginseng for the image for requesting the camera to return The priority of number, second information is greater than the first information.
7. such as the method described in any one of claim 1 to 5 for calling camera, which is characterized in that further include:
If monitoring the exit instruction for calling the application program of the camera or the instruction for stopping preview, described first is terminated The transmission of information.
8. a kind of mobile terminal characterized by comprising
Call request monitoring unit is asked for monitoring the calling for whether having application program to issue calling camera in the mobile terminal It asks;
First information generation unit, if for monitoring that having application program to issue in the mobile terminal calls the calling of camera to ask It asks, then the first information is generated based on the call request, the data frame format of the first information is the phase of the mobile terminal The data frame format that machine is supported;
First information transmission unit, for the first information to be sent to the camera, to indicate the camera according to The first information returns to corresponding preview image.
9. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 7 when executing the computer program The step of any one the method.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence realizes the step such as any one of claim 1 to 7 the method when the computer program is executed by one or more processors Suddenly.
CN201810980731.5A 2018-08-27 2018-08-27 Method for calling camera, mobile terminal and storage medium Active CN109068059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810980731.5A CN109068059B (en) 2018-08-27 2018-08-27 Method for calling camera, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810980731.5A CN109068059B (en) 2018-08-27 2018-08-27 Method for calling camera, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109068059A true CN109068059A (en) 2018-12-21
CN109068059B CN109068059B (en) 2020-09-11

Family

ID=64757095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810980731.5A Active CN109068059B (en) 2018-08-27 2018-08-27 Method for calling camera, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109068059B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413423A (en) * 2019-07-23 2019-11-05 腾讯科技(深圳)有限公司 Data processing method, related device, equipment and storage medium
CN111259441A (en) * 2020-01-14 2020-06-09 Oppo广东移动通信有限公司 Device control method, device, storage medium and electronic device
CN111314646A (en) * 2020-02-27 2020-06-19 Oppo(重庆)智能科技有限公司 Image acquisition method, image acquisition device, terminal device and readable storage medium
CN112199127A (en) * 2020-10-10 2021-01-08 Oppo(重庆)智能科技有限公司 Image data processing method and device, mobile terminal and storage medium
CN113596328A (en) * 2021-07-23 2021-11-02 北京字节跳动网络技术有限公司 Camera calling method and device and electronic equipment
CN113791969A (en) * 2021-08-12 2021-12-14 惠州Tcl云创科技有限公司 Debugging method of Android platform camera module, storage medium and terminal equipment
CN116528063A (en) * 2023-07-04 2023-08-01 荣耀终端有限公司 Shooting method, readable storage medium and electronic device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030031260A1 (en) * 2001-07-16 2003-02-13 Ali Tabatabai Transcoding between content data and description data
CN101375249A (en) * 2003-11-10 2009-02-25 微软公司 A color management system that supports legacy and advanced color management applications
CN103336833A (en) * 2013-07-11 2013-10-02 成都西可科技有限公司 Method for integrally viewing RAW images in intelligent mobile phone OS
CN103593370A (en) * 2012-08-16 2014-02-19 腾讯科技(深圳)有限公司 Browsers and method for implementing expanded applications in browsers
CN104703115A (en) * 2013-12-09 2015-06-10 佳能株式会社 Communication apparatus and control method thereof
CN104980660A (en) * 2015-07-10 2015-10-14 成都品果科技有限公司 Method for mute shooting on Android platform
CN105959530A (en) * 2016-04-26 2016-09-21 乐视控股(北京)有限公司 Method and system for invoking a camera function according to an individualized property of an application
CN106060459A (en) * 2016-05-30 2016-10-26 安徽四创电子股份有限公司 Protocol conversion system and method for camera
CN106372250A (en) * 2016-09-23 2017-02-01 郑州云海信息技术有限公司 Parameter passing method and device capable of starting local application through URL protocol
CN107205120A (en) * 2017-06-30 2017-09-26 维沃移动通信有限公司 The processing method and mobile terminal of a kind of image

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030031260A1 (en) * 2001-07-16 2003-02-13 Ali Tabatabai Transcoding between content data and description data
CN101375249A (en) * 2003-11-10 2009-02-25 微软公司 A color management system that supports legacy and advanced color management applications
CN103593370A (en) * 2012-08-16 2014-02-19 腾讯科技(深圳)有限公司 Browsers and method for implementing expanded applications in browsers
CN103336833A (en) * 2013-07-11 2013-10-02 成都西可科技有限公司 Method for integrally viewing RAW images in intelligent mobile phone OS
CN104703115A (en) * 2013-12-09 2015-06-10 佳能株式会社 Communication apparatus and control method thereof
CN104980660A (en) * 2015-07-10 2015-10-14 成都品果科技有限公司 Method for mute shooting on Android platform
CN105959530A (en) * 2016-04-26 2016-09-21 乐视控股(北京)有限公司 Method and system for invoking a camera function according to an individualized property of an application
CN106060459A (en) * 2016-05-30 2016-10-26 安徽四创电子股份有限公司 Protocol conversion system and method for camera
CN106372250A (en) * 2016-09-23 2017-02-01 郑州云海信息技术有限公司 Parameter passing method and device capable of starting local application through URL protocol
CN107205120A (en) * 2017-06-30 2017-09-26 维沃移动通信有限公司 The processing method and mobile terminal of a kind of image

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413423A (en) * 2019-07-23 2019-11-05 腾讯科技(深圳)有限公司 Data processing method, related device, equipment and storage medium
CN110413423B (en) * 2019-07-23 2024-07-23 腾讯科技(深圳)有限公司 Data processing method, related device, equipment and storage medium
CN111259441A (en) * 2020-01-14 2020-06-09 Oppo广东移动通信有限公司 Device control method, device, storage medium and electronic device
CN111259441B (en) * 2020-01-14 2023-02-28 Oppo广东移动通信有限公司 Device control method, device, storage medium and electronic device
CN111314646A (en) * 2020-02-27 2020-06-19 Oppo(重庆)智能科技有限公司 Image acquisition method, image acquisition device, terminal device and readable storage medium
CN111314646B (en) * 2020-02-27 2021-04-23 Oppo(重庆)智能科技有限公司 Image acquisition method, image acquisition device, terminal device and readable storage medium
CN112199127A (en) * 2020-10-10 2021-01-08 Oppo(重庆)智能科技有限公司 Image data processing method and device, mobile terminal and storage medium
CN113596328A (en) * 2021-07-23 2021-11-02 北京字节跳动网络技术有限公司 Camera calling method and device and electronic equipment
CN113791969A (en) * 2021-08-12 2021-12-14 惠州Tcl云创科技有限公司 Debugging method of Android platform camera module, storage medium and terminal equipment
WO2023015699A1 (en) * 2021-08-12 2023-02-16 惠州Tcl云创科技有限公司 Method for debugging android platform camera module, storage medium, and terminal device
CN116528063A (en) * 2023-07-04 2023-08-01 荣耀终端有限公司 Shooting method, readable storage medium and electronic device
CN116528063B (en) * 2023-07-04 2023-11-03 荣耀终端有限公司 Shooting method, readable storage medium and electronic device

Also Published As

Publication number Publication date
CN109068059B (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN109068059A (en) Method for invoking camera, mobile terminal and storage medium
JP7012689B2 (en) Command execution method and device
CN109933429A (en) Data processing method, device, electronic equipment and storage medium
US11016769B1 (en) Method and apparatus for processing information
CN108495043A (en) Image processing method and relevant apparatus
CN113196238B (en) Service-aware server-less cloud computing system
CN109166156A (en) A kind of generation method, mobile terminal and the storage medium of camera calibration image
CN110300165A (en) A kind of call method of function program, device, equipment and storage medium
CN114924851A (en) Training task scheduling method and device, electronic equipment and storage medium
CN109561134B (en) Electronic device, distributed cluster service distribution method and storage medium
CN114356367A (en) Intelligent firmware batch upgrading method, system and medium for terminal equipment
CN110032443A (en) Processor, its task processing method and the framework for handling task
CN112905273A (en) Service calling method and device
CN109471620A (en) A kind of automatic generation method of APP, device, terminal device and readable storage medium storing program for executing
CN115134352B (en) Buried point data uploading method, device, equipment and medium
CN110730220B (en) Intelligent scheduling method and device based on system current business capability integration
CN109166294A (en) One key alarming method, a key warning device and alarm
CN111970539A (en) Data coding method based on deep learning and cloud computing service and big data platform
CN108830590A (en) The acquisition device and terminal device of a kind of acquisition methods of information, information
WO2024212900A1 (en) Embedded software system generation method and apparatus, chip, device, and storage medium
CN110275701A (en) Data processing method, device, medium and calculating equipment
CN110704201A (en) Multimedia data sharing method and terminal equipment
CN116775267A (en) Resource quota methods, devices, equipment and storage media
CN115981632A (en) System construction method and device, electronic equipment and storage medium
CN116339184A (en) Sound box multi-terminal control method, device, equipment and medium based on distributed system

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