WO2017190691A1 - Picture compression method and apparatus - Google Patents

Picture compression method and apparatus Download PDF

Info

Publication number
WO2017190691A1
WO2017190691A1 PCT/CN2017/083241 CN2017083241W WO2017190691A1 WO 2017190691 A1 WO2017190691 A1 WO 2017190691A1 CN 2017083241 W CN2017083241 W CN 2017083241W WO 2017190691 A1 WO2017190691 A1 WO 2017190691A1
Authority
WO
WIPO (PCT)
Prior art keywords
bitmap
picture
compression
bitmaps
algorithm
Prior art date
Application number
PCT/CN2017/083241
Other languages
French (fr)
Chinese (zh)
Inventor
王康
黄贞
Original Assignee
贵州白山云科技有限公司
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 贵州白山云科技有限公司 filed Critical 贵州白山云科技有限公司
Publication of WO2017190691A1 publication Critical patent/WO2017190691A1/en

Links

Images

Classifications

    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/149Data rate or code amount at the encoder output by estimating the code amount by means of a model, e.g. mathematical model or statistical model
    • 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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • 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/17Methods 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 an image region, e.g. an object
    • H04N19/172Methods 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 an image region, e.g. an object the region being a picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/99Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals involving fractal coding

Definitions

  • the present invention relates to the field of picture compression, and in particular to a picture compression method and apparatus.
  • the purpose of encoding and compressing pictures is usually to transform and combine picture data according to certain rules, so as to represent as much image information as possible with as few code symbols as possible.
  • methods for image compression mainly include lossy compression and lossless compression.
  • lossy compression removes the sudden change of color in the image, and deletes the sudden change of color in the image, that is, the human brain will use the closest color to the nearby to fill the lost color characteristics.
  • the compression ratio of lossy compression is higher than that of lossless compression and can be used to satisfy storage and delivery requirements; however, lossy compression techniques can affect picture quality, and there will be more or less distortion when restoring original data.
  • Lossless compression uses design redundancy to remove duplicate data for compression to reduce the size of images saved on disk. Lossless compression does not cause any distortion to fully recover the original data; however, the compression ratio is limited by the statistical redundancy of the data.
  • the lossy compression and lossless compression of the image apply to different types of images. Lossy compression is suitable for pictures with uniform color distribution. The compressed picture generally has higher distortion and higher compression ratio; lossless compression is suitable for pictures with relatively simple color, and the compressed picture generally has high security. Trueness and lower compression ratio.
  • the client software product when it compresses the picture, it usually adopts a compression algorithm for compression according to the traditional compression algorithm for any picture content form. Obviously, a single algorithm cannot accommodate all images; a single quality cannot handle the pixel portion of each bitmap of the image. Even if the image compression is implemented according to the existing compression technology, only a picture with low compression ratio and distortion is obtained, thereby affecting the user experience.
  • the present invention provides a picture compression method and apparatus to solve at least the above problems.
  • a picture compression method including: acquiring a first picture; cutting the first picture into a plurality of bitmaps; and determining compression coding of each bitmap in the plurality of bitmaps
  • the algorithm compresses the corresponding bitmap by using a determined compression coding algorithm; and splices the compressed bitmap into a second picture.
  • determining a compression coding algorithm for each bitmap in the plurality of bitmaps includes: determining pixel quality of each bitmap in the plurality of bitmaps; and selecting each bitmap according to the pixel quality Compression coding algorithm.
  • selecting a compression coding algorithm for each bitmap includes: determining whether a pixel quality of each bitmap in the plurality of bitmaps is less than a predetermined threshold; and if the determination result is yes Selecting the compression encoding algorithm of the bitmap in a first set of compression encoding algorithms; otherwise, selecting the compression encoding algorithm of the bitmap in a second set of compression encoding algorithms.
  • the first compression coding algorithm set is a lossy compression coding algorithm set
  • the second compression coding algorithm set is a lossless compression coding algorithm set
  • the set of lossy compression coding algorithms includes at least one of the following: a model coding algorithm, a fractal coding algorithm, and a discrete cosine transform coding algorithm;
  • the lossless compression coding algorithm set includes at least one of the following: integer wavelet fast The hierarchical tree set splitting lossless compression algorithm SSPIHT, the improved adaptive run length coding algorithm, and the improved binary bit level coding algorithm.
  • cutting the first picture into a plurality of bitmaps includes: following the edge detection method The first picture is cut into the plurality of bitmaps.
  • the method further includes: storing the second picture; and/or outputting the second picture.
  • a picture compression apparatus including: an obtaining module, configured to acquire a first picture; a cutting module, configured to cut the first picture into a plurality of bitmaps; and a determining module, a compression coding algorithm for determining each bitmap in the plurality of bitmaps; a compression module, configured to compress a corresponding bitmap by using a determined compression coding algorithm; and a splicing module, configured to: compress the plurality of bits The picture is stitched into a second picture.
  • the determining module includes: a determining unit, configured to determine a pixel quality of each bitmap in the multiple bitmaps; and a selecting unit, configured to select compression coding of each bitmap according to the pixel quality algorithm.
  • the selecting unit includes: a determining subunit, configured to determine whether the pixel quality of each bitmap in the multiple bitmaps is less than a predetermined threshold; and selecting a subunit for determining that the result is In the case of the first compression coding algorithm set, the compression coding algorithm of the bitmap is selected; otherwise, the compression coding algorithm of the bitmap is selected in the second compression coding algorithm set.
  • a method of acquiring a first picture, cutting a first picture into a plurality of bitmaps, determining a compression coding algorithm for each bitmap in the plurality of bitmaps, and compressing the corresponding bitmap by using the determined compression coding algorithm is adopted.
  • the invention solves the problem of low compression rate and picture distortion caused by compressing pictures by using a single compression algorithm, improves the compression ratio of the picture, and reduces the distortion of the picture compression.
  • FIG. 1 is a flowchart of a picture compression method according to an embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram of a picture compression apparatus according to an embodiment of the present invention.
  • FIG. 3 is a flow chart of a method for cutting a compression stitching algorithm based on a picture bitmap according to a preferred embodiment of the present invention
  • FIG. 4 is a diagram of an apparatus for cutting a compression stitching algorithm based on a picture bitmap according to a preferred embodiment of the present invention. Schematic.
  • FIG. 1 is a flowchart of a picture compression method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step S101 acquiring a first picture
  • Step S102 cutting the first picture into a plurality of bitmaps
  • Step S103 determining a compression coding algorithm for each bitmap in the plurality of bitmaps
  • Step S104 compressing the corresponding bitmap by using a determined compression coding algorithm
  • Step S105 the compressed and encoded plurality of bitmaps are spliced into a second picture.
  • the multiple bitmaps obtained by the cutting are respectively compression-encoded, and different compression coding algorithms are used for different cutting parts of the first picture;
  • the picture size of the picture does not change. Therefore, multiple bitmaps can be re-spliced at the end, so that the second picture compressed by different compression coding algorithms can be obtained.
  • a compression coding algorithm may be determined according to the pixel quality of each bitmap, for example, determining the pixel quality of each bitmap in the plurality of bitmaps; and selecting a compression coding algorithm for each bitmap according to the pixel quality.
  • the pixel quality includes but is not limited to: comprehensive quantitative indicators such as definition, contrast, color shift, signal to noise ratio and number of dead points.
  • the compression algorithm is selected according to different pixel qualities, so that the cut portions of different pixel qualities can adopt different compression coding algorithms, thereby obtaining different compression ratios and distortion levels.
  • the compression coding algorithm for selecting each bitmap may adopt the following manner: determining whether the pixel quality of each bitmap in the multiple bitmaps is less than a predetermined threshold; if the determination result is yes, Selecting the compression coding algorithm of the bitmap in the first set of compression coding algorithms; otherwise, in the A compression coding algorithm that selects this bitmap in a set of two compression coding algorithms. Comparing the quantized pixel quality with a predetermined threshold, and selecting a corresponding compression coding algorithm in the first compression coding algorithm set or the second compression coding algorithm set according to different comparison results, the predetermined threshold may be 5%.
  • the foregoing first compression coding algorithm set is a set of lossy compression coding algorithms, including but not limited to: a model coding algorithm, a fractal coding algorithm, and a discrete cosine transform coding algorithm.
  • the foregoing second compression coding algorithm set is a lossless compression coding algorithm set, including but not limited to: integer wavelet fast multi-level tree set split lossless compression algorithm SSPIHT, improved adaptive run length coding algorithm, improved binary bit level coding algorithm .
  • the cutting may be performed according to a predetermined rule.
  • the simplest cutting method is to perform geometric cutting, that is, the image is directly cut into equal or unequal Multiple geometric figures.
  • the first picture is preferably cut into a plurality of bitmaps according to an edge detection method.
  • the method for detecting the edge may be any one of the methods disclosed in the prior art, and is not limited in the embodiment of the present invention.
  • the edge detection method is used to cut the first picture, and the similarly-shaped part of the first picture can be cut into a bitmap, and the part of the first picture with a large difference in nature is cut, which is advantageous for adopting different compression coding. Compression coding of the algorithm.
  • the second picture may be stored; and/or the second picture is output.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods of various embodiments of the present invention.
  • a picture compression device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
  • the term “module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • the picture compression apparatus includes: an acquisition module 20, a cutting module 22, a determination module 24, a compression module 26, and a splicing module 28, where
  • the obtaining module 20 is configured to acquire a first picture;
  • the cutting module 22 is coupled to the obtaining module 20 for cutting the first picture into a plurality of bitmaps;
  • the determining module 24 is coupled to the cutting module 22 for determining a plurality of positions a compression coding algorithm for each bitmap in the figure;
  • a compression module 26 coupled to the determination module 24 for compressing the corresponding bitmap using the determined compression coding algorithm;
  • a splicing module 28 coupled to the compression module 26 for compressing Multiple bitmaps are stitched into a second picture.
  • the determining module 24 includes: a determining unit, configured to determine a pixel quality of each bitmap in the plurality of bitmaps; and a selecting unit coupled to the determining unit, configured to select a compression encoding of each bitmap according to the pixel quality algorithm.
  • the selecting unit includes: a determining subunit, configured to determine whether a pixel quality of each bitmap in the plurality of bitmaps is less than a predetermined threshold; and selecting a subunit, coupled to the determining subunit, for determining that the result is In the case of the first compression coding algorithm set, the compression coding algorithm of the bitmap is selected; otherwise, the compression coding algorithm of the bitmap is selected in the second compression coding algorithm set.
  • the first compression coding algorithm set is a lossy compression coding algorithm set
  • the second compression coding algorithm set is a lossless compression coding algorithm set.
  • the set of lossy compression coding algorithms includes, but is not limited to, at least one of the following: a model coding algorithm, a fractal coding algorithm, and a discrete cosine transform coding algorithm;
  • the lossless compression coding algorithm set includes but is not limited to at least one of the following: integer wavelet Fast multi-level tree set splitting lossless compression algorithm SSPIHT, improved adaptive run length coding algorithm, improved binary bit level coding algorithm.
  • the cutting module 22 is configured to cut the first picture into a plurality of bitmaps according to an edge detection method.
  • the device may further include: a storage module coupled to the splicing module 28 for storing the second picture; and/or an output module coupled to the storage splicing module 28 or the storage module for outputting the second picture.
  • a storage module coupled to the splicing module 28 for storing the second picture
  • an output module coupled to the storage splicing module 28 or the storage module for outputting the second picture.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are located in multiple In the processor.
  • Embodiments of the present invention also provide a software for performing the technical solutions described in the above embodiments and preferred embodiments.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be Program code that is set to store for performing the following steps:
  • Step S101 acquiring a first picture
  • Step S102 cutting the first picture into a plurality of bitmaps
  • Step S103 determining a compression coding algorithm for each bitmap in the plurality of bitmaps
  • Step S104 compressing the corresponding bitmap by using a determined compression coding algorithm
  • Step S105 the compressed and encoded plurality of bitmaps are spliced into a second picture.
  • the foregoing storage medium may include, but is not limited to, a USB flash drive, a Read-Only Memory (ROM), and a Random Access Memory (RAM).
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • the object of the preferred embodiment of the present invention is to provide a method and a device for cutting and compressing a stitching algorithm based on a picture bitmap, and according to the size of the picture bitmap, after determining the pixel quality of the bitmap, intelligently selecting an appropriate compression algorithm, and then performing the compression.
  • the picture is stitched together to effectively implement high fidelity compression of the picture.
  • a preferred embodiment of the present invention provides a method for cutting a compression stitching algorithm based on a picture bitmap.
  • 3 is a flow chart of a method for cutting a compression stitching algorithm based on a picture bitmap according to a preferred embodiment of the present invention. As shown in FIG. 3, the method includes the following steps:
  • Step S1001 input the original picture, determine the original picture size, and cut the original picture into multiple bitmaps of different sizes according to the edge detection method;
  • the segmentation picture is implemented by detecting edge edges of different regions in the image.
  • the edge is the most basic feature of the picture, which is the result of discontinuity or mutation of the local features of the picture.
  • the zero point information of the extreme or second derivative of the first derivative of the picture is used to provide the basic basis of the edge point for processing the gray value, color and texture mutation; for constructing the difference sensitive to the gray step change of the image
  • the operator performs picture bitmap segmentation.
  • the preferred embodiment of the present invention adopts a local picture function based method and a multi-scale method and a boundary curve fitting method, and utilizes a first order differential operator: a Robert algorithm, a Sobel algorithm, and a second order differential calculation.
  • Sub: Laplace algorithm and Kirsh implement the segmentation of picture bitmaps.
  • resolution is 1920*1400
  • the picture is cut into 60 small pictures.
  • a binary image is obtained, and the small picture is divided according to the edge point density in the binary image.
  • the area where the edge point density is less than the preset density threshold is divided into a small picture, and the edge point density is greater than the pre-
  • the area where the density threshold is set is divided into a small picture.
  • the size of each small picture can be set to be the same or different.
  • a unit area may be set, and the unit area may be a rectangle of a preset size, typically a square, and the first picture is evenly divided into a plurality of small pictures by a unit area, and the edge point density of each unit area is calculated.
  • An area including a plurality of connected edge points having a density less than a preset density threshold merges the plurality of areas into a rectangular area as a small picture, if a rectangular area includes a plurality of connected edge points having a density greater than The area of the preset density threshold combines the multiple areas into one rectangular area as a small picture.
  • Step S1002 determining the pixel quality of each of the cut bitmaps, that is, detecting the comprehensive quality of various aspects such as sharpness, contrast, color shift, signal to noise ratio, and number of dead points;
  • Determining the pixel quality of each bitmap in the plurality of bitmaps includes: performing at least one of the following operations on each bitmap and calculating a pixel quality of each bitmap according to the operation result: a pixel brightness value of the statistical bitmap, The edge contour value of the statistical bitmap, the gray average of the statistical bitmap, the gray variance of the statistical bitmap, and the gray histogram of the statistical bitmap.
  • the pixel luminance values of the divided picture bitmaps are counted, and the edge contour values of the bitmaps transmitted in step S1002 are statistically recorded. And statistically divide the grayscale average and grayscale variance of each picture bitmap.
  • the preferred embodiment of the present invention utilizes a grayscale histogram function in conjunction with the pixel luminance value and the edge contour value to determine the picture bitmap local seek quality threshold preferably 5%.
  • Step S1003 if the pixel quality of the cut small bitmap is lower than the threshold of 5%, determine which lossy compression encoding algorithm is suitable for each pixel of the cut small bitmap;
  • Lossy compression is to reduce the redundancy of picture pixel correlation, and use the coding method to remove these redundancy, which is used to reduce redundant compressed data. That is, for the divided bitmap, between the adjacent pixels of the same row of the picture, the corresponding pixels of the adjacent frames of the moving picture have a relatively strong correlation between the adjacent pixels, and the correlation is taken out or reduced. Is to remove or reduce the picture bitmap information The redundancy in the middle thus achieves lossy compression of the segmented bitmap pixels.
  • Step S1004 selecting an optimal lossy compression coding algorithm, performing lossy compression on each of the cut small bitmap pixels;
  • the lossy compression algorithm includes, but is not limited to, one of model coding, fractal coding, discrete cosine transform coding, or any combination thereof.
  • Each compression algorithm has its own characteristics and is suitable for images in different formats. For example, for a quality threshold higher than 5%, the color richness is high, and it is suitable to be processed by a lossy algorithm.
  • the lossy compression of the picture will lose some information, but because of the high quality of the bitmap, the color richness is high, all the lost information will not affect the user's vision, and the compression ratio is low.
  • the lossy compression algorithm is based on Discrete Cosine Transform (DCT). In other embodiments, any other algorithm that can implement lossy compression may be used. An enumeration.
  • Step S1005 If the pixel quality of the small bitmap after the cutting is less than the threshold value of 5%, it is determined whether the pixel of each of the cut small bitmaps is suitable for which lossless compression encoding algorithm is used;
  • Lossless coding utilizes the statistical properties of the source to remove the intrinsic correlation and change the non-uniformity of the probability distribution, thereby realizing the compression of image information.
  • the lossless compression accuracy is high. Due to the statistical probability based method and the dictionary-based technology, the image is lost with less information when recompressing, and thus has higher precision.
  • the compression ratio of lossless compression is small, that is, the connection between the pixels of the picture is almost completely preserved, and the image is more accurate, so the compression ratio is small and the space is large; the lossless compression is reversible without losing the original information content.
  • Step S1006 selecting an optimal lossless compression coding algorithm, performing lossless compression on each of the cut small bitmap pixels;
  • the lossless compression algorithm includes, but is not limited to, one of the integer wavelet fast SPIHT lossless compression algorithm SSPIHT (Speed SPIHT), the improved adaptive run length coding, the improved binary (bit level) lossless image compression method, or any combination thereof.
  • SSPIHT Speed SPIHT
  • the bit plane coding method is introduced to optimize the SPIHT algorithm to improve the compression ratio and compression speed.
  • Step S1007 finding a global optimal bitmap suture according to the algorithm, and compressing the bitmap image after the splicing and dividing;
  • the global optimal suture is found after the cutting is completed by using step S1001, and then the final synthesis is realized by Poisson fusion technology.
  • the weight calculation method based on the gradient direction histogram statistics is performed by calculating the gradient direction histogram of each pixel region of the bitmap after compression, and then combining the gradient intensity and direction of the pixel points to perform weight calculation, thereby improving Based on the instability of the weight calculation method of color intensity or gradient strength, a better graph cutting suture search is completed.
  • the Poisson fusion method combined with overlapping transitions is divided into two unknown regions by overlapping regions, and the smoothing is defined respectively. The transitioned boundary values are used to implement the processing of image differences.
  • step S1007 in order to enable the second picture to be successfully decoded and displayed, stitching the compressed bitmap into the second picture includes: writing size information of each bitmap in the header file of the second picture, The location information in the first picture and the compression coding algorithm information used. According to the header file in the second picture, the first picture can be obtained and displayed normally.
  • Step S1008 storing a compressed new picture
  • step S1009 the compressed new picture is output.
  • the method provided by the preferred embodiment of the present invention can determine the quality bitmap quality threshold for the small bitmap pixels after the picture segmentation, thereby intelligently determining whether it belongs to lossy compression or lossless compression, and then selecting corresponding The compression algorithm, the number of different pixels reflects the richness of the color of the picture, and then splicing the compressed picture small bitmap to complete the uniform splicing of the picture color distribution, thereby ensuring effective compression of each bitmap pixel of the cut picture. Stitching ensures the high quality effect of the picture after cutting and compressing.
  • a preferred embodiment of the present invention also provides an apparatus for cutting a compression stitching algorithm based on a picture bitmap.
  • 4 is a schematic structural diagram of an apparatus for cutting a compression splicing algorithm based on a picture bitmap according to a preferred embodiment of the present invention. As shown in FIG. 4, the apparatus includes:
  • a picture cutting device 4001 configured to cut an original picture and cut into a plurality of bitmaps of different sizes according to an edge detection method
  • the picture quality analysis device 4002 is configured to determine the bitmap after cutting, determine the pixel quality of each cut bitmap and compare the threshold value by 5%, and select an appropriate compression algorithm for different bitmaps according to the comparison result;
  • the picture compression device 4003 includes a lossy compression unit 40031 for lossy compression of the post-cut bitmap, and a lossless compression unit 40032 for lossless compression of the post-cut bitmap, wherein:
  • the pixel quality of the small bitmap after cutting is less than 5% of the threshold, determine which lossy compression coding algorithm is suitable for each pixel of the small bitmap after cutting, and then select the optimal lossy compression coding algorithm for each After cutting, the small bitmap pixels are subjected to lossy compression;
  • the pixel quality of the small bitmap after cutting is lower than the threshold value of 5%, it is determined whether the pixel of each small bitmap after cutting is suitable for which lossless compression encoding algorithm, and then the optimal lossless compression encoding algorithm is selected, for each After cutting, the small bitmap pixels are subjected to lossless compression;
  • the picture splicing device 4004 is configured to perform global optimal bitmap stitching and splicing on the cut and compressed plurality of bitmaps to complete splicing a new picture.
  • the picture cutting device 4001 obtains a divided picture realized by edge accumulation of different areas in the image. Among them, the edge is the most basic feature of the picture, which is the result of the discontinuity or mutation of the local features of the picture. Therefore, next, the picture cutting device 4001 uses the extreme value of the first derivative of the picture or the zero point information of the second derivative to provide the basic basis of the edge point for processing the mutation of the gray value, the color and the texture, and is used for constructing The difference operator sensitive to the gray level step change of the image is used to perform image bitmap segmentation.
  • the local image function based method and the multi-scale method and the boundary curve fitting method are adopted in the present invention, and the first-order differential operator is utilized: Robert algorithm, Sobel algorithm and second-order differential operator: Laplace algorithm and Kirsh realize the segmentation of picture bitmap.
  • the picture quality analysis device 4002 determines the quality of each of the cut bitmap pixels, wherein:
  • the picture quality analysis device 4002 counts the pixel brightness values of the divided picture bitmaps, and statistically records the edge contour values of the bitmaps transmitted from the picture cutting device 4001. And the picture quality analysis device 4002 counts the gray average value and the gray scale variance of each picture bitmap after the division.
  • the picture quality analysis device 4002 calculates a function of the bitmap gray histogram, that is, the number of pixels having the gray level in the picture, reflecting the frequency of occurrence of different gray levels in the picture bitmap; for checking whether the picture is rationally utilized All allowed gray level ranges, and selecting boundary thresholds and calculating integrated optical density; the picture quality analysis device 4002 uses the gray histogram function to combine the pixel brightness values and the edge contour values to comprehensively determine the picture bitmap local search quality threshold 5%.
  • the picture compression device 4003 processes the picture using lossy compression.
  • lossy compression is to reduce the redundancy of picture pixel correlation, and use the coding method to delete these redundancy, which is used to reduce redundant compressed data. That is, for the divided bitmap, between the adjacent pixels of the same row of the picture, the corresponding pixels of the adjacent frames of the moving picture have a relatively strong correlation between the adjacent pixels, and the correlation is taken out or reduced. It is to remove or reduce the redundancy in the picture bitmap information to achieve lossy compression of the segmented bitmap pixels.
  • Lossless compression algorithms include, but are not limited to, one of model based coding, fractal coding, discrete cosine transform coding, or any combination thereof. Each compression algorithm has its own characteristics and is suitable for images in different formats.
  • the lossy compression algorithm is based on Discrete Cosine Transform (DCT). In other embodiments, any other algorithm that can implement lossy compression may be used. .
  • the picture compression device 4003 employs a lossless compression coding algorithm.
  • Lossless coding utilizes the statistical properties of the source to remove the intrinsic correlation and change the non-uniformity of the probability distribution, thereby realizing the compression of image information.
  • the lossless compression accuracy is high. Due to the statistical probability based method and the dictionary-based technology, the image is lost with less information when recompressing, and thus has higher precision.
  • the compression ratio of the lossless compression of the picture compression device 4003 is small, that is, the connection between the picture pixels is almost completely preserved, so that the image is more accurate, so the compression ratio is smaller and the space is larger; the lossless compression of the device is reversible. Without losing the original information content.
  • the integer wavelet fast SPIHT lossless compression algorithm SSPIHT Speed SPIHT
  • any other algorithm that can implement lossless compression may also be used, and will not be enumerated here.
  • the picture splicing device 4004 is configured to perform global optimal bitmap stitching and splicing on the cut and compressed plurality of bitmaps to complete splicing a new picture.
  • the Poisson fusion method using overlapping transitions is used to implement image fusion processing after graph cutting. By dividing each overlapping area into two adjacent unknown areas, the pixel intensity of the adjacent sides takes the average unknown pixel intensity on the two source pictures, and the pixel intensity of the side opposite the adjacent side is Take only the pixel intensity on one image to achieve an overlapping transition. The unknown region is divided and then merged, the Poisson fusion parameters are initialized, and the unknown region is Poisson fusion solution, and finally the fusion transition is completed.
  • the device device can compress and compress the spliced content according to the picture, and select corresponding points. Cut, compress, and splicing algorithms to efficiently perform compression and maintain high fidelity of the image.
  • the original image is cut into a plurality of bitmaps of different sizes according to the edge detection method, and then the quality of each cut bitmap pixel is judged, and the gray level histogram function is used to combine the pixel brightness value and the edge contour value to comprehensively determine the picture position.
  • the map seeks the quality threshold, and finally adopts the Poisson fusion method of overlapping transition to realize the image fusion processing after the graph cut. Therefore, based on the three methods, the accuracy of the selection and splicing of the image cutting compression algorithm is ensured, thereby ensuring the processed image has a good access effect.
  • bitmap segmentation is performed according to the size of the picture, and after determining the pixel quality of each bitmap, it is accurately determined that each of the cut small bitmap pixels adopts appropriate compression.
  • the algorithm can ensure different images adopt different suitable algorithms to achieve high fidelity effect of the image; in addition, the post-cutting compression algorithm selects the optimal lossy compression or lossless compression according to the pixel quality judgment of the divided image, and selects different compressions.
  • the algorithm is based on the pixel quality of the small picture bitmap after cutting. The number of different pixels reflects the richness of the picture color, and then the compressed picture small bitmap is spliced to complete the uniform splicing of the picture color distribution. Based on these three aspects, the image content is accurately optimized, and the precise compression and optimization of the compression algorithm and the optimization of the splicing algorithm ensure that the image after cutting and splicing achieves a high quality user experience.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the invention can accurately optimize the picture content, and selects the compression algorithm and optimizes the splicing algorithm by precise cutting, thereby ensuring the quality of the user experience after cutting and splicing the picture.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Algebra (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Provided are a picture compression method and apparatus. The method comprises: acquiring a first picture; cutting the first picture into a plurality of bitmaps; determining a compression coding algorithm for each of the plurality of bitmaps; using the determined compression coding algorithm to compress a corresponding bitmap; and splicing compressed bitmaps into a second picture. By means of the present invention, the problems of low compression ratio and picture distortion caused by compressing a picture using a single compression algorithm are solved, the compression ratio of a picture is increased, and the distortion of picture compression is reduced.

Description

图片压缩方法和装置Picture compression method and device
本申请要求在2016年5月5日提交中国专利局、申请号为201610293137.X、发明名称为“图片压缩方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application, filed on May 5, 2016, which is hereby incorporated by reference. .
技术领域Technical field
本发明涉及图片压缩领域,具体而言,涉及一种图片压缩方法和装置。The present invention relates to the field of picture compression, and in particular to a picture compression method and apparatus.
背景技术Background technique
“互联网+”时代企业通过网站向其用户传递信息,多样化的终端需要传递接收网站各类图片,常见的需求包括:用户通过个人计算机(Personal Computer,简称为PC)端浏览器、手机浏览器访问图片,通过平板电脑(PAD)或者手机应用程序(APP)访问图片,通过手机上传或下载图片,通过即时通信软件接收或传递各类图片等等。一般情况下,图片数据量都比较大,为了达到节省传递的带宽流量、存储的空间以及缩短图片处理时间的目的,需要在发送以及接收前对图片进行压缩处理或压缩编码。In the "Internet +" era, enterprises transmit information to their users through the website. Diversified terminals need to transmit and receive various types of pictures on the website. Common requirements include: users through personal computers (Personal Computer, PC for short) browsers, mobile browsers Access images, access images via a tablet (PAD) or mobile app (APP), upload or download images via mobile phone, receive or transfer images via instant messaging software, and more. In general, the amount of image data is relatively large. In order to save bandwidth traffic, storage space, and shorten image processing time, it is necessary to compress or compress the image before sending and receiving.
目前,数字图像处理技术领域,通常对图片的编码和压缩的目的就是对图片数据按照一定的规则进行变换与组合,从而达到用尽量少的代码符号来表示尽量多的图像信息。当前,对图像压缩的方法主要包括有损压缩和无损压缩。At present, in the field of digital image processing technology, the purpose of encoding and compressing pictures is usually to transform and combine picture data according to certain rules, so as to represent as much image information as possible with as few code symbols as possible. Currently, methods for image compression mainly include lossy compression and lossless compression.
其中,有损压缩通过保持颜色的逐渐变化,删除图像中颜色的突然变化部分,就是利用人类大脑会采用与附近最接近的颜色来填补所失去的颜色特点。有损压缩的压缩率相对于无损压缩较高,可以用于满足存储和传递需求;但是有损压缩技术会影响图片质量,在恢复原始数据时或多或少会存在一些失真。Among them, lossy compression removes the sudden change of color in the image, and deletes the sudden change of color in the image, that is, the human brain will use the closest color to the nearby to fill the lost color characteristics. The compression ratio of lossy compression is higher than that of lossless compression and can be used to satisfy storage and delivery requirements; however, lossy compression techniques can affect picture quality, and there will be more or less distortion when restoring original data.
而无损压缩利用设计冗余删除重复数据进行压缩,用以减少在磁盘上保存的图片尺寸。无损压缩不会引起任何失真可以完全恢复原始数据;但是压缩率会受到数据统计冗余度的限制。图片的有损压缩和无损压缩适用于不同类型的图片。有损压缩适合色彩多变分布均匀的图片,压缩后的图片一般失真较高和压缩率较高;无损压缩适合色彩相对简单的图片,压缩后的图片一般具有高保 真度和较低压缩率。Lossless compression uses design redundancy to remove duplicate data for compression to reduce the size of images saved on disk. Lossless compression does not cause any distortion to fully recover the original data; however, the compression ratio is limited by the statistical redundancy of the data. The lossy compression and lossless compression of the image apply to different types of images. Lossy compression is suitable for pictures with uniform color distribution. The compressed picture generally has higher distortion and higher compression ratio; lossless compression is suitable for pictures with relatively simple color, and the compressed picture generally has high security. Trueness and lower compression ratio.
在现阶段数字图像处理技术中,客户端软件产品针对图片进行压缩时,通常根据传统压缩算法,针对任何图片内容形式,均采用一种压缩算法进行压缩。很明显,单一算法无法适应所有图片;单一质量无法针对图片每个位图像素部分进行处理。即便按照已有的压缩技术实现图片压缩,也只是获得低压缩率、失真的图片,从而影响到用户的体验感受。In the current digital image processing technology, when the client software product compresses the picture, it usually adopts a compression algorithm for compression according to the traditional compression algorithm for any picture content form. Obviously, a single algorithm cannot accommodate all images; a single quality cannot handle the pixel portion of each bitmap of the image. Even if the image compression is implemented according to the existing compression technology, only a picture with low compression ratio and distortion is obtained, thereby affecting the user experience.
针对使用单一压缩算法压缩图片导致的压缩率低、图片失真的问题,相关技术中尚未给出有效的解决方案。An effective solution has not been given in the related art for the problem of low compression rate and picture distortion caused by compressing pictures using a single compression algorithm.
发明内容Summary of the invention
本发明提供了一种图片压缩方法和装置,以至少解决上述问题。The present invention provides a picture compression method and apparatus to solve at least the above problems.
根据本发明的一个方面,提供了一种图片压缩方法,包括:获取第一图片;将所述第一图片切割成多张位图;确定所述多张位图中每张位图的压缩编码算法;采用确定的压缩编码算法压缩对应的位图;将压缩后的位图拼接成第二图片。According to an aspect of the present invention, a picture compression method is provided, including: acquiring a first picture; cutting the first picture into a plurality of bitmaps; and determining compression coding of each bitmap in the plurality of bitmaps The algorithm compresses the corresponding bitmap by using a determined compression coding algorithm; and splices the compressed bitmap into a second picture.
可选地,确定所述多张位图中每张位图的压缩编码算法包括:确定所述多张位图中每张位图的像素质量;根据所述像素质量,选择每张位图的压缩编码算法。Optionally, determining a compression coding algorithm for each bitmap in the plurality of bitmaps includes: determining pixel quality of each bitmap in the plurality of bitmaps; and selecting each bitmap according to the pixel quality Compression coding algorithm.
可选地,根据所述像素质量,选择每张位图的压缩编码算法包括:判断所述多张位图中的每一位图的像素质量是否小于预定阈值;在判断结果为是的情况下,在第一压缩编码算法集合中选择所述位图的所述压缩编码算法;否则,在第二压缩编码算法集合中选择所述位图的所述压缩编码算法。Optionally, according to the pixel quality, selecting a compression coding algorithm for each bitmap includes: determining whether a pixel quality of each bitmap in the plurality of bitmaps is less than a predetermined threshold; and if the determination result is yes Selecting the compression encoding algorithm of the bitmap in a first set of compression encoding algorithms; otherwise, selecting the compression encoding algorithm of the bitmap in a second set of compression encoding algorithms.
可选地,所述第一压缩编码算法集合为有损压缩编码算法集合;所述第二压缩编码算法集合为无损压缩编码算法集合。Optionally, the first compression coding algorithm set is a lossy compression coding algorithm set; and the second compression coding algorithm set is a lossless compression coding algorithm set.
可选地,所述有损压缩编码算法集合包括以下至少之一:基于模型编码算法、分形编码算法、离散余弦变换编码算法;所述无损压缩编码算法集合包括以下至少之一:整数小波快速多级树集合分裂无损压缩算法SSPIHT、改进自适应游程编码算法、改进二进制位级编码算法。Optionally, the set of lossy compression coding algorithms includes at least one of the following: a model coding algorithm, a fractal coding algorithm, and a discrete cosine transform coding algorithm; the lossless compression coding algorithm set includes at least one of the following: integer wavelet fast The hierarchical tree set splitting lossless compression algorithm SSPIHT, the improved adaptive run length coding algorithm, and the improved binary bit level coding algorithm.
可选地,将所述第一图片切割成多张位图包括:按照边缘检测方法将所述 第一图片切割成所述多张位图。Optionally, cutting the first picture into a plurality of bitmaps includes: following the edge detection method The first picture is cut into the plurality of bitmaps.
可选地,在将压缩后的所述多张位图拼接成所述第二图片之后,所述方法还包括:储存所述第二图片;和/或输出所述第二图片。Optionally, after the compressed multiple bitmaps are spliced into the second picture, the method further includes: storing the second picture; and/or outputting the second picture.
根据本发明的另一个方面,还提供了一种图片压缩装置,包括:获取模块,用于获取第一图片;切割模块,用于将所述第一图片切割成多张位图;确定模块,用于确定所述多张位图中每张位图的压缩编码算法;压缩模块,用于采用确定的压缩编码算法压缩对应的位图;拼接模块,用于将压缩后的所述多张位图拼接成第二图片。According to another aspect of the present invention, a picture compression apparatus is provided, including: an obtaining module, configured to acquire a first picture; a cutting module, configured to cut the first picture into a plurality of bitmaps; and a determining module, a compression coding algorithm for determining each bitmap in the plurality of bitmaps; a compression module, configured to compress a corresponding bitmap by using a determined compression coding algorithm; and a splicing module, configured to: compress the plurality of bits The picture is stitched into a second picture.
可选地,所述确定模块包括:确定单元,用于确定所述多张位图中每张位图的像素质量;选择单元,用于根据所述像素质量,选择每张位图的压缩编码算法。Optionally, the determining module includes: a determining unit, configured to determine a pixel quality of each bitmap in the multiple bitmaps; and a selecting unit, configured to select compression coding of each bitmap according to the pixel quality algorithm.
可选地,所述选择单元包括:判断子单元,用于判断所述多张位图中的每一位图的所述像素质量是否小于预定阈值;选择子单元,用于在判断结果为是的情况下,在第一压缩编码算法集合中选择所述位图的所述压缩编码算法;否则,在第二压缩编码算法集合中选择所述位图的所述压缩编码算法。Optionally, the selecting unit includes: a determining subunit, configured to determine whether the pixel quality of each bitmap in the multiple bitmaps is less than a predetermined threshold; and selecting a subunit for determining that the result is In the case of the first compression coding algorithm set, the compression coding algorithm of the bitmap is selected; otherwise, the compression coding algorithm of the bitmap is selected in the second compression coding algorithm set.
通过本发明,采用获取第一图片;将第一图片切割成多张位图;确定多张位图中每张位图的压缩编码算法;采用确定的压缩编码算法压缩对应的位图的方式,解决了使用单一压缩算法压缩图片导致的压缩率低、图片失真的问题,提高了图片的压缩率,减小了图片压缩的失真。According to the present invention, a method of acquiring a first picture, cutting a first picture into a plurality of bitmaps, determining a compression coding algorithm for each bitmap in the plurality of bitmaps, and compressing the corresponding bitmap by using the determined compression coding algorithm is adopted. The invention solves the problem of low compression rate and picture distortion caused by compressing pictures by using a single compression algorithm, improves the compression ratio of the picture, and reduces the distortion of the picture compression.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的图片压缩方法的流程图;1 is a flowchart of a picture compression method according to an embodiment of the present invention;
图2是根据本发明实施例的图片压缩装置的结构示意图;2 is a schematic structural diagram of a picture compression apparatus according to an embodiment of the present invention;
图3是根据本发明优选实施例的基于图片位图切割压缩拼接算法的方法的流程图;3 is a flow chart of a method for cutting a compression stitching algorithm based on a picture bitmap according to a preferred embodiment of the present invention;
图4是根据本发明优选实施例的基于图片位图切割压缩拼接算法的设备的 结构示意图。4 is a diagram of an apparatus for cutting a compression stitching algorithm based on a picture bitmap according to a preferred embodiment of the present invention. Schematic.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
在本实施例中提供了一种图片压缩方法,图1是根据本发明实施例的图片压缩方法的流程图,如图1所示,该流程包括如下步骤:A picture compression method is provided in this embodiment. FIG. 1 is a flowchart of a picture compression method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
步骤S101,获取第一图片;Step S101, acquiring a first picture;
步骤S102,将第一图片切割成多张位图;Step S102, cutting the first picture into a plurality of bitmaps;
步骤S103,确定多张位图中每张位图的压缩编码算法;Step S103, determining a compression coding algorithm for each bitmap in the plurality of bitmaps;
步骤S104,采用确定的压缩编码算法压缩对应的位图;Step S104, compressing the corresponding bitmap by using a determined compression coding algorithm;
步骤S105,将压缩编码后的多张位图拼接成第二图片。Step S105, the compressed and encoded plurality of bitmaps are spliced into a second picture.
通过上述步骤,将第一图片切割成多张位图后,再对切割得到的多张位图分别进行压缩编码,并对第一图片的不同切割部分采用不同的压缩编码算法;由于压缩后的图片其图片尺寸并不会变化,因此,最后可以再将多张位图重新拼接,从而可以得到各个部分采用不同压缩编码算法进行压缩的第二图片。可见,通过上述步骤,解决了使用单一压缩算法压缩图片导致的压缩率低、图片失真的问题,提高了图片的压缩率,减小了图片压缩的失真。After the first picture is cut into multiple bitmaps, the multiple bitmaps obtained by the cutting are respectively compression-encoded, and different compression coding algorithms are used for different cutting parts of the first picture; The picture size of the picture does not change. Therefore, multiple bitmaps can be re-spliced at the end, so that the second picture compressed by different compression coding algorithms can be obtained. It can be seen that through the above steps, the problem of low compression rate and picture distortion caused by compressing the picture by using a single compression algorithm is solved, the compression ratio of the picture is improved, and the distortion of the picture compression is reduced.
在步骤S103中,可以根据每张位图的像素质量确定压缩编码算法,例如:确定多张位图中每张位图的像素质量;根据像素质量,选择每张位图的压缩编码算法。其中,像素质量包括但不限于:清晰度、对比度、色偏、信噪比和死点个数等方面的综合量化指标。根据不同的像素质量选择压缩算法,使得不同的像素质量的切割部分可以采用不同的压缩编码算法,从而得到不同的压缩率和失真程度。In step S103, a compression coding algorithm may be determined according to the pixel quality of each bitmap, for example, determining the pixel quality of each bitmap in the plurality of bitmaps; and selecting a compression coding algorithm for each bitmap according to the pixel quality. Among them, the pixel quality includes but is not limited to: comprehensive quantitative indicators such as definition, contrast, color shift, signal to noise ratio and number of dead points. The compression algorithm is selected according to different pixel qualities, so that the cut portions of different pixel qualities can adopt different compression coding algorithms, thereby obtaining different compression ratios and distortion levels.
可选地,根据像素质量,选择每张位图的压缩编码算法可以采用下列方式:判断多张位图中的每一位图的像素质量是否小于预定阈值;在判断结果为是的情况下,在第一压缩编码算法集合中选择此位图的压缩编码算法;否则,在第 二压缩编码算法集合中选择此位图的压缩编码算法。将量化后的像素质量与预定阈值进行比较,并根据不同的比较结果在第一压缩编码算法集合或者第二压缩编码算法集合中选择相应的压缩编码算法,上述的预定阈值可以为5%。Optionally, according to the pixel quality, the compression coding algorithm for selecting each bitmap may adopt the following manner: determining whether the pixel quality of each bitmap in the multiple bitmaps is less than a predetermined threshold; if the determination result is yes, Selecting the compression coding algorithm of the bitmap in the first set of compression coding algorithms; otherwise, in the A compression coding algorithm that selects this bitmap in a set of two compression coding algorithms. Comparing the quantized pixel quality with a predetermined threshold, and selecting a corresponding compression coding algorithm in the first compression coding algorithm set or the second compression coding algorithm set according to different comparison results, the predetermined threshold may be 5%.
可选地,上述的第一压缩编码算法集合为有损压缩编码算法集合,包括但不限于:基于模型编码算法、分形编码算法、离散余弦变换编码算法。Optionally, the foregoing first compression coding algorithm set is a set of lossy compression coding algorithms, including but not limited to: a model coding algorithm, a fractal coding algorithm, and a discrete cosine transform coding algorithm.
可选地,上述的第二压缩编码算法集合为无损压缩编码算法集合,包括但不限于:整数小波快速多级树集合分裂无损压缩算法SSPIHT、改进自适应游程编码算法、改进二进制位级编码算法。Optionally, the foregoing second compression coding algorithm set is a lossless compression coding algorithm set, including but not limited to: integer wavelet fast multi-level tree set split lossless compression algorithm SSPIHT, improved adaptive run length coding algorithm, improved binary bit level coding algorithm .
可选地,在步骤S102中将第一图片切割成多张位图时,可以按照预定规则进行切割,例如,最简单的切割方式是进行几何切割,即将图片直接切割成等大或者不等大的多个几何图形。在本发明实施例中,较优地按照边缘检测方法将第一图片切割成多张位图。其中,边缘检测方法可以采用现有技术中披露的任一方法,在本发明实施例中并不加以限制。采用边缘检测方法切割第一图片,能够将第一图片中性质相似的部分切割到一张位图中,而将第一图片中性质差别较大的部分切割开来,有利于采用不同的压缩编码算法的压缩编码。Optionally, when the first picture is cut into multiple bitmaps in step S102, the cutting may be performed according to a predetermined rule. For example, the simplest cutting method is to perform geometric cutting, that is, the image is directly cut into equal or unequal Multiple geometric figures. In the embodiment of the present invention, the first picture is preferably cut into a plurality of bitmaps according to an edge detection method. The method for detecting the edge may be any one of the methods disclosed in the prior art, and is not limited in the embodiment of the present invention. The edge detection method is used to cut the first picture, and the similarly-shaped part of the first picture can be cut into a bitmap, and the part of the first picture with a large difference in nature is cut, which is advantageous for adopting different compression coding. Compression coding of the algorithm.
可选地,在将压缩后的多张位图拼接成第二图片之后,可以储存第二图片;和/或输出第二图片。Optionally, after the compressed multiple bitmaps are spliced into the second picture, the second picture may be stored; and/or the second picture is output.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods of various embodiments of the present invention.
在本实施例中还提供了一种图片压缩装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。 In the embodiment, a picture compression device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图2是根据本发明实施例的图片压缩装置的结构示意图,如图2所示,该图片压缩装置包括:获取模块20、切割模块22、确定模块24、压缩模块26和拼接模块28,其中,获取模块20,用于获取第一图片;切割模块22,耦合至获取模块20,用于将第一图片切割成多张位图;确定模块24,耦合至切割模块22,用于确定多张位图中每张位图的压缩编码算法;压缩模块26,耦合至确定模块24,用于采用确定的压缩编码算法压缩对应的位图;拼接模块28,耦合至压缩模块26,用于将压缩后的多张位图拼接成第二图片。2 is a schematic structural diagram of a picture compression apparatus according to an embodiment of the present invention. As shown in FIG. 2, the picture compression apparatus includes: an acquisition module 20, a cutting module 22, a determination module 24, a compression module 26, and a splicing module 28, where The obtaining module 20 is configured to acquire a first picture; the cutting module 22 is coupled to the obtaining module 20 for cutting the first picture into a plurality of bitmaps; the determining module 24 is coupled to the cutting module 22 for determining a plurality of positions a compression coding algorithm for each bitmap in the figure; a compression module 26 coupled to the determination module 24 for compressing the corresponding bitmap using the determined compression coding algorithm; a splicing module 28 coupled to the compression module 26 for compressing Multiple bitmaps are stitched into a second picture.
可选地,确定模块24包括:确定单元,用于确定多张位图中每张位图的像素质量;选择单元,耦合至确定单元,用于根据像素质量,选择每张位图的压缩编码算法。Optionally, the determining module 24 includes: a determining unit, configured to determine a pixel quality of each bitmap in the plurality of bitmaps; and a selecting unit coupled to the determining unit, configured to select a compression encoding of each bitmap according to the pixel quality algorithm.
可选地,选择单元包括:判断子单元,用于判断多张位图中的每一位图的像素质量是否小于预定阈值;选择子单元,耦合至判断子单元,用于在判断结果为是的情况下,在第一压缩编码算法集合中选择此位图的压缩编码算法;否则,在第二压缩编码算法集合中选择此位图的压缩编码算法。Optionally, the selecting unit includes: a determining subunit, configured to determine whether a pixel quality of each bitmap in the plurality of bitmaps is less than a predetermined threshold; and selecting a subunit, coupled to the determining subunit, for determining that the result is In the case of the first compression coding algorithm set, the compression coding algorithm of the bitmap is selected; otherwise, the compression coding algorithm of the bitmap is selected in the second compression coding algorithm set.
可选地,第一压缩编码算法集合为有损压缩编码算法集合;第二压缩编码算法集合为无损压缩编码算法集合。Optionally, the first compression coding algorithm set is a lossy compression coding algorithm set; the second compression coding algorithm set is a lossless compression coding algorithm set.
可选地,有损压缩编码算法集合包括但不限于以下至少之一:基于模型编码算法、分形编码算法、离散余弦变换编码算法;无损压缩编码算法集合包括但不限于以下至少之一:整数小波快速多级树集合分裂无损压缩算法SSPIHT、改进自适应游程编码算法、改进二进制位级编码算法。Optionally, the set of lossy compression coding algorithms includes, but is not limited to, at least one of the following: a model coding algorithm, a fractal coding algorithm, and a discrete cosine transform coding algorithm; the lossless compression coding algorithm set includes but is not limited to at least one of the following: integer wavelet Fast multi-level tree set splitting lossless compression algorithm SSPIHT, improved adaptive run length coding algorithm, improved binary bit level coding algorithm.
可选地,切割模块22,用于按照边缘检测方法将第一图片切割成多张位图。Optionally, the cutting module 22 is configured to cut the first picture into a plurality of bitmaps according to an edge detection method.
可选地,装置还可以:储存模块,耦合至拼接模块28,用于储存第二图片;和/或输出模块,耦合至储存拼接模块28或者储存模块,用于输出第二图片。Optionally, the device may further include: a storage module coupled to the splicing module 28 for storing the second picture; and/or an output module coupled to the storage splicing module 28 or the storage module for outputting the second picture.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块分别位于多个处理器中。It should be noted that each of the above modules may be implemented by software or hardware. For the latter, the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are located in multiple In the processor.
本发明的实施例还提供了一种软件,该软件用于执行上述实施例及优选实施方式中描述的技术方案。Embodiments of the present invention also provide a software for performing the technical solutions described in the above embodiments and preferred embodiments.
本发明的实施例还提供了一种存储介质。在本实施例中,上述存储介质可 以被设置为存储用于执行以下步骤的程序代码:Embodiments of the present invention also provide a storage medium. In this embodiment, the foregoing storage medium may be Program code that is set to store for performing the following steps:
步骤S101,获取第一图片;Step S101, acquiring a first picture;
步骤S102,将第一图片切割成多张位图;Step S102, cutting the first picture into a plurality of bitmaps;
步骤S103,确定多张位图中每张位图的压缩编码算法;Step S103, determining a compression coding algorithm for each bitmap in the plurality of bitmaps;
步骤S104,采用确定的压缩编码算法压缩对应的位图;Step S104, compressing the corresponding bitmap by using a determined compression coding algorithm;
步骤S105,将压缩编码后的多张位图拼接成第二图片。Step S105, the compressed and encoded plurality of bitmaps are spliced into a second picture.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in the embodiment, the foregoing storage medium may include, but is not limited to, a USB flash drive, a Read-Only Memory (ROM), and a Random Access Memory (RAM). A variety of media that can store program code, such as a hard disk, a disk, or an optical disk.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
为了使本发明实施例的描述更加清楚,下面结合优选实施例进行描述和说明。In order to make the description of the embodiments of the present invention more clear, the following description and description are given in conjunction with the preferred embodiments.
本发明优选实施例的目的是提供一种基于图片位图切割压缩拼接算法的方法和设备,根据图片位图大小切割,判断位图像素质量后,智能地选择合适的压缩算法,再完成压缩后的图片拼接,有效的实现图片高保真压缩。The object of the preferred embodiment of the present invention is to provide a method and a device for cutting and compressing a stitching algorithm based on a picture bitmap, and according to the size of the picture bitmap, after determining the pixel quality of the bitmap, intelligently selecting an appropriate compression algorithm, and then performing the compression. The picture is stitched together to effectively implement high fidelity compression of the picture.
本发明优选实施例提供了一种基于图片位图切割压缩拼接算法的方法。图3是根据本发明优选实施例的基于图片位图切割压缩拼接算法的方法的流程图,如图3所示,该方法包括如下步骤:A preferred embodiment of the present invention provides a method for cutting a compression stitching algorithm based on a picture bitmap. 3 is a flow chart of a method for cutting a compression stitching algorithm based on a picture bitmap according to a preferred embodiment of the present invention. As shown in FIG. 3, the method includes the following steps:
步骤S1001,录入原始图片,确定原始图片大小,将原始图片按照边缘检测方法切割为多张不同大小的位图;Step S1001: input the original picture, determine the original picture size, and cut the original picture into multiple bitmaps of different sizes according to the edge detection method;
可选地,通过检测图像中不同区域的边缘累实现的分割图片。边缘是图片的最基本的特征,它是图片局部特征不连续或者突变的结果。利用图片一阶导数的极值或二阶导数的零点信息来提供边缘点的基本依据,用于处理灰度值、颜色和纹理方面的突变;用于构造对图像灰度阶跃变化敏感的差分算子来进行图片位图分割,本发明优选实施例采用基于局部图片函数的方法和多尺度方法和基于边界曲线拟合方法,利用一阶微分算子:Robert算法、Sobel算法和二阶微分算子:Laplace算法和Kirsh实现图片位图的分割。例如:分辨率为1920*1400 的图片切割为60张小图片。对第一图片进行边缘检测后获得二值图,根据二值图中的边缘点密度划分小图片,例如将边缘点密度小于预设密度阈值的区域划分为一个小图片,将边缘点密度大于预设密度阈值的区域划分为一个小图片。各小图片的尺寸可以设置为相同,也可以设置不同。本方法中可以设置单位区域,此单位区域可以是预设尺寸的矩形,典型的为正方形,以单位区域将第一图片均匀划分为多个小图片,计算每个单位区域的边缘点密度,如果一个矩形区域内包括多个连通的边缘点密度均小于预设密度阈值的区域将此多个区域合并为一个矩形区域作为一个小图片,如果一个矩形区域内包括多个连通的边缘点密度均大于预设密度阈值的区域将此多个区域合并为一个矩形区域作为一个小图片。Optionally, the segmentation picture is implemented by detecting edge edges of different regions in the image. The edge is the most basic feature of the picture, which is the result of discontinuity or mutation of the local features of the picture. The zero point information of the extreme or second derivative of the first derivative of the picture is used to provide the basic basis of the edge point for processing the gray value, color and texture mutation; for constructing the difference sensitive to the gray step change of the image The operator performs picture bitmap segmentation. The preferred embodiment of the present invention adopts a local picture function based method and a multi-scale method and a boundary curve fitting method, and utilizes a first order differential operator: a Robert algorithm, a Sobel algorithm, and a second order differential calculation. Sub: Laplace algorithm and Kirsh implement the segmentation of picture bitmaps. For example: resolution is 1920*1400 The picture is cut into 60 small pictures. After performing edge detection on the first picture, a binary image is obtained, and the small picture is divided according to the edge point density in the binary image. For example, the area where the edge point density is less than the preset density threshold is divided into a small picture, and the edge point density is greater than the pre- The area where the density threshold is set is divided into a small picture. The size of each small picture can be set to be the same or different. In the method, a unit area may be set, and the unit area may be a rectangle of a preset size, typically a square, and the first picture is evenly divided into a plurality of small pictures by a unit area, and the edge point density of each unit area is calculated. An area including a plurality of connected edge points having a density less than a preset density threshold merges the plurality of areas into a rectangular area as a small picture, if a rectangular area includes a plurality of connected edge points having a density greater than The area of the preset density threshold combines the multiple areas into one rectangular area as a small picture.
步骤S1002,对每个切割后的位图像素质量进行判断,即为检测清晰度、对比度、色偏、信噪比和死点个数多方面的综合质量;Step S1002, determining the pixel quality of each of the cut bitmaps, that is, detecting the comprehensive quality of various aspects such as sharpness, contrast, color shift, signal to noise ratio, and number of dead points;
可选地,对每个切割后的位图像素质量进行判断。确定所述多张位图中每张位图的像素质量包括:对每张位图进行以下运算中的至少一个并根据运算结果计算每张位图的像素质量:统计位图的像素亮度值、统计位图的边缘轮廓值、统计位图的灰度平均值、统计位图的灰度方差、统计位图的灰度直方图的函数。本发明优选实施例将分割后的图片位图的像素亮度值进行统计,同时将步骤S1002中传递过来的位图的边缘轮廓值进行统计记录。并且统计分割后每个图片位图灰度平均值和灰度方差。计算位图灰度直方图的函数,即为图片中具有该灰度级的像素的个数,反映出图片位图中不同灰度的出现频率;用于检查图片是否合理利用全部被允许的灰度级范围;以及选择边界阈值和计算综合光密度;本发明优选实施例利用灰度直方图函数结合像素亮度值和边缘轮廓值综合判定图片位图局部寻优质量阈值优选为5%。Optionally, a determination is made as to the quality of each cut bitmap pixel. Determining the pixel quality of each bitmap in the plurality of bitmaps includes: performing at least one of the following operations on each bitmap and calculating a pixel quality of each bitmap according to the operation result: a pixel brightness value of the statistical bitmap, The edge contour value of the statistical bitmap, the gray average of the statistical bitmap, the gray variance of the statistical bitmap, and the gray histogram of the statistical bitmap. In a preferred embodiment of the present invention, the pixel luminance values of the divided picture bitmaps are counted, and the edge contour values of the bitmaps transmitted in step S1002 are statistically recorded. And statistically divide the grayscale average and grayscale variance of each picture bitmap. Calculate the function of the bitmap gray histogram, that is, the number of pixels with the gray level in the picture, reflecting the frequency of occurrence of different gray levels in the picture bitmap; used to check whether the picture is reasonable to use all the allowed gray The range of degrees; and the selection of the boundary threshold and the calculation of the integrated optical density; the preferred embodiment of the present invention utilizes a grayscale histogram function in conjunction with the pixel luminance value and the edge contour value to determine the picture bitmap local seek quality threshold preferably 5%.
步骤S1003,如果切割后的小位图像素质量是低于阈值5%,判断每个切割后的小位图的像素适合采用哪种有损压缩编码算法;Step S1003, if the pixel quality of the cut small bitmap is lower than the threshold of 5%, determine which lossy compression encoding algorithm is suitable for each pixel of the cut small bitmap;
对分析每个切割后小位图的像素质量是低于阈值5%,则判断适合采用哪种有损压缩编码算法。有损压缩就是将图片像素相关性的冗余度删减,利用编码方法删除这些冗余,用于达到减少冗余压缩数据。即针对分割后的位图,在图片同一行相邻像素之间,相邻像素之间,活动图片的相邻帧的对应像素之间均具有相对强的相关性,取出或减少这些相关性,就是去除或减少图片位图信息 中的冗余度从而实现对分割后位图像素的有损压缩。To analyze the pixel quality of each of the cut small bitmaps below the threshold of 5%, it is determined which lossy compression coding algorithm is suitable. Lossy compression is to reduce the redundancy of picture pixel correlation, and use the coding method to remove these redundancy, which is used to reduce redundant compressed data. That is, for the divided bitmap, between the adjacent pixels of the same row of the picture, the corresponding pixels of the adjacent frames of the moving picture have a relatively strong correlation between the adjacent pixels, and the correlation is taken out or reduced. Is to remove or reduce the picture bitmap information The redundancy in the middle thus achieves lossy compression of the segmented bitmap pixels.
步骤S1004,选择最优的有损压缩编码算法,针对每个切割后小位图像素进行有损压缩;Step S1004, selecting an optimal lossy compression coding algorithm, performing lossy compression on each of the cut small bitmap pixels;
其中,有损压缩的算法包括但不限于:基于模型编码、分形编码、离散余弦变换编码中的一种或其任意组合。每种压缩算法具有其自身的特点,适用于不同格式的图片。例如,对于质量阈值高于5%的,色彩丰富度高,适合采用有损算法进行处理。进行有损压缩后的图片会损失一些信息,但是由于位图质量高,色彩丰富度高,所有损失的信息不会对用户视觉造成影响,并且压缩率较低。本优选实施例中,有损压缩的算法为基于离散余弦变化编码(Discrete Cosine Transform,简称为DCT),在其他实施例中,还可以采用其他任何可以实现有损压缩的算法,这里不再一一列举。The lossy compression algorithm includes, but is not limited to, one of model coding, fractal coding, discrete cosine transform coding, or any combination thereof. Each compression algorithm has its own characteristics and is suitable for images in different formats. For example, for a quality threshold higher than 5%, the color richness is high, and it is suitable to be processed by a lossy algorithm. The lossy compression of the picture will lose some information, but because of the high quality of the bitmap, the color richness is high, all the lost information will not affect the user's vision, and the compression ratio is low. In the preferred embodiment, the lossy compression algorithm is based on Discrete Cosine Transform (DCT). In other embodiments, any other algorithm that can implement lossy compression may be used. An enumeration.
步骤S1005,如果切割后的小位图像素质量低于阈值5%为否,则判断每个切割后的小位图的像素适合采用哪种无损压缩编码算法;Step S1005: If the pixel quality of the small bitmap after the cutting is less than the threshold value of 5%, it is determined whether the pixel of each of the cut small bitmaps is suitable for which lossless compression encoding algorithm is used;
对分析每个切割后小位图的像素质量是低于阈值5%为否,则判断适合采用哪种无损压缩编码算法。无损编码利用信源统计特性,去除其内在相关性和改变概率分布的不均匀性,从而实现图像信息的压缩。无损压缩精确度高,由于基于统计概率的方法和基于字典的技术,使得图像再压缩时损失较少的信息,进而拥有较高的精确度。无损压缩的压缩比率小,即将图片像素之间的联系几乎完整的保留了下来,图像更精确,所以压缩比率较小,占用空间较大;无损压缩具有可逆性,不损失原信息内容。To analyze whether the pixel quality of each of the cut small bitmaps is below the threshold of 5%, then it is determined which lossless compression coding algorithm is suitable. Lossless coding utilizes the statistical properties of the source to remove the intrinsic correlation and change the non-uniformity of the probability distribution, thereby realizing the compression of image information. The lossless compression accuracy is high. Due to the statistical probability based method and the dictionary-based technology, the image is lost with less information when recompressing, and thus has higher precision. The compression ratio of lossless compression is small, that is, the connection between the pixels of the picture is almost completely preserved, and the image is more accurate, so the compression ratio is small and the space is large; the lossless compression is reversible without losing the original information content.
步骤S1006,选择最优的无损压缩编码算法,针对每个切割后小位图像素进行无损压缩;Step S1006, selecting an optimal lossless compression coding algorithm, performing lossless compression on each of the cut small bitmap pixels;
其中,无损压缩算法包括但不限于:整数小波快速SPIHT无损压缩算法SSPIHT(Speed SPIHT)、改进自适应游程编码、改进二进制(位级)无损图像压缩方法中的一种或其任意组合。例如,色彩丰富并且分布不均匀,适合采用整数小波快速SPIHT无损压缩算法SSPIHT(Speed SPIHT)对于质量阈值低于5%的位图图像操作,该方法结合整数小波变换分解,在阈值小于等于4时,针对不重要系数激增的问题,引入位平面编码方式对SPIHT算法进行优化,提升压缩率和压缩速度。 The lossless compression algorithm includes, but is not limited to, one of the integer wavelet fast SPIHT lossless compression algorithm SSPIHT (Speed SPIHT), the improved adaptive run length coding, the improved binary (bit level) lossless image compression method, or any combination thereof. For example, rich in color and uneven distribution, suitable for integer image wavelet fast SPIHT lossless compression algorithm SSPIHT (Speed SPIHT) for bitmap image operation with quality threshold less than 5%, this method combined with integer wavelet transform decomposition, when the threshold is less than or equal to 4 For the problem of the increase of unimportant coefficient, the bit plane coding method is introduced to optimize the SPIHT algorithm to improve the compression ratio and compression speed.
步骤S1007,根据算法找到全局最优的位图缝合线,完成拼接分割后压缩位图图片;Step S1007, finding a global optimal bitmap suture according to the algorithm, and compressing the bitmap image after the splicing and dividing;
可选地,基于位图切割的图片拼接,利用步骤S1001切割完成后找出一条全局最佳缝合线,然后利用泊松融合技术实现最终的合成。基于梯度方向直方图统计的权值计算方法,通过计算每个切割压缩后的位图像素点领域的梯度方向直方图,然后将像素点的梯度强度和方向结合再一起进行权值计算,从而改善基于色彩强度或梯度强度的权值计算方法的不稳定性,完成了较好的图切割缝合线搜索;结合重叠过渡的泊松融合方式,即通过重叠区划分成两个未知区域,分别定义实现平滑过渡过的边界值来实现图像差异的处理。Optionally, based on the bitmap splicing of the image, the global optimal suture is found after the cutting is completed by using step S1001, and then the final synthesis is realized by Poisson fusion technology. The weight calculation method based on the gradient direction histogram statistics is performed by calculating the gradient direction histogram of each pixel region of the bitmap after compression, and then combining the gradient intensity and direction of the pixel points to perform weight calculation, thereby improving Based on the instability of the weight calculation method of color intensity or gradient strength, a better graph cutting suture search is completed. The Poisson fusion method combined with overlapping transitions is divided into two unknown regions by overlapping regions, and the smoothing is defined respectively. The transitioned boundary values are used to implement the processing of image differences.
步骤S1007中,为了使第二图片能够顺利解码并显示,将压缩后的位图拼接成第二图片包括:在所述第二图片的头文件中写入每个位图的尺寸信息、在所述第一图片中的位置信息、采用的压缩编码算法信息。根据此第二图片中的头文件进行解码便可以得到第一图片,并正常显示。In step S1007, in order to enable the second picture to be successfully decoded and displayed, stitching the compressed bitmap into the second picture includes: writing size information of each bitmap in the header file of the second picture, The location information in the first picture and the compression coding algorithm information used. According to the header file in the second picture, the first picture can be obtained and displayed normally.
步骤S1008,存储压缩后新图片;Step S1008, storing a compressed new picture;
步骤S1009,输出压缩后新图片。In step S1009, the compressed new picture is output.
与现有技术相比,本发明优选实施例所提供的方法,可以针对图片分割后的小位图像素判定质量位图质量阈值,从而智能判定属于有损压缩或者是无损压缩,进而选择相应的压缩算法,不同像素的个数反应出图片色彩的丰富度,再将压缩后的图片小位图进行拼接,完成图片色彩分布的均匀拼接,从而保证切割图片每个位图像素获得有效的压缩和拼接,保证切割压缩拼接后图片的优质效果。Compared with the prior art, the method provided by the preferred embodiment of the present invention can determine the quality bitmap quality threshold for the small bitmap pixels after the picture segmentation, thereby intelligently determining whether it belongs to lossy compression or lossless compression, and then selecting corresponding The compression algorithm, the number of different pixels reflects the richness of the color of the picture, and then splicing the compressed picture small bitmap to complete the uniform splicing of the picture color distribution, thereby ensuring effective compression of each bitmap pixel of the cut picture. Stitching ensures the high quality effect of the picture after cutting and compressing.
本发明优选实施例还提供了一种基于图片位图切割压缩拼接算法的设备。图4是根据本发明优选实施例的基于图片位图切割压缩拼接算法的设备的结构示意图,如图4所示,该设备包括:A preferred embodiment of the present invention also provides an apparatus for cutting a compression stitching algorithm based on a picture bitmap. 4 is a schematic structural diagram of an apparatus for cutting a compression splicing algorithm based on a picture bitmap according to a preferred embodiment of the present invention. As shown in FIG. 4, the apparatus includes:
图片切割设备4001,用于对原始图片切割,按照边缘检测方法切割为多张不同大小的位图;a picture cutting device 4001, configured to cut an original picture and cut into a plurality of bitmaps of different sizes according to an edge detection method;
图片质量分析设备4002,用于对切割后位图进行判断,判定每个切割后的位图像素质量与阈值5%比较,并根据比较结果对不同位图选择适当的压缩算法; The picture quality analysis device 4002 is configured to determine the bitmap after cutting, determine the pixel quality of each cut bitmap and compare the threshold value by 5%, and select an appropriate compression algorithm for different bitmaps according to the comparison result;
图片压缩设备4003,包括用于对切割后位图进行有损压缩的有损压缩单元40031,以及用于对切割后位图进行无损压缩的无损压缩单元40032,其中:The picture compression device 4003 includes a lossy compression unit 40031 for lossy compression of the post-cut bitmap, and a lossless compression unit 40032 for lossless compression of the post-cut bitmap, wherein:
如果切割后的小位图像素质量是低于阈值5%,判断每个切割后的小位图的像素适合采用哪种有损压缩编码算法,然后选择最优的有损压缩编码算法,针对每个切割后小位图像素进行有损压缩;If the pixel quality of the small bitmap after cutting is less than 5% of the threshold, determine which lossy compression coding algorithm is suitable for each pixel of the small bitmap after cutting, and then select the optimal lossy compression coding algorithm for each After cutting, the small bitmap pixels are subjected to lossy compression;
如果切割后的小位图像素质量低于阈值5%为否,则判断每个切割后的小位图的像素适合采用哪种无损压缩编码算法,然后选择最优的无损压缩编码算法,针对每个切割后小位图像素进行无损压缩;If the pixel quality of the small bitmap after cutting is lower than the threshold value of 5%, it is determined whether the pixel of each small bitmap after cutting is suitable for which lossless compression encoding algorithm, and then the optimal lossless compression encoding algorithm is selected, for each After cutting, the small bitmap pixels are subjected to lossless compression;
图片拼接设备4004,用于对切割压缩后的多个位图进行全局最优的位图缝合拼接,完成拼接新图片。The picture splicing device 4004 is configured to perform global optimal bitmap stitching and splicing on the cut and compressed plurality of bitmaps to complete splicing a new picture.
下面对上述设备的工作流程进行说明。The workflow of the above device will be described below.
首先,图片切割设备4001获得图像中不同区域的边缘累积实现的分割图片。其中,边缘是图片的最基本的特征,它是图片局部特征不连续或者突变的结果。所以,接下来,图片切割设备4001利用图片一阶导数的极值或二阶导数的零点信息来提供边缘点的基本依据,用于处理灰度值、颜色和纹理方面的突变,并且用于构造对图像灰度阶跃变化敏感的差分算子来进行图片位图分割,同时本发明中采用了基于局部图片函数的方法和多尺度方法和基于边界曲线拟合方法,利用一阶微分算子:Robert算法、Sobel算法和二阶微分算子:Laplace算法和Kirsh实现图片位图的分割。First, the picture cutting device 4001 obtains a divided picture realized by edge accumulation of different areas in the image. Among them, the edge is the most basic feature of the picture, which is the result of the discontinuity or mutation of the local features of the picture. Therefore, next, the picture cutting device 4001 uses the extreme value of the first derivative of the picture or the zero point information of the second derivative to provide the basic basis of the edge point for processing the mutation of the gray value, the color and the texture, and is used for constructing The difference operator sensitive to the gray level step change of the image is used to perform image bitmap segmentation. At the same time, the local image function based method and the multi-scale method and the boundary curve fitting method are adopted in the present invention, and the first-order differential operator is utilized: Robert algorithm, Sobel algorithm and second-order differential operator: Laplace algorithm and Kirsh realize the segmentation of picture bitmap.
接着,图片质量分析设备4002,对每个切割后的位图像素质量进行判断,其中:Next, the picture quality analysis device 4002 determines the quality of each of the cut bitmap pixels, wherein:
图片质量分析设备4002将分割后的图片位图的像素亮度值进行统计,同时将图片切割设备4001中传递过来的位图的边缘轮廓值进行统计记录。并且图片质量分析设备4002中统计分割后每个图片位图灰度平均值和灰度方差。图片质量分析设备4002计算位图灰度直方图的函数,即为图片中具有该灰度级的像素的个数,反映出图片位图中不同灰度的出现频率;用于检查图片是否合理利用全部被允许的灰度级范围,以及选择边界阈值和计算综合光密度;图片质量分析设备4002中利用灰度直方图函数结合像素亮度值和边缘轮廓值综合判定图片位图局部寻优质量阈值为5%。 The picture quality analysis device 4002 counts the pixel brightness values of the divided picture bitmaps, and statistically records the edge contour values of the bitmaps transmitted from the picture cutting device 4001. And the picture quality analysis device 4002 counts the gray average value and the gray scale variance of each picture bitmap after the division. The picture quality analysis device 4002 calculates a function of the bitmap gray histogram, that is, the number of pixels having the gray level in the picture, reflecting the frequency of occurrence of different gray levels in the picture bitmap; for checking whether the picture is rationally utilized All allowed gray level ranges, and selecting boundary thresholds and calculating integrated optical density; the picture quality analysis device 4002 uses the gray histogram function to combine the pixel brightness values and the edge contour values to comprehensively determine the picture bitmap local search quality threshold 5%.
如果分析到每个切割后小位图的像素质量是低于阈值5%,适合采用有损压缩编码算法。在这种情况下,图片压缩设备4003对图片使用有损压缩进行处理。其中,有损压缩就是将图片像素相关性的冗余度删减,利用编码方法删除这些冗余,用于达到减少冗余压缩数据。即针对分割后的位图,在图片同一行相邻像素之间,相邻像素之间,活动图片的相邻帧的对应像素之间均具有相对强的相关性,取出或减少这些相关性,就是去除或减少图片位图信息中的冗余度从而实现对分割后位图像素的有损压缩。有损压缩的算法包括但不限于:基于模型编码、分形编码、离散余弦变换编码中的一种或其任意组合。每种压缩算法具有其自身的特点,适用于不同格式的图片。本优选实施例中,有损压缩的算法为基于离散余弦变化编码(Discrete Cosine Transform,DCT),在其他实施例中,还可以采用其他任何可以实现有损压缩的算法,这里不再一一列举。If it is analyzed that the pixel quality of each small bitmap after cutting is below 5% of the threshold, a lossy compression coding algorithm is suitable. In this case, the picture compression device 4003 processes the picture using lossy compression. Among them, lossy compression is to reduce the redundancy of picture pixel correlation, and use the coding method to delete these redundancy, which is used to reduce redundant compressed data. That is, for the divided bitmap, between the adjacent pixels of the same row of the picture, the corresponding pixels of the adjacent frames of the moving picture have a relatively strong correlation between the adjacent pixels, and the correlation is taken out or reduced. It is to remove or reduce the redundancy in the picture bitmap information to achieve lossy compression of the segmented bitmap pixels. Lossless compression algorithms include, but are not limited to, one of model based coding, fractal coding, discrete cosine transform coding, or any combination thereof. Each compression algorithm has its own characteristics and is suitable for images in different formats. In the preferred embodiment, the lossy compression algorithm is based on Discrete Cosine Transform (DCT). In other embodiments, any other algorithm that can implement lossy compression may be used. .
如果分析到每个切割后小位图的像素质量是低于阈值5%为否,图片压缩设备4003采用无损压缩编码算法。无损编码利用信源统计特性,去除其内在相关性和改变概率分布的不均匀性,从而实现图像信息的压缩。无损压缩精确度高,由于基于统计概率的方法和基于字典的技术,使得图像再压缩时损失较少的信息,进而拥有较高的精确度。图片压缩设备4003的无损压缩的压缩比率小,即将图片像素之间的联系几乎完整的保留了下来,使得图像更精确,所以压缩比率较小,占用空间较大;该设备的无损压缩具有可逆性,不损失原信息内容。在本实施例中,整数小波快速SPIHT无损压缩算法SSPIHT(Speed SPIHT)。在其他实施例中,还可以采用其他任何可以实现无损压缩的算法,在此不再一一列举。If it is analyzed that the pixel quality of each of the post-cut small bitmaps is below 5% of the threshold, the picture compression device 4003 employs a lossless compression coding algorithm. Lossless coding utilizes the statistical properties of the source to remove the intrinsic correlation and change the non-uniformity of the probability distribution, thereby realizing the compression of image information. The lossless compression accuracy is high. Due to the statistical probability based method and the dictionary-based technology, the image is lost with less information when recompressing, and thus has higher precision. The compression ratio of the lossless compression of the picture compression device 4003 is small, that is, the connection between the picture pixels is almost completely preserved, so that the image is more accurate, so the compression ratio is smaller and the space is larger; the lossless compression of the device is reversible. Without losing the original information content. In this embodiment, the integer wavelet fast SPIHT lossless compression algorithm SSPIHT (Speed SPIHT). In other embodiments, any other algorithm that can implement lossless compression may also be used, and will not be enumerated here.
图片拼接设备4004,用于对切割压缩后的多个位图进行全局最优的位图缝合拼接,完成拼接新图片。采用重叠过渡的泊松融合方法用于实现图切割后的图像融合处理。通过将每个重叠区域划分成两个相邻的未知区域,两者相邻的边的像素强度取两幅源图片上对应未知的像素强度均值,而与相邻边相对的边的像素强度则只取一幅图像上的像素强度,以实现重叠过渡。将未知区域划分然后进行融合,将泊松融合参数初始化,最后将未知区域泊松融合求解,最后完成融合过渡。The picture splicing device 4004 is configured to perform global optimal bitmap stitching and splicing on the cut and compressed plurality of bitmaps to complete splicing a new picture. The Poisson fusion method using overlapping transitions is used to implement image fusion processing after graph cutting. By dividing each overlapping area into two adjacent unknown areas, the pixel intensity of the adjacent sides takes the average unknown pixel intensity on the two source pictures, and the pixel intensity of the side opposite the adjacent side is Take only the pixel intensity on one image to achieve an overlapping transition. The unknown region is divided and then merged, the Poisson fusion parameters are initialized, and the unknown region is Poisson fusion solution, and finally the fusion transition is completed.
通过上述优选实施例,有效地解决了现有技术中出现地的问题,本发明优选实施例所提供的设备装置可以根据图片分割压缩拼接的内容,选择相应的分 割、压缩和拼接算法,从而高效完成压缩,并且保持图片的高保真度。此外,原始图片按照边缘检测方法切割为多张不同大小的位图,进而对每个切割后的位图像素质量进行判断,利用灰度直方图函数结合像素亮度值和边缘轮廓值综合判定图片位图局部寻优质量阈值,最终采用重叠过渡的泊松融合方法用于实现图切割后的图像融合处理。因此,基于3种方式保证了图片切割压缩算法选择和拼接的准确性,进而保证了处理后的图片具有优质的访问效果。The above-mentioned preferred embodiments effectively solve the problems in the prior art. The device device provided by the preferred embodiment of the present invention can compress and compress the spliced content according to the picture, and select corresponding points. Cut, compress, and splicing algorithms to efficiently perform compression and maintain high fidelity of the image. In addition, the original image is cut into a plurality of bitmaps of different sizes according to the edge detection method, and then the quality of each cut bitmap pixel is judged, and the gray level histogram function is used to combine the pixel brightness value and the edge contour value to comprehensively determine the picture position. The map seeks the quality threshold, and finally adopts the Poisson fusion method of overlapping transition to realize the image fusion processing after the graph cut. Therefore, based on the three methods, the accuracy of the selection and splicing of the image cutting compression algorithm is ensured, thereby ensuring the processed image has a good access effect.
综上所述,通过本发明的上述实施例和优选实施例,根据图片的大小进行位图分割,判断每个位图像素质量后,精准判定每个切割后的小位图像素采用适合的压缩算法,可以确保不同图片采用不同的适合算法,从而实现图片高保真效果;另外,切割后压缩算法是根据分割后图片像素质量判定选择最优的有损压缩或是无损压缩,同时选择不同的压缩算法是根据切割后的小图片位图像素质量判定,不同像素的个数反映出图片色彩的丰富度,再将压缩后的图片小位图进行拼接,完成图片色彩分布的均匀拼接。基于这3个方面准确的优化图片内容,通过精准切割、从优选择压缩算法、优化拼接算法,从而保证了切割压缩拼接后的图片达到优质用户体验效果。In summary, according to the above embodiments and preferred embodiments of the present invention, bitmap segmentation is performed according to the size of the picture, and after determining the pixel quality of each bitmap, it is accurately determined that each of the cut small bitmap pixels adopts appropriate compression. The algorithm can ensure different images adopt different suitable algorithms to achieve high fidelity effect of the image; in addition, the post-cutting compression algorithm selects the optimal lossy compression or lossless compression according to the pixel quality judgment of the divided image, and selects different compressions. The algorithm is based on the pixel quality of the small picture bitmap after cutting. The number of different pixels reflects the richness of the picture color, and then the compressed picture small bitmap is spliced to complete the uniform splicing of the picture color distribution. Based on these three aspects, the image content is accurately optimized, and the precise compression and optimization of the compression algorithm and the optimization of the splicing algorithm ensure that the image after cutting and splicing achieves a high quality user experience.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
本发明可以准确的优化图片内容,通过精准切割、从优选择压缩算法、优化拼接算法,从而保证了切割压缩拼接后的图片达到优质用户体验效果。 The invention can accurately optimize the picture content, and selects the compression algorithm and optimizes the splicing algorithm by precise cutting, thereby ensuring the quality of the user experience after cutting and splicing the picture.

Claims (11)

  1. 一种图片压缩方法,其特征在于,包括:A picture compression method, comprising:
    获取第一图片;Get the first picture;
    将所述第一图片切割成多张位图;Cutting the first picture into a plurality of bitmaps;
    确定所述多张位图中每张位图的压缩编码算法;Determining a compression coding algorithm for each bitmap in the plurality of bitmaps;
    采用确定的压缩编码算法压缩对应的位图;Compressing a corresponding bitmap by using a determined compression coding algorithm;
    将压缩后的位图拼接成第二图片。The compressed bitmap is stitched into a second picture.
  2. 根据权利要求1所述的方法,其特征在于,确定所述多张位图中每张位图的压缩编码算法包括:The method according to claim 1, wherein the compression encoding algorithm for determining each bitmap in the plurality of bitmaps comprises:
    确定所述多张位图中每张位图的像素质量;Determining a pixel quality of each bitmap in the plurality of bitmaps;
    根据所述像素质量,选择每张位图的压缩编码算法。A compression encoding algorithm for each bitmap is selected based on the pixel quality.
  3. 根据权利要求2所述的方法,其特征在于,根据所述像素质量,选择每张位图的压缩编码算法包括:The method according to claim 2, wherein the compression encoding algorithm for selecting each bitmap according to the pixel quality comprises:
    判断所述多张位图中的每一位图的像素质量是否小于预定阈值;Determining whether a pixel quality of each bitmap in the plurality of bitmaps is less than a predetermined threshold;
    在判断结果为是的情况下,在第一压缩编码算法集合中选择所述位图的所述压缩编码算法;否则,在第二压缩编码算法集合中选择所述位图的所述压缩编码算法。If the determination result is yes, the compression coding algorithm of the bitmap is selected in the first compression coding algorithm set; otherwise, the compression coding algorithm of the bitmap is selected in the second compression coding algorithm set .
  4. 根据权利要求3所述的方法,其特征在于,The method of claim 3 wherein:
    所述第一压缩编码算法集合为有损压缩编码算法集合;The first compression coding algorithm set is a lossy compression coding algorithm set;
    所述第二压缩编码算法集合为无损压缩编码算法集合。The second compression coding algorithm set is a lossless compression coding algorithm set.
  5. 根据权利要求4所述的方法,其特征在于,The method of claim 4 wherein:
    所述有损压缩编码算法集合包括以下至少之一:基于模型编码算法、分形编码算法、离散余弦变换编码算法;The set of lossy compression coding algorithms includes at least one of the following: a model coding algorithm, a fractal coding algorithm, and a discrete cosine transform coding algorithm;
    所述无损压缩编码算法集合包括以下至少之一:整数小波快速多级树集合分裂无损压缩算法SSPIHT、改进自适应游程编码算法、改进二进制位级编码算法。The lossless compression coding algorithm set includes at least one of the following: an integer wavelet fast multi-level tree set split lossless compression algorithm SSPIHT, an improved adaptive run length coding algorithm, and an improved binary bit level coding algorithm.
  6. 根据权利要求1所述的方法,其特征在于,将所述第一图片切割成多张 位图包括:The method of claim 1 wherein said first picture is cut into a plurality of sheets Bitmaps include:
    按照边缘检测方法将所述第一图片切割成所述多张位图。The first picture is cut into the plurality of bitmaps according to an edge detection method.
  7. 根据权利要求1所述的方法,其特征在于,所述确定所述多张位图中每张位图的像素质量包括:对每张位图进行以下运算中的至少一个并根据运算结果计算每张位图的像素质量:统计位图的像素亮度值、统计位图的边缘轮廓值、统计位图的灰度平均值、统计位图的灰度方差、统计位图的灰度直方图的函数。The method according to claim 1, wherein the determining the pixel quality of each of the plurality of bitmaps comprises: performing at least one of the following operations on each of the bitmaps and calculating each of the operations according to the operation result Pixel quality of the bitmap: the pixel brightness value of the statistical bitmap, the edge contour value of the statistical bitmap, the gray average of the statistical bitmap, the gray variance of the statistical bitmap, and the function of the gray histogram of the statistical bitmap .
  8. 根据权利要求1所述的方法,其特征在于,将压缩后的位图拼接成第二图片包括:在所述第二图片的头文件中写入每个位图的尺寸信息、在所述第一图片中的位置信息、采用的压缩编码算法信息。The method according to claim 1, wherein the stitching the compressed bitmap into the second image comprises: writing size information of each bitmap in the header file of the second image, in the Location information in a picture, compression coding algorithm information used.
  9. 一种图片压缩装置,其特征在于包括:A picture compression device, comprising:
    获取模块,用于获取第一图片;Obtaining a module, configured to acquire a first picture;
    切割模块,用于将所述第一图片切割成多张位图;a cutting module, configured to cut the first picture into a plurality of bitmaps;
    确定模块,用于确定所述多张位图中每张位图的压缩编码算法;a determining module, configured to determine a compression encoding algorithm for each bitmap in the plurality of bitmaps;
    压缩模块,用于采用确定的压缩编码算法压缩对应的位图;a compression module, configured to compress a corresponding bitmap by using a determined compression coding algorithm;
    拼接模块,用于将压缩后的所述多张位图拼接成第二图片。a splicing module, configured to splicing the compressed plurality of bitmaps into a second picture.
  10. 根据权利要求9所述的装置,其特征在于,所述确定模块包括:The apparatus according to claim 9, wherein the determining module comprises:
    确定单元,用于确定所述多张位图中每张位图的像素质量;a determining unit, configured to determine a pixel quality of each bitmap in the plurality of bitmaps;
    选择单元,用于根据所述像素质量,选择每张位图的压缩编码算法。And a selecting unit, configured to select a compression coding algorithm for each bitmap according to the pixel quality.
  11. 根据权利要求10所述的装置,其特征在于,所述选择单元包括:The apparatus according to claim 10, wherein said selecting unit comprises:
    判断子单元,用于判断所述多张位图中的每一位图的所述像素质量是否小于预定阈值;a determining subunit, configured to determine whether the pixel quality of each bitmap in the plurality of bitmaps is less than a predetermined threshold;
    选择子单元,用于在判断结果为是的情况下,在第一压缩编码算法集合中选择所述位图的所述压缩编码算法;否则,在第二压缩编码算法集合中选择所述位图的所述压缩编码算法。 Selecting a subunit for selecting the compression encoding algorithm of the bitmap in the first compression encoding algorithm set if the determination result is yes; otherwise, selecting the bitmap in the second compression encoding algorithm set The compression coding algorithm.
PCT/CN2017/083241 2016-05-05 2017-05-05 Picture compression method and apparatus WO2017190691A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610293137.XA CN105979265A (en) 2016-05-05 2016-05-05 Image compression method and apparatus
CN201610293137.X 2016-05-05

Publications (1)

Publication Number Publication Date
WO2017190691A1 true WO2017190691A1 (en) 2017-11-09

Family

ID=56991882

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/083241 WO2017190691A1 (en) 2016-05-05 2017-05-05 Picture compression method and apparatus

Country Status (2)

Country Link
CN (1) CN105979265A (en)
WO (1) WO2017190691A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111738917A (en) * 2019-06-06 2020-10-02 北京京东尚科信息技术有限公司 Picture scaling method, device, equipment and storage medium
CN113784142A (en) * 2021-09-10 2021-12-10 河南启迪睿视智能科技有限公司 Method for lossless compression of tobacco leaf pictures

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105979265A (en) * 2016-05-05 2016-09-28 贵州白山云科技有限公司 Image compression method and apparatus
CN106791883A (en) * 2016-11-18 2017-05-31 上海兆芯集成电路有限公司 Texture brick compresses and decompression method and the device using the method
CN106685429B (en) * 2016-12-29 2020-07-10 广州华多网络科技有限公司 Integer compression method and device
CN108322755B (en) * 2018-01-10 2021-07-09 链家网(北京)科技有限公司 Picture compression processing method and system
CN110059214B (en) * 2019-04-01 2021-12-14 北京奇艺世纪科技有限公司 Image resource processing method and device
CN110110105A (en) * 2019-05-08 2019-08-09 中国联合网络通信集团有限公司 Picture display method and equipment
CN114095730B (en) * 2022-01-11 2022-04-19 山东捷瑞数字科技股份有限公司 Picture compression method and system
CN118573877A (en) * 2023-02-28 2024-08-30 奥比中光科技集团股份有限公司 Image compression and decompression method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075348A (en) * 2006-11-30 2007-11-21 腾讯科技(深圳)有限公司 Method and device for compressing image
CN102611823A (en) * 2012-01-13 2012-07-25 百度在线网络技术(北京)有限公司 Method and equipment capable of selecting compression algorithm based on picture content
CN103700121A (en) * 2013-12-30 2014-04-02 Tcl集团股份有限公司 Method and device for compressing composite image
CN103886623A (en) * 2012-12-19 2014-06-25 华为技术有限公司 Image compression method and equipment, and system
CN105979265A (en) * 2016-05-05 2016-09-28 贵州白山云科技有限公司 Image compression method and apparatus

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100566417C (en) * 2006-07-10 2009-12-02 逐点半导体(上海)有限公司 Method for compressing image
US8194736B2 (en) * 2008-04-15 2012-06-05 Sony Corporation Video data compression with integrated lossy and lossless compression
FR2940577B1 (en) * 2008-12-23 2011-04-22 Sagem Comm METHOD FOR ENCODING BY SEGMENTATION OF AN IMAGE
CN101783952A (en) * 2010-03-01 2010-07-21 广东威创视讯科技股份有限公司 Coding optimization method and coding optimization device for images
CN102098507B (en) * 2010-06-08 2013-12-25 同济大学 Integrative compressing method and device of image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075348A (en) * 2006-11-30 2007-11-21 腾讯科技(深圳)有限公司 Method and device for compressing image
CN102611823A (en) * 2012-01-13 2012-07-25 百度在线网络技术(北京)有限公司 Method and equipment capable of selecting compression algorithm based on picture content
CN103886623A (en) * 2012-12-19 2014-06-25 华为技术有限公司 Image compression method and equipment, and system
CN103700121A (en) * 2013-12-30 2014-04-02 Tcl集团股份有限公司 Method and device for compressing composite image
CN105979265A (en) * 2016-05-05 2016-09-28 贵州白山云科技有限公司 Image compression method and apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111738917A (en) * 2019-06-06 2020-10-02 北京京东尚科信息技术有限公司 Picture scaling method, device, equipment and storage medium
CN111738917B (en) * 2019-06-06 2024-06-18 北京京东尚科信息技术有限公司 Picture telescoping method, device, equipment and storage medium
CN113784142A (en) * 2021-09-10 2021-12-10 河南启迪睿视智能科技有限公司 Method for lossless compression of tobacco leaf pictures

Also Published As

Publication number Publication date
CN105979265A (en) 2016-09-28

Similar Documents

Publication Publication Date Title
WO2017190691A1 (en) Picture compression method and apparatus
CN102611823B (en) Method and equipment capable of selecting compression algorithm based on picture content
US9558422B2 (en) Methods and systems for differentiating synthetic and non-synthetic images
US9082160B2 (en) Image processing method, image compression device and mobile terminal
CN108337551B (en) Screen recording method, storage medium and terminal equipment
US20070195106A1 (en) Detecting Doctored JPEG Images
US9311735B1 (en) Cloud based content aware fill for images
CN112135140B (en) Video definition identification method, electronic device and storage medium
JP2019524007A (en) Video compression method and apparatus, and computer program therefor
US9245354B2 (en) System and method having transparent composite model for transform coefficients
US9509862B2 (en) Image processing system, image output device, and image processing method
CN113012073A (en) Training method and device for video quality improvement model
US20190333190A1 (en) Systems and methods for distortion removal at multiple quality levels
Peter Fast inpainting-based compression: Combining Shepard interpolation with joint inpainting and prediction
CN112950491B (en) Video processing method and device
Perfilieva et al. The F-transform preprocessing for JPEG strong compression of high-resolution images
Thakker et al. Lossy Image Compression-A Comparison Between Wavelet Transform, Principal Component Analysis, K-Means and Autoencoders
US20150146975A1 (en) Lossless color image compression adaptively using spatial prediction or inter-component prediction
CN113706639B (en) Image compression method and device based on rectangular NAM, storage medium and computing equipment
CN108933945B (en) GIF picture compression method, device and storage medium
CN106412583B (en) Image compression method and device
US11546597B2 (en) Block-based spatial activity measures for pictures
CN116760983B (en) Loop filtering method and device for video coding
CN113949868B (en) Entropy coding method and device
US20230326088A1 (en) User-guided variable-rate image compression

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17792517

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17792517

Country of ref document: EP

Kind code of ref document: A1