Image processing method, system, equipment and medium
By setting the master-slave PIPE and the first PIPE mode in the image processing system, the target parameter fusion between the master-slave PIPE is solved, and the problem that the independence of ISP PIPE in the prior art is difficult to meet complex application scenarios, and the efficiency and flexibility of image processing are improved.
Patent Information
- Application Number
- CN202510276286.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-05-30
AI Technical Summary
Existing ISP PIPEs are independent of each other, making it difficult to meet the needs of complex application scenarios such as image stitching and MCF.
By setting the master-slave PIPE and the adapted first PIPE mode, the target parameters of the fusion slave/master PIPE corresponding to the master/slave PIPE are controlled to realize the fusion of the target statistical parameters or algorithm parameters between the master-slave PIPE.
The single PIPE mechanism has been changed, reliable technical solutions are provided, and various scenario tasks are flexibly met, improving the efficiency and effect of image processing.
Smart Images

Figure CN120070150A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly relates to an image processing method, system, device and medium. Background Art
[0002] ISP (Image Signal Processing) is a technology that processes image data through a series of algorithms to improve image quality. When performing this series of algorithmic processes, it involves multiple algorithmic processing modules connected in series, which are usually referred to as ISP PIPE, and it can go through a series of hardware or software algorithmic image processing processes.
[0003] Currently, each ISP PIPE is independent of each other. Each PIPE uses its own statistical information as feedback input to the algorithmic processing module of that PIPE. The algorithmic processing module calculates the algorithmic parameters of that PIPE and uses the latest parameters for the next frame of image processing.
[0004] Since each PIPE is independent of each other, in application scenarios such as image stitching and MCF (Multi-color Fusion), this single PIPE mechanism is difficult to meet the above requirements.
[0005] Therefore, the above technical problems need to be solved by those skilled in the art urgently. Summary of the Invention
[0006] In view of this, the purpose of the present invention is to provide an image processing method, system, device and medium. By setting a master-slave PIPE and a first PIPE mode adapted to the master-slave PIPE, it is possible to control the target parameters of the master / slave PIPE to fuse the slave / master PIPE correspondingly under the current image processing task, changing the original single PIPE mechanism, providing a reliable technical solution for scenarios such as image stitching, and flexibly meeting the requirements of various scenario tasks.
[0007] The specific solutions are as follows:
[0008] In the first aspect, the present application discloses an image processing method, including:
[0009] Determine the PIPE configuration mode according to the current image processing task; the PIPE configuration mode includes a first PIPE mode;
[0010] Configure each PIPE according to the PIPE configuration mode to control each PIPE to obtain corresponding target statistical parameters in the PIPE configuration mode, so that each PIPE performs image processing using corresponding algorithmic parameters; the algorithmic parameters are calculated by the PIPE according to the corresponding target statistical parameters;
[0011] Among them, in the first PIPE mode, the target parameters corresponding to the first PIPE include the target parameters corresponding to the second PIPE. The target parameters include one of the target statistical parameters and the algorithm parameters. The first PIPE and the second PIPE include the slave PIPE among the PIPEs and the master PIPE to which the slave PIPE belongs.
[0012] Optionally, when the first PIPE mode is the parameter fusion mode, the first PIPE is the master PIPE, the second PIPE is the slave PIPE, and the target parameter is the target statistical parameter.
[0013] Optionally, the target statistical parameters corresponding to the first PIPE further include the local statistical parameters of the first PIPE;
[0014] The algorithm parameters corresponding to the first PIPE are calculated from the local statistical parameters of the first PIPE and some or all of the target statistical parameters corresponding to the second PIPE.
[0015] Optionally, making each PIPE perform image processing using the corresponding algorithm parameters includes:
[0016] Making the slave PIPE perform image processing using the algorithm parameters corresponding to the belonging master PIPE.
[0017] Optionally, in the parameter fusion mode, the target statistical parameters corresponding to the slave PIPE are the local statistical parameters of the slave PIPE, and the algorithm parameters corresponding to the slave PIPE are calculated from the target statistical parameters corresponding to the slave PIPE.
[0018] Optionally, when the first PIPE mode is the parameter following mode, the first PIPE is the slave PIPE, the second PIPE is the master PIPE, and the target parameter is the algorithm parameter.
[0019] Optionally, the algorithm parameters corresponding to the slave PIPE further include the local algorithm parameters of the slave PIPE;
[0020] Making each PIPE perform image processing using the corresponding algorithm parameters includes:
[0021] Making the slave PIPE determine a first algorithm module and a second algorithm module according to the obtained target attribute parameters, so as to control the first algorithm module to perform image processing using the algorithm parameters corresponding to the belonging master PIPE, and the second algorithm module to perform image processing using the local algorithm parameters of the slave PIPE; the first algorithm module and the second algorithm module are included in the multiple algorithm modules of the slave PIPE.
[0022] In a second aspect, the present application discloses an image processing system, including a processor and each PIPE;
[0023] The processor is configured to determine a PIPE configuration mode according to a current image processing task, and configure each PIPE according to the PIPE configuration mode; the PIPE configuration mode includes a first PIPE mode;
[0024] Each PIPE is configured to obtain corresponding target statistical parameters and perform image processing using corresponding algorithm parameters; the algorithm parameters are calculated by the PIPE according to the corresponding target statistical parameters;
[0025] Wherein, the PIPE configuration mode includes a first PIPE mode. In the first PIPE mode, the target parameters corresponding to the first PIPE include the target parameters corresponding to the second PIPE. The target parameters include one of the target statistical parameters and the algorithm parameters. The first PIPE and the second PIPE include a slave PIPE among the PIPEs and the master PIPE to which the slave PIPE belongs.
[0026] In a third aspect, the present application discloses an electronic device, including:
[0027] A memory for storing a computer program;
[0028] A processor for executing the computer program to implement the steps of the image processing method disclosed above.
[0029] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the image processing method disclosed above are implemented.
[0030] It can be seen that the present application determines a PIPE configuration mode according to a current image processing task; the PIPE configuration mode includes a first PIPE mode; each PIPE is configured according to the PIPE configuration mode to control each PIPE to obtain corresponding target statistical parameters in the PIPE configuration mode, so that each PIPE performs image processing using corresponding algorithm parameters; the algorithm parameters are calculated by the PIPE according to the corresponding target statistical parameters; wherein, in the first PIPE mode, the target parameters corresponding to the first PIPE include the target parameters corresponding to the second PIPE. The target parameters include one of the target statistical parameters and the algorithm parameters. The first PIPE and the second PIPE include a slave PIPE among the PIPEs and the master PIPE to which the slave PIPE belongs.
[0031] Beneficial effects: The present application can determine the corresponding PIPE configuration mode according to the current image processing task. In the first configuration mode, the target parameters corresponding to the first PIPE in each PIPE include the target parameters corresponding to the second PIPE. The first PIPE and the second PIPE include the slave PIPEs in each PIPE and the master PIPE to which the slave PIPE belongs, that is, the target parameters of the slave / master PIPE can include the target parameters in the corresponding master / slave PIPE. Wherein the target parameters include one of the target statistical parameters and the algorithm parameters involved in image processing. Thus, the master-slave distinction is made for each PIPE, and the fusion / reference of the target statistical parameters or algorithm parameters between the master and slave PIPEs is completed, so that the PIPEs in the PIPE image processing mechanism are no longer independent of each other, and image processing can be carried out with the help of the fused parameters, thereby providing a reliable technical solution for scenarios such as image stitching. Description of the Drawings
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0033] Figure 1 Flowchart of an image processing method disclosed in the present application;
[0034] Figure 2 Schematic diagram of independent operation of each PIPE disclosed in the present application;
[0035] Figure 3 Schematic diagram of the operation of the master-slave PIPEs in the parameter fusion mode disclosed in the present application;
[0036] Figure 4 Schematic diagram of the operation of the master-slave PIPEs in the parameter following mode disclosed in the present application;
[0037] Figure 5 Schematic diagram of the definition of an algorithm parameter following module disclosed in the present application;
[0038] Figure 6 Structural diagram of an electronic device disclosed in the present application. Detailed Description of the Invention
[0039] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0040] The embodiments of the present application disclose an image processing method, system, device and medium, which change the original single PIPE mechanism. By setting the first PIPE mode and the master-slave PIPE, the master-slave distinction is made for each PIPE, and the target parameters for the master / slave PIPE to fuse the slave / master PIPE can be controlled under the current image processing task, completing the fusion of the target statistical parameters or algorithm parameters between the master-slave PIPEs, so that the PIPEs in the PIPE image processing mechanism are no longer independent of each other, and image processing can be carried out with the help of the fused parameters, thereby providing a reliable technical solution for scenarios such as image stitching and flexibly meeting the requirements of various scenario tasks.
[0041] See Figure 1 As shown, the embodiments of the present application disclose an image processing method, and the method includes:
[0042] Step S11: Determine the PIPE configuration mode according to the current image processing task; the PIPE configuration mode includes the first PIPE mode.
[0043] In this embodiment, the corresponding PIPE configuration mode can be determined according to the current image processing task. The PIPE configuration mode specifically includes the first PIPE mode and may also include the second PIPE mode.
[0044] Among them, the first PIPE mode is a mode of fusing the parameters involved in the independent PIPEs, and can include at least one of a parameter fusion mode and a parameter following mode. The second PIPE mode can be a mode that keeps the PIPEs independent of each other.
[0045] It should be noted that the present application can refer to different types and complexities of image processing tasks to specifically determine different PIPE configuration modes, so as to adapt to different image processing tasks, and further be able to adapt to complex application scenarios such as image stitching and MCF multi-light fusion during the execution of image processing tasks, thereby improving the efficiency and effect of image processing and avoiding the problems of resource waste or insufficient processing capacity that may be brought by fixed configurations.
[0046] Step S12: Configure each PIPE according to the PIPE configuration mode to control each PIPE to obtain corresponding target statistical parameters in the PIPE configuration mode, so that each PIPE performs image processing using corresponding algorithm parameters; the algorithm parameters are calculated by the PIPE according to the corresponding target statistical parameters.
[0047] Specifically, in the first PIPE mode, the target parameters corresponding to the first PIPE include the target parameters corresponding to the second PIPE. The target parameters include one of the target statistical parameters and the algorithm parameters. The first PIPE and the second PIPE include the slave PIPE among each PIPE and the master PIPE to which the slave PIPE belongs.
[0048] In this embodiment, after determining the corresponding PIPE configuration mode, the processor / software can configure each PIPE according to the determined PIPE configuration mode, so that each configured PIPE can independently execute the image processing task.
[0049] In some examples, each PIPE can execute the image processing task according to the configuration with reference to the following process.
[0050] In different PIPE configuration modes, each PIPE can obtain corresponding target statistical parameters, and each PIPE can configure the algorithm parameters calculated according to the corresponding target statistical parameters to its local image processing module / algorithm module, so that the image processing module / algorithm module performs image processing according to the corresponding configuration. In this embodiment, image processing can specifically refer to denoising, color correction, contrast enhancement, etc.
[0051] For the first configuration mode, which distinguishes between master and slave PIPEs, it should be noted first that a master PIPE can correspond to one or more slave PIPEs, that is, the number of slave PIPEs can be one or multiple. This application does not limit the number of slave PIPEs, but a slave PIPE only belongs to one master PIPE.
[0052] The setting of the master and slave PIPEs can change the original independent relationship between each PIPE and can be used as the basis for target parameter fusion. In some examples, in the first PIPE mode, the parameter fusion between each PIPE is limited to between the master and slave PIPEs, that is, there is no parameter fusion between PIPEs with different subordinate relationships, and parameter fusion only occurs between PIPEs with subordinate relationships.
[0053] The setting of the master and slave PIPEs can be set according to the mutual relationship between image processes. The relevance between PIPEs with subordinate relationships is relatively high during image processing, and the relevance between PIPEs with different subordinate relationships is relatively low during image processing.
[0054] The parameter fusion between PIPEs with a subordinate relationship can be applied to image processing in complex scenarios, solve the problems encountered by the independent mechanism of PIPEs, and enrich the mechanism of image processing. In addition, the setting of the master-slave PIPEs can make the image fusion processing more accurate.
[0055] It can be understood that in the first PIPE mode, the fusion of target statistical parameters or algorithm parameters can be achieved between different PIPEs. Then, a single PIPE can complete image processing based on the fused parameters after fusing the parameters of other PIPEs, thereby providing a reliable technical solution for scenarios such as image stitching. Moreover, in this application, a master-slave mode is set between each PIPE. Through the collaborative working method of the master-slave PIPEs, each PIPE can accurately fuse parameters according to its own master-slave configuration, coordinating the image processing process.
[0056] In addition, it should be noted that during the process of each PIPE processing the current image data, various statistical parameters will be generated. These statistical parameters can include the brightness distribution, color distribution, noise level, edge intensity, etc. of the image, so as to reflect the internal characteristics and distribution of the image data.
[0057] The statistical parameters will be fed back and input into each algorithm module of the PIPE. The algorithm module calculates the latest algorithm parameters based on these statistical parameters, so as to perform better image processing on the next frame of image using the calculated algorithm parameters.
[0058] In some examples, after determining that the configuration mode is the first configuration mode, the software / processor configures each PIPE according to the first configuration mode, which can enable each PIPE to select appropriate target statistical parameters according to the configuration.
[0059] For example, in the first configuration mode, the target statistical parameters selected by the first PIPE include the target statistical parameters of the second PIPE that has a master-slave relationship with it, that is, the statistical parameters of the first PIPE are borrowed and fused. At this time, the target statistical parameters of the second PIPE can be only related to its own PIPE configuration.
[0060] It should be noted that an enable channel can be set between the first PIPE and the second PIPE. When the target parameter is determined to be the target statistical parameter, the enable channel is opened so that the target statistical parameters of the second PIPE can be fused into the target statistical parameters of the first PIPE to achieve statistical parameter enabling, thereby enabling the first PIPE to perform parameter fusion related to the target statistical parameter.
[0061] In some other examples, after determining that the configuration mode is the first configuration mode, the software / processor configures each PIPE according to the first configuration mode, which enables each PIPE to select appropriate algorithm parameters based on the configuration.
[0062] For example, in the first configuration mode, the algorithm parameters selected by the first PIPE include the algorithm parameters of the second PIPE that has a master-slave relationship with it. That is, the algorithm parameters of the first PIPE are used for reference. At this time, the target algorithm parameters of the second PIPE can be only related to the configuration of its own PIPE.
[0063] In summary, this embodiment can determine the corresponding PIPE configuration mode according to the current image processing task. In the first configuration mode, the target parameters corresponding to the first PIPE in each PIPE include the target parameters corresponding to the second PIPE. The first PIPE and the second PIPE include the slave PIPE in each PIPE and the master PIPE to which the slave PIPE belongs. That is, the target parameters of the slave / master PIPE can include the target parameters in the corresponding master / slave PIPE. The target parameters include one of the target statistical parameters and the algorithm parameters involved in image processing. Thus, the master-slave distinction is made for each PIPE and the fusion / reference of the target statistical parameters or algorithm parameters between the master and slave PIPEs is completed, so that the PIPEs in the PIPE image processing mechanism are no longer independent of each other and can perform image processing with the help of the fused parameters, thereby providing a reliable technical solution for scenarios such as image stitching.
[0064] Furthermore, in the second PIPE mode, the target statistical parameters corresponding to the master PIPE are the local statistical parameters of the master PIPE, and the algorithm parameters corresponding to the master PIPE are calculated based on the target statistical parameters corresponding to the master PIPE; the target statistical parameters corresponding to the slave PIPE are the local statistical parameters of the slave PIPE, and the algorithm parameters corresponding to the slave PIPE are calculated based on the target statistical parameters corresponding to the slave PIPE.
[0065] That is, as Figure 2 shown, in the second PIPE mode, the master PIPE and the slave PIPE operate independently of each other and have no association. The target statistical parameters corresponding to the master PIPE are the local statistical parameters of the master PIPE, and the target statistical parameters corresponding to the slave PIPE are the local statistical parameters of the slave PIPE. That is, both the master PIPE and the slave PIPE use the algorithm parameters calculated from their respective local statistical parameters for image processing. In this mode, it is equivalent to two PIPEs operating independently.
[0066] In another embodiment, as Figure 3As shown, when the first PIPE mode is the parameter fusion mode, the first PIPE is the main PIPE, the second PIPE is the slave PIPE, and the target parameter is the target statistical parameter.
[0067] That is to say, the first PIPE mode can specifically be the parameter fusion mode. In this case, the first PIPE is the main PIPE, the second PIPE is the slave PIPE, and the target parameter is specifically the target statistical parameter.
[0068] That is, in the parameter fusion mode, the main PIPE can obtain the target statistical parameters obtained by each slave PIPE after completing the corresponding image processing. For example, the main PIPE can obtain the target statistical parameters obtained by each slave PIPE after completing the image processing of the corresponding area.
[0069] Among them, the main PIPE can directly obtain the statistical parameters output by the hardware where the slave PIPE is located, or can obtain them from the corresponding memory buffer.
[0070] These target statistical parameters may include various parameters such as the brightness distribution, color distribution, noise level, and edge strength of the image. Each slave PIPE can process a specific image area or a specific image task, and the generated statistical parameters reflect the characteristics of this part of the image.
[0071] It should also be pointed out that the slave PIPE can only calculate the corresponding algorithm parameters using its local statistical parameters, and the slave PIPE cannot obtain the statistical parameters of the main PIPE. That is, in the parameter fusion mode, the target statistical parameter corresponding to the slave PIPE can be the local statistical parameter of the slave PIPE.
[0072] Therefore, when configuring the main PIPE, the configured parameters include the number of slave PIPEs, the ID (identifier) numbers of all slave PIPEs, and the enabling of fused statistical information. Among them, the ID number of the slave PIPE is the index number of the PIPE. The main PIPE can find the resources of the slave PIPE through this ID and obtain the statistical parameters of the slave PIPE; the enabling of fused statistical information means that the main PIPE needs to obtain the statistical parameters of all or part of the slave PIPEs.
[0073] For example, in a multi-camera system, different PIPEs may be responsible for processing the images collected by different cameras. The viewing angles, lighting conditions, etc. of each camera may be different, so the statistical information generated by each PIPE will also be different. At this time, when it is necessary to stitch the images of the entire scene, the fused statistical information is enabled. At this time, the main PIPE configured as the main mode can obtain the statistical parameters from each slave PIPE according to the ID number of the slave PIPE.
[0074] Further, the target statistical parameters corresponding to the first PIPE further include the local statistical parameters of the first PIPE; the algorithm parameters corresponding to the first PIPE are calculated through the local statistical parameters of the first PIPE and some or all of the target statistical parameters corresponding to the second PIPE.
[0075] It can be understood that the algorithm parameters corresponding to the main PIPE can be jointly calculated according to the local statistical parameters of the main PIPE and the target statistical parameters corresponding to each slave PIPE. The target statistical parameters corresponding to each slave PIPE participating in the joint calculation can be all the target statistical parameters corresponding to each slave PIPE, some of the target statistical parameters corresponding to each slave PIPE, or all or some of the target statistical parameters corresponding to some slave PIPEs.
[0076] Specifically, the selection of the target statistical parameters corresponding to each slave PIPE can be determined according to different image processing tasks, and the selection basis can be the relevance between the image processing task of the main PIPE and the image processing tasks of the slave PIPEs to which it belongs in the image processing task. The target statistical data of the slave PIPEs with high relevance can be added to the parameter fusion process of the main PIPE, and the target statistical data of the slave PIPEs with low relevance are not added to the parameter fusion process of the main PIPE.
[0077] Specifically, the main PIPE will first fuse the statistical parameters of this PIPE and all slave PIPEs, then calculate the algorithm parameters, and save the algorithm parameters to the local parameter cache.
[0078] In a specific implementation, the main PIPE can perform a mean operation on the local statistical parameters and the target statistical parameters corresponding to the slave PIPE, and calculate the corresponding algorithm parameters based on the result of the mean operation.
[0079] In another specific implementation, the main PIPE can perform a weighted process on the local statistical information and the target statistical parameters corresponding to the slave PIPE by using a pre-set weight coefficient, and calculate the corresponding algorithm parameters based on the weighted result.
[0080] In yet another specific implementation, the above parameter fusion can also be deep computational processing.
[0081] It should be noted that in the parameter fusion mode, the main PIPE can perform image processing using the algorithm parameters corresponding to the main PIPE, which are jointly calculated based on the local statistical parameters of the main PIPE and the target statistical parameters corresponding to each slave PIPE. In some embodiments, the slave PIPE can perform image processing using the algorithm parameters calculated by itself. That is, in the parameter fusion mode, the target statistical parameters corresponding to the slave PIPE are the local statistical parameters of the slave PIPE. The slave PIPE can further calculate the corresponding algorithm parameters based on the local statistical parameters, and then perform image processing based on the algorithm parameters calculated from the local statistical parameters.
[0082] It can be seen that in the parameter fusion mode, the main and slave PIPEs have different settings for the algorithm parameters and target statistical data. The main PIPE mainly performs parameter fusion, which can ensure the image processing effect of the main PIPE that plays a major role in image processing, reduce the processing process of other PIPEs that are relatively in a subordinate position during the image processing process, and achieve the balance of parameter utility and resource consumption.
[0083] Alternatively, in some examples, the slave PIPE can perform image processing using the algorithm parameters corresponding to the belonging main PIPE. That is, enabling each PIPE to perform image processing using the corresponding algorithm parameters includes:
[0084] In the parameter fusion mode, enabling the slave PIPE to perform image processing using the algorithm parameters corresponding to the belonging main PIPE.
[0085] That is to say, in the parameter fusion mode, since the main PIPE fuses the local statistical parameters and the target statistical parameters of the slave PIPE, and calculates the algorithm parameters using the fused statistical parameters, when the slave PIPE processes the next frame of image, it can also perform image processing using the algorithm parameters corresponding to the belonging main PIPE.
[0086] It can be seen that in the parameter fusion mode, the main PIPE can fuse the local statistical parameters and the target statistical parameters corresponding to all slave PIPEs, and calculate the algorithm parameters using the fused parameters locally. In this way, the characteristics of the images collected by multiple PIPEs can be comprehensively considered, so as to output a set of compatible algorithm parameters that meet multiple PIPEs.
[0087] In yet another embodiment, as Figure 4 shown, when the first PIPE mode is the parameter following mode, the first PIPE is the slave PIPE, the second PIPE is the main PIPE, and the target parameter is the algorithm parameter.
[0088] That is to say, the first PIPE mode can also be a parameter following mode. In this case, the first PIPE is a slave PIPE, the second PIPE is a master PIPE, and the target parameter is specifically an algorithm parameter. That is, in the parameter fusion mode, the slave PIPE can obtain the algorithm parameter of the master PIPE from the parameter cache of the master PIPE and use the algorithm parameter of the master PIPE for image processing.
[0089] This embodiment creatively proposes a method for algorithm parameter following. The slave PIPE can conveniently follow and use the algorithm parameter of the master PIPE, providing a simple and reliable technical solution for stitching and MCF multi-light fusion scenarios.
[0090] Furthermore, the algorithm parameter corresponding to the slave PIPE further includes the local algorithm parameter of the slave PIPE.
[0091] Based on this, the step of enabling each PIPE to perform image processing using the corresponding algorithm parameter includes:
[0092] In the parameter following mode, enabling the slave PIPE to determine a first algorithm module and a second algorithm module according to the obtained target attribute parameter, so as to control the first algorithm module to perform image processing using the algorithm parameter corresponding to the belonging master PIPE, and the second algorithm module to perform image processing using the local algorithm parameter of the slave PIPE; the first algorithm module and the second algorithm module are included in the multiple algorithm modules of the slave PIPE.
[0093] That is to say, the algorithm parameter corresponding to the slave PIPE can include the algorithm parameter on the master PIPE side and the local algorithm parameter of the slave PIPE. Specifically, the slave PIPE can determine a first algorithm module and a second algorithm module according to the obtained target attribute parameter, and control the first algorithm module to perform image processing using the algorithm parameter corresponding to the master PIPE, while controlling the second algorithm module to perform image processing using the local algorithm parameter of the slave PIPE. Among them, the multiple algorithm modules of the slave PIPE are specifically divided into a first algorithm module and a second algorithm module, and the information of the first algorithm module can be empty, which means that all algorithm modules of the slave PIPE use the local algorithm parameter of the slave PIPE for image processing; in addition, the information of the second algorithm module can also be empty, which means that all algorithm modules of the slave PIPE use the algorithm parameter of the master PIPE for image processing.
[0094] It should be noted that considering that the main PIPE integrates the target statistical parameters of multiple PIPEs when calculating algorithm parameters and is more accurate in certain regions or scenarios, some algorithm modules in the slave PIPE can use these algorithm parameters for calculation. On the other hand, combined with the use of the algorithm parameters calculated by some algorithm modules in the slave PIPE for image processing, this solution takes into account the situation where the accuracy requirements for algorithm parameters are low in some regions or scenarios and can also achieve differential configuration of parameters with maximum flexibility.
[0095] In some other possible examples, the main PIPE usually only uses the algorithm parameters calculated locally by it and does not need to obtain the algorithm parameters of the slave PIPE, thereby ensuring the dominant position of the main PIPE in the entire image processing process when the main and slave PIPEs are configured.
[0096] When configuring the above-mentioned slave PIPE, the configured parameters include the ID number of the main PIPE and the target attribute parameter representing the algorithm parameter following information. Among them, the ID number of the main PIPE is the index number of the PIPE. The slave PIPE can find the resources of the main PIPE through this ID and obtain the algorithm parameters of the main PIPE for its own use. The algorithm parameter following information specifies on which algorithm modules the slave PIPE uses the algorithm parameters calculated by the main PIPE, and the remaining algorithm modules use the algorithm parameters calculated by the slave PIPE itself to flexibly achieve differential configuration of parameters.
[0097] The definition of the algorithm parameter following module / First algorithm module is as Figure 5 shown. The algorithm parameter following information is a 32-bit or 64-bit parameter, which is the bitwise OR calculation result of some or all algorithm parameter following modules / First algorithm modules.
[0098] In this embodiment, a series of algorithm following modules / First algorithm modules are defined in an enumerated manner, and each module is assigned a unique binary bit value, which is determined by a left shift operation (<<). For example, the value of algorithm following module 1 is (1<<0), that is, 000...001 in binary; the value of algorithm following module 2 is (1<<1), that is, 000...010 in binary; the value of algorithm following module 3 is (1<<2), that is, 000...100 in binary, and so on.
[0099] By performing a "bitwise OR" operation on the binary bits corresponding to different algorithm following modules, a comprehensive identifier representing on which algorithm modules the slave PIPE uses the main PIPE algorithm parameters can be obtained.
[0100] For example, if PIPE hopes to use the algorithm parameters of the main PIPE on the algorithm following module 1 and algorithm following module 3, then the value of the algorithm parameter following information is algorithm following module 1|algorithm following module 3, that is, (1<<0)|(1<<2), and the calculation result is 000...101 in binary. Based on this calculation result, PIPE can quickly determine on which algorithm modules to adopt the algorithm parameters of the main PIPE, and the remaining modules not included in this result use the algorithm parameters calculated by the slave PIPE itself, thus realizing the differential configuration of parameters and improving the flexibility and adaptability of the ISP master-slave PIPE mechanism in image processing.
[0101] It can be seen that in the parameter following mode, the slave PIPE can choose to use the algorithm parameters calculated locally for some or all algorithm modules, or choose to use the algorithm parameters of the main PIPE for some or all algorithm modules, thus providing a simple and reliable technical solution for image stitching and MCF multi-light fusion scenarios.
[0102] In addition, it should be noted that the parameter fusion mode and the parameter following mode can coexist in one scenario. That is, during the operation of the main PIPE and the slave PIPE, the slave PIPE can only use the statistical parameters of its own PIPE to calculate the algorithm parameters, and the main PIPE can use the statistical parameters of its own PIPE, or fuse the statistical parameters of its own PIPE with the statistical parameters of the slave PIPE and use the fused statistical parameters for algorithm calculation, and finally save the calculated algorithm parameter results to the parameter cache respectively. The main PIPE can only use the algorithm parameters generated by its own PIPE and configure them to the image processing module; the slave PIPE can partially or completely choose to use its own PIPE's parameters to configure to the image processing module, or select some or all of the algorithm parameters of the main PIPE from the parameter cache of the main PIPE according to the aforementioned algorithm parameter following information.
[0103] Furthermore, the present application also discloses an image processing system, including a processor and each PIPE;
[0104] The processor is used to determine the PIPE configuration mode according to the current image processing task and configure each PIPE according to the PIPE configuration mode; the PIPE configuration mode includes the first PIPE mode; each PIPE is used to obtain the corresponding target statistical parameters and perform image processing using the corresponding algorithm parameters; the algorithm parameters are calculated by the PIPE according to the corresponding target statistical parameters.
[0105] Among them, the PIPE configuration mode includes a first PIPE mode. In the first PIPE mode, the target parameters corresponding to the first PIPE include the target parameters corresponding to the second PIPE. The target parameters include one of the target statistical parameters and the algorithm parameters. The first PIPE and the second PIPE include the slave PIPEs in each PIPE and the master PIPE to which the slave PIPE belongs.
[0106] The execution process of the above system can refer to the execution process of the above image processing method, which will not be elaborated here. The system also has the same beneficial effects as those in the above method embodiments.
[0107] Figure 6 The figure is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the image processing method executed by the electronic device disclosed in any of the foregoing embodiments.
[0108] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is imposed on it here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is made here.
[0109] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0110] In addition, the memory 22, as a carrier for resource storage, may be a read-only memory, a random access memory, a disk, or an optical disc, etc. The resources stored thereon include an operating system 221, a computer program 222, data 223, etc., and the storage method may be temporary storage or permanent storage.
[0111] Among them, the operating system 221 is used to manage and control each hardware device and the computer program 222 on the electronic device 20 to enable the processor 21 to perform operations and processing on the massive data 223 in the memory 22. It may be Windows, Unix, Linux, etc. In addition to the computer program capable of implementing the image processing method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks. The data 223 may include not only the data transmitted by external devices received by the electronic device, but also the data collected by its own input / output interface 25, etc.
[0112] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium. When the computer program stored in the storage medium is loaded and executed by a processor, the steps of the image processing method disclosed in any of the foregoing embodiments are implemented.
[0113] Furthermore, the embodiments of the present application also disclose a computer program product. A computer program is stored in the computer program product. When the computer program is loaded and executed by a processor, the steps of the image processing method disclosed in any of the foregoing embodiments are implemented.
[0114] In this specification, the various embodiments are described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the system disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method section.
[0115] Those skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of the examples have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0116] The steps of the method or algorithm described in combination with the embodiments disclosed in this article can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (Random Access Memory, i.e., RAM), internal memory, read-only memory (Read-Only Memory, i.e., ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, compact disc read-only memory (Compact Disc Read-Only Memory, i.e., CD-ROM), or any other form of storage medium well-known in the technical field.
[0117] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising said element.
[0118] The above has introduced in detail an image processing method, system, device and storage medium provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An image processing method, characterized in that: include: Determine the PIPE configuration mode according to the current image processing task; The PIPE configuration mode includes a first PIPE mode; Configure each PIPE according to the PIPE configuration mode, so as to control each PIPE to obtain corresponding target statistical parameters under the PIPE configuration mode, so that each PIPE performs image processing using corresponding algorithm parameters; The algorithm parameters are calculated by PIPE based on the corresponding target statistical parameters; Among them, in the first PIPE mode, the target parameters corresponding to the first PIPE include the target parameters corresponding to the second PIPE, the target parameters include the target statistical parameters and one of the algorithm parameters, and the first PIPE and the second PIPE include the slave PIPEs in each PIPE and the master PIPE to which the slave PIPEs belong.
2. The image processing method according to claim 1, characterized in that: When the first PIPE mode is the parameter fusion mode, the first PIPE is the master PIPE, the second PIPE is the slave PIPE, and the target parameter is the target statistical parameter.
3. The image processing method according to claim 2, characterized in that: The target statistical parameters corresponding to the first PIPE also include local statistical parameters of the first PIPE; The algorithm parameters corresponding to the first PIPE are calculated by using the local statistical parameters of the first PIPE and part or all of the target statistical parameters corresponding to the second PIPE.
4. The image processing method according to claim 2 or 3, characterized in that: The step of causing each PIPE to perform image processing using corresponding algorithm parameters includes: The slave PIPE is enabled to perform image processing using the algorithm parameters corresponding to the master PIPE to which it belongs.
5. The image processing method according to claim 2 or 3, characterized in that: In the parameter fusion mode, the target statistical parameters corresponding to the slave PIPE are local statistical parameters of the slave PIPE, and the algorithm parameters corresponding to the slave PIPE are calculated according to the target statistical parameters corresponding to the slave PIPE.
6. The image processing method according to claim 1, characterized in that: When the first PIPE mode is the parameter following mode, the first PIPE is the slave PIPE, the second PIPE is the master PIPE, and the target parameter is the algorithm parameter.
7. The image processing method according to claim 6, characterized in that: The algorithm parameters corresponding to the slave PIPE also include local algorithm parameters of the slave PIPE; The step of causing each PIPE to perform image processing using corresponding algorithm parameters includes: The slave PIPE determines a first algorithm module and a second algorithm module according to the acquired target attribute parameters, so as to control the first algorithm module to perform image processing using the algorithm parameters corresponding to the master PIPE to which it belongs, and the second algorithm module to perform image processing using the local algorithm parameters of the slave PIPE; the multiple algorithm modules of the slave PIPE include the first algorithm module and the second algorithm module.
8. An image processing system, characterized in that: Including processors and PIPEs; The processor is used to determine a PIPE configuration mode according to a current image processing task, and configure each PIPE according to the PIPE configuration mode; the PIPE configuration mode includes a first PIPE mode; Each PIPE is used to obtain the corresponding target statistical parameters and perform image processing using the corresponding algorithm parameters; The algorithm parameters are calculated by PIPE based on the corresponding target statistical parameters; Among them, the PIPE configuration mode includes a first PIPE mode. In the first PIPE mode, the target parameter corresponding to the first PIPE includes the target parameter corresponding to the second PIPE, the target parameter includes the target statistical parameter and one of the algorithm parameters, and the first PIPE and the second PIPE include the slave PIPEs in each PIPE and the master PIPE to which the slave PIPEs belong.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the image processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 7 are implemented.