Image data processing method and system, chip and storage medium
By converting and splitting data formats in the image processing system and adapting to the processing method of DSP chips, the problem of inconsistent data formats of hardware and software algorithms and DSP algorithms is solved, and the efficiency and flexibility of image processing are improved.
Patent Information
- Application Number
- CN202411197665.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-10
AI Technical Summary
In the prior art, the data formats of hardware and software algorithms and DSP algorithms in image processing systems are not uniform, resulting in low processing efficiency.
By adding a data format conversion module to the image processing system, the image data to be processed is converted from the first format to the second format, and the data blocks are split and combined according to the calculation function module, and the processing method of the DSP chip is adapted to realize the data format Unity.
Improve the efficiency and flexibility of image processing, and reduce processing limitations and inconvenience caused by data format differences.
Smart Images

Figure CN119107220A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data technology, and specifically to an image data processing method, system, chip and storage medium. Background Art
[0002] There are hardware image processing algorithms and software image processing algorithms in the system on chip (System on Chip, SOC), and these two algorithms have their own advantages and disadvantages. For example, the advantage of the hardware image processing algorithm is fast processing speed, but the disadvantage is high manufacturing cost and inconvenient modification; the advantage of the software image processing algorithm is high flexibility, and the corresponding image algorithm can be written according to demand, but the disadvantage is slow processing speed. In order to solve the above two disadvantages, the existing technology will add a digital signal processing (Digital Signal Processing, DSP) algorithm to the image processing system (such as adding a DSP algorithm for image processing in a DSP chip). However, adding a DSP algorithm will face the problem of data format between the data processed by the DSP algorithm and the data processed by the hardware algorithm and software algorithm of the SOC, resulting in low processing efficiency and the like. Summary of the invention
[0003] In view of this, the present application provides an image data processing method, system, chip and storage medium to optimize the image data processing process and improve processing efficiency.
[0004] In a first aspect, an embodiment of the present application provides an image data processing method, which is applied to a first chip, and the method includes:
[0005] Acquire image data to be processed, where the image data to be processed is image data in a first format;
[0006] Performing data format conversion on the first format image data to obtain second format image data;
[0007] Splitting the second format image data according to the computing function module included in the first chip to obtain a plurality of data blocks;
[0008] Inputting the plurality of data blocks into the corresponding computing function modules for processing respectively to obtain a plurality of first image data;
[0009] Combining the plurality of first image data to obtain second image data;
[0010] The second image data is output.
[0011] In a possible implementation manner, converting the image data in the first format to obtain the image data in the second format includes:
[0012] The C component, M component, Y component and K component data of each pixel in the first format image data are arranged by channels in the printing color mode to obtain the second format image data, wherein the second format image data includes four groups of data, and the data in each group is the data of a single channel.
[0013] In a possible implementation, the second format image data is split according to the computing function module included in the first chip to obtain multiple data blocks, including:
[0014] Determining a computing function module included in the first chip;
[0015] Determine the computing function module corresponding to the data in each channel of the second format image data;
[0016] The second format image data is split according to the computing function modules corresponding to the data in each channel of the second format image data to obtain a plurality of data blocks, wherein each data block corresponds to at least one computing function module.
[0017] In a possible implementation manner, combining the plurality of first image data to obtain second image data includes:
[0018] Arrange the C component, M component, Y component and K component data of each pixel point in the plurality of first image data in a printing color mode by channel to obtain second image data.
[0019] In a possible implementation manner, combining the plurality of first image data to obtain second image data includes:
[0020] The C component, M component, Y component and K component data of each pixel point in the plurality of first image data are alternately arranged in the order of CMYK in the printing color mode to obtain the second image data.
[0021] In a possible implementation manner, the outputting the second image data includes:
[0022] The second image data is output to the second chip.
[0023] In a second aspect, an embodiment of the present application provides an image data processing system, including:
[0024] A data conversion module, and a first processor connected to the data conversion module;
[0025] The data conversion module is used to obtain the image data to be processed, and perform data format conversion on the image data to be processed to obtain image data in a second format; wherein the image data to be processed is image data in a first format;
[0026] The first processor is used to split the second format image data according to the operation function module included in the first processor to obtain multiple data blocks; and input the multiple data blocks into the corresponding operation function modules for processing respectively to obtain multiple first image data;
[0027] The data conversion module is further used to combine the multiple first image data to obtain second image data and output it.
[0028] In a possible implementation, the data conversion module includes an input data format conversion unit and an output data format conversion unit; the first processor is connected to the input data format conversion unit and the output data format conversion unit respectively;
[0029] The input data format conversion unit is used to obtain image data to be processed, and perform data format conversion on the image data to be processed to obtain image data in a second format; wherein the image data to be processed is image data in a first format;
[0030] The output data format conversion unit is used to combine the multiple first image data to obtain second image data and output it.
[0031] In a possible implementation, converting the to-be-processed image data into a second format to obtain image data includes:
[0032] Arrange the C component, M component, Y component and K component data of each pixel in the image data to be processed in the printing color mode by channels to obtain image data in a second format, wherein the image data in the second format includes four groups of data, and the data in each group is data of a single channel;
[0033] The combining the plurality of first image data to obtain and output the second image data comprises:
[0034] The C component, M component, Y component and K component data of each pixel point in the plurality of first image data are arranged alternately in the order of CMYK in the printing color mode to obtain the second image data and output it to the second processor.
[0035] In a possible implementation, the first processor includes a first determining unit, a second determining unit, and a splitting unit;
[0036] The first processor is used to split the second format image data according to the operation function module included in the first processor to obtain multiple data blocks, including:
[0037] The first determining unit is used to determine the computing function module included in the first processor;
[0038] The second determining unit is used to determine the computing function module corresponding to the data in each channel of the second format image data;
[0039] The splitting unit is used to split the second format image data according to the operation function modules corresponding to the data in each channel of the second format image data to obtain multiple data blocks, wherein each data block corresponds to at least one operation function module.
[0040] In a third aspect, an embodiment of the present application provides a chip, including:
[0041] processor;
[0042] Memory;
[0043] A computer program is stored in the memory, and when the computer program is executed, the processor executes any one of the methods described in the first aspect.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the first aspect.
[0045] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising a computer program / instructions, which, when executed by a processor, implement the steps of any one of the methods described in the first aspect.
[0046] Compared with the prior art, the embodiment of the present application converts the image data to be processed from the first format image data into the second format image data, and splits the second format image data according to the computing function modules contained in the first chip, so that the first chip can perform image data computing and processing, thereby reducing the data processing limitations and inconveniences caused by processing data format differences input from other chips, thereby improving the efficiency of image processing and the flexibility of image processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0048] Figure 1 It is a data flow diagram of an image processing system in the related art;
[0049] Figure 2 A schematic diagram of data flow in an image processing system provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of an image data processing method provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of data format conversion provided in an embodiment of the present application, wherein (a) is a schematic diagram of a pixel inter leaved format, and (b) is a schematic diagram of a platen format;
[0052] Figure 5 A structural block diagram of an image data processing system provided in an embodiment of the present application;
[0053] Figure 6 A structural block diagram of another image data processing system provided in an embodiment of the present application;
[0054] Figure 7 A structural block diagram of another image data processing system provided in an embodiment of the present application;
[0055] Figure 8 A data flow diagram of image data processing provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0057] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0058] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0059] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0060] In image processing systems, SOC is a common image data processing chip. Generally speaking, SOC contains hardware image processing algorithms and software image processing algorithms, such as Figure 1 As shown in the figure, the data flow of hardware image processing algorithm and software image processing algorithm in processing image data. In practical applications, these two algorithms have their own advantages and disadvantages. For example, the advantage of hardware image processing algorithm is fast processing speed, but the disadvantage is high manufacturing cost and inconvenience in modification; the advantage of software image processing algorithm is high flexibility, and the corresponding image algorithm can be written according to the demand, but the disadvantage is slow processing speed. In order to solve the above two disadvantages, the existing technology will add DSP algorithm to the image processing system, such as Figure 2 As shown in the figure, the data flow of the hardware image processing algorithm, software image processing algorithm and DSP algorithm in processing image data. However, adding the DSP algorithm will face the problem of inconsistent data formats between the data processed by the DSP algorithm and the data processed by the hardware algorithm and software algorithm of the SOC, resulting in low processing efficiency.
[0061] In view of the above problems, the embodiments of the present application provide an image data processing method, system, chip, storage medium and program product. The embodiments of the present application add a module for converting the DSP algorithm data format to the framework of the image processing system. This module can adapt the data format of the hardware image processing algorithm and software image processing algorithm of the SOC and the DSP algorithm, so that the DSP algorithm and the hardware image processing algorithm and software image processing algorithm of the SOC can achieve high-speed and stable interaction, thereby improving the efficiency of image processing and the flexibility of image processing. The following is a detailed description in conjunction with the specific implementation method.
[0062] See also Figure 3 , is a schematic diagram of an image data processing method provided in an embodiment of the present application. The method can be applied to Figure 2 In the DSP chip of the image processing system shown in FIG. 1 , the DSP chip is also referred to as the first chip in the embodiment of the present application. Figure 3 As shown, the method includes:
[0063] S301: Acquire image data to be processed, wherein the image data to be processed is image data in a first format.
[0064] In an embodiment of the present application, the image data to be processed may be image data flowing from the SOC chip to the first chip (DSP chip). At this time, the format of the image data to be processed is a data format suitable for the SOC chip, also referred to as the first format, that is, the image data to be processed is image data in the first format.
[0065] S302: Convert the data format of the image data in the first format to obtain image data in the second format.
[0066] In the embodiment of the present application, since the algorithm contained in the SOC chip is different from the algorithm contained in the DSP chip, the formats of the applicable image data are different. Therefore, if the first format image data is directly applied to the DSP chip, the image data processing time will be longer and the performance of the DSP chip will be reduced. Therefore, for the first format image data, it is necessary to convert it into the second format image data that is more suitable for processing by the DPS chip, so as to reduce the situation where the DSP chip has large data processing limitations and inconveniences due to the difference in data formats input by other chips, thereby improving the efficiency of image processing and the flexibility of image processing.
[0067] In one possible implementation, converting the first format image data into the second format image data specifically includes: arranging the C component, M component, Y component and K component data of each pixel in the first format image data in a printing color mode by channel to obtain the second format image data, wherein the second format image data includes four groups of data, and the data in each group is data of a single channel.
[0068] Specifically, since the first format image data is the image data output by the SOC, and the SOC's requirement for the image data format is to alternately arrange the C component, M component, Y component and K component data of each pixel in the printing color mode in a certain order according to the arrangement order of the pixels, that is, in a pixel interleaved format, specifically as follows: Figure 4 (a). It can be seen that Figure 4In (a), the C component, M component, Y component and K component data of each pixel in the first format image data are arranged alternately in the order of CMYK, wherein the C component data is the component data of the pixel in the C channel, the M component data is the component data of the pixel in the M channel, the Y component data is the component data of the pixel in the Y channel, and the K component data is the component data of the pixel in the K channel. As for the first chip, i.e., the DSP chip, since the DSP chip processes data in batches when processing data, such as performing the same addition, subtraction, multiplication, and division operations on each data in the data block, the operation object can be a certain number, or it can be operated in pairs with each data in another data block (the above operation is also called vector operation, and the data blocks involved in the operation are called vectors); however, it is difficult for the DSP chip to add a certain data in the same data block and multiply another data. Therefore, although vector operation can greatly improve the efficiency of DSP in processing data, it also requires that the arrangement format of the data has a certain logic, that is, the data that need to be processed in the same way are arranged together. In practical applications, since most image algorithms are processed by channels, the data processing methods of the same channel are the same or similar, and the data processing methods of different channels may be different. Therefore, it is more suitable for DSP to process data by arranging the C component (component of C channel), M component (component of M channel), Y component (component of Y channel) and K component (component of K channel) data of each pixel of the image data in CMYK mode, that is, the C component (component of C channel), M component (component of M channel), Y component (component of Y channel) and K component (component of K channel) in the printing color mode according to the arrangement order of pixels, that is, converting the image data format into planner format, as shown below. Figure 4 (b). It can be seen that Figure 4 In (b), the second format image data obtained after data format conversion includes four groups of data, and the data in each group are all single channel data, such as the data included in the first group are all component data of the C channel, the data included in the second group are all component data of the M channel, the data included in the third group are all component data of the Y channel, and the data included in the fourth group are all component data of the K channel.
[0069] Depend on Figure 4 It can be seen intuitively that when the channel data of the image data is subsequently divided, if the following Figure 4 If the pixel interleaved format shown in (a) is used, each data block will contain data of four channels of CMYK, which is not conducive to vector processing. If the plane format is used, each vector will only contain data of a single channel, which is more suitable for subsequent data calculation and processing.
[0070] In summary, in the embodiment of the present application, data format conversion is to convert Figure 4The data in the pixe linter left format shown in (a) is converted into the following Figure 4 (b) shows the data in the planner format.
[0071] In the specific implementation, the conversion of the first format image data into the second format image data needs to be realized by an algorithm, that is, software, hardware, etc. are required, and the user can choose according to specific needs in actual application. In the embodiment of the present application, since the object is image data, a DSP chip suitable for processing image data is used for data format conversion. The DSP chip contains a DSP algorithm, which has a faster processing speed than the software image processing algorithm in the SOC, and is more flexible and cost-saving than the hardware image processing algorithm in the SOC. Specifically, since the data format conversion itself solves the problem of inconsistent data formats between the SOC and the DSP, the data format conversion function can be made into a separate functional unit, which is set on the DSP chip and electrically connected to the data input end of the DSP chip. At this time, the functional unit is also called an input data format conversion unit. When the first format image data flows to the DSP chip, it is directly converted into the second format image data through the input data format conversion unit on the DSP chip, and then transmitted to the data input end of the DSP chip.
[0072] S303: Split the second format image data according to the computing function modules included in the first chip to obtain a plurality of data blocks.
[0073] In the embodiment of the present application, the first chip may include multiple operation function modules, such as an addition operation function module, a subtraction operation function module, a multiplication operation function module, a division operation function module, etc. In order to facilitate the first chip to process image data, the second format image data can be split according to the corresponding operation function modules.
[0074] In a possible implementation, the computing function module corresponding to the data in each channel of the second format image data can be determined, and the second format image data can be split into multiple data blocks according to the computing function module corresponding to the data in each channel of the second format image data, wherein each data block corresponds to at least one computing function module. Specifically, if the computing function modules corresponding to the data in a certain channel of the second format image data include at least two, then when splitting the second format image data, the data of the channel can be split into at least two data blocks according to the corresponding computing function modules, and if the computing function module corresponding to the data in a certain channel of the second format image data includes one, then when splitting the second format image data, all the data of the channel can be divided into one data block. Exemplarily, if the operation function modules corresponding to the data of the C channel in the second format image data include an addition operation function module and a multiplication operation function module, the operation function modules corresponding to the data of the M channel include a multiplication operation function module, the operation function modules corresponding to the data of the Y channel include a subtraction operation function module, and the operation function modules corresponding to the data of the K channel include a division operation function module and a subtraction operation function module, then when splitting the second format image data, the data of the C channel is split into two data blocks according to the corresponding operation function modules, one of which corresponds to the addition operation function module, and the other corresponds to the multiplication operation function module; the data of the K channel is split into two data blocks according to the corresponding operation function modules, one of which corresponds to the division operation function module, and the other corresponds to the subtraction operation function module; all the data of the M channel is divided into one data block, and all the data of the Y channel is divided into one data block.
[0075] S304: Input the multiple data blocks into corresponding operation function modules for processing respectively to obtain multiple first image data.
[0076] In the embodiment of the present application, after the data blocks of the second format image data are divided, the data blocks are respectively input into the corresponding operation function modules, and the operation function modules perform operation processing, and the data obtained after the operation processing is the first image data. It should be noted that the operation processing of the data blocks by the operation function modules in the first chip can refer to the content description of the relevant technology of the DSP chip. For the sake of simplicity, the embodiment of the present application will not be repeated here.
[0077] S305: Combine the plurality of first image data to obtain second image data.
[0078] In an embodiment of the present application, the data processed by the first chip needs to be input into a subsequent chip. At this time, depending on the type of the subsequent chip, multiple first image data need to be combined in different ways to obtain second image data.
[0079] In a possible implementation, if the type of the subsequent chip is different from that of the first chip, such as the subsequent chip is a SOC chip, the C component, M component, Y component, and K component data of each pixel point in the multiple first image data in the printing color mode are interlaced in the order of CMYK to obtain the second image data. Specifically, for the multiple first image data, the order of each pixel point can be determined according to the first format image data, and then the C component, M component, Y component, and K component data of each pixel point in the printing color mode are interlaced in the order of CMYK according to the order of each pixel point to obtain the second image data. The data format of the second image data can refer to Figure 4 (a) shows the pixel interleaved format.
[0080] In another possible implementation, if the type of the subsequent chip is the same as that of the first chip, that is, the subsequent chip is a DSP chip, the C component, M component, Y component, and K component data of each pixel point in the plurality of first image data in the printing color mode are arranged in channels to obtain the second image data. Specifically, for the plurality of first image data, the order of each pixel point can be determined according to the first format image data, and then the C component, M component, Y component, and K component data of each pixel point in the printing color mode can be arranged in channels according to the order of each pixel point to obtain the second image data. The data format of the second image data can refer to Figure 4 (b) The planner format shown.
[0081] In the specific implementation, the process of combining multiple first image data to obtain the second image data is essentially a process of data format conversion. Therefore, like converting the first format image data into the second format image data, it needs to be implemented through an algorithm, that is, it requires software, hardware, etc. For details, please refer to the description of the relevant part of converting the first format image data into the second format image data. For the sake of simplicity, the embodiment of the present application will not be repeated here. Different from converting the first format image data into the second format image data, the data format conversion unit set in the embodiment of the present application is called the output data format conversion unit, and is set at the output end of the first chip. When the first image data flows to the next-level chip, it is directly converted into the second image data through the output data format conversion unit on the DSP chip, and then transmitted to the data input end of the next-level chip.
[0082] It should be noted that, in some embodiments, the latter chip is also called the second chip.
[0083] In practical applications, the vectors required by the DSP algorithm have a certain data size, such as 128 or 256 bits, etc. These data can be formed by combining 8-bit input data one by one, of course, they can also be formed by combining 16-bit or 32-bit input data one by one. Multiple data are integrated into a data block, which is a vector. This data block can be understood as a small data block, which is disassembled from the large data block of the source data. DSP processes each data in the vector together to complete the data processing work efficiently. When the processing is completed, we need to reassemble the data of each vector into a whole block of data, that is, to reassemble the output data. In this process, the process of disassembling the source data block into vectors is the input data format conversion and splitting process, and then combining the vectors into a whole block of data is the output data format conversion process.
[0084] S306: Output second image data.
[0085] In the embodiment of the present application, after the second image data is obtained, the second image data is output to the second chip.
[0086] The embodiment of the present application integrates an input data format conversion function and an output data format conversion function on the DSP chip, which can realize the conversion of data formats between the DSP algorithm and the SOC algorithm, thereby ensuring the efficiency of image processing.
[0087] Corresponding to the above embodiment, the embodiment of the present application further provides an image data processing system, which includes but is not limited to a printer, a copier, a fax machine, a multifunctional image making and copying device, an electrostatic printing device and any other similar device.
[0088] See also Figure 5 , is a structural block diagram of an image data processing system provided in an embodiment of the present application. Figure 5 As shown, the image data processing system 500 includes: a data conversion module 510, and a first processor 520 that is in communication with the data conversion module 510. In a specific implementation, the data conversion module 510 is used to obtain image data to be processed, and convert the image data to be processed into a second format image data, wherein the image data to be processed is image data in the first format; the first processor 520 is used to split the image data in the second format according to the operation function modules included in the first processor to obtain multiple data blocks; and input the multiple data blocks into the corresponding operation function modules for processing respectively to obtain multiple first image data; at the same time, the data conversion module 510 is also used to combine the multiple first image data to obtain and output the second image data.
[0089] In one possible implementation, Figure 6As shown, the data conversion module 510 includes an input data format conversion unit 511 and an output data format conversion unit 512, wherein the output end of the input data format conversion unit 511 is communicatively connected to the input end of the first processor 520, and the output end of the first processor 520 is communicatively connected to the input end of the output data format conversion unit 512. In a specific implementation, the input data format conversion unit 511 is used to obtain image data to be processed, and perform data format conversion on the image data to be processed to obtain image data in a second format; wherein the image data to be processed is image data in a first format; and the output data format conversion unit 512 is used to combine a plurality of first image data, obtain second image data, and output the second image data.
[0090] In a possible implementation, the input data format conversion unit 511 is used to convert the data format of the image data to be processed to obtain the second format image data, specifically including: the input data format conversion unit 511 is used to arrange the C component, M component, Y component and K component data of each pixel in the image data to be processed in the printing color mode by channel to obtain the second format image data, wherein the second format image data includes four groups of data, and the data in each group is the data of a single channel.
[0091] In one possible implementation, the output data format conversion unit 512 is used to combine multiple first image data to obtain second image data and output it, specifically including: the output data format conversion unit 512 is used to interleave the C component, M component, Y component and K component data of each pixel point in the multiple first image data in the printing color mode in the order of CMYK, obtain the second image data and output it to the second processor.
[0092] In one possible implementation, Figure 7 As shown, the first processor 520 includes a first determining unit 521, a second determining unit 522 and a splitting unit 523; wherein the first determining unit 521 is used to determine the operation function module included in the first processor; the second determining unit 522 is used to determine the operation function module corresponding to the data in each channel of the second format image data; the splitting unit 523 is used to split the second format image data according to the operation function module corresponding to the data in each channel of the second format image data, to obtain multiple data blocks, wherein each data block corresponds to at least one operation function module.
[0093] In the embodiment of the present application, the first processor 520 may be a DSP chip, in which case the input data format conversion unit 511 and the output data format conversion unit 512 may be arranged on another separate chip, and be communicatively connected with the first processor 520, or the first processor 520 and the input data format conversion unit 511 and the output data format conversion unit 512 may all be arranged on the same DSP chip as a functional unit. In specific implementation, the user may make settings according to the requirements, and the embodiment of the present application does not specifically limit this.
[0094] In one possible implementation, the first processor 520 also includes an input unit and a data processing unit (not shown in the figure), wherein the input unit is used to input multiple data blocks into corresponding operation function modules respectively, and the data processing unit is used to perform operation processing on the input data blocks based on the operation function modules respectively to obtain multiple first image data.
[0095] The specific contents of the embodiments of the present application can be found in the description of the above method embodiments, which will not be repeated here for the sake of brevity.
[0096] The embodiment of the present application converts the image data to be processed from the first format image data into the second format image data, and splits the second format image data according to the computing function modules included in the first chip, so that the first chip can perform image data computing and processing, thereby reducing the situation where data processing is limited and inconvenient due to differences in data formats input from other chips, thereby improving the efficiency of image processing and the flexibility of image processing.
[0097] The image data processing flow of the embodiment of the present application is further described below in conjunction with specific embodiments.
[0098] See also Figure 8 , is a data flow diagram of an image data processing provided by an embodiment of the present application, wherein HW_step represents a hardware image processing operation, and DSP_step represents a DSP image processing operation. Figure 8 As shown in the figure, in order to enable HW_step and DSP_step to interact with each other normally, three functional units are used to complete the process. The three functional units include: an input data format conversion unit, which is used to convert input data into high-speed operation data suitable for DSP_step; an output data format conversion unit, which is used to convert the data format processed by DSP_step into a data format suitable for HW_step processing; a data monitoring unit, which is used to monitor the unit status of HW_step and DSP_step, and determine the unit that needs to interact with data according to the unit status, thereby controlling the data flow between the units. Specifically, as Figure 5As shown, the data interaction process between HW_step and DSP_step can be: first HW_step→first DSP_step→second HW_step→second DSP_step→others, wherein after the first HW_step processes the data, the data monitoring unit will judge the state and flow direction of the data flow, and when it is determined that the next DSP_step to process the data is the first DSP_step, the data will be transmitted to the first input data format conversion unit to convert the data into data suitable for DSP high-speed processing. The data monitoring unit will also monitor the state of the first DSP_step. When it is determined that the first DSP_step has completed the data processing, the data will be transmitted to the first output data format conversion unit to convert the data into data that can be normally processed by the HW_step. When the output data is converted After the conversion, the monitoring unit will judge the status of the data and control the data flow to the second HW_step. When the second HW_step has processed the data, the data monitoring unit will judge the status and direction of the data flow. When it is determined that the next data to be processed is the second DSP_step, the data will be transmitted to the second input data format conversion unit for data format conversion. The data monitoring unit will also monitor the status of the second DSP_step. When it is determined that the second DSP_step has completed the data processing, the data will be transmitted to the second output data format conversion unit for conversion into data that can be normally processed by the HW_step. After the output data is converted, the data monitoring unit will judge the status of the data. This is repeated to ultimately ensure that data interaction can be carried out in an orderly manner in the DSP and HW.
[0099] certainly Figure 8 In the embodiment of the present application, the data interaction process between HW_step and DSP_step can also be: first HW_step→first DSP_step→second DSP_step→others, and the data flow and monitoring method can refer to the above embodiment. For the sake of simplicity, the embodiment of the present application will not be repeated here. In the embodiment of the present application, data can be exchanged between DSP_step and HW_step according to the above rules, so as to realize flexible matching of various image processing operations.
[0100] It should be noted that HW_step may also be SW_step, where SW_step represents a software image processing operation.
[0101] In the embodiment of the present application, the specific monitoring process of the data monitoring unit is: first confirm the arrangement order of the image processing operations to confirm the overall flow of the data, then confirm the status of each image processing operation in processing the data, and determine whether it is necessary to output data or input data based on the status of each image processing operation.
[0102] In the embodiment of the present application, the input data format conversion unit and the output data format conversion unit both convert the data format to adapt to the data format requirements of the next HW_step or DSP_ste, where different input and output formats require different data conversion modules. Exemplarily, taking the DSP algorithm as an example, before calling it, it is necessary to pass through an input data format conversion unit to convert the data into a vector form for DSP processing. After the processing is completed, the vector data is recombined into the data format required for the next image processing operation. This recombined unit is the output data format conversion unit.
[0103] In the embodiment of the present application, when the DSP can adapt to various data formats of hardware and software, the DSP algorithm can be added to the image system, so that the combination of image processing algorithms can become more flexible and varied.
[0104] Corresponding to the above embodiment, the embodiment of the present application further provides a chip. The chip includes a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed, the processor executes some or all of the steps in the above method embodiment.
[0105] Corresponding to the above embodiment, the embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium may store a program, wherein when the program is running, the device where the computer-readable storage medium is located may be controlled to execute some or all of the steps in the above method embodiment. In a specific implementation, the computer-readable storage medium may be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0106] Corresponding to the above-mentioned embodiment, the embodiment of the present application further provides a computer program product, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes some or all of the steps in the above-mentioned method embodiment.
[0107] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0108] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0110] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0111] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for processing image data, characterized in that: Applied to the first chip, the method includes: Acquire image data to be processed, where the image data to be processed is image data in a first format; Performing data format conversion on the first format image data to obtain second format image data; Splitting the second format image data according to the computing function module included in the first chip to obtain a plurality of data blocks; Inputting the plurality of data blocks into the corresponding computing function modules for processing respectively to obtain a plurality of first image data; Combining the plurality of first image data to obtain second image data; The second image data is output.
2. The method according to claim 1, characterized in that The converting the data format of the first-format image data to obtain the second-format image data includes: The C component, M component, Y component and K component data of each pixel in the first format image data are arranged by channels in the printing color mode to obtain the second format image data, wherein the second format image data includes four groups of data, and the data in each group is the data of a single channel.
3. The method according to claim 1, characterized in that The second format image data is split according to the computing function module included in the first chip to obtain a plurality of data blocks, including: Determining a computing function module included in the first chip; Determine the computing function module corresponding to the data in each channel of the second format image data; The second format image data is split according to the computing function modules corresponding to the data in each channel to obtain a plurality of data blocks, wherein each data block corresponds to at least one computing function module.
4. The method according to claim 1, characterized in that: The combining the plurality of first image data to obtain the second image data comprises: The C component, M component, Y component and K component data of each pixel point in the plurality of first image data are alternately arranged in the order of CMYK in the printing color mode to obtain the second image data.
5. The method according to claim 1, characterized in that The outputting the second image data comprises: The second image data is output to the second chip.
6. An image data processing system, characterized in that: include: A data conversion module, and a first processor connected to the data conversion module; The data conversion module is used to obtain the image data to be processed, and perform data format conversion on the image data to be processed to obtain image data in a second format; wherein the image data to be processed is image data in a first format; The first processor is used to split the second format image data according to the operation function module included in the first processor to obtain multiple data blocks; and input the multiple data blocks into the corresponding operation function modules for processing respectively to obtain multiple first image data; The data conversion module is further used to combine the multiple first image data to obtain second image data and output it.
7. The image data processing system according to claim 6, characterized in that: The data conversion module includes an input data format conversion unit and an output data format conversion unit; the first processor is connected to the input data format conversion unit and the output data format conversion unit respectively; The input data format conversion unit is used to obtain image data to be processed, and perform data format conversion on the image data to be processed to obtain image data in a second format; wherein the image data to be processed is image data in a first format; The output data format conversion unit is used to combine the multiple first image data to obtain second image data and output it.
8. The image data processing system according to claim 7, characterized in that: The step of converting the image data to be processed into a second format to obtain image data includes: Arrange the C component, M component, Y component and K component data of each pixel in the image data to be processed in the printing color mode by channels to obtain image data in a second format, wherein the image data in the second format includes four groups of data, and the data in each group is data of a single channel; The combining the plurality of first image data to obtain and output the second image data comprises: The C component, M component, Y component and K component data of each pixel point in the plurality of first image data are arranged alternately in the order of CMYK in the printing color mode to obtain the second image data and output it to the second processor.
9. The image data processing system according to claim 6, characterized in that: The first processor includes a first determining unit, a second determining unit and a splitting unit; The first processor is used to split the second format image data according to the operation function module included in the first processor to obtain multiple data blocks, including: The first determining unit is used to determine the computing function module included in the first processor; The second determining unit is used to determine the computing function module corresponding to the data in each channel of the second format image data; The splitting unit is used to split the second format image data according to the computing function modules corresponding to the data in each channel to obtain multiple data blocks, wherein each data block corresponds to at least one computing function module.
10. A chip, characterized in that: include: processor; Memory; The memory stores a computer program, which, when executed, enables the processor to execute the method according to any one of claims 1 to 5.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 5.
