CN104572204B - A kind of generation method of image information, device and electronic equipment - Google Patents

A kind of generation method of image information, device and electronic equipment Download PDF

Info

Publication number
CN104572204B
CN104572204B CN201510011769.8A CN201510011769A CN104572204B CN 104572204 B CN104572204 B CN 104572204B CN 201510011769 A CN201510011769 A CN 201510011769A CN 104572204 B CN104572204 B CN 104572204B
Authority
CN
China
Prior art keywords
image processing
image
processing module
information
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510011769.8A
Other languages
Chinese (zh)
Other versions
CN104572204A (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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201510011769.8A priority Critical patent/CN104572204B/en
Publication of CN104572204A publication Critical patent/CN104572204A/en
Application granted granted Critical
Publication of CN104572204B publication Critical patent/CN104572204B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Image Processing (AREA)

Abstract

A kind of generation method of image information, device and electronic equipment.An embodiment of the present invention provides the generation method and device of a kind of image information, the described method includes:When listening to the specified action event for secondary or physical bond, operating system in a dormant state is waken up;Specify information is set in the operating system;Start image processing module, read the specify information, to enter the designated mode of described image processing module;Under the designated mode, by described image processing module driving image processing hardware generation image information.The embodiment of the present invention realizes the automation of image generation, substantially increases the simplicity of operation, reduces and takes.

Description

Image information generation method and device and electronic equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for generating image information, and an electronic device.
Background
Along with the rapid development of science and technology, electronic computing devices are widely popularized, the utilization rate of people in the aspects of work, study, daily communication and the like is higher and higher, and electronic computing is an indispensable part of life of people.
When the electronic device is in a standby state, if a user needs to generate image information, the user needs to start the operating system first, then find the image processing module to start, and finally start the image processing hardware corresponding to the image processing module to generate the image information, which is tedious in operation and time-consuming.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a method for generating image information, so as to improve the simplicity of operation and reduce time consumption.
Correspondingly, the embodiment of the invention also provides a device for generating the image information and electronic equipment, which are used for ensuring the realization and the application of the method.
In order to solve the above problem, the present invention discloses a method for generating image information, comprising:
when a specified operation event aiming at the physical key is monitored, waking up an operating system in a dormant state;
setting specified information in the operating system;
starting an image processing module, reading the specified information to enter a specified mode of the image processing module;
and in the specified mode, driving image processing hardware by the image processing module to generate image information.
Preferably, the designated operation event of the physical key includes at least one of a double-click event of a volume key and a long-press event of a volume key.
Preferably, the step of waking up the operating system in the sleep state when the specified operation event for the physical key is listened to comprises:
when a key event aiming at a physical key is monitored, transmitting the characteristic information of the operating system in a dormant state to a window manager;
when the window manager determines that the operating system is in a dormant state according to the characteristic information, starting a thread;
invoking a power service through the thread.
Preferably, the step of sending the feature information that the operating system is in the hibernation state to the window manager includes:
reporting the key event of the physical key to an input process;
when the operating system is in a dormant state and the proxy state is not refused to receive the input event, the proxy state is changed into a receiving input event by the input process;
and sending the characteristic information of the operating system in the dormant state to a window manager by the input process.
Preferably, the operating system is in the sleep state according to at least one of the following conditions:
media services are not invoked, telephony services are not invoked, and power services are not invoked.
Preferably, the thread is a delay thread, and the step of calling the power service through the thread includes:
and calling power supply service after preset time through the delay thread.
Preferably, the step of starting the image processing module includes:
judging whether the image processing module is in a background mode;
if yes, calling an onResume function to start the image processing module;
if not, calling an onCreate function and an onResume function to start the image processing module.
Preferably, the step of reading the designation information to enter a designation mode of the image processing module includes:
when the onResume function is called to start the image processing module, the specified information is read to enter a specified mode of the image processing module.
Preferably, in the designated mode, the step of driving image processing hardware by the image processing module to generate image information includes:
starting an image generation mode of the image processing module;
starting the image processing hardware in a power-on standby state by the image processing module;
and after the image processing hardware is started, sending an image generation request to drive the image processing hardware to generate one or more frames of image information.
Preferably, the step of starting the image processing module to generate the image mode includes:
when the image processing module is in a background mode, switching the image processing module into an image generating mode;
and when the image processing module is not in the background mode, entering an image generation mode.
Preferably, the step of sending an image generation request to drive the image processing hardware to generate one or more frames of image information after the image processing hardware is started comprises:
judging whether a preview image refreshing message is received or not; if yes, generating an image generation request after a preset time;
and sending the image generation request.
Preferably, the step of sending an image generation request to drive the image processing hardware to generate one or more frames of image information after the image processing hardware is started comprises:
when the image processing hardware generates a frame of image information, driving audio hardware to play a prompt tone once;
and naming the generated one or more frames of image information according to the uniform file name and different configured suffixes.
The embodiment of the invention also discloses a device for generating the image information, which comprises:
the operating system awakening module is used for awakening the operating system in the dormant state when a specified operating event aiming at the physical key is monitored;
the specified information setting module is used for setting specified information in the operating system;
the starting module is used for starting the image processing module;
a specified information reading module for reading the specified information to enter a specified mode of the image processing module;
and the image information generating module is used for driving the image processing hardware to generate the image information by the image processing module in the specified mode.
Preferably, the designated operation event of the physical key includes at least one of a double-click event of a volume key and a long-press event of a volume key.
Preferably, the operating system wake-up module includes:
the characteristic information sending submodule is used for sending the characteristic information of the operating system in a dormant state to the window manager when a key event aiming at the physical key is monitored;
the thread starting submodule is used for starting a thread when the window manager determines that the operating system is in a dormant state according to the characteristic information;
and the power supply service calling submodule is used for calling the power supply service through the thread.
Preferably, the characteristic information sending sub-module includes:
the reporting submodule is used for reporting the key event of the physical key to an input process;
the change submodule is used for changing the proxy state into a receiving input event by the input process when the operating system is in a dormant state and the proxy state is the state of refusing to receive the input event;
and the sending submodule is used for sending the information that the operating system is in the dormant state to the window manager by the input process.
Preferably, the operating system is in the sleep state according to at least one of the following conditions:
media services are not invoked, telephony services are not invoked, and power services are not invoked.
Preferably, the thread is a delay thread, and the power service invoking sub-module includes:
and the delay calling submodule is used for calling the power supply service after the preset time through the delay thread.
Preferably, the starting module comprises:
the background mode judgment submodule is used for judging whether the image processing module is in a background mode or not; if yes, calling the first calling sub-module, and if not, calling the second calling sub-module;
the first calling submodule is used for calling an onResume function to start the image processing module;
and the second calling submodule is used for calling the onCreate function and the onResume function to start the image processing module.
Preferably, the designation information reading module includes:
and the node reading submodule is used for reading the specified information when the onResume function is called to start the image processing module so as to enter a specified mode of the image processing module.
Preferably, the image information generating module includes:
the generated image mode starting submodule is used for starting the generated image mode of the image processing module;
the hardware starting submodule is used for starting the image processing hardware in a power-on standby state;
and the image generation request sending submodule is used for sending an image generation request after the image processing hardware is started so as to drive the image processing hardware to generate one or more frames of image information.
Preferably, the generate image mode submodule comprises:
the switching submodule is used for switching the image processing module into an image generating mode when the image processing module is in a background mode;
and the entering sub-module is used for entering an image generating mode when the image processing module is not in the background module.
Preferably, the image generation request transmission sub-module includes:
the message judging submodule is used for judging whether a preview image refreshing message is received or not; if yes, calling a request generation submodule;
the request generation submodule is used for generating an image generation request after a preset time;
and the request sending submodule is used for sending the image generation request.
Preferably, the image generation request transmission sub-module includes:
the prompt tone driving submodule is used for driving the audio hardware to play a prompt tone once when the image processing hardware generates a frame of image information;
and the naming submodule is used for naming the generated one or more frames of image information according to the uniform file name and the configuration of different suffixes.
The embodiment of the invention also discloses electronic equipment, which comprises a control module, an image processing module and image processing hardware; wherein,
the control module includes:
the operating system starting module is used for awakening the operating system in the dormant state when a specified operating event aiming at the physical key is monitored;
the specified information setting module is used for setting specified information in the operating system;
the starting module is used for starting the image processing module;
the image processing module includes:
a specified information reading module for reading the specified information to enter a specified mode of the image processing module;
and the image information generating module is used for driving the image processing hardware to generate the image information by the image processing module in the specified mode.
Preferably, the designated operation event of the physical key includes at least one of a double-click event of a volume key and a long-press event of a volume key.
Preferably, the operating system wake-up module includes:
the characteristic information sending submodule is used for sending the characteristic information of the operating system in a dormant state to the window manager when a key event aiming at the physical key is monitored;
the thread starting submodule is used for starting a thread when the window manager determines that the operating system is in a dormant state according to the characteristic information;
and the power supply service calling submodule is used for calling the power supply service through the thread.
Preferably, the characteristic information sending sub-module includes:
the reporting submodule is used for reporting the key event of the physical key to an input process;
the change submodule is used for changing the proxy state into a receiving input event by the input process when the operating system is in a dormant state and the proxy state is the state of refusing to receive the input event;
and the sending submodule is used for sending the information that the operating system is in the dormant state to the window manager by the input process.
Preferably, the operating system is in the sleep state according to at least one of the following conditions:
media services are not invoked, telephony services are not invoked, and power services are not invoked.
Preferably, the thread is a delay thread, and the power service invoking sub-module includes:
and the delay calling submodule is used for calling the power supply service after the preset time through the delay thread.
Preferably, the starting module comprises:
the background mode judgment submodule is used for judging whether the image processing module is in a background mode or not; if yes, calling the first calling sub-module, and if not, calling the second calling sub-module;
the first calling submodule is used for calling an onResume function to start the image processing module;
and the second calling submodule is used for calling the onCreate function and the onResume function to start the image processing module.
Preferably, the designation information reading module includes:
and the node reading submodule is used for reading the specified information when the onResume function is called to start the image processing module so as to enter a specified mode of the image processing module.
Preferably, the image information generating module includes:
the generated image mode starting submodule is used for starting the generated image mode of the image processing module;
the hardware starting submodule is used for starting the image processing hardware in a power-on standby state;
and the image generation request sending submodule is used for sending an image generation request after the image processing hardware is started so as to drive the image processing hardware to generate one or more frames of image information.
Preferably, the generate image mode submodule comprises:
the switching submodule is used for switching the image processing module into an image generating mode when the image processing module is in a background mode;
and the entering sub-module is used for entering an image generating mode when the image processing module is not in the background module.
Preferably, the image generation request transmission sub-module includes:
the message judging submodule is used for judging whether a preview image refreshing message is received or not; if yes, calling a request generation submodule;
the request generation submodule is used for generating an image generation request after a preset time;
and the request sending submodule is used for sending the image generation request.
Preferably, the image generation request transmission sub-module includes:
the prompt tone driving submodule is used for driving the audio hardware to play a prompt tone once when the image processing hardware generates a frame of image information;
and the naming submodule is used for naming the generated one or more frames of image information according to the uniform file name and the configuration of different suffixes.
Compared with the prior art, the embodiment of the invention has the following advantages:
according to the embodiment of the invention, when the specified operation event aiming at the physical key is monitored, the operating system in the dormant state is awakened, and the specified information is set in the operating system, so that the started image processing module executes the operation of driving the image processing hardware to generate the image information in the specified mode, and a user does not need to manually start the operating system, manually start the image processing module and the like, thereby realizing the automation of image generation, greatly improving the simplicity and convenience of operation and reducing time consumption.
According to the embodiment of the invention, when the onResume function is called to start the image processing module, the specified information is read to perform the preset specified module, so that the conflict of starting the image processing module to the generation period under different conditions is avoided, and the practicability is improved.
According to the embodiment of the invention, after the image processing module is judged to be in the background mode, the image generation mode can be automatically switched back, and if the image processing module is not in the background mode, the image generation mode can be opened after the image processing module is started, so that the practicability is improved.
In the embodiment of the invention, the image processing hardware in the power-on standby state is directly started, so that the initialization work of a plurality of registers is saved, the time for starting the image processing hardware is reduced, and the speed for starting the image processing hardware is improved.
Drawings
FIG. 1 is a flow chart illustrating the steps of an embodiment of a method for generating image information according to the present invention;
FIG. 2 is a block diagram of an embodiment of an apparatus for generating image information according to the present invention;
fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a method for generating image information according to the present invention is shown, and specifically may include the following steps:
101, when a specified operation event aiming at a physical key is monitored, waking up an operating system in a dormant state;
it should be noted that the physical key may be a key having physical hardware, as opposed to a virtual key, i.e., a physical key.
In the embodiment of the invention, the user can trigger the electronic equipment to automatically generate the image information by performing specified operation on the physical key.
In a preferred example of the embodiment of the present invention, the specified operation event of the physical key may include at least one of a double-click event of a volume key and a long-press event of the volume key.
In this example, the physical key may be a volume key, i.e., a key for adjusting the volume.
If the user clicks a physical key, a key event (KeyEvent) may be triggered, for example, if an UP key of a VOLUME key is triggered, a keymode _ VOLUME _ UP event may be triggered, and if a DOWN key of the VOLUME key is triggered, a keymode _ VOLUME _ DOWN may be triggered.
If the same key event is received twice within a preset time period (such as 500ms), it may indicate that a double-click event of the physical key is triggered; a series of identical key events received within a preset time period (e.g., 500ms) may indicate that a long press event of the physical key has been initiated.
Of course, the physical keys and the designated operation events thereof are only examples, and other physical keys and the designated operation events thereof may be set according to actual situations when the embodiment of the present invention is implemented. In addition, besides the above physical keys and their designated operation events, those skilled in the art may also adopt other physical keys and their designated operation events according to actual needs, and the embodiment of the present invention is not limited to this.
In a preferred embodiment of the present invention, step 101 may comprise the following sub-steps:
substep S11, when a key event for the physical key is monitored, sending the characteristic information that the operating system is in a dormant state to the window manager;
substep S12, when the window manager determines from the characteristic information that the operating system is in a sleep state, starting a thread;
substep S13, a power service is invoked by the thread.
When the native operating system is in a dormant state, triggering the physical key generally does not wake up the operating system.
In the interpenet keybefore disparting method of PhoneWindowManager, the accessory condition (i.e. feature information) of the physical key is obtained, if the media service is not called, the telephone service is not called, and the power service is not called, a thread is started, the power service is called in the run method of the thread, and the screen is lighted.
In a preferred embodiment of the present invention, the sub-step S11 may include the following sub-steps:
step S111, reporting the key event of the physical key to an input process;
substep S112, when the operating system is in a sleep state and the proxy state is not refused to receive the input event, changing the proxy state to receive the input event by the input process;
substep S113, sending the characteristic information of the operating system in the dormant state to the window manager by the input process
In a specific implementation, when a key event of a physical key is monitored, the key event may be reported to an input process.
If the user presses the DOWN key of the VOLUME key, the key event key _ VOLUME _ DOWN of the DOWN key of the VOLUME key may be reported to the Input process.
The input process may determine that the operating system state is in the sleep state under the conditions that the media service (media) is not called (idle), the phone service (phone) is not called (idle), the power service (power) is not called, and the like.
Generally, one recipient is required at the time of broadcasting an event. If the operating system is in a sleep state, the proxy state is generally a decision to receive an input event, which may indicate that no receiver currently receives an input event. If the broadcast event occurs, it is filtered out by the operating system.
In the embodiment of the invention, the agent state is modified to be the event of receiving input at the input layer, which can represent the event that the receiver receives input currently, so that the requirement of the operating system is met and the event cannot be filtered by the operating system.
The Input process sends feature information that the operating system is in a dormant state to an instance of a windows manager (phonewindowmanger).
In a preferred example of the embodiment of the present invention, the thread may be a delayed thread, and in this example, the sub-step S13 may include the following sub-steps:
and a substep S131 of calling a power service after a preset time through the delay thread.
In this example, when the physical key is triggered, a counter (count) may be started to count, a delay thread process may be invoked, the delay thread is started after a preset time (e.g., 1s), and a long-press event of the physical key (e.g., a volume key) may be simulated.
The power service is called in the run method of the delayed thread, illuminating the screen.
Step 102, setting specified information in the operating system;
in practical applications, since different processes cannot directly transfer data, specific information (commonly referred to as a flag bit) can be set in the operating system for transferring data in different application processes.
In the embodiment of the present invention, if it is determined that the behavior is initiated by the physical key to generate image information, the operation system may set the specific information for identification, for example, set the value of the custom field "burst _ capture" to true.
Step 103, starting an image processing module;
in a particular implementation, the image processing module may be started by an Intent mechanism of the operating system.
In a preferred embodiment of the present invention, step 103 may comprise the following sub-steps:
a substep S21 of determining whether the image processing module is in a background mode; if yes, performing the substep S22, otherwise, performing the substep S23;
substep S22, calling onResume function to start the image processing module;
sub-step S23, calls onCreate function and onResume function to start the image processing module.
In practical application, there are 7 life cycles in the operating system, which are:
onCreate,onStart,onRestart,onResume,onPause,onStop,onDestory;
if the image processing module is exited by pressing the Home key last time, switching to the background is called.
For image processing modules, two life cycles, the onCreate function, which can be used to open an exclusive device (image hardware), and the onCreate function, which is mainly used to respond to a WM _ Create message, are actually concerned, and the onCreate function, which can be used to open an exclusive device (image hardware), sends a WM _ Create message to the operating system after a window is created (Create).
If the image processing module does not run in the background, the image processing module needs to be started up in the moment to normally call two life cycles of an onCreate function and an onResume function.
If the image processing module is started last time and then returns by pressing the Home key, the image processing module is actually in the background, and at this time, the image processing module is started and the onResume function needs to be called.
Step 104, reading the specified information to enter a specified mode of the image processing module;
by applying the embodiment of the invention, a designated mode for generating the image information can be preset, and the designated mode can specify information such as a flow and parameters for generating the image information.
If the operating system has the designated information, the user can be judged to perform the designated operation on the physical key, the electronic equipment is triggered to automatically generate the image information, and the preset designated mode is continuously executed to generate the image information.
If the operating system does not have the designated information, the electronic equipment can be triggered to automatically generate the image information without continuously executing the preset designated mode by judging that the user does not perform the designated operation on the physical key.
For example, when the value of the custom field "burst _ capture" is true, it may be determined that the user has triggered the electronic device to automatically generate image information by performing a specified operation on a physical key.
In a preferred embodiment of the present invention, step 104 may comprise the following sub-steps:
and a substep S31 of reading the designation information to enter a designation mode of the image processing module when the onResume function is called to start the image processing module.
Because the starting processes of the image processing module in the background are different, the conflict of the life cycle exists. Therefore, in order to be compatible with the two cases, in the embodiment of the present invention, the specified information in the operating system may be read uniformly when the onResume function is called, for example, the judgment is performed by using the value of the custom field "burst _ capture" of the operating system.
According to the embodiment of the invention, when the onResume function is called to start the image processing module, the specified information is read to perform the preset specified module, so that the conflict of starting the image processing module to the generation period under different conditions is avoided, and the practicability is improved.
And 105, driving image processing hardware by the image processing module to generate image information in the specified mode.
In practical applications, the image processing hardware may be disposed in the electronic device, controlled by the image processing module, and may be used to generate image information for a specific object.
After the image processing module is started, the image processing module can drive corresponding hardware equipment (namely image processing hardware) to generate image information.
Specifically, an optical image generated by a SCENE (SCENE) through a LENS (LENS) of image hardware is projected onto the surface of an image Sensor (Sensor), then converted into an electric signal, converted into a digital image signal after A/D (analog-to-digital conversion), and compressed and converted into a specific image file format for storage in a digital signal processing chip (DSP) or a coding library.
In a preferred embodiment of the present invention, step 104 may comprise the following sub-steps:
a substep S41 of starting a generated image mode of the image processing module;
generally, the image processing module may include a plurality of application modes, for example, an image generation mode (image information may be generated), a video recording mode (video information may be generated), a panoramic image generation mode (panoramic image information may be generated), and the image generation mode is selected by the embodiment of the present invention to generate the image information.
In a preferred embodiment of the present invention, the sub-step S41 may include the following sub-steps:
substep S411, when the image processing module is in a background mode, switching the image processing module to an image generation mode;
if the image processing module is in the image recording generation mode or the panoramic image generation mode before the Home key is pressed, the operation of switching back to the image processing module is started again, and the operation is generally automatically restored to the previous operation according to the design of an operating system, namely, the operation is returned to the image recording generation mode or the panoramic image generation mode.
Therefore, for such a situation, the embodiment of the present invention may automatically switch back to the image generation mode after determining that the image processing module is in the background mode, and if the image processing module is not in the background mode, the image generation mode may be opened after the image processing module is started, thereby improving the practicability.
It should be noted that the image processing module may be in the image generation mode before entering the background mode, and the image generation mode may also be switched according to the embodiment of the present invention, which is not limited in this embodiment of the present invention.
And a substep S412 of entering an image generation mode when the image processing module is not in the background mode.
If the image processing module is not in the background module, the image processing module can be started and then directly enter an image generating mode.
According to the embodiment of the invention, after the image processing module is judged to be in the background mode, the image generation mode can be automatically switched back, and if the image processing module is not in the background mode, the image generation mode can be opened after the image processing module is started, so that the practicability is improved.
A substep S42 of starting the image processing hardware in a power-on standby state by the image processing module;
image processing hardware typically has three states, idle, standby, and running. The idle is in a power-down state and is in a complete non-working state, the standby state is in a power-on standby state, and running is in a complete working state.
The starting of the image processing hardware needs to call the data of the frame layer, then call the data of the HAL (hardware abstraction layer) layer, then call the driver drive, and finally start the hardware.
Additional time is consumed because the hardware device needs to initialize many registers when it is first powered up.
By applying the embodiment of the invention, the image processing hardware can be always in a standby power-on state from the beginning of initialization.
In a specific implementation, the image processing hardware can be started by bringing in an action event in the event through a StartActivity method provided by an operating system. The action event may be an event for starting image processing hardware.
In the embodiment of the invention, the image processing hardware in the power-on standby state is directly started, so that the initialization work of a plurality of registers is saved, the time for starting the image processing hardware is reduced, and the speed for starting the image processing hardware is improved.
A substep S43, sending an image generation request to drive the image processing hardware to generate one or more frames of image information after the image processing hardware is started;
in the embodiment of the present invention, after the image processing hardware is started, the operating system may be used to send an image generation request, so that the image processing hardware responds to the image generation request to generate image information.
In a preferred embodiment of the present invention, the sub-step S43 may include the following sub-steps:
substep S431, determining whether a preview image refresh message is received; if yes, go to substep S432;
in practical applications, according to the surfaceTexture mechanism of the operating system, each time the preview data of the image processing hardware is refreshed, a notification message (image preview refresh message) of onsurface TextureUpdate is received, and the number of times of preview refresh can be known through the notification message.
A substep S432 of generating an image generation request after a preset time;
and a substep S433 of transmitting the image generation request.
After detecting the first frame of preview image data, indicating that the image processing hardware has successfully started and begins outputting data, an image generation request may be initiated.
However, in the process of generating image information, image processing hardware often needs to perform processing such as color adjustment, white balance judgment, and Banding (water ripple) calculation, and some frames of preview image data are required as a statistical basis.
In the embodiment of the invention, after the preset time, the image generation request is sent, so that the image data of the previous frames (such as the previous 5 frames) can be avoided, and otherwise, the problems of color deviation, water ripple and the like of the image information occur.
Of course, the embodiment of the present invention may also generate an image generation request when it is determined that the preview image refresh message is received, which is not limited in this respect.
In a specific implementation, the Image generation request may include a parameter for generating Image information, the Image processing module may drive the Image processing hardware to generate one or more frames of Image information according to the parameter, and the Image information may be in a format such as Jpeg (Joint Photographic Experts Group), TIFF (Tagged Image file format), and RAW.
It should be noted that the user may set or modify the parameters in advance, and if the user does not set or modify the parameters, the image generation request may be generated according to default parameters.
For example, the parameter may include generating N (N is a positive integer, and default is 5) pieces of image information, and the user may adjust N, and if not, may set the N by 5.
In a preferred embodiment of the present invention, the sub-step S43 may include the following sub-steps:
substep S434, when the image processing hardware generates a frame of image information, driving the audio hardware to play a prompt tone once;
in the embodiment of the invention, when the received image information is received, the prompt tone is sent out according to the number of the image information to prompt the user about how many frames of image information are generated.
And a substep S435 of naming the generated one or more frames of image information according to the uniform file name and different configured suffixes.
In the embodiment of the present invention, in order to identify that the generated one or more frames of image information are image information obtained by one generation operation, the generated one or more frames of image information may be named according to a uniform file name. Meanwhile, in order to distinguish different image information, different suffixes need to be configured thereto.
For example, with "JSP" and the current date as the unified file name and the sequence number as the suffix, the generated image information may be named "JSP 20141121_ 001", "JSP 20141121_ 002", "JSP 20141121_ 003", and the like, respectively.
When the image information generation is completed, the image preview interface of the image processing module can be returned, so that the subsequent operation of the user is facilitated.
According to the embodiment of the invention, when the specified operation event aiming at the physical key is monitored, the operating system in the dormant state is awakened, and the specified information is set in the operating system, so that the started image processing module executes the operation of driving the image processing hardware to generate the image information, and a user does not need to manually start the operating system, the image processing module and the like, so that the automation of image generation is realized, the simplicity and convenience of operation are greatly improved, and the time consumption is reduced.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 2, a block diagram of an embodiment of an apparatus for generating image information according to the present invention is shown, and may specifically include the following modules:
an operating system wake-up module 201, configured to wake up an operating system in a dormant state when a specified operation event for a physical key is monitored;
a designation information setting module 202 for setting designation information in the operating system;
a starting module 203 for starting the image processing module;
a designation information reading module 204 for reading the designation information to enter a designation mode of the image processing module;
and an image information generating module 205, configured to, in the designated mode, drive image processing hardware by the image processing module to generate image information.
In a specific implementation, the designated operation event of the physical key may include at least one of a double-click event of a volume key and a long-press event of the volume key.
In a preferred embodiment of the present invention, the os wake-up module 201 may include the following sub-modules:
the characteristic information sending submodule is used for sending the characteristic information of the operating system in a dormant state to the window manager when a key event aiming at the physical key is monitored;
the thread starting submodule is used for starting a thread when the window manager determines that the operating system is in a dormant state according to the characteristic information;
and the power supply service calling submodule is used for calling the power supply service through the thread.
In a preferred embodiment of the present invention, the characteristic information sending sub-module may include the following sub-modules:
the reporting submodule is used for reporting the key event of the physical key to an input process;
the change submodule is used for changing the proxy state into a receiving input event by the input process when the operating system is in a dormant state and the proxy state is the state of refusing to receive the input event;
and the sending submodule is used for sending the information that the operating system is in the dormant state to the window manager by the input process.
In a preferred example of the present invention, the operating system being in the hibernation state may be subject to at least one of the following conditions:
media services are not invoked, telephony services are not invoked, and power services are not invoked.
In a preferred embodiment of the present invention, the thread may be a delay thread, and the power service invoking submodule may include the following submodules:
and the delay calling submodule is used for calling the power supply service after the preset time through the delay thread.
In a preferred embodiment of the present invention, the starting module 203 may include the following sub-modules:
the background mode judgment submodule is used for judging whether the image processing module is in a background mode or not; if yes, calling the first calling sub-module, and if not, calling the second calling sub-module;
the first calling submodule is used for calling an onResume function to start the image processing module;
and the second calling submodule is used for calling the onCreate function and the onResume function to start the image processing module.
In a preferred embodiment of the present invention, the designation information reading module 204 may include the following sub-modules:
and the node reading submodule is used for reading the specified information when the onResume function is called to start the image processing module so as to enter a specified mode of the image processing module.
In a preferred embodiment of the present invention, the image information generating module 205 may include the following sub-modules:
the generated image mode starting submodule is used for starting the generated image mode of the image processing module;
the hardware starting sub-module is used for starting the image processing hardware in a power-on standby state by the image processing module;
and the image generation request sending submodule is used for sending an image generation request after the image processing hardware is started so as to drive the image processing hardware to generate one or more frames of image information.
In a preferred embodiment of the present invention, the image generation image mode starting sub-module may include the following sub-modules:
the switching submodule is used for switching the image processing module into an image generating mode when the image processing module is in a background mode;
and the entering sub-module is used for entering an image generating mode when the image processing module is not in the background module.
In a preferred embodiment of the present invention, the generation request sending sub-module may include the following sub-modules:
the message judging submodule is used for judging whether a preview image refreshing message is received or not; if yes, calling a request generation submodule;
the request generation submodule is used for generating an image generation request after a preset time;
and the request sending submodule is used for sending the image generation request.
In a preferred embodiment of the present invention, the image generation request transmission sub-module may include the following sub-modules:
the prompt tone driving submodule is used for driving the audio hardware to play a prompt tone once when the image processing hardware generates a frame of image information;
and the naming submodule is used for naming the generated one or more frames of image information according to the uniform file name and the configuration of different suffixes.
Referring to fig. 3, a block diagram of an embodiment of an electronic device of the present invention is shown, which may include a control module 310, an image processing module 320, and image processing hardware 330; wherein,
the control module 310 may include the following modules:
an operating system starting module 311, configured to wake up an operating system in a dormant state when a specified operation event for a physical key is monitored;
a designation information setting module 312 for setting designation information in the operating system;
a start module 313 for starting the image processing module 320;
the image processing module 320 may include the following modules:
a designation information reading module 321 for reading the designation information to enter a designation mode of the image processing module;
an image information generating module 322, configured to, in the designated mode, drive the image processing hardware 330 by the image processing module 320 to generate image information.
In a specific implementation, the designated operation event of the physical key may include at least one of a double-click event of a volume key and a long-press event of the volume key.
In a preferred embodiment of the present invention, the os wakeup module 311 may include the following sub-modules:
the characteristic information sending submodule is used for sending the characteristic information of the operating system in a dormant state to the window manager when a key event aiming at the physical key is monitored;
the thread starting submodule is used for starting a thread when the window manager determines that the operating system is in a dormant state according to the characteristic information;
and the power supply service calling submodule is used for calling the power supply service through the thread.
In a preferred embodiment of the present invention, the characteristic information sending sub-module may include the following sub-modules:
the reporting submodule is used for reporting the key event of the physical key to an input process;
the change submodule is used for changing the proxy state into a receiving input event by the input process when the operating system is in a dormant state and the proxy state is the state of refusing to receive the input event;
and the sending submodule is used for sending the information that the operating system is in the dormant state to the window manager by the input process.
In a preferred example of the present invention, the operating system being in the hibernation state may be subject to at least one of the following conditions:
media services are not invoked, telephony services are not invoked, and power services are not invoked.
In a preferred embodiment of the present invention, the thread may be a delay thread, and the power service invoking submodule may include the following submodules:
and the delay calling submodule is used for calling the power supply service after the preset time through the delay thread.
In a preferred embodiment of the present invention, the starting module 313 may include the following sub-modules:
the background mode judgment submodule is used for judging whether the image processing module is in a background mode or not; if yes, calling the first calling sub-module, and if not, calling the second calling sub-module;
the first calling submodule is used for calling an onResume function to start the image processing module 320;
and a second calling submodule, configured to call the onCreate function and the onResume function to start the image processing module 320.
In a preferred embodiment of the present invention, the designation information reading module 321 may include the following sub-modules:
and the node reading submodule is used for reading the specified information when the image processing module 320 is started by calling the onResume function so as to enter a specified mode of the image processing module.
In a preferred embodiment of the present invention, the image information generating module 322 may include the following sub-modules:
a generated image mode starting sub-module, configured to start a generated image mode of the image processing module 320;
the hardware starting submodule is used for starting the image processing hardware in a power-on standby state;
and the image generation request sending submodule is used for sending an image generation request after the image processing hardware 330 is started so as to drive the image processing hardware 330 to generate one or more frames of image information.
In a preferred embodiment of the present invention, the image generation image mode starting sub-module may include the following sub-modules:
a switching sub-module, configured to switch the image processing module to an image generation mode when the image processing module 320 is in a background mode;
and the entering sub-module is used for entering an image generating mode when the image processing module 320 is not in the background mode.
In a preferred embodiment of the present invention, the generation request sending sub-module may include the following sub-modules:
the message judging submodule is used for judging whether a preview image refreshing message is received or not; if yes, calling a request generation submodule;
the request generation submodule is used for generating an image generation request after a preset time;
and the request sending submodule is used for sending the image generation request.
In a preferred embodiment of the present invention, the image generation request transmission sub-module may include the following sub-modules:
the prompt tone driving submodule is used for driving the audio hardware to play a prompt tone once when the image processing hardware 330 generates a frame of image information;
and the naming submodule is used for naming the generated one or more frames of image information according to the uniform file name and the configuration of different suffixes.
For the embodiments of the apparatus and the electronic device, since they are basically similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method for generating image information, the device for generating image information and the electronic device provided by the invention are described in detail, and specific examples are applied in the text to explain the principle and the implementation of the invention, and the description of the above embodiments is only used to help understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (14)

1. A method for generating image information, comprising:
when a specified operation event aiming at a physical key is monitored, reporting the key event of the physical key to an input process;
when the operating system is in a dormant state and the proxy state is the state of refusing to receive the input event, the input process changes the proxy state into the state of receiving the input event;
the input process sends the characteristic information of the operating system in the dormant state to a window manager;
when the window manager determines that the operating system is in a dormant state according to the characteristic information, starting a thread;
invoking a power service through the thread;
setting specified information in the operating system;
starting an image processing module, reading the specified information to enter a specified mode of the image processing module;
and in the specified mode, driving image processing hardware by the image processing module to generate image information.
2. The method according to claim 1, wherein the designated operation event of the physical key includes at least one of a double-click event of a volume key, and a long-press event of a volume key.
3. The method of claim 1, wherein the operating system is in a sleep state according to at least one of the following conditions:
media services are not invoked, telephony services are not invoked, and power services are not invoked.
4. The method of claim 1, wherein the thread is a delayed thread, and wherein invoking the power service by the thread comprises:
and calling power supply service after preset time through the delay thread.
5. The method according to claim 1 or 2 or 3 or 4, wherein the step of starting up an image processing module comprises:
judging whether the image processing module is in a background mode;
if yes, calling an onResume function to start the image processing module;
if not, calling an onCreate function and an onResume function to start the image processing module.
6. The method according to claim 5, wherein the step of reading the designation information to enter a designation mode of the image processing module comprises:
when the onResume function is called to start the image processing module, the specified information is read to enter a specified mode of the image processing module.
7. The method of claim 1, 2, 3 or 4, wherein in the specified mode, the step of driving image processing hardware by the image processing module to generate image information comprises:
starting an image generation mode of the image processing module;
starting the image processing hardware in a power-on standby state by the image processing module;
and after the image processing hardware is started, sending an image generation request to drive the image processing hardware to generate one or more frames of image information.
8. The method of claim 7, wherein the step of initiating the generate image mode of the image processing module comprises:
when the image processing module is in a background mode, switching the image processing module into an image generating mode;
and when the image processing module is not in the background mode, entering an image generation mode.
9. The method of claim 7, wherein the step of sending an image generation request to drive the image processing hardware to generate one or more frames of image information after the image processing hardware is started comprises:
judging whether a preview image refreshing message is received or not; if yes, generating an image generation request after a preset time;
and sending the image generation request.
10. The method of claim 7, wherein the step of sending an image generation request to drive the image processing hardware to generate one or more frames of image information after the image processing hardware is started comprises:
when the image processing hardware generates a frame of image information, driving audio hardware to play a prompt tone once;
and naming the generated one or more frames of image information according to the uniform file name and different configured suffixes.
11. An apparatus for generating image information, comprising:
the operating system awakening module is used for reporting the key event of the physical key to an input process when monitoring the specified operating event aiming at the physical key; when the operating system is in a dormant state and the proxy state is the state of refusing to receive the input event, the input process changes the proxy state into the state of receiving the input event; the input process sends the characteristic information of the operating system in the dormant state to a window manager; when the window manager determines that the operating system is in a dormant state according to the characteristic information, starting a thread; invoking a power service through the thread;
the specified information setting module is used for setting specified information in the operating system;
the starting module is used for starting the image processing module;
a specified information reading module for reading the specified information to enter a specified mode of the image processing module;
and the image information generating module is used for driving the image processing hardware to generate the image information by the image processing module in the specified mode.
12. The apparatus according to claim 11, wherein the specifying information reading module includes:
and the node reading submodule is used for reading the specified information when the onResume function is called to start the image processing module so as to enter a specified mode of the image processing module.
13. The apparatus according to claim 11 or 12, wherein the image information generating module comprises:
the generated image mode starting submodule is used for starting the generated image mode of the image processing module;
the hardware starting submodule is used for starting the image processing hardware in a power-on standby state;
and the image generation request sending submodule is used for sending an image generation request after the image processing hardware is started so as to drive the image processing hardware to generate one or more frames of image information.
14. An electronic device, comprising a control module, an image processing module, and image processing hardware; wherein,
the control module includes:
the operating system starting module is used for reporting the key event of the physical key to an input process when monitoring the specified operation event aiming at the physical key; when the operating system is in a dormant state and the proxy state is the state of refusing to receive the input event, the input process changes the proxy state into the state of receiving the input event; the input process sends the characteristic information of the operating system in the dormant state to a window manager; when the window manager determines that the operating system is in a dormant state according to the characteristic information, starting a thread; invoking a power service through the thread;
the specified information setting module is used for setting specified information in the operating system;
the starting module is used for starting the image processing module;
the image processing module includes:
a specified information reading module for reading the specified information to enter a specified mode of the image processing module;
and the image information generating module is used for driving the image processing hardware to generate the image information by the image processing module in the specified mode.
CN201510011769.8A 2015-01-09 2015-01-09 A kind of generation method of image information, device and electronic equipment Active CN104572204B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510011769.8A CN104572204B (en) 2015-01-09 2015-01-09 A kind of generation method of image information, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510011769.8A CN104572204B (en) 2015-01-09 2015-01-09 A kind of generation method of image information, device and electronic equipment

Publications (2)

Publication Number Publication Date
CN104572204A CN104572204A (en) 2015-04-29
CN104572204B true CN104572204B (en) 2018-05-22

Family

ID=53088362

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510011769.8A Active CN104572204B (en) 2015-01-09 2015-01-09 A kind of generation method of image information, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN104572204B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210056220A1 (en) * 2019-08-22 2021-02-25 Mediatek Inc. Method for improving confidentiality protection of neural network model

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103116450A (en) * 2013-01-22 2013-05-22 上海艾为电子技术有限公司 Method and device for controlling equipment state and equipment
CN103810971A (en) * 2012-11-14 2014-05-21 中兴通讯股份有限公司 Energy-saving display method and device of terminal, LCD (liquid crystal display) module, terminal
CN103870290A (en) * 2012-12-10 2014-06-18 联想(北京)有限公司 Switching method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101920020B1 (en) * 2012-08-07 2019-02-11 삼성전자 주식회사 Status Change Control Method and Electronic Device supporting the same
CN104158531A (en) * 2013-05-13 2014-11-19 鸿富锦精密工业(深圳)有限公司 Electronic device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810971A (en) * 2012-11-14 2014-05-21 中兴通讯股份有限公司 Energy-saving display method and device of terminal, LCD (liquid crystal display) module, terminal
CN103870290A (en) * 2012-12-10 2014-06-18 联想(北京)有限公司 Switching method and device
CN103116450A (en) * 2013-01-22 2013-05-22 上海艾为电子技术有限公司 Method and device for controlling equipment state and equipment

Also Published As

Publication number Publication date
CN104572204A (en) 2015-04-29

Similar Documents

Publication Publication Date Title
US20230094272A1 (en) Notification Processing System, Method, and Electronic Device
US12075358B2 (en) Terminal device sleep state control method and apparatus, and computer-readable storage medium
US10031575B2 (en) Method and device for waking up MCU chip
JP6072362B2 (en) Application program processing method, apparatus, program, and storage medium
JP6355735B2 (en) Method and apparatus for initiating an energy saving mode
CN106815065B (en) Background application awakening method and device and electronic equipment
CN104731604B (en) Determine the method and system for being playing the application program of sound
CN103024630A (en) Volume regulating method of first electronic equipment and first electronic equipment
RU2619089C2 (en) Method and device for multiple videos reproduction
CN104980592A (en) Intelligent mobile terminal intercommunication method and apparatus thereof
JP2017510920A (en) Power consumption control method, apparatus, program, and recording medium
WO2010060248A1 (en) A method to adjust the incoming call ring tone of the mobile terminal and a mobile terminal
WO2015154376A1 (en) Power saving method and device for terminal, terminal, computer program and carrier
CN110543333B (en) Sleep processing method and device for processor, mobile terminal and storage medium
CN104572204B (en) A kind of generation method of image information, device and electronic equipment
CN106453940B (en) A kind of method and device adjusting volume
CN117812404A (en) Display equipment and application starting management method
CN106550129A (en) Communication means, device and mobile terminal under battery saving mode
CN111338501A (en) Pressure-sensitive vibration processing method and device, mobile terminal and electronic equipment
WO2023078262A1 (en) Application processing method and apparatus, and electronic device
CN113067757B (en) Information transmission and storage method, device and medium
EP2608014A2 (en) Device and method for terminating music reproduction in a wireless terminal
KR100605963B1 (en) Method for processing automatical back up of wireless terminal using external memory
CN102769704A (en) Silence starting-up treatment method based on mobile phone, and mobile phone
CN116567171B (en) Video call method and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Shandong City, Qingdao Province, Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Country or region after: China

Address before: Shandong City, Qingdao Province, Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.

Country or region before: China