CN118317203A - Image processing method and device, electronic equipment and chip - Google Patents

Image processing method and device, electronic equipment and chip

Info

Publication number
CN118317203A
CN118317203A CN202310020349.0A CN202310020349A CN118317203A CN 118317203 A CN118317203 A CN 118317203A CN 202310020349 A CN202310020349 A CN 202310020349A CN 118317203 A CN118317203 A CN 118317203A
Authority
CN
China
Prior art keywords
data
filter
original
pixel
multimedia
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310020349.0A
Other languages
Chinese (zh)
Inventor
田牧豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Publication of CN118317203A publication Critical patent/CN118317203A/en
Pending legal-status Critical Current

Links

Abstract

The disclosure relates to an image processing method, an image processing device, electronic equipment and a chip, wherein the method comprises the following steps: collecting multimedia data, and acquiring pixel data of any pixel point in the multimedia data; determining original filter data according to the filter type selected by a user; performing filter processing on the multimedia data based on the original filter data to obtain target image data; the filter processing includes color space conversion of the pixel data with raw filter data. The present disclosure can add a color filter for multimedia data of a large size and a high frame rate by performing filter processing on the multimedia data using original filter data.

Description

Image processing method and device, electronic equipment and chip
Technical Field
The disclosure relates to the technical field of image processing, and in particular relates to an image processing method, an image processing device, electronic equipment and a chip.
Background
With the development of the multimedia industry, people are increasingly used to adding filters to multimedia data shot by terminal electronic devices such as mobile phones, tablet computers and the like so as to obtain favorite style types.
However, the existing electronic device products have no option compatible with large-size and high-frame-rate color filters in the camera function, especially the video function, of the electronic device; the user cannot add color filters efficiently and quickly in the face of large-size and high-frame-rate images. Therefore, how to implement adding color filters to large-sized and high-frame-rate multimedia data is a technical problem to be solved.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides an image processing method, an image processing device, an electronic device, and a chip, so as to better filter multimedia data.
According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method including:
Collecting multimedia data, and acquiring pixel data of any pixel point in the multimedia data;
Determining original filter data according to the filter type selected by a user;
performing filter processing on the multimedia data based on the original filter data to obtain target image data; the filter processing includes color space conversion of the pixel data with the original filter data.
Optionally, determining the original filter data according to the filter type selected by the user includes:
receiving a first operation input by a user, wherein the first operation is used for selecting a filter type;
And acquiring original filter data corresponding to the filter type.
Optionally, acquiring raw filter data corresponding to a filter type includes:
and determining the original filter data according to the corresponding relation between the filter type and the original filter data.
Optionally, performing filter processing on the multimedia data based on the original filter data to obtain target image data, including:
obtaining candidate data according to the pixel data and the original filter data;
performing color space conversion on the candidate data to obtain target image data; the color space conversion includes converting the candidate data to a YUV color space.
Optionally, the method further comprises:
And restoring the pixel data of the pixel points of the areas except the designated area to obtain the local filter data, wherein the designated area is selected by a user through a second operation.
Optionally, performing filter processing on the multimedia data based on the original filter data, including:
the control image signal processor performs filter processing on the multimedia data according to the original filter data.
According to a second aspect of the embodiments of the present disclosure, there is provided an image processing apparatus including:
the acquisition module is configured to acquire multimedia data and acquire pixel data of any pixel point in the multimedia data;
the determining module is configured to determine original filter data according to the filter type selected by a user;
the filter module is configured to perform filter processing on the multimedia data according to the original filter data to obtain target image data; the filter processing includes color space conversion of the pixel data with the original filter data.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
A processor;
a memory for storing processor-executable instructions;
Wherein the processor is configured to:
Collecting multimedia data, and obtaining pixel data of any pixel point in the multimedia data;
Determining original filter data according to the filter type selected by a user;
Performing filter processing on the multimedia data according to the original filter data to obtain target image data; the filter processing includes color space conversion of the pixel data with the original filter data.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the image processing method provided by the first aspect of the present disclosure.
According to a fifth aspect of embodiments of the present disclosure, a chip is provided, which may include a processor and an interface; the processor is configured to read instructions to perform the steps of the image processing method provided in the first aspect of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
Under the condition that multimedia data are acquired, acquiring pixel data of any pixel point in the multimedia data, determining original filter data according to a filter type selected by a user, and performing filter processing on the multimedia data based on the original filter data to obtain target image data, wherein the filter processing comprises performing color space conversion on the pixel data and the original filter data. According to the embodiment of the disclosure, the filter processing is completed on the multimedia data by acquiring the pixel data in the multimedia data and performing color space conversion on the original filter data and the pixel data, so that the color filter function can be provided for a user aiming at the image data with large size and high frame rate, and the use experience of the user can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating an image processing method according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating an image processing method according to another exemplary embodiment.
Fig. 3 is a process example diagram of a color filter in an image processing method according to another exemplary embodiment.
Fig. 4 is an exemplary diagram showing filter processing of a single frame image in an image processing method according to another exemplary embodiment.
Fig. 5 is a block diagram of an image processing apparatus according to an exemplary embodiment.
Fig. 6 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
An image signal Processor (IMAGE SIGNAL Processor, ISP) belongs to a Chip structure of a System On Chip (SOC) of an electronic device, and is provided with an independent operation unit and an operation structure which complement with the CPU, and in the field of image processing, the image signal Processor can perform corresponding preprocessing On an image, including operations such as data acquisition, denoising, image stitching and the like, so that the consumption of the CPU in image processing can be reduced, and the resource utilization rate of the CPU can be improved.
Here, the control parameters of the image signal processor may include a gain level and a color correction matrix for automatic white balance and color adjustment. In addition, the image signal processor may also receive processing data from the image memory to perform color space conversion, such as RGB to YUV, on the processing data.
Currently, when an image is filtered, the filtering is mainly realized through a software algorithm, namely, a color filter is realized through CPU calculation and processing. However, this is limited to a great extent by the CPU performance, and when the data content of the data to be processed is too large, the electronic device may suffer from a problem of jamming. For example, the data content of the data to be processed is excessively large, which may be the resolution of the image to be processed is too large, or may be the FPS (FRAMES PER seconds, transmission frames per Second) frame rate of the image to be processed is too high.
In view of the above problems, the image processing method, apparatus, electronic device and chip provided in this embodiment can process an image with a too large resolution or a too large frame rate.
Fig. 1 is a flowchart illustrating an image processing method according to an exemplary embodiment, including the following steps, as shown in fig. 1.
In step S11, multimedia data is collected, and pixel data of any pixel point in the multimedia data is obtained.
In the embodiment of the disclosure, the electronic device may collect multimedia data, where the electronic device may be a device with a communication capability, which may be a mobile phone (mobile phone), a tablet computer or a computer with a wireless transceiver function, and may also be a Virtual Reality (VR) terminal, a central control display screen, a sweeping robot, an augmented reality (augmented reality, AR) terminal, and the like.
In addition, the electronic device may include an image sensor, and a camera of the electronic device may collect light reflected from a scene within a viewing range and project a resulting light signal to a photosensitive area of the image sensor. The image sensor may perform photoelectric conversion to convert the optical signal into an original image, and form image data in a RAW format, which may be used as multimedia data in the embodiments of the present disclosure.
In some implementations, the multimedia data collected by the electronic device may be an image. Alternatively, the multimedia data collected by the electronic device may be video, where the video may be composed of a plurality of video frames.
It should be noted that, the multimedia data in the embodiments of the present disclosure may be data collected by the electronic device in real time. In other words, the multimedia data may be an image acquired by the electronic device in real time, or may be a video acquired by the electronic device in real time.
In addition, after the multimedia data is acquired, the electronic device can acquire the pixel data of any pixel point in the multimedia data. From the above description, it is known that multimedia data may be video or image, and may be composed of a plurality of pixels, whether video or image. Thus, after the multimedia data is acquired, the embodiments of the present disclosure may acquire pixel data of each pixel, where the pixel data may include RGB data of each pixel. On this basis, the original filter data is determined according to the filter type selected by the user, i.e., the process advances to step S12.
In step S12, the original filter data is determined according to the filter type selected by the user.
In some embodiments, in order to implement a filter for multimedia data, the embodiments of the present disclosure may determine original filter data, where the original filter data may be preset according to a filter effect, that is, different original filter data may be obtained by performing a back-pushing on different filter effects. In addition, the raw filter data may be used to filter the multimedia data. Here, the raw filter data may be a filter matrix.
In the embodiment of the disclosure, the original filter data may be data obtained by deducing and debugging according to the filter effect, that is, the original filter data is obtained based on the filter effect, and the original filter data corresponding to different filter effects are different. For example, the original filter data corresponding to the filter effect "green orange" is the a matrix. For another example, the original filter data corresponding to the filter effect "latin" is a B matrix.
As an alternative, in the case where a user input filter selection operation is detected, the electronic apparatus may determine a filter effect corresponding to the filter selection operation. On this basis, the original filter data corresponding to the filter effect is acquired. Each filter effect may correspond to a filter number based on which the electronic device may obtain raw filter data. In other words, the electronic device may determine the original filter data according to the filter type selected by the user.
It should be noted that, in the embodiment of the disclosure, the original filter data may be pre-stored in the color space conversion (Color Space Transformation, CST) module, and each filter effect may correspond to a filter number. In other words, the filter numbers and the original filter data may be stored in a one-to-one correspondence. In addition, the filter type in the embodiments of the present disclosure may also be referred to as a filter effect.
In step S13, filter processing is performed on the multimedia data based on the original filter data to obtain target image data.
In some embodiments, after the original filter data is obtained, the embodiment of the disclosure may perform filter processing on the multimedia data according to the original filter data to obtain the target image data, where the original filter data is different, and the finally obtained target image data is different.
Here, the filter processing may be used to color space convert pixel data with original filter data. In other words, the electronic device may perform color space conversion on the pixel data and the original filter data to implement filter processing, so as to obtain the target image data.
In a specific implementation manner, after the original filter data is obtained, the embodiment of the disclosure may control an Image Signal Processor (ISP) to perform filter processing on the multimedia data according to the original filter data, so as to obtain the target image data.
From the above description it is known that an Image Signal Processor (ISP) is a specialized integrated circuit for image data processing for further processing of image data formed by an image sensor for better image quality.
It should be noted that, the embodiments of the present disclosure may also utilize other hardware processors to filter multimedia data to provide a large-size and high-frame-rate color filter function for users without increasing power consumption and computational power requirements.
In the embodiment of the disclosure, the multimedia data may be RGB format image data, that is, the pixel values of each pixel point in the multimedia data may be R (red), G (green), and B (blue) values. In other words, the multimedia data may be composed of a plurality of pixels, and each pixel may correspond to three channels of R (red), G (green), and B (blue). In the process of performing filter processing on multimedia data, the embodiment of the disclosure may first acquire pixel data of each pixel, that is, acquire RGB data of each pixel. On this basis, a color filter operation is realized based on the pixel data of each pixel and the original filter data to obtain target image data.
As a specific implementation manner, the main application scenario of the embodiment of the present disclosure may be a stand-alone video scenario, and may particularly be applied to a large-size, high-frame rate scenario. In other words, the multimedia data collected by the electronic device may be a stand-alone video, and in the process of recording the video, the embodiment of the disclosure may obtain the original filter data based on the first operation input by the user.
On the basis, the electronic equipment can perform filter processing on the multimedia data acquired by the electronic equipment in real time according to the original filter data so as to obtain target image data. The target image data may be a target image obtained by a filter, or may be a target video composed of a plurality of target video frames, where each target video frame may be obtained by filtering with the original filter data.
It can be seen that the image size and frame rate are not limited by CPU performance when using the filter effect in the embodiments of the present disclosure, so that a better image quality effect can be obtained, for example, 4k &60fp can be selected when recording.
Under the condition that the multimedia data is acquired, the embodiment of the disclosure can acquire the pixel data of any pixel point in the multimedia data, and then determine the original filter data according to the filter type selected by the user. On the basis, filter processing is performed on the multimedia data based on the original filter data to obtain target image data. Wherein the filter processing includes color space conversion of the pixel data with the original filter data. According to the embodiment of the disclosure, the filter processing is completed on the multimedia data by acquiring the pixel data in the multimedia data and performing color space conversion on the original filter data and the pixel data, so that the color filter function can be provided for a user aiming at the image data with large size and high frame rate, and the use experience of the user can be improved.
Fig. 2 is a flowchart of an image processing method according to another exemplary embodiment, as shown in fig. 2, including the following steps.
In step S21, multimedia data is collected, and pixel data of any pixel point in the multimedia data is obtained.
The specific implementation of step S21 may refer to the description of the foregoing embodiments, and will not be described herein.
In step S22, a first operation of user input is received, the first operation being for selecting a filter type.
As an alternative, the electronic device may receive a first operation of the user input, wherein the first operation may be used to select the filter type. Here, the first operation may be triggered by triggering a filter selection control. In addition, the first operation may be a click operation, a voice control operation, or a gesture operation.
As an example, after detecting that the user triggers the control corresponding to the "green orange" filter effect by clicking, the electronic device may determine that the electronic device receives the first operation input by the user, where the first operation is used to select the "green orange" filter effect, that is, the filter type is "green orange".
As another example, when detecting that the user has selected the "latin" filter effect by voice, the electronic device may determine a first operation to receive user input, where the first operation is to select the "latin" filter effect, i.e., the filter type is "latin". For example, in the case where the electronic device detects a user input voice "switch filter effect to latin", it may determine that a first operation of user input is received and the first operation is for the selected filter type to be "latin".
As another example, when it is detected that the user has selected the "mystery" filter effect by way of a gesture, the electronic device may determine a first operation to receive user input, where the first operation is to select the "mystery" filter effect, i.e., the filter type is "mystery". For example, in the event that the electronic device detects a user input specifying gesture, it may determine a first operation to receive the user input, and the first operation is for the selected filter type to be "mystery". Wherein the specified gesture is used to select a filter effect. For example, the specified gesture may be a sign-on gesture.
Through the above description, it is known that a plurality of filter effects may be configured on the electronic device, and when multimedia data is collected, a user may select a filter effect according to personal preference, that is, when a first operation input by the user is received, the embodiment of the disclosure may use the filter effect triggered by the first operation as a filter type.
It should be noted that the first operation may be input before the acquisition of the multimedia data, or may be input when the multimedia data is acquired. For example, the user may want to change the filter effect of the video during recording, which may be achieved by inputting a first operation.
In some embodiments, after receiving the first operation input by the user, the embodiment of the present disclosure may acquire the original filter data corresponding to the filter type, that is, step S23 is performed.
In step S23, original filter data corresponding to the filter type is acquired.
In an embodiment of the disclosure, the electronic device may acquire raw filter data corresponding to a filter type, where the raw filter data may include a filter matrix. As one example, the raw filter data may be a 3*3 filter matrix.
It is known from the above description that each filter effect may correspond to a filter number, and the original filter data and the filter number may be stored in a one-to-one correspondence manner. Accordingly, after the filter type is acquired, the embodiments of the present disclosure may acquire the original filter data corresponding thereto based on the filter number of the filter type.
As one example, the filter number of "portrait retention" is 1, and in the case where it is detected that the first operation input by the user is for selecting "portrait retention", the embodiment of the present disclosure may use the original filter data a corresponding to the filter number 1 as the original filter data corresponding to the filter type.
As another example, the filter number of "BBP" is 2, and in the case where it is detected that the first operation of the user input is for selecting "BBP", the embodiment of the present disclosure may use the original filter data B corresponding to the filter number 2 as the original filter data corresponding to the filter type.
In step S24, the control image signal processor performs filter processing on the multimedia data according to the original filter data to obtain target image data.
In some embodiments, after obtaining the original filter data corresponding to the filter type, the electronic device may control an Image Signal Processor (ISP) to perform filter processing on the multimedia data according to the original filter data, to obtain the target image data. Wherein the image signal processor may also be referred to as an image processing engine.
As an example, embodiments of the present disclosure may control an Image Signal Processor (ISP) to filter multimedia data according to a filter matrix and a conversion matrix to obtain target image data. Wherein the image signal processor may also be referred to as an image processing engine.
In embodiments of the present disclosure, an Image Signal Processor (ISP) may include a color space conversion module, wherein the color space conversion module primarily functions to convert image data in RGB format into YUV format.
As an alternative, when the multimedia data is subjected to filter processing by using the original filter data, the electronic device may obtain candidate data according to the pixel data of each pixel point and the original filter data. On the basis, the candidate data is subjected to color space conversion to obtain target image data. Here, the color space conversion may include converting the candidate data to a YUV color space.
As is known from the above description, the original filter data may be a filter matrix, and after the filter matrix is acquired, the electronic device may multiply the filter matrix (original filter data) by pixel data in the multimedia data through an Image Signal Processor (ISP) to obtain candidate data.
On this basis, color space conversion is performed on the candidate data, i.e. the candidate data may be multiplied by the conversion matrix, plus an offset value. The filter matrix (original filter data) can be recorded in a table, and the hardware can read the filter matrix (original filter data) in the table to a register for calculation during operation. It should be noted that, when the color space of the conversion is determined, the conversion matrix and the offset value may be fixed data.
As one example, the transformation matrix isOffset value isThe pixel data of the pixel points in the multimedia data can be expressed asThe raw filter data (filter matrix) obtained isThus, the calculation process of the target image data may be as follows:
In the above formula And may be the target image data in the practice of the present disclosure.
In other embodiments, the embodiment of the disclosure may also determine the original filter data according to the correspondence between the filter effect and the original filter data. Specifically, the electronic device may determine a filter table corresponding to the filter type through a table look-up manner, and take parameters in the filter table as original filter data, where the parameters in the filter table may include a result of multiplying a filter matrix by a conversion matrix.
Through the above description, it is known that different original filter data can be obtained through debugging for color filters with different effects, and on the basis of the above description, the results obtained by multiplying different original filter data with a conversion matrix can be stored in different tables in advance. Therefore, in the process of performing filter processing on multimedia data, the electronic device can realize the switching of filter effects by reading the data in different tables, so that the color filter effect can be realized through an Image Signal Processor (ISP) without changing the existing hardware structure.
Here, the electronic device may control the image signal processor to perform filter processing on the multimedia data according to the parameters in the filter table, to obtain the target image data. Wherein the filter table may comprise a matrix of 3*3, i.e. the parameters in the filter table may consist of 9 data.
In other embodiments, after performing filter processing on the multimedia data to obtain the target image data, the embodiment of the disclosure may also restore pixel data of pixels in other areas except the designated area to obtain local filter data. Wherein the designated area may be input by the user through the second operation. In the embodiment of the disclosure, the local filter data may be composed of data after filter processing and data after restoration.
Here, the restoration of the pixel data of the pixel points of the other region than the specified region may be the inverse filter processing. As is known from the above description, an object of filter processing of multimedia data based on original filter data may be each pixel point in the multimedia data. Therefore, when the multimedia data is subjected to the filter processing, the electronic device may perform color space conversion on the pixel data of each pixel point and the original filter data to obtain the target image data. The target image data may include a plurality of target sub-data, that is, each pixel may correspond to one target sub-data.
In some embodiments, restoring pixel data of pixels of other regions than the specified region may include: and acquiring target sub-data corresponding to each pixel point in other areas. On the basis, the restoration of the pixel data of the pixel points of other areas is realized by utilizing each target sub-data and the original filter data.
As an example, a first pixel point exists in the designated area, the target sub-data corresponding to the first pixel point is the first target sub-data, and when the restoring operation is performed, the electronic device may perform processing using the first target sub-data and the original filter data. For example, the electronic device may first subtract the offset value from the first target sub-data and then divide the first target sub-data by the conversion matrix and the original filter data, so that the pixel data of the first pixel point may be obtained, and further reduction of the pixel data of the first pixel point in other areas may be achieved. The restoration of other pixels is similar to the first pixel, and will not be described here again.
As a specific embodiment, in the case where the user input of the second operation is detected, the electronic device may restore the pixel data of the pixels of the other area than the specified area to obtain the local filter data. Wherein the second operation is used for filtering the designated area in the multimedia data. For example, the user wishes to highlight the human body during the video recording process, and when detecting that the user inputs the second operation for the human body, the electronic device can restore the pixel data of the pixels in the region other than the human body, so that the modification of the image part can be realized while obtaining better image quality.
In another specific embodiment, in the case that the specified object exists in the image, the electronic device may restore pixel data of pixels in other areas except for the specified object to obtain local filter data. The specified object may be obtained according to a preference analysis of the user, may be preset by the user, or may be determined according to a plurality of historical data, where the historical data may be data formed by a plurality of second operations input by the user before the current moment. For example, in the case where the presence of a face in an image is detected, the electronic device may restore pixel data of pixels of other areas than the face.
For a better understanding of the process of color filters, the disclosed embodiments present an example diagram as shown in fig. 3, and it can be appreciated from fig. 3 that the camera module of the electronic device can output raw image data, which can be multimedia data in the disclosed embodiments. Then, an image processing engine (ISP) may perform basic image quality processing and format conversion on the image, and a color filter may be implemented using CST.
On this basis, image algorithmic processing may process images using algorithms to enhance image quality or to perform other functions. Finally, the image coding can code the image, so that the image can be conveniently stored in a file. Thus, the final image file can be obtained, and the image file can be displayed on the screen of the electronic equipment.
As shown in fig. 4, when performing filter processing on a single frame image, the electronic device may issue an image application in an application program, where the application may carry a filter number tag. Then, the electronic device may package the tuning parameters, and select the CST matrix parameters according to the filter number tag, where the CST matrix parameters may be the original filter data in the embodiment of the present disclosure, and the filter numbers are different, so that the corresponding original filter data is different. The electronic device may then send the tuning parameter to the hardware platform to write to the register.
The Sensor in fig. 4 can be used for the drawing and returned to the program flow in the image frame format. On this basis, the ISP may perform processing operations including CTS conversion, and finally may perform image post-processing, which may include image algorithms, encoding, and the like.
According to the embodiment of the disclosure, under the condition that multimedia data are acquired, pixel data of any pixel point in the multimedia data are acquired, then original filter data are determined according to the filter type selected by a user, and on the basis, an image signal processor is controlled to perform filter processing on the multimedia data according to the original filter data so as to obtain target image data. According to the embodiment of the disclosure, the image signal processor is utilized to process the multimedia data, so that the color filter function can be provided for a user aiming at the image data with large size and high frame rate on the premise of not increasing power consumption and calculation power requirements, and the use experience of the user can be improved. In addition, under the condition of realizing a better picture effect, the embodiment of the disclosure can optimize indexes such as memory, power consumption and the like, and further can improve the fluency in the use process of the electronic equipment.
Fig. 5 is a block diagram of an image processing apparatus 300 according to an exemplary embodiment. Referring to fig. 5, the image processing apparatus 300 may include an acquisition module 301, a determination module 302, and a filter module 303.
The acquiring module 301 is configured to acquire multimedia data and acquire pixel data of any pixel point in the multimedia data;
the determination module 302 is configured to determine raw filter data based on the filter type selected by the user;
The filter module 303 is configured to perform filter processing on the multimedia data based on the original filter data to obtain target image data; the filter processing includes color space conversion of the pixel data with raw filter data.
In some implementations, the determination module 302 can include:
a first operation receiving sub-module configured to receive a first operation input by a user, the first operation being for selecting a filter type;
And the first acquisition submodule is configured to acquire the original filter data corresponding to the filter type.
In some embodiments, the first acquisition sub-module may be further configured to determine the original filter data according to a correspondence of the filter type and the original filter data.
In some embodiments, the filter module 303 may include:
The candidate data acquisition sub-module is configured to obtain candidate data according to the pixel data and the original filter data;
the multiplication submodule is configured to perform color space conversion on the candidate data to obtain the target image data; the color space conversion includes converting the candidate data to a YUV color space.
In some embodiments, the image processing apparatus 300 may further include:
And the restoration module is configured to restore the pixel data of the pixel points of the other areas except the designated area to obtain the local filter data, wherein the designated area is selected by the user through a second operation.
In some embodiments, the filter module 303 may be further configured to control the image signal processor to filter the multimedia data according to the raw filter data.
Under the condition that multimedia data are acquired, the embodiment of the disclosure acquires pixel data of any pixel point in the multimedia data, then determines original filter data according to a filter type selected by a user, and performs filter processing on the multimedia data based on the original filter data to obtain target image data, wherein the filter processing comprises performing color space conversion on the pixel data and the original filter data. According to the embodiment of the disclosure, the filter processing is completed on the multimedia data by acquiring the pixel data in the multimedia data and performing color space conversion on the original filter data and the pixel data, so that the color filter function can be provided for a user aiming at the image data with large size and high frame rate, and the use experience of the user can be improved.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The embodiment of the disclosure also provides an electronic device, including:
A processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
Collecting multimedia data, and acquiring pixel data of any pixel point in the multimedia data;
Determining original filter data according to the filter type selected by a user;
Performing filter processing on the multimedia data based on the original filter data to obtain target image data; the filter processing includes color space conversion of the pixel data with raw filter data.
The present disclosure also provides a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the image processing method provided by the present disclosure.
Fig. 6 is a block diagram of an electronic device 800 for an image processing method, which electronic device 800 may be a local hub device, which may be a router or a hub gateway, etc., according to an exemplary embodiment. In addition, the electronic device 800 may also be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 6, an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen between the electronic device 800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operational mode, such as a capture mode or a video mode, the front camera and/or the rear camera may receive an external target image. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
Input/output interface 812 provides an interface between processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the electronic device 800. For example, the sensor assembly 814 may detect an on/off state of the electronic device 800, a relative positioning of the components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in position of the electronic device 800 or a component of the electronic device 800, the presence or absence of a user's contact with the electronic device 800, an orientation or acceleration/deceleration of the electronic device 800, and a change in temperature of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices, either wired or wireless. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of electronic device 800 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
The apparatus may be a stand-alone electronic device or may be part of a stand-alone electronic device, for example, in one embodiment, the apparatus may be an integrated circuit (INTEGRATED CIRCUIT, IC) or a chip, where the integrated circuit may be an IC or may be a collection of ICs; the chip may include, but is not limited to, the following: GPU (Graphics Processing Unit, graphics Processor), CPU (Central Processing Unit ), FPGA (Field Programmable GATE ARRAY, programmable logic array), DSP (DIGITAL SIGNAL Processor ), ASIC (Application SPECIFIC INTEGRATED Circuit), SOC (System on Chip, SOC, system on Chip or System on Chip), and the like. The integrated circuits or chips described above may be used to execute executable instructions (or code) to implement the image processing methods described above. The executable instructions may be stored on the integrated circuit or chip or may be retrieved from another device or apparatus, such as the integrated circuit or chip including a processor, memory, and interface for communicating with other devices. The executable instructions may be stored in the memory, which when executed by the processor implement the image processing method described above; or the integrated circuit or the chip can receive the executable instructions through the interface and transmit the executable instructions to the processor for execution, so as to realize the image processing method.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-mentioned image processing method when being executed by the programmable apparatus.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. An image processing method, the method comprising:
Collecting multimedia data, and acquiring pixel data of any pixel point in the multimedia data;
Determining original filter data according to the filter type selected by a user;
Performing filter processing on the multimedia data based on the original filter data to obtain target image data; the filter processing includes color space conversion of the pixel data with raw filter data.
2. The method of claim 1, wherein determining raw filter data based on the user-selected filter type comprises:
Receiving a first operation input by a user, wherein the first operation is used for selecting the filter type;
and acquiring the original filter data corresponding to the filter type.
3. The method of claim 2, wherein the acquiring the raw filter data corresponding to the filter type comprises:
and determining the original filter data according to the corresponding relation between the filter type and the original filter data.
4. The method according to claim 1, wherein the filtering the multimedia data based on the original filter data to obtain target image data comprises:
Obtaining candidate data according to the pixel data and the original filter data;
performing color space conversion on the candidate data to obtain the target image data; the color space conversion includes converting the candidate data to a YUV color space.
5. The method according to any one of claims 1 to 4, further comprising:
And restoring the pixel data of the pixel points of the areas except the designated area to obtain the local filter data, wherein the designated area is selected by a user through a second operation.
6. The method according to any one of claims 1 to 4, wherein the filtering the multimedia data based on the raw filter data comprises:
and controlling an image signal processor to carry out filter processing on the multimedia data according to the original filter data.
7. An image processing apparatus, characterized in that the apparatus comprises:
the determining module is configured to collect multimedia data and acquire pixel data of any pixel point in the multimedia data;
the determining module is configured to determine original filter data according to the filter type selected by a user;
the filter module is configured to perform filter processing on the multimedia data based on the original filter data to obtain target image data; the filter processing includes color space conversion of the pixel data with raw filter data.
8. An electronic device, comprising:
A processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
Collecting multimedia data, and acquiring pixel data of any pixel point in the multimedia data;
Determining original filter data according to the filter type selected by a user;
Performing filter processing on the multimedia data based on the original filter data to obtain target image data; the filter processing includes color space conversion of the pixel data with raw filter data.
9. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the method of any of claims 1 to 6.
10. A chip, comprising a processor and an interface; the processor is configured to read instructions to perform the method of any one of claims 1 to 6.
CN202310020349.0A 2023-01-06 Image processing method and device, electronic equipment and chip Pending CN118317203A (en)

