CN112181876A - Color image transmission method and device, electronic equipment and storage medium - Google Patents

Color image transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112181876A
CN112181876A CN202011045667.5A CN202011045667A CN112181876A CN 112181876 A CN112181876 A CN 112181876A CN 202011045667 A CN202011045667 A CN 202011045667A CN 112181876 A CN112181876 A CN 112181876A
Authority
CN
China
Prior art keywords
color components
pixel points
pin
color
rearranging
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.)
Granted
Application number
CN202011045667.5A
Other languages
Chinese (zh)
Other versions
CN112181876B (en
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 Lynxi Technology Co Ltd
Original Assignee
Beijing Lynxi Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Lynxi Technology Co Ltd filed Critical Beijing Lynxi Technology Co Ltd
Priority to CN202011045667.5A priority Critical patent/CN112181876B/en
Publication of CN112181876A publication Critical patent/CN112181876A/en
Application granted granted Critical
Publication of CN112181876B publication Critical patent/CN112181876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a color image transmission method and device, electronic equipment and a storage medium, and belongs to the technical field of image processing. The method comprises the following steps: acquiring color components of a plurality of pixel points in the color image; rearranging the color components of the plurality of pixel points; and transmitting the color components of the rearranged pixels to an external memory through a data bus, wherein at least one pin of the data bus is grouped and used for transmitting the same type of color components in the transmission process. Therefore, the transmission sequence of the color components on each pin group is changed by changing the arrangement sequence of the color components in each pixel point in the color image, and the color components of the same type are transmitted by at least one same pin group, so that the turnover rate of the pins of the data bus is reduced, and the transmission power consumption is reduced.

Description

Color image transmission method and device, electronic equipment and storage medium
Technical Field
The present application belongs to the field of image processing technologies, and in particular, to a method and an apparatus for transmitting a color image, an electronic device, and a storage medium.
Background
With the development of artificial intelligence image processing technology, image processing using an image processing chip has become a trend. When image processing is performed by using an image processing chip, image data is often stored by means of an external memory during image processing because of the large capacity of image files. In the related art, power consumption generated in an image transmission process is large.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for transmitting a color image, an electronic device, and a storage medium, which can reduce power consumption during image transmission.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a method for transmitting a color image, where the method includes:
acquiring color components of a plurality of pixel points in the color image;
rearranging the color components of the plurality of pixel points;
and transmitting the color components of the rearranged pixels to an external memory through a data bus, wherein at least one pin of the data bus is grouped and used for transmitting the same type of color components in the transmission process.
In a second aspect, an embodiment of the present application provides an apparatus for transmitting a color image, the apparatus including:
the acquisition module is used for acquiring color components of a plurality of pixel points in the color image;
the first rearrangement module is used for rearranging the color components of the plurality of pixel points;
and the transmission module is used for transmitting the rearranged color components of the plurality of pixel points to an external memory through a data bus, wherein in the transmission process, at least one pin group of the data bus is used for transmitting the same type of color components.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In the embodiment of the application, color components of a plurality of pixel points in a color image are obtained; rearranging the color components of the plurality of pixel points; and transmitting the color components of the rearranged pixels to an external memory through a data bus, wherein at least one pin of the data bus is grouped and used for transmitting the same type of color components in the transmission process. Therefore, the transmission sequence of the color components on each pin group is changed by changing the arrangement sequence of the color components in each pixel point in the color image, so that the color components of the same type are transmitted by the same pin group as much as possible, the turnover rate of the pins of the data bus is reduced, and the power consumption of the chip is reduced.
Drawings
Fig. 1 is a flowchart of a method for transmitting a color image according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of data transmission according to an embodiment of the present application;
fig. 3 is a second flowchart of a method for transmitting a color image according to an embodiment of the present application;
fig. 4 is a third flowchart of a method for transmitting a color image according to an embodiment of the present application;
fig. 5 is a fourth flowchart of a method for transmitting a color image according to an embodiment of the present application;
fig. 6 is a second schematic diagram of data transmission according to an embodiment of the present application;
fig. 7 is a third schematic diagram of data transmission according to an embodiment of the present application;
fig. 8 is a fifth flowchart of a method for transmitting a color image according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a color image transmission apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The color image transmission method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof. The apparatus in the embodiment of the present application is an electronic Device, and the electronic Device may be a Mobile phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a Wearable Device (Wearable Device), or the like. The electronic device includes a chip for performing image processing (hereinafter referred to as an image processing chip), the image processing chip is connected to an external memory via a data bus, and image data of a color image can be stored in the external memory via the image processing chip and read from the external memory to the image processing chip. The external memory may be any dynamic random access memory. In an embodiment, the dram may be a Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM). Because DDR SDRAM is triggered by double edges, data transmission is carried out on both the rising edge and the falling edge of a clock, and therefore the data transmission rate is high.
Referring to fig. 1, fig. 1 is a flowchart of a color image transmission method provided in an embodiment of the present application, and as shown in fig. 1, the embodiment provides a color image transmission method, including the following steps:
step 101, obtaining color components of a plurality of pixel points in the color image.
The color image may have any image format, for example, an RGB image format, wherein the RGB image format may also include a plurality of formats, for example, RGB24, RGB555, and the like, and for ease of understanding, the following description will use RGB24 as an example.
For example, each pixel in the RGB image is composed of three basic color channels, i.e., each pixel includes R, G, B color components, where each color component in the RGB24 image occupies 8 bits, and together constitutes a 24-bit pixel. The color component can be obtained by scanning each pixel point in the color image line by line one by one, and the color component of each pixel point is obtained in sequence; or scanning all pixel points of the whole color image, and acquiring color components of all pixel points at one time. The plurality of pixel points may be partial pixel points in the color image or all pixel points in the color image, and the application is not particularly limited.
Assuming that the color component of the first pixel point in the color image is represented by (B0, G0, R0), the color component of the second pixel point is represented by (B1, G1, R1), the color component of the third pixel point is represented by (B2, G2, R2), and so on, if the color components of the first 8 pixel points in the color image are obtained, the arrangement order of the color components is B0, G0, R0, B1, G1, R1, B2, G2, R2, B3, G3, R3, B4, G4, R4, B5, G5, R5, B6, G6, R6, B7, G7, R7.
And 102, rearranging the color components of the plurality of pixel points.
Since the number of pins of a data bus for data transmission between the image processing chip and the external memory may be 32bit, 64bit, or 128bit, and the sum of the number of bits of data of the color component of each pixel is 24bit, when the color component is transmitted through the data bus, the types of the color components transmitted on the pins of each data bus may be different. As shown in FIG. 2, in the data transmission diagram shown in FIG. 2, a 32-bit data bus is adopted, and the 32 bits are grouped according to every 8 bits to obtain four pin groups, which respectively correspond to the DQ [7:0] pin group, the DQ [15:8] pin group, the DQ [23:16] pin group and the DQ [31:24] pin group in FIG. 2.
When the color components of the pixel points are transmitted by adopting the four pin groups, the four pin groups can only transmit 32 bits of data due to each pulse edge trigger, so that the color components transmitted when the first pulse edge triggers are B0, G0, R0 and B1; the color components transmitted upon triggering of the second pulse edge are G1, R1, B2, G2; at the triggering of the third pulse edge, the color components transmitted are R2, B3, G3, R3, …, and thus the R, G, B color component type transmitted on each pin grouping is not the same. For a color image, the difference between the corresponding numerical values of different color components is large, so that the data transmitted by the pins in each pin group has large change, which causes the pins to frequently turn over, thereby increasing the transmission power consumption.
In this embodiment, the color components of the plurality of pixel points are rearranged, so that the color components can be arranged according to a preset arrangement order, and further, the color components can be transmitted on the data bus according to a preset transmission order. For example, the corresponding positions of some or all of the color components in the arrangement order may be adjusted, so that at least the same pin group transmits the same type of color components in the transmission process of the rearranged color components. For example, at least one pin grouping may be determined for transmitting color components of the target locations in the rank order, and color components of the same type may be reordered to the target locations.
In some alternative embodiments, the rearranged arrangement order may be determined according to the pin number of the data bus between the image processing chip and the external memory. For example, assuming that the number of pins of a data bus between the external memory and the image processing chip is 32 bits, the B color component may be transmitted separately by one of four pin groups of the data bus, the R color component may be transmitted separately by one of the group of pin groups, the G color component may be transmitted separately by one of the group of pin groups, and the color component may be inserted through the remaining group of pin groups according to actual circumstances. Therefore, when the pin group transmits the same type of color components, the data change is small, the turnover frequency of the pins in the data transmission process can be reduced, and the transmission power consumption is saved. The present disclosure does not limit the manner in which the color components of the plurality of pixels are rearranged.
And 103, transmitting the rearranged color components of the plurality of pixel points to an external memory through a data bus.
After determining the rearranged arrangement order of the color components, the color components may be transferred to each pin group of the data bus according to the rearranged arrangement order, so that the color components are transmitted to the external memory through the data bus. It should be noted that, after each color component is transmitted to the external memory, the external memory may store the color components according to the arrangement order of the color components transmitted by the data bus each time, so as to ensure that each color component still maintains the rearranged arrangement order unchanged. Since the external memory stores the color components in the transmission order, which is the prior art, it is not described herein again.
It should be noted that, because at least one pin packet of the data bus is used to transmit the same type of color component during the transmission of the color component, it is ensured that the same type of color component is written into a part of the pin packets in the data bus, thereby ensuring that the power consumption consumed during the transmission of the color component is reduced.
In this embodiment, the color components of the pixel points are rearranged, and the arrangement order of the color components in each pixel point in the color image is changed, so as to change the transmission order of the color components on different pin groups, so that the color components of the same type are transmitted through the same pin group as much as possible. Like this, the colour component that is close to the pixel has great similarity, the turnover rate of pin reduces during can making the transmission, through rearranging the colour component can be with less cost, reduce the turnover rate of data bus pin, and need not extra data, do not change the bandwidth of external memory, can not increase the chronogenesis of external memory, can realize not influencing the bandwidth function of chip, when not influencing the chronogenesis performance of chip, reduce chip data transmission's consumption, thereby reduce the whole consumption of chip.
Further, referring to fig. 3, fig. 3 is a second flowchart of a color image transmission method provided in the embodiment of the present application, and based on the embodiment shown in fig. 1, the step 102 of rearranging color components of a plurality of pixel points may include the following steps:
step 301, determining N pin groups of the data bus according to the number of pins of the data bus, where N is a positive integer, and the number of pins of the pin groups is the same as the data bit number of any color component.
The number of pins of the data bus may be automatically determined by the image processing chip according to the working state of the pins, or may be preset by a user according to an actual situation, which is not specifically limited in the present application. Since the number of data bits of each color component is 8 bits, the pins of the data bus can be grouped according to the number of data bits of the color component, thereby obtaining a plurality of pin groups.
Since N is a positive integer and the number of pins of the image processing chip is usually 32bit, 64bit, 128bit, or the like, N is generally a positive integer having a multiple relation with 4, such as 4, 8, 16, or the like.
Step 302, rearranging the color components of the plurality of pixel points according to the N pin groups.
After determining the number of pin groupings of the data bus, the color components of the pixel points may be rearranged according to the number of pin groupings. For example, assuming that the number of pins of a data bus between the external memory and the image processing chip is 32 bits, the B color component may be transmitted separately by one of four pin groups of the data bus, the R color component may be transmitted separately by one of the group of pin groups, the G color component may be transmitted separately by one of the group of pin groups, and the color component may be inserted through the remaining group of pin groups according to actual circumstances. Assuming that the number of pins of a data bus between the external memory and the image processing chip is 64 bits, two groups of pins of eight pin groups of the data bus may be used to separately transmit the B color component, two groups of pins may be used to separately transmit the R color component, two groups of pins may be used to separately transmit the G color component, and the remaining two groups of pins may be inserted through the color component according to actual conditions.
In an optional implementation manner, the color components of the plurality of pixel points may be rearranged by determining a target pixel point from the plurality of pixel points, then determining a color component of a target type from the target pixel point, finally rearranging the color component of the target type to a corresponding position of the corresponding same pin group, and rearranging each color component of the remaining pixel points and the color component of the non-target type of the target pixel point to corresponding positions of other pin groups.
For example, assuming that color components of 40 pixel points need to be rearranged, first, color components of red types of 10 target pixel points are obtained, the color components of red types of the 10 target pixel points are rearranged to a position corresponding to the same pin group, and the remaining color components are randomly rearranged to positions corresponding to the remaining pin groups.
In another optional implementation manner, the color components of the multiple pixels are rearranged, which may be determining a target pixel from the multiple pixels, then rearranging the color components of the target pixel to the corresponding positions of the same pin group, and rearranging the color components of the remaining pixels to the corresponding positions of the same pin group according to the types of the color components. For example, assuming that the color components of 40 pixels need to be rearranged, 10 pixels may be selected as target pixels, the color components of the remaining 30 pixels are rearranged to corresponding positions of different pin groups according to the types of the color components, and the color components of the 10 target pixels are rearranged to corresponding positions of the remaining pin groups.
In this embodiment, the number of the pin groups is determined according to the number of the pins of the data bus, and then the color components of the pixel points can be rearranged according to the number of the pin groups, so that the image processing chip can flexibly determine the transmission sequence of the color components according to the change of the number of the pins of the data bus, and the image processing chip does not need to be separately controlled for chips with different numbers of the pins, thereby being beneficial to realizing the batch production of the image processing chip.
Further, referring to fig. 4, fig. 4 is a third flowchart of a color image transmission method according to an embodiment of the present invention, based on the embodiment shown in fig. 3, the step 302 rearranges color components of a plurality of pixel points according to N pin groups, and may include the following steps:
step 401, determining a target pixel point from a plurality of pixel points.
The target pixel points may be a preset number of pixel points randomly selected from the plurality of pixel points, or the preset number of pixel points selected according to a preset rule according to an arrangement sequence of the pixel points. The number of target pixels may be set according to actual conditions, for example, the number of target pixels may be determined according to the number of pixels of the color image to be transmitted and the number of pin groups, for example, a ratio of the number of pixels of the color image to be transmitted and the number of pin groups is determined as the number of target pixels, which is not specifically limited in the present invention.
In some optional embodiments, the number of the target pixel points is K, and the preset number of the selected pixel points according to the arrangement order of the pixel points and the preset rule may refer to that K pixels with continuous arrangement order among the plurality of pixel points are determined as the target pixel points. For example, the first to K-th pixel points among the plurality of pixel points are determined as target pixel points. The method can also be used for determining the pixel points with the arrangement sequence being multiple of the preset number as target pixel points. For example, among the plurality of pixel points, the pixel points whose arrangement order is a multiple of 2 may be determined as the target pixel point, and the present invention is not particularly limited.
Step 402, rearranging the color components of the object type of the object pixel points to the corresponding positions of the corresponding second pin groups.
The target type may be one or more of types of color components of the target pixel point. For example, when the object type is a red type of color component in the object pixel point, the color component of the red type is rearranged to a corresponding position of the at least one second pin group. When the target type is a red type, a green type, and a blue type of the color component in the target pixel point, the color components of the red type, the green type, and the blue type may be rearranged to the corresponding positions of at least one second pin group corresponding to each color type, respectively.
It should be noted that each pixel point includes a plurality of types of color components, such as a red type of color component, a green type of color component, and so on. The N pin groupings include a first pin grouping and a second pin grouping, where the second pin grouping is used to transmit color components of the target type, and the number of the second pin grouping may be determined according to the number of the target type and is an integer multiple of the target type.
In a possible implementation manner, the color components of the object type of the object pixel points may be rearranged to the corresponding positions of the corresponding second pin groups according to the arrangement sequence of the object pixel points in the plurality of pixel points. Therefore, the turnover rate of the pins in the data transmission process can be further reduced, and the transmission power consumption is reduced.
Step 403, determining the residual color components according to the plurality of pixel points and the color components of the object type of the object pixel points, and rearranging the residual color components to the corresponding positions of the first pin group.
After the target type of the target pixel point is determined, the residual color components can be determined according to the plurality of pixel points and the color components of the target type of the target pixel point, and finally the residual color components are rearranged to the corresponding position of the first pin group. Since different first pin groupings do not need to be divided according to the types of color components when the remaining color components are rearranged to the corresponding positions of the first pin grouping, the color components transmitted in the first pin grouping may contain a plurality of types of color components.
In a possible implementation manner, the color components rearranged to the corresponding positions of the first pin group may be rearranged according to an arrangement sequence of pixels to which the color components belong, or may be rearranged according to color types of the color components, for example, the color components rearranged to the first pin group include two types, and the color components of the same color type are rearranged at a plurality of corresponding positions adjacent to the first pin group, so that when the first pin group is transmitted, data transmission is performed sequentially according to the color types, which can further reduce the pin turnover rate in the data transmission process, and reduce transmission power consumption.
In this embodiment, by rearranging the color components of the object type of the object pixel point to the corresponding positions of the corresponding second pin groups and rearranging the remaining color components to the corresponding positions of the first pin groups, at least one pin group in the data bus can be used for transmitting the color components of the same type, so that the turnover rate of the pins of the data bus is reduced, and the power consumption of the chip is reduced.
Furthermore, the target types are multiple, and each target type corresponds to at least one second pin group; the step 402 of rearranging the color components of the object type of the object pixel points to the corresponding positions of the corresponding second pin groups includes:
and according to the target type corresponding to the color component of the target pixel point, rearranging the color component of the target pixel point to the corresponding position of at least one second pin group corresponding to the target type.
In this embodiment, the target types of the target pixel points may be multiple, and at least one second pin group of each target type corresponds to each target type, so that the second pin groups for transmitting color components of the same type in the data bus are also multiple. For example, when the target type includes three types of red, green and blue, at least three second pin groups are needed to transmit color components of the red, green and blue types, respectively, so that for a 32-bit data bus, 24 bits are needed as the second pin groups, and the remaining 8 bits are needed as the first pin groups, so that the number of the second pin groups for transmitting the same type of color components in the data bus is increased, thereby further reducing the turnover rate of the data bus pins and lowering the power consumption of the chip.
Further, referring to fig. 5, fig. 5 is a fourth flowchart of a color image transmission method according to an embodiment of the present invention, based on the embodiment shown in fig. 3, where the step 302 rearranges color components of a plurality of pixel points according to N pin groups, and may include the following steps:
step 501, determining a target pixel point from a plurality of pixel points.
The target pixel points may be a preset number of pixel points randomly selected from the plurality of pixel points, or the preset number of pixel points selected according to a preset rule according to an arrangement sequence of the pixel points. The number of target pixels may be set according to actual conditions, for example, the number of target pixels may be determined according to the number of pixels of the color image to be transmitted and the number of pin groups, for example, a ratio of the number of pixels of the color image to be transmitted and the number of pin groups is determined as the number of target pixels, which is not specifically limited in the present invention.
In some optional embodiments, the number of the target pixel points is K, and the preset number of the selected pixel points according to the arrangement order of the pixel points and the preset rule may refer to that K pixels with continuous arrangement order among the plurality of pixel points are determined as the target pixel points. For example, the first to K-th pixel points among the plurality of pixel points are determined as target pixel points. The method can also be used for determining the pixel points with the arrangement sequence being multiple of the preset number as target pixel points. For example, among the plurality of pixel points, the pixel points whose arrangement order is a multiple of 2 may be determined as the target pixel point, and the present invention is not particularly limited.
Step 502, rearranging the color components of the target pixel point to the corresponding position of the first pin group.
After the target pixel point is obtained, color components of the target pixel point can be rearranged to a corresponding position of the first pin group. Thus, the first pin grouping is used to transmit all color components of the target pixel point.
As described above, the color components rearranged to the corresponding position of the first pin group may be rearranged according to the arrangement sequence of the pixels to which the color components belong, or according to the color types of the color components, which is not described herein again.
Step 503, rearranging the color components of the remaining pixel points except the target pixel point among the plurality of pixel points to the corresponding positions of the second pin groups corresponding to the color components of each type.
The second pin groups are used for transmitting color components of the same type, and each type of color component corresponds to at least one second pin group under the condition that the color components of the rest pixel points are of multiple types, so that each color component of the rest pixel points can be rearranged to the corresponding position of the second pin group corresponding to each type of color component.
In this embodiment, by rearranging the color components of the target pixel point to the corresponding positions of the first pin group and rearranging the color components of the remaining pixel points to the corresponding positions of the second pin group corresponding to the color components of each type, at least one pin group in the data bus can be used for transmitting the color components of the same type, so that the turnover rate of the pins of the data bus is reduced, and the power consumption of the chip is reduced.
Further, the step 503 of rearranging color components of remaining pixel points of the plurality of pixel points except the target pixel point to corresponding positions of the second pin groups corresponding to the color components of each type respectively includes:
and according to the arrangement sequence of the residual pixel points in the plurality of pixel points, rearranging the color components of the residual pixel points to the corresponding positions of the second pin groups corresponding to the color components of various types respectively according to the arrangement sequence.
After the target pixel points in the plurality of pixel points are determined, residual pixel points can be determined, and color components of the residual pixel points are sequentially rearranged to corresponding positions of the corresponding second pin groups according to the arrangement sequence of the residual pixel points in the plurality of pixel points. For example, suppose that the color components of 40 pixels need to be rearranged and transmitted to a 32-bit data bus, the first 10 pixels can be selected as target pixels, all the color components of the 10 pixels are rearranged to the corresponding positions of the first pin group, the color components of each type of the 11 th pixel are respectively rearranged to the corresponding positions of the corresponding second pin group, and the color components of each type of the 12 pixels are respectively rearranged to the corresponding positions of the corresponding second pin group, so as to analogize, the other pixels of the remaining pixels are rearranged to the corresponding positions of the corresponding second pin group in the same manner, so that the color components of the same type of the adjacent pixels are transmitted in each second pin group, and because the similarity of the values of the color components of the same type of the adjacent pixels is larger, therefore, the turnover rate in the second pin group is obviously reduced, and the power consumption of the chip can also be obviously reduced.
In this embodiment, the color components of the remaining pixel points are rearranged to the corresponding positions of the second pin groups corresponding to the color components of each type according to the corresponding arrangement sequence, so that the turn-over rate in the second pin groups is further reduced, and the power consumption of the chip is further reduced.
Further, the step 501 of determining a target pixel point from a plurality of pixel points includes:
and determining the pixel points with the arrangement sequence in a multiple relation with 4 as target pixel points. For example, a first pin group and a second pin group in the data bus may be determined according to the pin group number of the data bus, and the first pin group is used to transmit the color component of the target pixel, and the second pin group is used to transmit the color components of the other pixels except the target pixel. The first pin group is a pin group whose arrangement order is multiple to 4 in the above N pin groups, and the number of the first pin group may be one or multiple.
When the quantity of first pin group is one, can extract the colour component in 4 th pixel point, 8 th pixel point, 12 th pixel point of color image with the pixel point of 4 times relations of rank order, alternate the position that this first pin group corresponds with the colour component of extracting again in proper order, can guarantee like this that other pin groups except this first pin group in the data bus are the colour component of transmission same type.
As shown in fig. 6, fig. 6 is a schematic diagram of data transmission of a data bus. The pin count of the data bus between the external memory and the image processing chip is 32bit, and the pin count totally comprises DQ [7: 0), DQ [15:8], DQ [23:16] and DQ [31:24] four pin groupings. Wherein, DQ [7: 0), DQ [15:8], DQ [23:16] are second pin groups for transmitting B, G, R-type color components of pixel points such as 1 st to 3 rd pixel points, 5 th to 7 th pixel points, and 9 th to 11 th pixel points, DQ [31: and 24] is a first pin group which is used for transmitting color components of pixel points of a 4 th pixel point, an 8 th pixel point and a 12 th pixel point.
When the quantity of first pin group is a plurality of, can extract the colour component in 4 th pixel point, 8 th pixel point, 12 th pixel point range order in the color image and the pixel of 4 times relations, alternate the position that corresponds to a plurality of first pin groups in proper order with the colour component of extracting again, can guarantee like this that other pin groups except that a plurality of first pin groups are the colour component of transmission same type in the data bus. Fig. 7 is a schematic diagram of another data transmission of the data bus, as shown in fig. 7. The pin number of the data bus between the external memory and the image processing chip is 64 bits, and the data bus totally comprises DQ [7: 0), DQ [15:8], DQ [23:16], DQ [31:24], DQ [ 39: 32], DQ [ 47: 40], DQ [ 55: 48] and DQ [ 63: 56] eight pin groupings. Wherein, DQ [7: 0), DQ [15:8], DQ [23:16], DQ [ 39: 32], DQ [ 47: 40], DQ [ 55: and 48] is a second pin group which is respectively used for transmitting B, G, R types of color components of pixel points such as 1 st to 3 rd pixel points, 5 th to 7 th pixel points, 9 th to 11 th pixel points and the like, DQ [31:24] and DQ [ 63: 56] is a first pin group for transmitting color components of pixels of the 4 th pixel, the 8 th pixel and the 12 th pixel.
In this embodiment, the rearrangement order of the color components of the target pixel point on the first pin group is determined by determining the number of the first pin group in the data bus, so as to determine the rearrangement order of all the color components of the plurality of pixel points, thereby reducing the number of pixel points requiring to adjust the rearrangement order and shortening the rearrangement time.
Further, when the first pin group is multiple, the step 502 of rearranging the color components of the target pixel point to the corresponding position of the first pin group includes:
determining the corresponding relation between each color component of the target pixel point and a plurality of first pin groups;
and according to the corresponding relation, rearranging the color components of the target pixel points to the corresponding positions of the plurality of first pin groups.
For example, when the first pin group is multiple, each color component of the target pixel point may be transmitted through the multiple first pin groups, so that before transmission, a corresponding relationship between each color component of the target pixel point and the multiple first pin groups is determined, and then the color components of the target pixel point are rearranged to corresponding positions of the multiple first pin groups according to the corresponding relationship.
It should be noted that, the correspondence between each color component of the target pixel and the plurality of first pin groups may be determined according to the arrangement sequence of the color components of the target pixel, and each color component is sequentially rearranged to the corresponding position of the plurality of first pin groups, as shown in fig. 7, the B color component of the 4 th pixel is rearranged to DQ [31:24] pin grouping, reordering G color component of pixel 4 to DQ [ 63: pin grouping 56], rearrangement of the R color component of the 4 th pixel to DQ [31:24] grouping, and then rearranging the B color component of the 8 th pixel point to DQ [ 63: 56 pins are grouped, and so on. And according to the types of the color components of the target pixel points, sequentially rearranging the color components to the corresponding positions of the plurality of first pin groups. For example, the B color components of the 4 th pixel, the 8 th pixel, and the 12 th pixel are rearranged to DQ [31:24] grouping, and rearranging G color components of the 4 th pixel point, the 8 th pixel point and the 12 th pixel point to DQ [ 63: 56] grouping, rearranging the R color components of the 4 th pixel point, the 8 th pixel point and the 12 th pixel point to DQ [31:24] pin grouping, and rearranging the B color components of the 16 th pixel point, the 20 th pixel point and the 24 th pixel point to DQ [ 63: 56 pins are grouped, and so on.
In this embodiment, when the first pins are grouped into a plurality of groups, the rearrangement sequence of each color component of the target pixel point in the plurality of first pin groups can be determined, so as to determine the transmission sequence of the color components of all the pixel points, thereby facilitating the low-power transmission of the data bus.
Further, referring to fig. 8, fig. 8 is a fifth flowchart of a method for transmitting a color image according to an embodiment of the present application, and based on the embodiment shown in fig. 1, after the color components of the rearranged pixels are transmitted to the external memory through the data bus, the method further includes the following steps:
step 801, reading color components of a plurality of pixel points stored in an external memory through a data bus, wherein in the reading process, at least one pin of the data bus is grouped for transmitting the same type of color components.
After the color image is stored in the external memory, when a reading instruction for the color image is detected, the color components of the plurality of pixel points stored in the external memory may be read, and the order of reading the color components is the same as the storage order of the color components in the external memory, so that the order of the read color components is the same as the order rearranged in the step 102.
Step 802, rearranging the color components of the plurality of pixel points to obtain an initial ordering of the color components of the plurality of pixel points, wherein the initial ordering is determined according to an ordering sequence of the pixel points to which the color components belong.
In this step, the read color components may be reordered according to the arrangement order of the pixel points to which the color components belong, and the color components may be reordered according to the arrangement order of the pixel points to obtain the initial ordering of the color components. The rearrangement method of the color components in the reading process can also be obtained by reverse derivation according to the rearrangement method of the color components in the writing process in step 302, so as to obtain the initial ordering of the color components, and since the two rearrangement methods are just opposite, they are not described herein again.
Step 803, color images are generated according to the initial ordering.
And after the initial sequencing of the color components of the multiple pixel points is obtained, the initial sequencing of the color components of the whole color image is obtained according to the method, and the color image is generated, so that an image processing chip can analyze and process the color image.
In this embodiment, the color components are read according to the storage order of the color components, and therefore, in the reading process, the same type of color components are also transmitted by the same pin group, so that the turnover rate of the data bus pins is reduced, and the effect of reducing the power consumption of the chip is achieved.
It should be noted that, in the color image transmission method provided in the embodiment of the present application, the execution subject may be a color image transmission apparatus, or a control module in the color image transmission apparatus for executing the color image transmission method. The embodiment of the present application takes a method for transmitting a color image by a color image transmission apparatus as an example, and describes a color image transmission apparatus provided in the embodiment of the present application.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a color image transmission apparatus according to an embodiment of the present application. The color image transmission apparatus 900 includes:
an obtaining module 901, configured to obtain color components of multiple pixel points in a color image;
a first rearranging module 902, configured to rearrange color components of a plurality of pixel points;
a transmission module 903, configured to transmit the color components of the rearranged multiple pixel points to an external memory through a data bus, where in the transmission process, at least one pin of the data bus is grouped to transmit the same type of color component.
Further, the first reordering module 902 comprises:
the determining submodule is used for determining N pin groups of the data bus according to the pin number of the data bus, wherein N is a positive integer, and the pin number of the pin groups is the same as the data bit number of any color component;
and the rearrangement submodule is used for rearranging the color components of the plurality of pixel points according to the N pin groups.
Further, the pixel point comprises a plurality of types of color components, the N pin groups comprise a first pin group and a second pin group, and the second pin group is used for transmitting the color components of the target type;
the rearrangement submodule comprises:
the first determining unit is used for determining a target pixel point from a plurality of pixel points;
the first rearrangement unit is used for rearranging the color components of the target type of the target pixel points to the corresponding positions of the corresponding second pin groups;
and the processing unit is used for determining the residual color components according to the plurality of pixel points and the color components of the target type of the target pixel points, and rearranging the residual color components to the corresponding positions of the first pin group.
Furthermore, the target types are multiple, and each target type corresponds to at least one second pin group;
a processing unit to:
and according to the target type corresponding to the color component of the target pixel point, rearranging the color component of the target pixel point to the corresponding position of at least one second pin group corresponding to the target type.
Further, the pixel point comprises a plurality of types of color components, the N pin groups comprise a first pin group and a second pin group, and the second pin group is used for transmitting the same type of color components;
the rearrangement submodule comprises:
the second determining unit is used for determining a target pixel point from the plurality of pixel points;
the second rearrangement unit is used for rearranging the color components of the target pixel points to the corresponding positions of the first pin groups;
and the third rearrangement unit is used for rearranging the color components of the residual pixel points except the target pixel point in the plurality of pixel points to the corresponding positions of the second pin groups corresponding to the color components of various types respectively.
Further, a third rearrangement unit for:
and according to the arrangement sequence of the residual pixel points in the plurality of pixel points, rearranging the color components of the residual pixel points to the corresponding positions of the second pin groups corresponding to the color components of various types respectively according to the arrangement sequence.
Further, a second determining unit configured to:
and determining the pixel points with the arrangement sequence in a multiple relation with 4 as target pixel points.
Further, in a case where the first pin is grouped into a plurality, a second rearrangement unit operable to:
determining the corresponding relation between each color component of the target pixel point and a plurality of first pin groups;
and according to the corresponding relation, rearranging the color components of the target pixel points to the corresponding positions of the plurality of first pin groups.
Further, the color image transmission apparatus 900 further includes:
the reading module is used for reading the color components of a plurality of pixel points stored in the external memory through the data bus, wherein in the reading process, at least one pin group of the data bus is used for transmitting the same type of color components;
the second rearrangement module is used for rearranging the color components of the plurality of pixel points to obtain the initial ordering of the color components of the plurality of pixel points, wherein the initial ordering is determined according to the ordering sequence of the pixel points to which the color components belong;
and the generation module is used for generating the color image according to the initial sequencing.
The color image transmission device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The color image transmission apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The color image transmission apparatus provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to fig. 8, and is not described herein again to avoid repetition.
As shown in fig. 10, the electronic device 1000 includes a processor 1002, a memory 1001, and a program or an instruction stored in the memory 1001 and executable on the processor 1002, where the program or the instruction is executed by the processor 1002 to implement the processes of the color image transmission method embodiment, and can achieve the same technical effects, and in order to avoid repetition, the descriptions are omitted here.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned color image transmission method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device in the above embodiment. Readable storage media, including computer-readable storage media, such as Read-Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the methods of the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (12)

1. A method for transmitting a color image, the method comprising:
acquiring color components of a plurality of pixel points in the color image;
rearranging the color components of the plurality of pixel points;
and transmitting the color components of the rearranged pixels to an external memory through a data bus, wherein at least one pin of the data bus is grouped and used for transmitting the same type of color components in the transmission process.
2. The method of claim 1, wherein the rearranging the color components of the plurality of pixel points comprises:
determining N pin groups of the data bus according to the pin number of the data bus, wherein N is a positive integer, and the pin number of the pin groups is the same as the data bit number of any color component;
and rearranging the color components of the plurality of pixel points according to the N pin groups.
3. The method of claim 2, wherein the pixel points comprise a plurality of types of color components, and wherein the N pin groupings comprise a first pin grouping and a second pin grouping, the second pin grouping being used to transmit a color component of a target type;
wherein, the rearranging the color components of the plurality of pixel points according to the N pin groups comprises:
determining a target pixel point from the plurality of pixel points;
rearranging the color components of the object type of the object pixel points to the corresponding positions of the corresponding second pin groups;
and determining residual color components according to the pixel points and the color components of the target type of the target pixel points, and rearranging the residual color components to the corresponding positions of the first pin group.
4. The method of claim 3, wherein the target type is plural, each of the target types corresponding to at least one of the second pin groupings;
wherein said reordering the color components of the object type of said object pixel to the corresponding position of the corresponding second pin grouping comprises:
and according to the target type corresponding to the color component of the target pixel point, rearranging the color component of the target pixel point to the corresponding position of at least one second pin group corresponding to the target type.
5. The method of claim 2, wherein the pixel points comprise a plurality of types of color components, and wherein the N pin groupings comprise a first pin grouping and a second pin grouping, the second pin grouping being used to transmit the same type of color component;
wherein, the rearranging the color components of the plurality of pixel points according to the N pin groups comprises:
determining a target pixel point from the plurality of pixel points;
rearranging the color components of the target pixel point to the corresponding position of the first pin group;
and rearranging the color components of the rest pixel points except the target pixel point in the plurality of pixel points to the corresponding positions of the second pin groups corresponding to the color components of various types respectively.
6. The method according to claim 5, wherein said rearranging color components of remaining ones of the plurality of pixel points, excluding the target pixel point, to corresponding positions of the second pin group corresponding to each type of color component, respectively comprises:
and according to the arrangement sequence of the residual pixel points in the pixel points, rearranging the color components of the residual pixel points to the corresponding positions of the second pin groups corresponding to the color components of various types respectively according to the arrangement sequence.
7. The method of claim 5, wherein said determining a target pixel point from said plurality of pixel points comprises:
and determining the pixel points with the arrangement sequence in a multiple relation with 4 as target pixel points.
8. The method according to claim 5, wherein, in the case that the first pin is grouped into a plurality of pins, the rearranging the color components of the target pixel point to the corresponding positions of the first pin group comprises:
determining the corresponding relation between each color component of the target pixel point and a plurality of first pin groups;
and according to the corresponding relation, rearranging the color components of the target pixel points to the corresponding positions of the first pin groups.
9. The method according to any one of claims 1 to 8, wherein after the step of transmitting the color components of the rearranged pixels to the external memory through the data bus, the method comprises:
reading the color components of the plurality of pixel points stored in the external memory through the data bus, wherein in the reading process, at least one pin group of the data bus is used for transmitting the same type of color components;
rearranging the color components of the plurality of pixel points to obtain initial ordering of the color components of the plurality of pixel points, wherein the initial ordering is determined according to the ordering sequence of the pixel points to which the color components belong;
generating the color image according to the initial ordering.
10. A color image transmission apparatus, comprising:
the acquisition module is used for acquiring color components of a plurality of pixel points in the color image;
the first rearrangement module is used for rearranging the color components of the plurality of pixel points;
and the transmission module is used for transmitting the rearranged color components of the plurality of pixel points to an external memory through a data bus, wherein in the transmission process, at least one pin group of the data bus is used for transmitting the same type of color components.
11. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method for transmitting a color image according to any one of claims 1 to 9.
12. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the method for transmission of color images according to any one of claims 1 to 9.
CN202011045667.5A 2020-09-28 2020-09-28 Color image transmission method and device, electronic equipment and storage medium Active CN112181876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011045667.5A CN112181876B (en) 2020-09-28 2020-09-28 Color image transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011045667.5A CN112181876B (en) 2020-09-28 2020-09-28 Color image transmission method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112181876A true CN112181876A (en) 2021-01-05
CN112181876B CN112181876B (en) 2022-09-02

Family

ID=73945597

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011045667.5A Active CN112181876B (en) 2020-09-28 2020-09-28 Color image transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112181876B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5422657A (en) * 1993-09-13 1995-06-06 Industrial Technology Research Institute Graphics memory architecture for multimode display system
JPH1027130A (en) * 1996-07-12 1998-01-27 Fuji Xerox Co Ltd Picture processor and its processing method
US5724560A (en) * 1995-12-14 1998-03-03 International Business Machines Corporation Display graphics adapter for processing different pixel sizes in a windowing system
US20010017658A1 (en) * 1996-02-29 2001-08-30 Toshihisa Kuroiwa Frame memory device and method
US20020054229A1 (en) * 2000-11-06 2002-05-09 Mega Chips Corporation Image processing circuit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5422657A (en) * 1993-09-13 1995-06-06 Industrial Technology Research Institute Graphics memory architecture for multimode display system
US5724560A (en) * 1995-12-14 1998-03-03 International Business Machines Corporation Display graphics adapter for processing different pixel sizes in a windowing system
US20010017658A1 (en) * 1996-02-29 2001-08-30 Toshihisa Kuroiwa Frame memory device and method
JPH1027130A (en) * 1996-07-12 1998-01-27 Fuji Xerox Co Ltd Picture processor and its processing method
US20020054229A1 (en) * 2000-11-06 2002-05-09 Mega Chips Corporation Image processing circuit

Also Published As

Publication number Publication date
CN112181876B (en) 2022-09-02

Similar Documents

Publication Publication Date Title
US20200372609A1 (en) Super-resolution video reconstruction method, device, apparatus and computer-readable storage medium
CN107247540B (en) Application icon adjusting method and device
US11734554B2 (en) Pooling processing method and system applied to convolutional neural network
US10627062B2 (en) Method for realizing fast color mixing of any colors
CN106056530B (en) Method and device for displaying picture content in application
CN102023843B (en) Function calling method and device as well as smart card
US20230087911A1 (en) Method and apparatus for generating vector diagram and storage medium
US20210227173A1 (en) Image data processing method, data transmission apparatus, image display method and storage medium
CN112287257A (en) Page display method and device, electronic equipment and storage medium
EP4270902A1 (en) Data conversion method and apparatus, and storage medium and electronic apparatus
CN112181876B (en) Color image transmission method and device, electronic equipment and storage medium
CN111049735B (en) Group head portrait display method, device, equipment and storage medium
CN113286174A (en) Video frame extraction method and device, electronic equipment and computer readable storage medium
CN112929672A (en) Video compression method, device, equipment and computer readable storage medium
CN111813485A (en) Page layout processing method, device and equipment and computer readable storage medium
CN110737473A (en) Data processing method and device, terminal and storage medium
CN108446177B (en) Task processing method, computer readable storage medium and terminal device
CN113727117B (en) DP-based compressed data stream transmission method, device, equipment and storage medium
CN113591832B (en) Training method of image processing model, document image processing method and device
CN112185312B (en) Image data processing method and device
CN115665335B (en) Image processing method, image processing apparatus, image forming apparatus, and medium
US10979723B2 (en) Image processing method and image processing device
CN108696670A (en) Tile reuse is carried out in imaging
CN115456858B (en) Image processing method, device, computer equipment and computer readable storage medium
CN110008132B (en) Test case design method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant