CN114189689B - Image compression processing method, device, electronic equipment and storage medium - Google Patents

Image compression processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114189689B
CN114189689B CN202111415047.0A CN202111415047A CN114189689B CN 114189689 B CN114189689 B CN 114189689B CN 202111415047 A CN202111415047 A CN 202111415047A CN 114189689 B CN114189689 B CN 114189689B
Authority
CN
China
Prior art keywords
data
channel
target color
filtering
yuvy
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.)
Active
Application number
CN202111415047.0A
Other languages
Chinese (zh)
Other versions
CN114189689A (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.)
Guangzhou Side Medical Technology Co ltd
Original Assignee
Guangzhou Side Medical 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 Guangzhou Side Medical Technology Co ltd filed Critical Guangzhou Side Medical Technology Co ltd
Priority to CN202111415047.0A priority Critical patent/CN114189689B/en
Publication of CN114189689A publication Critical patent/CN114189689A/en
Application granted granted Critical
Publication of CN114189689B publication Critical patent/CN114189689B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention provides an image compression processing method, an image compression processing device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a Bayer image to be processed; wherein, the Bayer image to be processed adopts GRBG color arrangement; converting GRBG color arrangement in the Bayer image to be processed into YUVY color arrangement; performing format conversion on the data of the YUVY color arrangement to obtain target color array data; filtering the target color array data; and compressing the filtered target color array data. The image compression processing method, the device, the electronic equipment and the storage medium can ensure that the resolution of the images before and after compression processing is unchanged, simultaneously eliminate the correlation of RGB color space, reduce high-frequency components among pixels and improve the image quality.

Description

Image compression processing method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image compression processing method, an image compression processing device, an electronic device, and a storage medium.
Background
A wireless capsule endoscope is a medical device for examining the gastrointestinal tract. It is a capsule containing a miniature camera, light emitting diodes (Light Emitting Diode, LEDs), a battery and a radio transmitter, through which images are continuously acquired while passing through the digestive tract and transmitted to the outside of the body for medical examination based on the acquired image data. Since wireless capsule endoscopes are battery powered, it is often necessary to compress the image in order to reduce the power consumption associated with transmitting the image.
In the related art, an image acquired by a wireless capsule endoscope is generally compressed based on a Bayer interpolation algorithm; however, in this compression method, two green pixels in the captured image need to be converted into one green pixel for processing, which results in a reduced resolution of the image, and thus, a reduced quality of the image.
Disclosure of Invention
Aiming at the problems existing in the prior art, the embodiment of the invention provides an image compression processing method, an image compression processing device, electronic equipment and a storage medium.
The invention provides an image compression processing method, which comprises the following steps:
acquiring a Bayer image to be processed; wherein, the Bayer image to be processed adopts GRBG color arrangement;
converting GRBG color arrangement in the Bayer image to be processed into YUVY color arrangement;
performing format conversion on the data of the YUVY color arrangement to obtain target color array data;
filtering the target color array data;
and compressing the filtered target color array data.
According to the image compression processing method provided by the invention, the method for converting the GRBG color arrangement in the Bayer image to be processed into the YUVY color arrangement comprises the following steps:
constructing a first column matrix based on the GRBG-color arranged data;
multiplying the first column matrix by a fourth-order coefficient matrix to obtain a second column matrix;
determining a first row element in the second column matrix as data of a Y channel, determining a second row element in the second column matrix as data of a U channel, determining a third row element in the second column matrix as data of a V channel, and determining a fourth row element in the second column matrix as data of a Y channel;
and obtaining the YUVY color arrangement based on the data of the Y channel, the data of the U channel, the data of the V channel, and the data of the Y channel.
According to the image compression processing method provided by the invention, the format conversion is performed on the data of the YUVY color arrangement to obtain target color array data, which comprises the following steps:
for each group of data of the YUVY color arrangement of a preset number of rows, continuously arranging the data of the Y channel of each data of the YUVY color arrangement; wherein the data of the Y channel includes data of the Y channel and data of the Y channel in the YUVY row;
sequentially arranging the data of the U channel of each yury data on the first side of the data of all the Y channels;
and continuously arranging the data of the V channel of each Y UVY data on the second side of the data of the Y channel to obtain the target color array data.
According to the image compression processing method provided by the invention, the filtering of the target color array data comprises the following steps:
filtering is performed based on a combination of data for each channel in the target color array data.
According to the image compression processing method provided by the invention, the filtering based on the combination of the data of each channel in the target color array data comprises the following steps:
filtering the data of the U channel based on the data of the Y channel, the data of the Y-channel and the data of the U channel in the target color array data;
and filtering the data of the V channel based on the data of the Y channel, the data of the Y-channel and the data of the V channel in the target color array data.
According to the image compression processing method provided by the invention, the filtering of the data of the U channel based on the data of the Y channel, the data of the Y-channel and the data of the U channel in the target color array data comprises the following steps:
filtering the data of the U channel based on formula (1);
wherein,and (3) representing the filtered data of the U channel, wherein n represents the row number of a matrix formed by the data of the U channel or the data of the V channel in the target color array data, m represents the column number of a matrix formed by the data of the U channel or the data of the V channel in the target color array data, and I represents the data of the channel in the target color array data.
According to the image compression processing method provided by the invention, the filtering of the data of the V channel based on the data of the Y channel, the data of the Y-channel and the data of the V channel in the target color array data comprises the following steps:
filtering the data of the V-channel based on equation (2);
wherein,data representing the filtered V-channels.
The invention also provides an image compression processing device, which comprises:
an acquisition unit for acquiring a Bayer image to be processed; wherein, the Bayer image to be processed adopts GRBG color arrangement;
the first conversion unit is used for converting GRBG color arrangement in the Bayer image to be processed into YUVY color arrangement;
the second conversion unit is used for carrying out format conversion on the data of the YUVY color arrangement to obtain target color array data;
the filtering unit is used for filtering the target color array data;
and the processing unit is used for compressing the filtered target color array data.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the image compression processing method as described in any one of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the image compression processing method as described in any of the above.
The invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the image compression processing method as described in any one of the above.
The image compression processing method, the device, the electronic equipment and the storage medium provided by the invention have the advantages that GRBG color arrangement in the Bayer image to be processed is firstly converted into YUVY color arrangement, and then format conversion, filtering and compression processing are carried out on data of the YUVY color arrangement, so that the resolution ratio of the image before and after the compression processing can be kept unchanged, the correlation of RGB color space is eliminated, the high-frequency components among pixels are reduced, and the image quality is improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an image compression processing method provided by the invention;
fig. 2 is a schematic diagram of GRBG color arrangement provided in the present invention;
FIG. 3 is a second schematic diagram of a GRBG color arrangement provided by the present invention;
fig. 4 is a schematic diagram of converting GRBG color arrangement in a Bayer image to be processed into yuv y color arrangement according to the present invention;
FIG. 5 is a schematic diagram of the conversion of data from a YUVY color arrangement to target color array data according to the present invention;
fig. 6 is a schematic diagram of the structure of an image compression processing apparatus provided by the present invention;
fig. 7 is a schematic diagram of the physical structure of the electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The image compression processing method of the present invention is described below with reference to fig. 1 to 5.
Fig. 1 is a schematic flow chart of an image compression processing method provided by the invention, as shown in fig. 1, the image compression processing method comprises the following steps:
and step 101, acquiring a Bayer image to be processed.
Wherein, the Bayer image to be processed adopts GRBG color arrangement.
For example, an original Bayer (Bayer) image photographed by a capsule endoscope is obtained, the original Bayer image is arranged by using GRBG colors to obtain a Bayer image to be processed, each GRBG color is arranged to correspond to a pixel block of 2×2, fig. 2 is one of schematic diagrams of the GRBG color arrangement provided by the present invention, as shown in fig. 2, the upper left corner pixel of the pixel block of 2×2 is marked as G, and represents data of a G channel; the upper right pixel is labeled B, representing the data for the B channel; the lower left pixel is labeled R, representing the data for the R channel; the lower right pixel is marked G, the data of the G channel is marked, and the data of all the original Bayer images are arranged in this way.
Fig. 3 is a second schematic diagram of GRBG color arrangement provided in the present invention, as shown in fig. 3, the data of each channel is marked according to the row and column to obtain a pixel block with resolution of 8×8, for example, G in fig. 3 11 Data representing the G channel of the first row and first column of pixels, G 24 * Data representing G channel of pixels of second row and fourth column, B 16 Data representing the B channel of the pixels of the sixth column of the first row, R 25 Data representing the R channel of the pixels of the second row and the fifth column.
The color G represents green, R represents red, and B represents blue.
Step 102, converting GRBG color arrangement in the Bayer image to be processed into YUVY color arrangement.
Optionally, constructing a first column matrix based on the GRBG-color arranged data; multiplying the first column matrix by a fourth-order coefficient matrix to obtain a second column matrix; determining a first row element in the second column matrix as data of a Y channel, determining a second row element in the second column matrix as data of a U channel, determining a third row element in the second column matrix as data of a V channel, and determining a fourth row element in the second column matrix as data of a Y channel; and obtaining the YUVY color arrangement based on the data of the Y channel, the data of the U channel, the data of the V channel, and the data of the Y channel.
Y represents brightness, and U and V represent chromaticity.
For example, a first column matrix constructed based on GRBG-color arranged data may be expressed asThe second column matrix can be calculated by multiplying the first column matrix by the fourth-order coefficient matrix, and specifically, the second column matrix is calculated by adopting the following formula (3).
Wherein,representing a second column matrix which sequentially contains Y-channel data, U-channel data, V-channel data and Y * Channel data, Y channel data, U channel data, V channel data and Y * The data of the channels are sequentially arranged to obtain data of a YUVY color arrangement; />Representing a matrix of fourth order coefficients.
Fig. 4 is a schematic diagram of converting a GRBG color arrangement in a Bayer image to be processed into a yuv y color arrangement according to the present invention, and as shown in fig. 4, each pixel block of the GRBG color arrangement of 2×2 corresponds to a pixel block of the yuv y color arrangement of 2×2.
And 103, performing format conversion on the data of the YUVY color arrangement to obtain target color array data.
Optionally, for each set of data of the YUVY color arrangement of a preset number of rows, sequentially arranging data of Y channels of each data of the YUVY color arrangement; wherein the data of the Y channel includes data of the Y channel and data of the Y channel in the YUVY row; sequentially arranging the data of the U channel of each yury data on the first side of the data of all the Y channels; and continuously arranging the data of the V channel of each Y UVY data on the second side of the data of the Y channel to obtain the target color array data.
For example, when obtaining all the data of the YUVY color arrangement, format conversion is required to be performed on all the data of the YUVY color arrangement, and if a preset number of rows are two, the data of every two rows are mixed for conversion, where the purpose of format conversion is to achieve separation of color channels.
Fig. 5 is a schematic diagram of converting yury color data into target color array data, as shown in fig. 5, for the first two rows of 4 2×2 pixel blocks, Y in the first 2×2 pixel block 11 And Y 22 * Sequentially arranging Y in the second 2 x 2 pixel block 13 And Y 24 * Then Y in the third 2 x 2 pixel block is arranged successively 15 And Y 26 * Then Y in the fourth 2 x 2 pixel block is arranged continuously 17 And Y 28 * The method comprises the steps of carrying out a first treatment on the surface of the Then U in 4 blocks of 2 x 2 pixels 12 、U 14 、U 16 And U 18 Sequentially arranged on a first side (e.g., left side) of all marks Y, V in the final 4 2×2 pixel blocks 21 、V 23 、V 25 And V 27 Sequentially on a second side (e.g., the second side is the right side) of all the marks Y. The pixel blocks of other rows are subjected to format conversion by adopting the same method, and finally the obtained target color matrix data is shown in fig. 5.
Step 104, filtering the target color array data.
Optionally, filtering is performed based on a combination of data for each channel in the target color array data.
Specifically, filtering based on a combination of data for each channel in the target color array data may be achieved by:
and filtering the data of the U channel based on the data of the Y channel, the data of the Y-channel and the data of the U channel in the target color array data.
Specifically, the data of the U channel is filtered based on equation (1).
Wherein,and n represents the row number of a matrix formed by the data of the U channel or the data of the V channel in the target color array data, and m represents the column number of the matrix formed by the data of the U channel or the data of the V channel in the target color array data>Representing rounding down the included data, I representing the data of the channels in the target color array data.
For example, when filtering the data of the U channels, the data of all the U channels of the first row are not filtered, that is, in the case of n=1, the data of the U channel before filtering is equal to the data of the U channel after filtering; all the data of the U-channels except the first row need to be filtered.
When n=2, m=1,
when n=2, m=2,
when n=2, m=3,
at n=2When m=4, the number of the active groups is,
when n=3, m=1,
when n=3, m=2,
when n=3, m=3,
when n=3, m=4,
when n=4, m=1,
when n=4, m=2,
when n=4, m=3,
when n=4, m=4,
the filtering method can be used for filtering the data of each U channel based on the data of the Y channel, the data of the Y-channel and the data of the U channel. Therefore, when the data of the U channel is filtered, the data of the Y channel and the data of the Y channel are combined, so that the correlation between adjacent channels of pixels is reflected; the combination of the data of the Y channel and the data of the Y channel shows the correlation between the brightness spaces of the pixels, thereby reducing the high-frequency components among the pixels, reducing the redundancy among the pixels and ensuring the accuracy of the image data.
And filtering the data of the V channel based on the data of the Y channel, the data of the Y-channel and the data of the V channel in the target color array data.
Specifically, the data of the V-channel is filtered based on formula (2).
Wherein,data representing the filtered V-channels.
For example, when filtering the data of the V-channels, the data of all V-channels of the first column are not filtered, i.e., in the case of m=1, the data of the V-channels before filtering is equal to the data of the V-channels after filtering; all V-channel data except the first column needs to be filtered.
When n=1, m=2,
when n=1, m=3,
when n=1, m=4,
when n=2, m=2,
when n=2, m=3,
when n=2, m=4,
when n=3, m=2,
when n=3, m=3,
when n=3, m=4,
when n=4, m=2,
when n=4, m=3,
when n=4, m=4,
the filtering method can be used for filtering the data of each V channel, wherein the data is obtained by filtering the data based on the Y channel, the data of the Y-channel and the data of the V channel. Therefore, when the data of the V channel is filtered, the data of the Y channel and the data of the Y channel are combined, so that the correlation between adjacent channels of pixels is reflected; the combination of the data of the Y channel and the data of the Y channel shows the correlation between the brightness spaces of the pixels, thereby reducing the high-frequency components among the pixels, reducing the redundancy among the pixels and ensuring the accuracy of the image data.
The pixel points involved in filtering the boundary of the image are extended by 0, for example, in nIn the case of=4, m=4, for V 87 When filtering is performed, the filtering is required to be performed on V 87 0 is added below, namely0 in (c).
And 105, compressing the filtered target color array data.
Illustratively, the filtered target color array data is subjected to lossless compression by adopting one of a JPEG2000 lossless compression method, a Fast and Efficient Lossless Image Compression System (FELICS) and a JPEG-LS lossless compression method, so as to improve the compression ratio of the image data.
The image compression processing method provided by the invention has the advantages that firstly, GRBG color arrangement in the Bayer image to be processed is converted into YUVY color arrangement, and then, format conversion, filtering and compression processing are carried out on data of the YUVY color arrangement, so that the resolution ratio of the image before and after the compression processing is unchanged, the correlation of RGB color space is eliminated, the high-frequency components among pixels are reduced, and the image quality is improved.
In addition, the correlation between adjacent channels of pixels and the correlation between brightness spaces of pixels are reflected during filtering, so that high-frequency components among pixels are reduced, redundancy among pixels is reduced, and the accuracy of image data is ensured; the algorithm of the invention is simple and easy to embed.
The image compression processing apparatus provided by the present invention will be described below, and the image compression processing apparatus described below and the image compression processing method described above may be referred to correspondingly to each other.
Fig. 6 is a schematic structural diagram of an image compression processing apparatus provided by the present invention, and as shown in fig. 6, the image compression processing apparatus includes an acquisition unit 601, a first conversion unit 602, a second conversion unit 603, a filtering unit 604, and a processing unit 605; wherein:
an acquiring unit 601, configured to acquire a Bayer image to be processed; wherein, the Bayer image to be processed adopts GRBG color arrangement;
a first conversion unit 602, configured to convert GRBG color arrangements in the Bayer image to be processed into yuv y color arrangements;
a second converting unit 603, configured to perform format conversion on the YUVY color-arranged data, to obtain target color array data;
a filtering unit 604, configured to filter the target color array data;
and a processing unit 605, configured to perform compression processing on the filtered target color array data.
The image compression processing device provided by the invention firstly converts GRBG color arrangement in the Bayer image to be processed into YUVY color arrangement, and then performs format conversion, filtering and compression processing on data of the YUVY color arrangement, so that the resolution of the image before and after compression processing can be ensured to be unchanged, meanwhile, the correlation of RGB color space is eliminated, the high-frequency components among pixels are reduced, and the image quality is improved.
Based on any of the above embodiments, the first conversion unit 602 is specifically configured to:
constructing a first column matrix based on the GRBG-color arranged data;
multiplying the first column matrix by a fourth-order coefficient matrix to obtain a second column matrix;
determining a first row element in the second column matrix as data of a Y channel, determining a second row element in the second column matrix as data of a U channel, determining a third row element in the second column matrix as data of a V channel, and determining a fourth row element in the second column matrix as data of a Y channel;
and obtaining the YUVY color arrangement based on the data of the Y channel, the data of the U channel, the data of the V channel, and the data of the Y channel.
Based on any of the above embodiments, the second conversion unit 603 is specifically configured to:
for each group of data of the YUVY color arrangement of a preset number of rows, continuously arranging the data of the Y channel of each data of the YUVY color arrangement; wherein the data of the Y channel includes data of the Y channel and data of the Y channel in the YUVY row;
sequentially arranging the data of the U channel of each yury data on the first side of the data of all the Y channels;
and continuously arranging the data of the V channel of each Y UVY data on the second side of the data of the Y channel to obtain the target color array data.
Based on any of the above embodiments, the filtering unit 604 is specifically configured to:
filtering is performed based on a combination of data for each channel in the target color array data.
Based on any of the above embodiments, the filtering unit 604 is specifically configured to:
filtering the data of the U channel based on the data of the Y channel, the data of the Y-channel and the data of the U channel in the target color array data;
and filtering the data of the V channel based on the data of the Y channel, the data of the Y-channel and the data of the V channel in the target color array data.
Based on any of the foregoing embodiments, filtering the data of the U channel based on the data of the Y channel, the data of the Y x channel, and the data of the U channel in the target color array data includes:
filtering the data of the U channel based on formula (1);
wherein,and (3) representing the filtered data of the U channel, wherein n represents the row number of a matrix formed by the data of the U channel or the data of the V channel in the target color array data, m represents the column number of a matrix formed by the data of the U channel or the data of the V channel in the target color array data, and I represents the data of the channel in the target color array data.
Based on any of the foregoing embodiments, filtering the data of the V channel based on the data of the Y channel, the data of the Y x channel, and the data of the V channel in the target color array data includes:
filtering the data of the V-channel based on equation (2);
wherein,data representing the filtered V-channels.
Fig. 7 is a schematic physical structure of an electronic device according to the present invention, as shown in fig. 7, the electronic device may include: processor 710, communication interface (Communications Interface) 720, memory 730, and communication bus 740, wherein processor 710, communication interface 720, memory 730 communicate with each other via communication bus 740. Processor 710 may invoke logic instructions in memory 730 to perform an image compression processing method comprising: acquiring a Bayer image to be processed; wherein, the Bayer image to be processed adopts GRBG color arrangement;
converting GRBG color arrangement in the Bayer image to be processed into YUVY color arrangement;
performing format conversion on the data of the YUVY color arrangement to obtain target color array data;
filtering the target color array data;
and compressing the filtered target color array data.
Further, the logic instructions in the memory 730 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of executing the image compression processing method provided by the above methods, the method comprising: acquiring a Bayer image to be processed; wherein, the Bayer image to be processed adopts GRBG color arrangement;
converting GRBG color arrangement in the Bayer image to be processed into YUVY color arrangement;
performing format conversion on the data of the YUVY color arrangement to obtain target color array data;
filtering the target color array data;
and compressing the filtered target color array data.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the image compression processing method provided by the above methods, the method comprising: acquiring a Bayer image to be processed; wherein, the Bayer image to be processed adopts GRBG color arrangement;
converting GRBG color arrangement in the Bayer image to be processed into YUVY color arrangement;
performing format conversion on the data of the YUVY color arrangement to obtain target color array data;
filtering the target color array data;
and compressing the filtered target color array data.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. An image compression processing method, characterized by comprising:
acquiring a Bayer image to be processed; wherein, the Bayer image to be processed adopts GRBG color arrangement;
converting GRBG color arrangement in the Bayer image to be processed into YUVY color arrangement;
performing format conversion on the data of the YUVY color arrangement to obtain target color array data;
filtering the target color array data;
compressing the filtered target color array data;
the performing format conversion on the data of the YUVY color arrangement to obtain target color array data, including:
for each group of data of the YUVY color arrangement of a preset number of rows, continuously arranging the data of the Y channel of each data of the YUVY color arrangement; wherein the data of the Y channel includes data of the Y channel and data of the Y channel in the YUVY row;
sequentially arranging the data of the U channel of each yury data on the first side of the data of all the Y channels;
and continuously arranging the data of the V channel of each Y UVY data on the second side of the data of the Y channel to obtain the target color array data.
2. The image compression processing method according to claim 1, wherein the converting the GRBG color arrangement in the Bayer image to be processed into the yury color arrangement includes:
constructing a first column matrix based on the GRBG-color arranged data;
multiplying the first column matrix by a fourth-order coefficient matrix to obtain a second column matrix;
determining a first row element in the second column matrix as data of a Y channel, determining a second row element in the second column matrix as data of a U channel, determining a third row element in the second column matrix as data of a V channel, and determining a fourth row element in the second column matrix as data of a Y channel;
and obtaining the YUVY color arrangement based on the data of the Y channel, the data of the U channel, the data of the V channel, and the data of the Y channel.
3. The image compression processing method according to claim 1 or 2, wherein the filtering the target color array data includes:
filtering is performed based on a combination of data for each channel in the target color array data.
4. The image compression processing method according to claim 3, wherein the filtering based on the combination of the data of the respective channels in the target color array data includes:
filtering the data of the U channel based on the data of the Y channel, the data of the Y-channel and the data of the U channel in the target color array data;
and filtering the data of the V channel based on the data of the Y channel, the data of the Y-channel and the data of the V channel in the target color array data.
5. The image compression processing method according to claim 4, wherein the filtering the data of the U channel based on the data of the Y channel, the data of the Y x channel, and the data of the U channel in the target color array data includes:
filtering the data of the U channel based on formula (1);
wherein,representing the filtered data of the U channel, n represents the row number of a matrix formed by the data of the U channel or the data of the V channel in the target color array data, and m represents the matrix formed by the data of the U channel or the data of the V channel in the target color array dataColumn number, I, represents the data of the channel in the target color array data.
6. The image compression processing method according to claim 4, wherein the filtering the data of the V channel based on the data of the Y channel, the data of the Y x channel, and the data of the V channel in the target color array data includes:
filtering the data of the V-channel based on equation (2);
wherein,data representing the filtered V-channels.
7. An image compression processing apparatus, comprising:
an acquisition unit for acquiring a Bayer image to be processed; wherein, the Bayer image to be processed adopts GRBG color arrangement;
the first conversion unit is used for converting GRBG color arrangement in the Bayer image to be processed into YUVY color arrangement;
the second conversion unit is used for carrying out format conversion on the data of the YUVY color arrangement to obtain target color array data;
the filtering unit is used for filtering the target color array data;
the processing unit is used for compressing the filtered target color array data;
the second conversion unit is specifically configured to:
for each group of data of the YUVY color arrangement of a preset number of rows, continuously arranging the data of the Y channel of each data of the YUVY color arrangement; wherein the data of the Y channel includes data of the Y channel and data of the Y channel in the YUVY row;
sequentially arranging the data of the U channel of each yury data on the first side of the data of all the Y channels;
and continuously arranging the data of the V channel of each Y UVY data on the second side of the data of the Y channel to obtain the target color array data.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the image compression processing method according to any one of claims 1 to 6 when the program is executed.
9. A non-transitory computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor implements the steps of the image compression processing method according to any of claims 1 to 6.
CN202111415047.0A 2021-11-25 2021-11-25 Image compression processing method, device, electronic equipment and storage medium Active CN114189689B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111415047.0A CN114189689B (en) 2021-11-25 2021-11-25 Image compression processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111415047.0A CN114189689B (en) 2021-11-25 2021-11-25 Image compression processing method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114189689A CN114189689A (en) 2022-03-15
CN114189689B true CN114189689B (en) 2024-02-02

Family

ID=80602603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111415047.0A Active CN114189689B (en) 2021-11-25 2021-11-25 Image compression processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114189689B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004056084A1 (en) * 2002-12-18 2004-07-01 Nokia Corporation Image data compression device and decompression device and image data compression program and decompression program
CN102622739A (en) * 2012-03-30 2012-08-01 中国科学院光电技术研究所 Method for correcting non-uniformity of image of Bayer filter array color camera
CN103414903A (en) * 2013-08-28 2013-11-27 清华大学 Compressing method and device for Bayer format images
JP2016063289A (en) * 2014-09-16 2016-04-25 日本放送協会 Video compression device, video compression method and video compression program
JP2017085545A (en) * 2015-10-27 2017-05-18 キヤノン株式会社 Image processing apparatus and control method of the same, and computer program
CN110139039A (en) * 2019-05-24 2019-08-16 安翰科技(武汉)股份有限公司 The compression processing method and system of capsule endoscope bayer image
CN110149520A (en) * 2019-05-24 2019-08-20 安翰科技(武汉)股份有限公司 The processing method and system of capsule endoscope bayer image YUV lossless compression
CN110868603A (en) * 2019-11-04 2020-03-06 电子科技大学 Bayer image compression method
CN111406404A (en) * 2019-07-15 2020-07-10 上海极清慧视科技有限公司 Compression method, decompression method, system and storage medium for obtaining video file
CN111869213A (en) * 2018-01-16 2020-10-30 株式会社尼康 Encoding device, decoding device, encoding method, decoding method, encoding program, and decoding program
CN112819721A (en) * 2021-02-04 2021-05-18 湖南兴芯微电子科技有限公司 Method and system for reducing noise of image color noise

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7903306B2 (en) * 2005-07-22 2011-03-08 Samsung Electronics Co., Ltd. Sensor image encoding and/or decoding system, medium, and method
US9414087B2 (en) * 2014-04-24 2016-08-09 Lytro, Inc. Compression of light field images
US9516197B2 (en) * 2014-10-21 2016-12-06 Pixspan, Inc. Apparatus and method for lossless compression of raw color sensor data from a color array filtered image sensor

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004056084A1 (en) * 2002-12-18 2004-07-01 Nokia Corporation Image data compression device and decompression device and image data compression program and decompression program
CN102622739A (en) * 2012-03-30 2012-08-01 中国科学院光电技术研究所 Method for correcting non-uniformity of image of Bayer filter array color camera
CN103414903A (en) * 2013-08-28 2013-11-27 清华大学 Compressing method and device for Bayer format images
JP2016063289A (en) * 2014-09-16 2016-04-25 日本放送協会 Video compression device, video compression method and video compression program
JP2017085545A (en) * 2015-10-27 2017-05-18 キヤノン株式会社 Image processing apparatus and control method of the same, and computer program
CN111869213A (en) * 2018-01-16 2020-10-30 株式会社尼康 Encoding device, decoding device, encoding method, decoding method, encoding program, and decoding program
CN110139039A (en) * 2019-05-24 2019-08-16 安翰科技(武汉)股份有限公司 The compression processing method and system of capsule endoscope bayer image
CN110149520A (en) * 2019-05-24 2019-08-20 安翰科技(武汉)股份有限公司 The processing method and system of capsule endoscope bayer image YUV lossless compression
CN111406404A (en) * 2019-07-15 2020-07-10 上海极清慧视科技有限公司 Compression method, decompression method, system and storage medium for obtaining video file
CN110868603A (en) * 2019-11-04 2020-03-06 电子科技大学 Bayer image compression method
CN112819721A (en) * 2021-02-04 2021-05-18 湖南兴芯微电子科技有限公司 Method and system for reducing noise of image color noise

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JPEG2000 compression anddecompression system based on Bayer image;Yan Yaqiong et al;《2013 IEEE 11th International Conference on Electronic Measurement & Instruments》;全文 *
基于JPEG图像的无线胶囊内窥镜的设计;潘国兵 等;《高技术通讯》;全文 *
用于无线内视镜系统的基带处理专用集成电路;陈新凯 等;《清华大学学报(自然科学版)》;全文 *

Also Published As

Publication number Publication date
CN114189689A (en) 2022-03-15

Similar Documents

Publication Publication Date Title
US10733703B2 (en) Efficient image demosaicing and local contrast enhancement
US20170323617A1 (en) Rgb to yuv format conversion and inverse conversion method and circuit for depth packing and depacking
JP2002516540A (en) Color image compression based on two-dimensional discrete wavelet transform resulting in perceptually lossless images
JP2012511870A5 (en)
US8086032B2 (en) Image processing device, image processing method, and image pickup apparatus
Turcza et al. Low-power image compression for wireless capsule endoscopy
CN1812595A (en) Color interpolation algorithm
US10694100B2 (en) Image processing apparatus, image processing method, and computer readable recording medium
EP2526695A1 (en) Image encoder and image decoder
Mohammed et al. Lossless compression in Bayer color filter array for capsule endoscopy
CN110149520B (en) Capsule endoscope bayer image YUV lossless compression processing method and system
Alam et al. Are current advances of compression algorithms for capsule endoscopy enough? A technical review
WO2019237659A1 (en) Blind compressive sampling method, apparatus and imaging system
CN114189689B (en) Image compression processing method, device, electronic equipment and storage medium
US7512277B2 (en) Data compression for colour images using wavelet transform
US20040208362A1 (en) Encoding and decoding data to render 2D or 3D images
US9088716B2 (en) Methods and apparatus for image processing in wireless capsule endoscopy
CN110139039B (en) Compression processing method and system for capsule endoscope bayer image
CN114189690A (en) Image compression processing method and device, electronic equipment and storage medium
EP2528319A1 (en) Image data compressing and decompressing methods and devices
US20040207737A1 (en) Image compression apparatus and image processing system
US20040252894A1 (en) Image compression apparatus and image processing system
CN106780429B (en) Method for extracting key frame of WCE video time sequence redundant image data based on perception color space and key corner
Thoné et al. An efficient hardware-optimized compression algorithm for wireless capsule endoscopy image transmission
Malathkar et al. Low cost image compression algorithm with colour reproduction algorithm for transmitting video frame of capsule endoscopy using low power

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