Image processing method and apparatus

By storing the shooting and preview processing parameters to different software contexts and selecting appropriate processing parameters to connect to the hardware context based on image attributes, the problem of poor ISP processing effect is solved, and more efficient image processing and display effects are achieved.

CN115696064BActive Publication Date: 2026-03-24SPREADTRUM COMM (TIANJIN) INC
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-27
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In the prior art, image signal processors (ISPs) use the same processing parameters to process preview images and captured images, resulting in poor processing quality.

Method used

The shooting processing parameters and preview processing parameters are stored in different software contexts. Appropriate processing parameters are selected based on image attributes, and a connection is established with the idle hardware context to achieve asynchronous processing.

Benefits of technology

It improves the processing performance of the image signal processor (ISP), reduces the coupling effect between processing parameters, and enhances the processor's efficiency and image display quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115696064B_ABST
    Figure CN115696064B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image processing, and particularly relates to an image processing method and device. Different processing parameters of a to-be-processed image are stored in different software contexts, then the image attribute of the to-be-processed image is determined, the software context storing the processing parameters is connected with the hardware context in an idle state, the processing parameters are sent to the hardware context for storage, so that the image signal processor (ISP) acquires the processing parameters from the hardware context and performs image processing on the to-be-processed image according to the processing parameters. The method stores the shooting processing parameters and the preview processing parameters in different software contexts in advance, and according to different attributes of the to-be-processed image, the ISP selects different processing parameters to perform image processing on the to-be-processed image, so that the shooting processing parameters and the image processing parameters do not affect each other, and the processing effect of the ISP is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, and in particular, to an image processing method and device. BACKGROUND

[0002] With the rapid development of smart phones, the camera function of the phone is also more and more rich and powerful. Users can record the details of life and travel through the camera function of the phone. As the core of the camera image processing, the working efficiency and working ability of the image signal processor (ISP) play a crucial role in the quality and function development of the camera output image.

[0003] During image processing, the ISP processes the image obtained by the camera based on processing parameters. In related technologies, the ISP usually uses the same processing parameters to process preview images and shooting images, but the processing parameters suitable for preview images may not be suitable for shooting images, and using the same processing parameters for processing may result in poor image processing effect. SUMMARY

[0004] Embodiments of the present application provide an image processing method and device, which store shooting processing parameters and preview processing parameters in different software contexts in advance, and the ISP selects different processing parameters for image processing of the to-be-processed image according to different attributes of the to-be-processed image, so that the shooting processing parameters and the image processing parameters do not affect each other.

[0005] In a first aspect, embodiments of the present application provide an image processing method, comprising:

[0006] storing different processing parameters of a to-be-processed image in different software contexts, wherein the processing parameters include shooting processing parameters and preview processing parameters;

[0007] determining an image attribute of the to-be-processed image, wherein the image attribute includes a shooting image corresponding to the shooting processing parameters or a preview image corresponding to the preview processing parameters;

[0008] according to the image attribute, establishing a connection between a software context storing a corresponding processing parameter and a hardware context in an idle state;

[0009] sending the processing parameter to the hardware context storage, so that an image signal processor (ISP) acquires the processing parameter from the hardware context and performs image processing on the to-be-processed image according to the processing parameter.

[0010] In an embodiment, the storing of different processing parameters of the to-be-processed image in different software contexts comprises:

[0011] determine the shooting processing parameter and the preview processing parameter of the image to be processed;

[0012] store the shooting processing parameter to a first software context and store the preview processing parameter to a second software context.

[0013] In an embodiment, if it is determined that the image attribute is the shooting image, the software context in which the corresponding processing parameter is stored is connected with a hardware context in an idle state, including:

[0014] traverse the hardware context and determine any hardware context in the idle state as a first hardware context;

[0015] dynamically associate the first software context and the first hardware context.

[0016] In an embodiment, if it is determined that the image attribute is the shooting image, the processing parameter is sent to the hardware context storage, so that an image signal processor (ISP) acquires the processing parameter from the hardware context and performs image processing on the image to be processed according to the processing parameter, including:

[0017] send the shooting processing parameter to the first hardware context storage, so that the ISP acquires the shooting processing parameter from the first hardware context and performs image processing on the image to be processed according to the shooting processing parameter