Publications (1)

Publication Number Publication Date
CN118317203A true CN118317203A (en) 2024-07-09

Family

ID=

Similar Documents

Publication Publication Date Title
JP7169383B2 (en) Capture and user interface using night mode processing
RU2630167C1 (en) Method and device for switching colour range mode
CN109345485B (en) Image enhancement method and device, electronic equipment and storage medium
CN110958401B (en) Super night scene image color correction method and device and electronic equipment
CN106657780B (en) Image preview method and device
CN110944230B (en) Video special effect adding method and device, electronic equipment and storage medium
CN111050062B (en) Shooting method and electronic equipment
CN109089043B (en) Shot image preprocessing method and device, storage medium and mobile terminal
CN112770059B (en) Photographing method and device and electronic equipment
CN113014803A (en) Filter adding method and device and electronic equipment
WO2017012232A1 (en) Method and apparatus for displaying picture
US10951816B2 (en) Method and apparatus for processing image, electronic device and storage medium
US11348365B2 (en) Skin color identification method, skin color identification apparatus and storage medium
CN113891018A (en) Shooting method and device and electronic equipment
CN111835977B (en) Image sensor, image generation method and device, electronic device, and storage medium
CN118317203A (en) Image processing method and device, electronic equipment and chip
CN114285978A (en) Video processing method, video processing device and electronic equipment
KR20220014801A (en) Image processing method, device and storage medium
CN111263190A (en) Video processing method and device, server and storage medium
CN118018835A (en) Image capturing method, image capturing device, image capturing apparatus, and storage medium
CN110876013B (en) Method and device for determining image resolution, electronic equipment and storage medium
CN118096535A (en) Image processing method and device, electronic equipment and storage medium
CN117369615A (en) Electronic equipment control method and device, storage medium and electronic equipment
CN116012222A (en) Image processing method, device, electronic equipment and storage medium
CN114071016A (en) Image processing method, image processing device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication