Image processing circuit, image processing method, electronic apparatus, and storage medium
By using a switching switch circuit in the image processing circuit, the working mode of the master and slave processor is dynamically adjusted according to the shooting scene information, the problem of high energy consumption of the dual processor system is solved, and the battery life and processing capabilities of the mobile terminal are improved.
Patent Information
- Application Number
- CN202310508118.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2024-11-08
AI Technical Summary
The dual processor system has high energy consumption, which affects the battery life and user experience of the mobile terminal.
By introducing a switching switch circuit into the image processing circuit, the main processor controls the input port conduction mode of the switching switch circuit based on the shooting scene information, realizing dynamic working mode switching between the master and slave processors, ensuring that working together when needed to improve Processing capability otherwise only enables the main processor to operate to reduce energy consumption.
It effectively reduces the energy consumption of the dual processor system, improves the battery life of the mobile terminal, and ensures a collaborative working mode with high processing capabilities, avoiding the high energy consumption caused by the dual processors working simultaneously for a long time.
Smart Images

Figure CN118915898A_ABST
Abstract
Description
Background Art
[0002] With the development of mobile communication technology, the functions supported by mobile terminal products are becoming more and more complex and diverse, which makes mobile terminals designed based on a single processor encounter bottlenecks in processing power. In order to overcome the problem of processing power and seek better processing effects, mobile terminals equipped with dual processors have begun to be widely used.
[0003] Using dual processors can improve the processing power of mobile terminals and support more applications. However, adding a processor will increase the energy consumption of the entire system. The relevant technology uses temperature control strategies to control energy consumption, but it loses user experience. Therefore, the current dual processor system still has the disadvantage of high energy consumption. Summary of the invention
[0004] The purpose of the present disclosure is to provide an image processing circuit, an image processing method, an electronic device and a computer-readable storage medium, thereby reducing the energy consumption of a dual-processor system at least to a certain extent.
[0005] According to a first aspect of the present disclosure, there is provided an image processing circuit, comprising: a processor, the processor comprising a main processor and a slave processor, the slave processor comprising a data input terminal and a data output terminal, and the slave processor being connected to the main processor via the data output terminal; a switching circuit, connected between an image sensor and the processor, comprising a first input terminal, a first output terminal, and a second output terminal, the first output terminal being connected to the data input terminal, and the second output terminal being connected to the main processor; the main processor being used to obtain shooting scene information, and controlling the first input terminal to be conducted with the first output terminal, or controlling the first input terminal to be conducted with the second output terminal, according to the shooting scene information.
[0006] According to a second aspect of the present disclosure, there is provided an image processing method, which is applied to a main processor of an electronic device, wherein the electronic device further comprises a slave processor and a switching circuit; the slave processor comprises a data input terminal and a data output terminal, and the slave processor is connected to the main processor via the data output terminal; the switching circuit is connected between the image sensor and the processor, and comprises a first input terminal, a first output terminal, and a second output terminal, wherein the first output terminal is connected to the data input terminal, and the second output terminal is connected to the main processor; the image processing method comprises: acquiring shooting scene information; controlling the first input terminal to be connected to the first output terminal, or controlling the first input terminal to be connected to the second output terminal according to the shooting scene information.
[0007] According to a third aspect of the present disclosure, an electronic device is provided, comprising the above-mentioned image processing circuit and configured to execute the above-mentioned image processing method. The electronic device comprises a processor and a memory, wherein the memory is configured to store executable instructions of the processor, and the processor is configured to execute the above-mentioned image processing method by executing the executable instructions.
[0008] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented.
[0009] The image processing circuit provided by the embodiment of the present disclosure includes a main processor and a slave processor, and the main processor controls the switching switch circuit to adjust the working mode between the main processor and the slave processor. On the one hand, when the main processor controls the first input end and the first output end of the switching switch circuit to be turned on according to the shooting scene information, since the slave processor is connected to the main processor through the data output end, in this mode, the main processor and the slave processor can work together to improve the processing capacity so as to support more applications. On the other hand, when the main processor controls the first input end and the second output end of the switching switch circuit to be turned on according to the shooting scene information, since the second output end is directly connected to the main processor, only the main processor can be put into working state without more processing capacity, so as to reduce energy consumption; on the other hand, the main processor can freely switch between the two working modes according to the identified shooting scene information based on the shooting scene information, while ensuring the high processing capacity of the main and slave processors when working together, actively switch to the main processor working mode in the scene without collaborative processing, avoiding the main and slave processors being in the simultaneous working mode for a long time, greatly reducing energy consumption, and thus improving the battery life of the mobile terminal equipped with the image processing circuit.
[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0012] Figure 1 A schematic diagram schematically illustrates an image processing circuit according to an exemplary embodiment of the present disclosure;
[0013] Figure 2 Another image processing circuit diagram schematically illustrates an exemplary embodiment of the present disclosure;
[0014] Figure 3 A schematic diagram schematically illustrates a switching circuit of an exemplary embodiment of the present disclosure;
[0015] Figure 4 A schematic diagram schematically illustrates another switching circuit according to an exemplary embodiment of the present disclosure;
[0016] Figure 5 A schematic diagram schematically illustrates a switching circuit of an exemplary embodiment of the present disclosure;
[0017] Figure 6 A flowchart schematically illustrating the operating principle of an image processing circuit in an exemplary embodiment of the present disclosure;
[0018] Figure 7 A flowchart schematically illustrates an image processing method in an exemplary embodiment of the present disclosure;
[0019] Figure 8 A schematic diagram schematically illustrates a power saving mode in an exemplary embodiment of the present disclosure;
[0020] Fig. 9 A schematic diagram of an electronic device to which the embodiments of the present disclosure can be applied is shown. DETAILED DESCRIPTION
[0021] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0022] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0023] To further improve the processing capability of mobile terminals, mobile terminals are equipped with dual-core processors, one of which is a main processor as the core processor, usually integrating CPU (Central Processing Unit), ISP (Image Signal Processor), GPU (Graphics Processing Unit) and other modules, responsible for data processing in various core scenarios. The other slave processor is used to assist the main processor to improve the overall processing performance.
[0024] In one scenario, a mobile terminal is equipped with a main processor and a slave processor. The main processor is responsible for processing communication applications such as calls and text messages, and the slave processor is responsible for processing entertainment applications (such as games and beauty photos). In this way, even if the mobile terminal has many background programs, it will not affect the basic functions and running speed of the mobile terminal.
[0025] In another scenario, the mobile terminal is equipped with a main processor and a slave processor. The main processor handles complex data processing of various applications, and the slave processor serves as a dedicated processor for image processing to enhance the image processing capability of the mobile terminal.
[0026] For example, a mobile terminal equipped with two processors usually has a large energy consumption, which affects the battery life of the mobile terminal. As the demand for the processing power of the camera in the mobile terminal increases, there are power consumption bottlenecks in video recording scenes, default photo scenes, portrait shooting scenes, etc., which not only affects the battery life of the mobile terminal, but also hinders the development of new functions for the mobile terminal.
[0027] In the related art, in order to reduce the energy consumption of dual processors, a temperature control strategy is adopted that sacrifices user experience, which affects the expressiveness of the image and, to a certain extent, affects the user experience.
[0028] Based on one or more of the above problems, the present disclosure provides an image processing circuit, such as Figure 1 As shown, the image processing circuit may include a processor (including a main processor 1 and a slave processor 2 ) and a switching circuit 3 .
[0029] The slave processor 2 includes a data input terminal 21 and a data output terminal 22, and the slave processor 2 is connected to the data input terminal 11 of the main processor 1 through the data output terminal 22. The switching circuit 3 is connected between the image sensor and the processor, and includes a first input terminal 31, a first output terminal 32, and a second output terminal 33. The first output terminal 32 is connected to the data input terminal 21, and the second output terminal 33 is connected to the data input terminal 12 of the main processor 1; the main processor 1 is used to obtain the shooting scene information, and control the first input terminal 31 to be connected to the first output terminal 32, or control the first input terminal 31 to be connected to the second output terminal 33 according to the shooting scene information. The data input terminal 11 and the data input terminal 12 of the main processor 1 can be two independent ports, or can be the same data input port, and there is no special restriction on this.
[0030] The image processing circuit of the embodiment of the present disclosure adjusts the working mode between the main processor 1 and the slave processor 2 by controlling the switching circuit 3 through the main processor 1. On the one hand, when the main processor 1 controls the first input terminal 31 and the first output terminal 32 of the switching circuit 3 to be turned on according to the shooting scene information, since the slave processor 2 is connected to the main processor 1 through the data output terminal 22, in this mode, the main processor 1 and the slave processor 2 can work together to improve the processing capability so as to support more applications. On the other hand, when the main processor 1 controls the first input terminal 31 and the second output terminal 33 of the switching circuit 3 to be turned on according to the shooting scene information, since the second output terminal 33 is directly connected to the main processor 1, only the main processor 1 can be put into operation without the need for more processing power to reduce energy consumption; on the other hand, the main processor 1 can freely switch between the two operating modes based on the shooting scene information according to the identified shooting scene information, thereby ensuring the high processing power of the master and slave processors when working together, and actively switching to the working mode of the main processor 1 in a scenario where no collaborative processing is required, thereby avoiding the master and slave processors being in the simultaneous working state for a long time, greatly reducing energy consumption, and thereby improving the battery life of the mobile terminal equipped with the image processing circuit.
[0031] The image processing circuit of the embodiment of the present disclosure can be loaded on a mobile terminal, which can also be referred to as a terminal device, a smart terminal, a smart device, an electronic device, a terminal, etc., and the embodiment of the present disclosure does not impose any special restrictions on this. Among them, the mobile terminal can be a smart device equipped with a dual processor, such as a smart phone, a computer, a tablet computer, a car device, a game device, an imaging device, a wearable device, and other smart devices.
[0032] The components in the image processing circuit of the embodiment of the present disclosure are described below.
[0033] The image processing circuit may be provided in a mobile terminal, which includes a plurality of processors, such as a main processor 1 and at least one slave processor 2, and each slave processor 2 includes a data input terminal 21 and a data output terminal 22, and is connected to the main processor 1 via the data output terminal 22. The image processing circuit is described below by taking an example in which the image processing circuit includes a main processor 1 and a slave processor 2.
[0034] See also Figure 1 As shown, the image processing circuit is connected between the image sensor and the processor (main processor 1 and slave processor 2), and is used to control the image sensor to be connected to the main processor 1 or to control the image sensor to be connected to the slave processor 2. The image sensor is used to receive the light signal collected by the camera and complete the photoelectric signal conversion.
[0035] Among them, the image processing circuit can be between the image sensor corresponding to the front camera and the processor to control whether the data from the front camera is processed by the main processor 1, or processed by the slave processor 2 and the main processor 1 in sequence. Of course, the image processing circuit can also be set between the image sensor corresponding to the rear camera and the processor to control whether the data from the rear camera is processed by the main processor 1, or processed by the slave processor 2 and the main processor 1 in sequence. The embodiment of the present disclosure is described by taking the image processing circuit connected between the sensor corresponding to the front camera and the processor as an example.
[0036] Continue to see Figure 1 In one working mode, the slave processor 2 is connected to the data input terminal 11 of the master processor 1 through the data output terminal 22, and the first output terminal 32 is connected to the data input terminal 21 of the slave processor 2. The processed data processed by the slave processor 2 is input to the master processor 1 via the connection circuit between the data output terminal 22 and the data input terminal 11 of the master processor 1, so as to realize the coordinated work of the master and slave processors.
[0037] Correspondingly, in another working mode, the raw data output by the image sensor is directly input to the main processor 1 via the connection circuit between the second output terminal 33 and the data input terminal 12 of the main processor 1, that is, the slave processor 2 is skipped and the main processor 1 directly processes the data.
[0038] Based on this, the main processor 1 is used to control the first input terminal 31 and the first output terminal 32 to be connected when the shooting scene information indicates that the main processor 1 and the slave processor 2 need to work together; and the main processor 1 is also used to control the first input terminal 31 and the second output terminal 33 to be connected when the shooting scene information indicates that the main processor 1 and the slave processor 2 do not need to work together.
[0039] The embodiment of the present disclosure does not impose any special restrictions on the interface type of each component. The shooting scene information includes the current shooting scene content collected by the camera (such as the front camera), and the main processor 1 can determine the current shooting scene type according to the shooting scene information, so as to determine whether the main processor 1 and the slave processor 2 need to work together according to the shooting scene type.
[0040] In some possible embodiments, scenes may be divided according to the processing capabilities of the main processor 1 and the slave processor 2. For example, the processing capability of the slave processor 2 is more advantageous in night scenes, scenes with rich colors, and scenes with high-definition video. When the scene type is determined to be the above type based on the shooting scene information, the main processor 1 controls the main processor 1 and the slave processor 2 to work together.
[0041] Correspondingly, the processing capability of the main processor 1 is more advantageous in slow-motion scenes, snapshot scenes, and scenes with high response speed requirements. When the scene type is determined to be the above type based on the shooting scene information, the main processor 1 performs data processing without turning on the master-slave processor collaborative working mode.
[0042] It is worth noting that the embodiments of the present disclosure can determine the scenario type for switching between single-processor and dual-processor working modes according to actual needs, and there is no special limitation on this.
[0043] In an exemplary embodiment, data exchange is implemented between the slave processor 2 and the master processor 1 via a communication bus. The communication bus may be I 3 C.I 2 C, etc., wherein the switching circuit 3 and each processing circuit can be connected through I 3 C, of course, it can also be connected through the SPI (Serial Peripheral Interface) bus.
[0044] It should be noted that the selection of the above connection lines is for illustrative purposes only, and the embodiments of the present disclosure do not specifically limit the connection lines.
[0045] The data interaction between the main processor 1 and the slave processor 2 may include: when the main processor 1 changes the working mode of the processor by controlling the conduction mode of the switch switching circuit 3, data is processed synchronously between the main processor 1 and the slave processor 2 to avoid the problem of screen jumps during image processing by data synchronization.
[0046] In an exemplary embodiment, the main processor 1 is also used to send the processing data corresponding to the main processor 1 to the slave processor 2 through the communication bus when the first input terminal 31 switches from being connected to the second output terminal 33 to being connected to the first output terminal 32; accordingly, the slave processor 2 is also used to process the received processing data.
[0047] Continue to see Figure 1 As shown, in the scenario where the single-processor working mode is switched to the dual-processor working mode, the image is initially processed only by the main processor 1, that is, the first input terminal 31 and the second output terminal 33 are connected, and then the main processor 1 determines that it is currently necessary to switch to the dual-processor working mode based on the shooting scene information. In addition to controlling the first input terminal 31 and the first output terminal 32 to be connected, the main processor 1 also synchronizes the current processing data of the main processor 1 to the slave processor 2 through the communication bus, so that the slave processor 2 continues to process the processed data.
[0048] Based on this, in the scenario where the single-processor working mode is switched to the dual-processor working mode, the image output mode is switched from image sensor → main processor 1 → rendering to image sensor → main processor 1 → slave processor 2 (processing data synchronized from main processor 1) → main processor 1 → rendering. After the switch is completed, the output mode is switched to image sensor → slave processor 2 → main processor 1 → rendering, thereby achieving seamless switching of the output effects and avoiding image content jumps caused by the switch from the single-processor working mode to the dual-processor working mode.
[0049] In an exemplary embodiment, the slave processor 2 is further configured to send the original data received from the slave processor 2 to the master processor 1 through the communication bus when the first input terminal 31 switches from being connected to the first output terminal 32 to being connected to the second output terminal 33 .
[0050] Continue to see Figure 1 As shown, in the scenario where the dual-processor working mode is switched to the single-processor working mode, the image begins to be processed collaboratively by the master and slave processors, that is, the first input terminal 31 is connected to the first output terminal 32, and then the master processor 1 determines that it is necessary to switch to the single-processor working mode according to the shooting scene information, then the master processor 1 controls the first input terminal 31 and the second output terminal 33 to be connected, and the master processor 1 can synchronize the original data to the master processor 1 through the slave processor 2 so that the master processor 1 processes the original data. This process can timely avoid the slave processor 2 from executing the data processing process, and hand over the data processing work to the main processor 1, thereby reducing the processing energy consumption and realizing seamless switching of the output effect.
[0051] In another exemplary embodiment, in a scenario where the main processor 1 determines that the single processor working mode needs to be switched according to the shooting scene information, the slave processor 2 can continue to execute the data processing process and complete the image processing work this time, and the subsequent image processing process is only executed by the main processor 1.
[0052] See also Figure 2 A schematic diagram of another image processing circuit according to an exemplary embodiment of the present disclosure is shown. Figure 2 As shown, for components other than the front-end, they can also be processed in a similar manner as the front-end, that is, a switch switching circuit can be set, which can be selected according to actual needs, and there is no special restriction on this. The embodiment of the present disclosure does not impose any special restrictions on the types of input terminals and output terminals between the components.
[0053] In an exemplary embodiment, the switch circuit may include two groups of switch circuits; one group of switch circuits is connected between the first input terminal 31 and the first output terminal 32 , and is used to transmit the data of the image sensor to the slave processor 2 .
[0054] Another set of switching circuits is connected between the first input terminal 21 and the second output terminal 33 , and is used to transmit the data of the image sensor to the main processor 1 .
[0055] The main processor 1 of the embodiment of the present disclosure further includes an enable terminal, Figure 3 A schematic diagram of a switching circuit according to an exemplary embodiment of the present disclosure is shown. Figure 3 As shown, a switching circuit connected between the first input terminal 31 and the first output terminal 32 includes: a first switch tube T1, a second switch tube T2, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4 and a fifth resistor R5.
[0056] Among them, the control end of the first switch tube T1 is connected to the enable end of the main processor 1 through the first resistor R1, the first end of the first switch tube T1 is connected to the enable end of the main processor 1, and the second end of the first switch tube T1 is connected to the control end of the second switch tube T2; the first end of the second resistor R2 is connected to the enable end of the main processor 1, and the second end of the second resistor R2 is connected to the first switch tube T1; the control end of the second switch tube T2 is connected to the second end of the first switch tube T1, the first end of the second switch tube T2 is connected to the output end of the image sensor, and the second end of the second switch tube T2 is connected to the slave processor 2; the first end of the third resistor R3 is connected to the control end of the second switch tube T2, and the second end of the third resistor R3 is connected to the first end of the second switch tube T2; the first end of the fourth resistor R4 is connected to the first end of the second switch tube T2, and the second end of the fourth resistor R4 is grounded; the first end of the fifth resistor R5 is connected to the second end of the second switch tube T2, and the second end of the fifth resistor R5 is grounded.
[0057] In another exemplary embodiment, Figure 4 As shown, another set of switching circuits connected between the first input terminal 31 and the second output terminal 33 may also include a first switch tube T1, a second switch tube T2, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4 and a fifth resistor R5. The specific connection method of each device is:
[0058] The control end of the first switch tube T1 is connected to the enable end of the main processor 1 through the first resistor R1, the first end of the first switch tube T2 is connected to the enable end of the main processor 1, and the second end of the first switch tube T1 is connected to the control end of the second switch tube T2; the first end of the second resistor R2 is connected to the enable end, and the second end of the second resistor R2 is connected to the first switch tube T1; the control end of the second switch tube T2 is connected to the second end of the first switch tube T1, the first end of the second switch tube T2 is connected to the output end of the image sensor, and the second end of the second switch tube T2 is connected to the main processor 1; the first end of the third resistor R3 is connected to the control end of the second switch tube T2, and the second end of the third resistor R3 is connected to the first end of the second switch tube T2; the first end of the fourth resistor R4 is connected to the first end of the second switch tube T2, and the second end of the fourth resistor R4 is grounded; the first end of the fifth resistor R5 is connected to the second end of the second switch tube T2, and the second end of the fifth resistor R5 is grounded.
[0059] The first switch tube T1 and the second switch tube T2 in the embodiment of the present disclosure can both be switch transistors, and both have a control end, a first end, and a second end. The control end of the switch transistor can be a gate, the first end can be a source, and the second end can be a drain; or the control end of each switch transistor can be a gate, the first end can be a drain, and the second end can be a source. In addition, each switch transistor can be an enhancement transistor or a depletion transistor, and the embodiment of the present disclosure does not make special restrictions on this. In addition, each switch transistor can be an N-type transistor or a P-type transistor, and the embodiment of the present disclosure does not make special restrictions on this.
[0060] The resistance values of the first resistor R1 , the second resistor R2 , the third resistor R3 , the fourth resistor R4 and the fifth resistor R5 may be in the kilo-ohm range, and the specific resistance values may be customized according to user requirements, which is not specifically limited in the embodiments of the present disclosure.
[0061] Based on the above Figure 3 and Figure 4 The switching circuits shown respectively can control the first input terminal 31 to be connected to the first output terminal 32 , or control the first input terminal 31 to be connected to the second output terminal 33 .
[0062] The following description is made by taking all the switch elements as N-type thin film transistors as an example. Since the switch elements are all N-type thin film transistors, the on signals of all the switch elements are high level signals, and the off signals of all the switch elements are low level signals.
[0063] like Figure 5As shown, the above-mentioned switching switch circuit 3 may include a first switching circuit 51 and a second switching circuit 52, wherein the first switching circuit 51 is connected between the first input terminal 31 and the first output terminal 32, and the second switching circuit 52 is connected between the first input terminal 31 and the second output terminal 33.
[0064] When the enable signal connected to the enable end of the first switching circuit 51 is at a low level, and the enable signal connected to the enable end of the second switching circuit 52 is at a high level, it is a single processor working mode, that is, the first switch tube T1 and the second switch tube T2 in the second switching circuit 52 are both turned on, and the first input end 31 is turned on with the second output end 33. In this working mode, the data output by the image sensor is processed by the main processor 1 and then output, avoiding the dual processors working at the same time and reducing energy consumption.
[0065] Correspondingly, when the enable signal connected to the enable end of the first switching circuit 51 is at a high level, and the enable signal connected to the enable end of the second switching circuit 52 is at a low level, it is a dual-processor working mode, that is, the first switch tube T1 and the second switch tube T2 in the first switching circuit 51 are both turned on, and the first input end 31 is turned on with the first output end 32. In this working mode, the data output by the image sensor is processed by the slave processor 2 and the main processor 1 in sequence and then output, so that the dual processors work synchronously, which can improve the image processing quality and achieve the image processing effect that meets the user's expectations.
[0066] From the above, it can be seen that the main processor 1 can control the first switching circuit 51 to be turned on, or control the second switching circuit 52 to be turned on according to the actual shooting scene information, so as to realize the scene-based free switching of the processor's working mode. In the scenario where dual-processor processing is not required, the power saving mode (single-processor working mode) can be entered. In the scenario where higher image processing quality is required, the power saving mode can be canceled and the dual-processor working mode can be entered, thereby achieving an effective balance between power saving and processing capability.
[0067] The switching circuit 3 may also be a circuit structure of other forms, such as a single-pole double-throw switch, wherein the fixed end of the single-pole double-throw switch is connected to the first input end 31, the first movable end is connected to the first output end 32, and the second movable end is connected to the second output end 33. The specific form of the switching circuit 3 can be customized according to user needs and is not specifically limited in this exemplary embodiment.
[0068] It should be noted that, in the initialization state, the enable signal connected to the enable end of the first switching circuit 51 can be defaulted to a low level, and the enable signal connected to the enable end of the second switching circuit 52 can be defaulted to a high level, that is, the single processor working mode of the main processor 1. Only when it is determined according to the shooting scene information that the master and slave processors need to work together, the enable signal connected to the enable end of the first switching circuit 51 is controlled to a high level, and the enable signal connected to the enable end of the second switching circuit 52 is controlled to a low level, and the dual processor working mode is entered.
[0069] Combine the following Figure 6 The operating principle of the image processing circuit is explained.
[0070] Step S610: The single processor working mode is set as default.
[0071] The enable signal at the enable end of the first switching circuit 51 is at a low level, and the enable signal at the enable end of the second switching circuit 52 is at a high level.
[0072] Step S620: the main processor 1 obtains shooting scene information.
[0073] Step S630: The main processor 1 determines whether it is necessary to switch to a dual processor working mode of a master and a slave processor based on the shooting scene information.
[0074] Step S640: The main processor 1 determines that it needs to switch to the dual-processor working mode based on the shooting scene information, then activates the dual-processor working mode, and controls the enable signal of the enable end of the first switching circuit 51 to be high level, and the enable signal of the enable end of the second switching circuit 52 to be low level, and outputs the image processing result based on the working mode of the dual processor.
[0075] Among them, the switch control circuit can be a MIPI (Mobile Industry Processor Interface) switch. After the dual-processor working mode is activated, the mode can be switched by switching the MIPI switch.
[0076] Step S650: the main processor 1 obtains shooting scene information.
[0077] Step S660: The main processor 1 determines whether it is necessary to switch to the single processor working mode based on the shooting scene information.
[0078] Among them, if it is necessary to switch to the single processor working mode, go to step S670, activate the single processor working mode, and control the enable signal of the enable end of the first switching circuit 51 to be low level, and the enable signal of the enable end of the second switching circuit 52 to be high level, and output the image processing result based on the working mode of the single processor, and continue to go to step S620.
[0079] In summary, the image processing circuit provided in the embodiment of the present disclosure adjusts the working mode between the main processor 1 and the slave processor 2 by controlling the switching circuit 3 through the main processor 1. On the one hand, when the main processor 1 controls the first input terminal 31 and the first output terminal 32 of the switching circuit 3 to be turned on according to the shooting scene information, since the slave processor 2 is connected to the main processor 1 through the data output terminal, in this mode, the main processor 1 and the slave processor 2 can work together to improve the processing capability so as to support more applications. On the other hand, when the main processor 1 controls the first input terminal 21 and the second output terminal 33 of the switching circuit 3 to be turned on according to the shooting scene information, since the second output terminal 33 is directly connected to the main processor 1, the main processor 1 can be in a working state without more processing power, so as to reduce energy consumption; on the other hand, the main processor 1 can freely switch between two working modes according to the identified shooting scene information based on the shooting scene information, while ensuring the high processing power of the master and slave processors when working together, and actively switch to the main processor 1 working mode in the scene without collaborative processing, avoiding the master and slave processors being in working mode for a long time, greatly reducing energy consumption, and thus improving the battery life of the mobile terminal equipped with the image processing circuit. In addition, by exchanging data between the master and slave processors, when switching the working modes of different processors, the master and slave processors synchronize data through the communication bus, which can avoid the difficulty of image jump when switching the working mode, and achieve seamless docking of the picture, thereby improving the overall performance of the mobile terminal equipped with multiple processors.
[0080] For further information, see Figure 7 The present disclosure also provides an image processing method, which is as follows: Figure 1 and Figure 7 The image processing method according to the embodiment of the present disclosure is described.
[0081] The image processing method of the embodiment of the present disclosure is applied to a main processor 1 of an electronic device, and the electronic device also includes a slave processor 2 and a switching circuit 3; the slave processor 2 includes a data input terminal 21 and a data output terminal 22, and the slave processor 2 is connected to the main processor 1 through the data output terminal 22; the switching circuit 3 is connected between the image sensor and the processor, and includes a first input terminal 31, a first output terminal 32, and a second output terminal 33, the first output terminal 32 is connected to the data input terminal 21, and the second output terminal 33 is connected to the main processor 1; the image processing method may include steps S710 and S720:
[0082] In step S710, the shooting scene information is obtained;
[0083] In step S720, the first input terminal is controlled to be connected to the first output terminal, or the first input terminal is controlled to be connected to the second output terminal according to the shooting scene information.
[0084] The main processor 1 may obtain the shooting scene information, and may obtain the shooting scene information through the front camera of the electronic device.
[0085] In an exemplary embodiment, the slave processor 2 is connected to the data input terminal of the master processor 1 via the data output terminal 22 , and the second output terminal 33 is connected to the data input terminal of the master processor 1 .
[0086] The main processor 1 can determine whether the current shooting requires the dual processor working mode after obtaining the shooting scene information. The main processor 1 controls the first input terminal 31 to be connected to the first output terminal 32, or controls the first input terminal 31 to be connected to the second output terminal 33 according to the shooting scene information.
[0087] In an exemplary embodiment, the above-mentioned switching switch circuit 3 may include a first switching circuit 51 and a second switching circuit 52, wherein the first switching circuit 51 is connected between the first input terminal 31 and the first output terminal 32, and the second switching circuit 52 is connected between the first input terminal 31 and the second output terminal 33.
[0088] It should be noted that, in the initialization state, the enable signal connected to the enable end of the first switching circuit 51 can be defaulted to a low level, and the enable signal connected to the enable end of the second switching circuit 52 can be defaulted to a high level, that is, the single processor working mode of the main processor 1. Only when it is determined according to the shooting scene information that the master and slave processors need to work together, the enable signal connected to the enable end of the first switching circuit 51 is controlled to a high level, and the enable signal connected to the enable end 44 of the second switching circuit 52 is controlled to a low level, and the dual processor working mode is entered.
[0089] Figure 8 A schematic diagram showing a power saving mode according to an exemplary embodiment of the present disclosure is shown. Figure 8 As shown, when the front camera needs to save power consumption, the enable signal connected to the enable end of the first switching circuit 51 is at a low level, and the enable signal connected to the enable end of the second switching circuit 52 is at a high level, that is, the single processor working mode of the main processor 1. In this case, the second output end 33 can be directly connected to the sensor hub end of the main processor 1, so that the built-in processor of the sensor hub performs processing, thereby achieving the goal of reducing power consumption.
[0090] During the image processing process performed by the image processing circuit based on the embodiment of the present invention, a mobile terminal equipped with a dual processor can save 25-30 mA of power consumption, of which the expected benefit corresponding to bypassing the power consumption of the slave processor in the photo / video shooting scenario is 17-20 mA, and the expected benefit corresponding to MM and MX on the platform of the mobile terminal is 5-10 mA.
[0091] It should be noted that see Figure 8 For the rear camera, the processing method can be the same as that of the front camera. The main processor 1 controls the switching circuit 3 to switch the single-processor and dual-processor working modes. The image processing circuit of the embodiment of the present disclosure can process the data collected by each camera module in the above manner, and the specific type of the camera module is not specifically limited.
[0092] In an exemplary embodiment, when the main processor 1 controls the first input terminal 31 to switch from being connected to the second output terminal 33 to being connected to the first output terminal 32 based on the shooting scene information, the main processor 1 sends the processed data to the slave processor 2 so that the slave processor 2 processes the received processed data.
[0093] In an exemplary embodiment, when the main processor 1 controls the first input terminal 31 to switch from being connected to the first output terminal 32 to being connected to the second output terminal 33 based on the shooting scene information, the main processor 1 receives the original data sent by the slave processor 2 for processing.
[0094] The connection relationship and operation principle of the components of the image processing circuit involved in the image processing method can be found in the detailed description of the above-mentioned embodiment of the image processing circuit, which will not be repeated here.
[0095] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0096] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0097] The exemplary embodiments of the present disclosure also provide an electronic device including the above-mentioned image processing circuit and used to execute the above-mentioned method, and the above-mentioned mobile terminal. Generally, the electronic device may include a processor and a memory, wherein the memory is used to store executable instructions of the processor, and the processor is configured to execute the above-mentioned image processing method by executing the executable instructions.
[0098] Below Fig. 9 Taking the mobile terminal 900 in the example, the structure of the electronic device in the embodiment of the present disclosure is exemplarily described. It should be understood by those skilled in the art that in addition to the components specifically used for mobile purposes, Fig. 9 The structure in the figure can also be applied to fixed type devices. In other embodiments, the mobile terminal 900 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware. The interface connection relationship between the components is only shown schematically and does not constitute a structural limitation on the mobile terminal 900. In other embodiments, the mobile terminal may also adopt the same Fig. 9 Different interface connection methods, or a combination of multiple interface connection methods.
[0099] like Fig. 9 As shown, the mobile terminal 900 may specifically include: a processor 901, a memory 902, a bus 903, a mobile communication module 904, an antenna 1, a wireless communication module 905, an antenna 2, a display screen 906, a camera module 907, an audio module 908, a power module 909, and a sensor module 910.
[0100] Each processor 901 may include one or more processing units. For example, the processor 901 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.
[0101] The encoder can encode (i.e. compress) an image or video to reduce the data size for storage or transmission. The decoder can decode (i.e. decompress) the encoded data of the image or video to restore the image or video data. The mobile terminal 900 can support one or more encoders and decoders.
[0102] The processor 901 may be connected to the memory 902 or other components via the bus 903. The processor 901 is used as a master processor, and the processor 9011 is used as a slave processor. The connection between the master and slave processors is similar to the image processing circuit of the embodiment of the present disclosure.
[0103] The memory 902 may be used to store computer executable program codes, which may include instructions. The processor 901 executes various functional applications and data processing of the mobile terminal 900 by running the instructions stored in the memory 902. The memory 902 may also store application data, such as images, videos, and other files.
[0104] The communication function of the mobile terminal 900 can be implemented by the mobile communication module 904, antenna 1, wireless communication module 905, antenna 2, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 904 can provide 3G, 4G, 5G and other mobile communication solutions applied to the mobile terminal 900. The wireless communication module 905 can provide wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. applied to the mobile terminal 900.
[0105] The display screen 906 is used to implement display functions, such as displaying user interfaces, images, videos, etc., and displaying abnormal prompt information. The camera module 907 is used to implement shooting functions, such as shooting images, videos, etc., to collect scene images. The audio module 908 is used to implement audio functions, such as playing audio, collecting voice, etc. The power module 909 is used to implement power management functions, such as charging the battery, powering the device, monitoring the battery status, etc. The sensor module 910 may include one or more sensors to implement corresponding induction detection functions.
[0106] In addition, the exemplary embodiments of the present disclosure further provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of the present specification.
[0107] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0108] In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0109] In addition, program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0110] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. An image processing circuit, characterized in that: include: A processor, the processor comprising a main processor and a slave processor, the slave processor comprising a data input terminal and a data output terminal, the slave processor being connected to the main processor via the data output terminal; A switching circuit, connected between the image sensor and the processor, comprising a first input terminal, a first output terminal, and a second output terminal, wherein the first output terminal is connected to the data input terminal, and the second output terminal is connected to the main processor; The main processor is used to obtain shooting scene information, and control the first input end to be connected to the first output end, or control the first input end to be connected to the second output end according to the shooting scene information.
2. The image processing circuit according to claim 1, characterized in that: The slave processor is connected to the data input terminal of the master processor via the data output terminal, and the second output terminal is connected to the data input terminal of the master processor; The main processor is used for controlling the first input end to be connected with the first output end when the shooting scene information indicates that the main processor and the slave processor need to work together; and The main processor is further configured to control the first input terminal to be connected to the second output terminal when the shooting scene information indicates that the main processor and the slave processor do not need to work together.
3. The image processing circuit according to claim 1, characterized in that: The slave processor and the master processor implement data exchange via a communication bus.
4. The image processing circuit according to claim 3, characterized in that: The main processor is further configured to send the processing data corresponding to the main processor to the slave processor via the communication bus when the first input end switches from being connected to the second output end to being connected to the first output end; The slave processor is further configured to process the received processing data.
5. The image processing circuit according to claim 3, characterized in that: The slave processor is further configured to send the original data received by the slave processor to the master processor via the communication bus when the first input terminal switches from being connected to the first output terminal to being connected to the second output terminal.
6. The image processing circuit according to claim 1, characterized in that: The switching circuit includes two groups of switching circuits; One set of the switching circuits is connected between the first input terminal and the first output terminal, and is used to transmit the data of the image sensor to the slave processor; Another set of the switching circuits is connected between the first input terminal and the second output terminal, and is used to transmit the data of the image sensor to the main processor.
7. The image processing circuit according to claim 6, characterized in that: The main processor further includes an enable terminal, a group of the switching circuits connected between the first input terminal and the first output terminal, including: A first switch tube, a control end of which is connected to the enable end of the main processor through a first resistor, a first end of the first switch tube is connected to the enable end of the main processor, and a second end of the first switch tube is connected to the control end of the second switch tube; A second resistor, wherein a first end of the second resistor is connected to the enable end, and a second end of the second resistor is connected to the first switch tube; a second switch tube, wherein a control end of the second switch tube is connected to a second end of the first switch tube, a first end of the second switch tube is connected to an output end of the image sensor, and a second end of the second switch tube is connected to the slave processor; a third resistor, wherein a first end of the third resistor is connected to the control end of the second switch tube, and a second end of the third resistor is connected to the first end of the second switch tube; a fourth resistor, wherein a first end of the fourth resistor is connected to the first end of the second switch tube, and a second end of the fourth resistor is grounded; A fifth resistor, wherein a first end of the fifth resistor is connected to the second end of the second switch tube, and a second end of the fifth resistor is grounded.
8. The image processing circuit according to claim 6, characterized in that: The main processor further includes an enable terminal, another set of the switching circuits connected between the first input terminal and the second output terminal, including: A first switch tube, wherein a control end of the first switch tube is connected to an enable end of the main processor through a first resistor, a first end of the first switch tube is connected to the enable end of the main processor, and a second end of the first switch tube is connected to a control end of a second switch tube; A second resistor, wherein a first end of the second resistor is connected to the enable end, and a second end of the second resistor is connected to the first switch tube; a second switch tube, wherein a control end of the second switch tube is connected to a second end of the first switch tube, a first end of the second switch tube is connected to an output end of the image sensor, and a second end of the second switch tube is connected to the main processor; a third resistor, wherein a first end of the third resistor is connected to the control end of the second switch tube, and a second end of the third resistor is connected to the first end of the second switch tube; a fourth resistor, wherein a first end of the fourth resistor is connected to the first end of the second switch tube, and a second end of the fourth resistor is grounded; A fifth resistor, wherein a first end of the fifth resistor is connected to the second end of the second switch tube, and a second end of the fifth resistor is grounded.
9. An image processing method, characterized in that: A main processor applied to an electronic device, the electronic device further comprising a slave processor and a switching circuit; the slave processor comprising a data input terminal and a data output terminal, the slave processor being connected to the main processor via the data output terminal; the switching circuit being connected between an image sensor and the processor, comprising a first input terminal, a first output terminal and a second output terminal, the first output terminal being connected to the data input terminal, and the second output terminal being connected to the main processor; The image processing method comprises: Get shooting scene information; The first input terminal is controlled to be connected to the first output terminal, or the first input terminal is controlled to be connected to the second output terminal according to the shooting scene information.
10. The method according to claim 9, characterized in that The slave processor is connected to the data input terminal of the master processor via the data output terminal, and the second output terminal is connected to the data input terminal of the master processor; The controlling the first input end to be connected to the first output end, or the controlling the first input end to be connected to the second output end according to the shooting scene information, comprises: If the shooting scene information indicates that the main processor and the slave processor need to work together, controlling the first input end to be connected to the first output end; as well as If the shooting scene information indicates that the main processor and the slave processor do not need to work together, the first input end and the second output end are controlled to be connected.
11. The method according to claim 10, characterized in that The method further comprises: When the first input terminal is controlled to switch from being connected to the second output terminal to being connected to the first output terminal based on the shooting scene information, the processed data is sent to the slave processor so that the slave processor processes the received processed data.
12. The method according to claim 10, characterized in that The method further comprises: When the first input terminal is controlled to switch from being connected to the first output terminal to being connected to the second output terminal based on the shooting scene information, the original data sent by the slave processor is received.
13. An electronic device, characterized in that: include: The image processing circuit according to any one of claims 1 to 8.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 9 to 12 is implemented.