[0018] In an embodiment, the method further includes:

[0019] after image processing is completed, the dynamic association of the first software context and the first hardware context is deleted, so that the first hardware context reverts to the idle state.

[0020] In an embodiment, the determination of the shooting processing parameter and the preview processing parameter of the image to be processed includes:

[0021] acquire environment data of a current environment;

[0022] determine the preview processing parameter and the shooting processing parameter of the image to be processed according to the environment data.

[0023] In an embodiment, the image to be processed is an image captured in real time by a camera.

[0024] In a second aspect, an embodiment of the present application provides an image processing device, including:

[0025] The processing module is configured to store different processing parameters of the image to be processed into different software contexts respectively, wherein the processing parameters include shooting processing parameters and preview processing parameters.

[0026] The determining module is configured to determine an image attribute of the image to be processed, wherein the image attribute includes a shooting image corresponding to the shooting processing parameters or a preview image corresponding to the preview processing parameters.

[0027] The associating module is configured to establish a connection between a software context storing corresponding processing parameters and a hardware context in an idle state according to the image attribute.

[0028] The sending module is configured to send the processing parameters to the hardware context storage, so that an image signal processor (ISP) acquires the processing parameters from the hardware context and performs image processing on the image to be processed according to the processing parameters.

[0029] In a third aspect, an electronic device is provided, including:

[0030] at least one processor; and

[0031] at least one memory communicatively connected with the processor, wherein:

[0032] the memory stores program instructions, and the processor invokes the program instructions to execute the method provided in the first aspect.

[0033] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium includes stored programs, wherein the programs are executed by a processor to implement the method provided in the first aspect.

[0034] In the embodiments of the present application, different processing parameters of the image to be processed are stored into different software contexts respectively, the processing parameters include shooting processing parameters and preview processing parameters, then an image attribute of the image to be processed is determined, the image attribute includes a shooting image corresponding to the shooting processing parameters or a preview image corresponding to the preview processing parameters, a connection between a software context storing corresponding processing parameters and a hardware context in an idle state is established according to the image attribute, and the processing parameters are sent to the hardware context storage, so that an image signal processor (ISP) acquires the processing parameters from the hardware context and performs image processing on the image to be processed according to the processing parameters. The shooting processing parameters and the preview processing parameters are stored into different software contexts in advance, different processing parameters are selected by the ISP according to different attributes of the image to be processed to perform image processing on the image to be processed, so that the shooting processing parameters and the image processing parameters do not affect each other, and the processing effect of the ISP is improved. BRIEF DESCRIPTION OF DRAWINGS

[0035] 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 needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0036] Figure 1 A flow chart of an image processing method provided by an embodiment of the present application;

[0037] Figure 2 A flow chart of another image processing method provided by an embodiment of the present application;

[0038] Figure 3 A schematic diagram of an image processing method provided by an embodiment of the present application;

[0039] Figure 4 A structural schematic diagram of an image processing device provided by an embodiment of the present application;

[0040] Figure 5 A structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to better understand the technical solutions of the present application, the embodiments of the present application will be described in detail below with reference to the drawings.

[0042] It should be clear that the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort belong to the scope of protection of the present application.

[0043] The terms used in the embodiments of the present application are only for the purpose of describing the specific embodiments, and are not intended to limit the present application. The singular forms "a", "an" and "the" used in the embodiments of the present application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.

[0044] In view of the problem of poor ISP image processing effect in the prior art, the embodiments of the present application provide an image processing method, which improves the processing effect of ISP.

[0045] Figure 1 A flow chart of an image processing method provided by an embodiment of the present application. The method can be applied to a smart phone or other terminal device with shooting function, such as Figure 1 As shown in the figure, the method can include:

[0046] In step 101, different processing parameters of the to-be-processed image are respectively stored in different software contexts, and the processing parameters include shooting processing parameters and preview processing parameters.

[0047] When the smart phone uses the photographing function, a plurality of continuous frames of original images can be obtained through the camera, and the to-be-processed image is one of the frames. After the to-be-processed image is processed by the ISP, the to-be-processed image is displayed on the screen of the smart phone. Before the user clicks the photographing button, the to-be-processed image displayed on the screen of the smart phone is a preview image, and the user can adjust the shooting angle or the shooting object according to the preview image to obtain an ideal shooting image. When the user clicks the photographing button, the smart phone determines the corresponding to-be-processed image in the internal as the shooting image. After the smart phone obtains a frame of to-be-processed image, the shooting processing parameters and the preview processing parameters of the frame of to-be-processed image can be determined, and the two parameters are stored in different software contexts SW-Context, for example, the shooting processing parameters are stored in a first SW-Context, and the preview processing parameters are stored in a second SW-Context, and the first SW-Context and the second SW-Context are any two of a plurality of SW-Contexts. Generally, the number of SW-Contexts is large, and two SW-Contexts can be configured to store the processing parameters for each frame of to-be-processed image.

[0048] In step 102, the image attribute of the to-be-processed image is determined, and the image attribute includes a shooting image corresponding to the shooting processing parameter or a preview image corresponding to the preview processing parameter.

[0049] For any frame of to-be-processed image, before the ISP processes the to-be-processed image, the smart phone determines the image attribute of the to-be-processed image, that is, determines whether the to-be-processed image is a preview image or a shooting image. The shooting image corresponds to the shooting processing parameter, and the preview image corresponds to the preview processing parameter.

[0050] In step 103, according to the image attribute, the software context storing the corresponding processing parameter is connected with the hardware context in an idle state.

[0051] When the to-be-processed image is determined as a shooting image, the SW-Context storing the shooting processing parameter is connected with the HW-Context in an idle state, and when the to-be-processed image is determined as a preview image, the SW-Context storing the preview processing parameter is connected with the HW-Context in an idle state. Taking the first SW-Context as an example, if the to-be-processed image is a shooting image, the smart phone will traverse the hardware context and determine any HW-Context in an idle state as a first HW-Context, and then dynamically associate the first SW-Context and the first HW-Context.

[0052] In step 104, the shooting processing parameter is sent to the hardware context storage, so that the image signal processor ISP acquires the shooting processing parameter from the hardware context and performs image processing on the to-be-processed image according to the shooting processing parameter.

[0053] Before the ISP processes the to-be-processed image, the smartphone sends the processing parameter corresponding to the to-be-processed image to the memory space associated with the HW-Context. The ISP can acquire the processing parameter from the memory space associated with the HW-Context and write it into the ISP hardware register. In subsequent image processing, the processing parameter is acquired from the ISP hardware register to process the to-be-processed image. After the image processing is completed, the smartphone deletes the dynamic association between the SW-Context and the HW-Context, so that the HW-Context reverts to the idle state. After the first SW-Context and the first HW-Context are dynamically associated, the first HW-Context becomes a non-idle state. After the image processing is completed, the smartphone deletes the dynamic association between the first SW-Context and the first HW-Context, and the first HW-Context reverts to the idle state. If the next to-be-processed image is a preview image, the HW-Context can be dynamically associated with the SW-Context storing the preview processing parameter. By releasing the hardware resources in time and updating the processing parameter of the next to-be-processed image in time, the smartphone can ensure that each to-be-processed image has independent processing parameters, thereby realizing frame-level control of the processing parameter of the to-be-processed image.

[0054] In an embodiment, after the smartphone acquires the to-be-processed image through the camera, the environmental data of the current environment can be acquired, and the preview processing parameter and the shooting processing parameter of the to-be-processed image can be determined according to the environmental data. For example, when the smartphone is switched from a dark environment to an environment with higher brightness, the corresponding processing parameter needs to be modified to weaken the influence of light on the to-be-processed image. Or, when the smartphone is shooting a night scene, the processing parameter also needs to be adjusted accordingly, such as adjusting the sharpness, color enhancement, etc.

[0055] In the embodiment of the present application, the SW-Context can realize the asynchronous processing of the processor and the ISP. After determining the processing parameters of the image to be processed, the processor of the smart phone can directly store the processing parameters to the SW-Context. When the ISP needs to obtain the processing parameters, the ISP does not need to directly interface with the processor, but only needs to obtain the processing parameters in the SW-Context. The processor and the ISP do not affect each other, the idle time is reduced, and the efficiency is improved. The SW-Context simultaneously saves the preview processing parameters and the shooting processing parameters, the smart phone can select the corresponding processing parameters according to the image properties of the image to be processed to process the image, the influence caused by the coupling of the preview processing parameters and the shooting processing parameters is reduced, and the display effect of the image on the screen is improved.

[0056] Figure 2 The flowchart of another image processing method provided by the embodiment of the present application is shown in FIG. 2. As shown in FIG. 2, the method can include the following steps. Figure 2

[0057] Step 201, determining the processing parameters.

[0058] The smart phone can determine the corresponding processing parameters according to the current environment. The aspects involved in the processing parameters can include automatic white balance, automatic focusing, automatic exposure, sharpness adjustment, color enhancement, and the like. With the change of the processing parameters, the image processed through the above process will have different effects.

[0059] Step 202, obtaining the SW-Context.

[0060] Step 203, storing the processing parameters to the SW-Context.

[0061] In the embodiment of the present application, the smart phone will configure a plurality of SW-Contexts. The SW-Contexts which do not store the processing parameters can be regarded as idle states, and the SW-Contexts which store the processing parameters can be regarded as non-idle states. The smart phone can obtain two SW-Contexts which respectively store the shooting processing parameters and the preview processing parameters in the plurality of idle state SW-Contexts.

[0062] Step 204, traversing the HW-Context.

[0063] Step 205, judging whether the current HW-Context is in the idle state.

[0064] If the current HW-Context is in the non-idle state, returning to step 204, if the current HW-Context is in the idle state, entering step 206.

[0065] ​Step 206, dynamically associate SW-Context with HW-Context.

[0066] The smart phone dynamically associates SW-Context storing corresponding processing parameters with HW-Context according to the image attribute of the image to be processed. Specifically, if the image to be processed is a shooting image, SW-Context storing shooting processing parameters is dynamically associated with HW-Context, and if the image to be processed is a preview image, SW-Context storing preview processing parameters is dynamically associated with HW-Context.

[0067] Step 207, write the processing parameters in SW-Context into the memory space associated with HW-Context.

[0068] The corresponding processing parameters are written into the memory space. There is a certain time interval between the processor generating the processing parameters and writing the processing parameters into the memory space associated with HW-Context. After the SW-Context is configured in the embodiment of the present application, the processor can save the processing parameters in the SW-Context, and then process other tasks, without waiting for the connection with HW-Context to be established, thereby improving the efficiency of the processor.

[0069] Step 208, start CFG module to carry the processing parameters to the ISO hardware register.

[0070] The CFG module is a module inside the ISP for carrying the processing parameters.

[0071] Step 209, ISP image processing.

[0072] Step 210, delete the dynamic association of SW-Context with HW-Context.

[0073] In the embodiment of the present application, after the connection between SW-Context and HW-Context is disconnected, the HW-Context restored to the idle state can establish a connection with other SW-Context to store the processing parameters of other images to be processed. The number of HW-Contexts is usually less than that of SW-Contexts, which is related to the hardware configuration of the ISP, while the number of SW-Contexts is a software level, which can not be limited by the hardware, and can be configured according to the specific requirements.

[0074] In the embodiment of the present application, the path of the processing parameters can be as follows Figure 3As shown, the processor generates processing parameters for each frame of the image to be processed based on environmental data, and then sends these parameters to the SW-Context for storage. Each frame of the image to be processed corresponds to two processing parameters (capture processing parameters and preview processing parameters). If the current image to be processed is determined to be a preview image, the preview processing parameters are sent to the HW-Context; if the current image to be processed is determined to be a captured image, the capture processing parameters are sent to the HW-Context. Finally, the processing parameters are transferred from the HW-Context to the ISP via the transfer module.

[0075] Figure 4 This is a schematic diagram of the structure of an image processing device provided in an embodiment of the present invention. Figure 3 As shown, the device may include: a processing module 410, a determining module 420, an association module 430, and a sending module 440.

[0076] The processing module 410 is used to store different processing parameters of the image to be processed into different software contexts. The processing parameters include shooting processing parameters and preview processing parameters.

[0077] The determining module 420 is used to determine the image attributes of the image to be processed. The image attributes include: the captured image corresponding to the capturing processing parameters, or the preview image corresponding to the preview processing parameters.

[0078] The association module 430 is used to establish a connection between the software context storing the corresponding processing parameters and the hardware context that is in an idle state, based on the image attributes.

[0079] The sending module 440 is used to send processing parameters to the hardware context storage so that the image signal processor (ISP) can obtain the processing parameters from the hardware context and perform image processing on the image to be processed according to the processing parameters.

[0080] The image processing apparatus provided in this embodiment of the invention can be used as a specific device to implement the image processing method of this embodiment of the invention.

[0081] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0082] like Figure 5 As shown, the electronic device is represented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: one or more processors 510, memory 530, and communication bus 540 connecting different system components (including memory 530 and processor 510).

[0083] Communication bus 540 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration bus, a processor or local bus using any of a variety of bus architectures. By way of example, these architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0084] Electronic device typically includes a variety of computer system readable media. These media can be any available media that is accessible by electronic device and includes both volatile and non-volatile media, removable and non-removable media.

[0085] Memory 530 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. Electronic device can further include other removable / non-removable, volatile / non-volatile computer system storage media. Although Figure 5 Although not shown in FIG. 5, computer system can also include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, FIG. 5 illustrates a magnetic floppy disk drive (FDD) 552 which reads from or writes to a removable non- volatile magnetic media (i.e., floppy disks), and an optical disk drive 554 which reads from or writes to a removable non-volatile optical media (e.g., optical disks such as Compact Disc Read Only Memory (CD-ROM), Digital Video Disk Read Only Memory (DVD-ROM) or other optical media). In these instances, each drive can be connected to bus 540 by one or more data media interfaces. Memory 530 can include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.

[0086] The program / utility, having a set of program modules, can be stored in the memories 530, for execution by the processor 510, as readily apparent to those skilled in the art. The program modules include, but are not limited to, an operating system, one or more applications, other program modules, and program data, each or some combination thereof, which can include implementation of the network environment. The program modules commonly execute the functions and / or methods of embodiments of the present application as described herein.

[0087] The electronic device can also communicate with one or more external devices such as a keyboard or a pointing device, through the communication interface 520 and also through other means such as a USB port, a parallel port, a game port, an IEEE 1394 port, a Bluetooth® port, and / or a serial port, by which the electronic device can enable a user to interact with the electronic device and / or by which the electronic device can enable the electronic device to interact with other computing devices. Such interaction can be through wired or wireless communication. Figure 5 The electronic device can also communicate with one or more networks, such as one or more Local Area Networks (LANs), Wide Area Networks (WANs), and / or the Internet through a network adapter (not shown in FIG. 5). It should be appreciated that the network adapter can also be used to enable the electronic device to communicate with other electronic devices or devices through a Figure 5 It should be appreciated that the software modules described herein can include one or more instructions that can be executed by the processor 510. The software modules can be stored in memory 530, and / or in other storage devices that can be local to and / or remote from the electronic device. It should be appreciated that the software modules can be written in any of a number of programming languages, and / or scripting languages, including but not limited to, C, C++, Java, Visual Basic, and / or JavaScript, just to name a few. It should be appreciated that the software modules can be compiled or interpreted programs, and / or can be stored in any format as appropriate for the particular programming language and / or scripting language.

[0088] The processor 510 performs functions and / or methods of embodiments of the present application by executing the programs stored in the memory 530.

[0089] The present application also provides a computer readable storage medium storing computer instructions, which cause the computer to perform the image processing method provided by the embodiments of the present application.

[0090] The aforementioned computer-readable storage medium may be any combination of one or more computer-readable media. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in connection with an instruction execution system, apparatus, or device.

[0091] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0092] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0093] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0094] In addition, the terms "first", "second", etc. are used herein only to describe different instances, and do not imply or suggest relative importance or a number of the technical features indicated. Thus, the features defined with "first", "second", etc. can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise explicitly and specifically limited.

[0095] Any process or method descriptions or descriptions of the flow diagrams described herein or otherwise described herein can be understood as representing modules, segments, or portions of code that include one or more executable instructions for implementing specific logical functions or steps in the processes. The scope of preferred embodiments of the present application includes additional implementation involving other processes or methods that can be performed according to the claimed subject matter, either manually or with the aid of a computer or processor, and that are not necessarily included within the above specification. The processes or methods described herein or otherwise described herein can be understood as representing executable instructions that, when executed by a processor, software, or computing component, carry out the processes, methods, or functions described herein.

[0096] In several embodiments of the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only illustrative, and for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0097] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of hardware plus software functional units.

[0098] The above description is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.

Claims

1. An image processing method, characterized in that, include: Different processing parameters for the image to be processed are stored in different software contexts, including shooting processing parameters and preview processing parameters. Determine the image attributes of the image to be processed, including: the captured image corresponding to the shooting processing parameters, or the preview image corresponding to the preview processing parameters; Based on the image attributes, a connection is established between the software context storing the corresponding processing parameters and the hardware context that is in an idle state. The processing parameters are sent to the hardware context storage so that the image signal processor (ISP) can obtain the processing parameters from the hardware context and perform image processing on the image to be processed according to the processing parameters; The step of storing different processing parameters of the image to be processed into different software contexts includes: Determine the shooting processing parameters and the preview processing parameters of the image to be processed; The shooting processing parameters are stored in the first software context, and the preview processing parameters are stored in the second software context; If the image attribute is determined to be the captured image, then establishing a connection between the software context storing the corresponding processing parameters and the hardware context in an idle state includes: The hardware contexts are traversed and any hardware context that is in an idle state is determined as the first hardware context; The first software context and the first hardware context are dynamically associated.

2. The method according to claim 1, characterized in that, If the image attribute is determined to be the captured image, then sending the processing parameters to the hardware context storage, so that the image signal processor (ISP) obtains the processing parameters from the hardware context and performs image processing on the image to be processed according to the processing parameters, includes: The shooting processing parameters are sent to the first hardware context storage so that the ISP can obtain the shooting processing parameters from the first hardware context and perform image processing on the image to be processed according to the shooting processing parameters.

3. The method according to claim 2, characterized in that, The method further includes: After image processing is completed, the dynamic association between the first software context and the first hardware context is deleted, so that the first hardware context returns to the idle state.

4. The method according to claim 1, characterized in that, The process of determining the shooting processing parameters and the preview processing parameters of the image to be processed includes: Obtain environmental data for the current environment; The preview processing parameters and the shooting processing parameters of the image to be processed are determined based on the environmental data.

5. The method according to claim 1, characterized in that, The image to be processed is an image captured in real time by a camera.

6. An image processing apparatus, characterized in that, include: The processing module is used to store different processing parameters of the image to be processed into different software contexts, including shooting processing parameters and preview processing parameters; The determining module is used to determine the image attributes of the image to be processed, the image attributes including: a captured image corresponding to the capturing processing parameters, or a preview image corresponding to the preview processing parameters; The association module is used to establish a connection between the software context storing the corresponding processing parameters and the hardware context that is in an idle state, based on the image attributes. The sending module is used to send the processing parameters to the hardware context storage, so that the image signal processor (ISP) can obtain the processing parameters from the hardware context and perform image processing on the image to be processed according to the processing parameters; The step of storing different processing parameters of the image to be processed into different software contexts includes: Determine the shooting processing parameters and the preview processing parameters of the image to be processed; The shooting processing parameters are stored in the first software context, and the preview processing parameters are stored in the second software context; If the image attribute is determined to be the captured image, then establishing a connection between the software context storing the corresponding processing parameters and the hardware context in an idle state includes: The hardware contexts are traversed and any hardware context that is in an idle state is determined as the first hardware context; The first software context and the first hardware context are dynamically associated.

7. An electronic device, characterized in that, include: At least one processor; as well as At least one memory communicatively connected to the processor, wherein: The memory stores program instructions, and the processor invokes the program instructions to execute the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed by a processor, implements the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Thread management method and device with DMA (direct memory access) participation in MVP (multi thread virtual pipeline) processor

    CN103955408A

  • Image acquisition method, image acquisition system and unmanned equipment

    CN113676673A

  • Image processing method and system, electronic equipment and storage medium

    CN113727035A