CN109774152B - Incremental compression storage method for continuous slice images based on three-dimensional model - Google Patents

Incremental compression storage method for continuous slice images based on three-dimensional model Download PDF

Info

Publication number
CN109774152B
CN109774152B CN201811554989.5A CN201811554989A CN109774152B CN 109774152 B CN109774152 B CN 109774152B CN 201811554989 A CN201811554989 A CN 201811554989A CN 109774152 B CN109774152 B CN 109774152B
Authority
CN
China
Prior art keywords
image
byte
compression
storing
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811554989.5A
Other languages
Chinese (zh)
Other versions
CN109774152A (en
Inventor
郭文华
贺晨龙
陈涛
卢秉恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Jiaotong University
Original Assignee
Xian Jiaotong University
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 Xian Jiaotong University filed Critical Xian Jiaotong University
Priority to CN201811554989.5A priority Critical patent/CN109774152B/en
Publication of CN109774152A publication Critical patent/CN109774152A/en
Application granted granted Critical
Publication of CN109774152B publication Critical patent/CN109774152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for incremental compression storage of continuous slice images based on a three-dimensional model, which comprises the following steps: establishing an original image storage space; generating a blank binary file on an original image storage space; storing a first image on an original image storage space as a reference standard of a subsequent image; for the subsequent images, the subsequent images and the previous image are subjected to incremental processing, and the two images are directly subjected to exclusive-or operation; for the generated difference image, a sparse matrix compression storage method is adopted for compression; counting the byte content generated after secondary compression, storing the total byte number by using 4 bytes in the binary file, filling the content of the binary file with the compressed byte content, repeating the steps for the next image, and generating an independent binary compressed file. The invention has higher compression rate compared with the traditional compression algorithm of a single image because the continuity of the slice image is considered.

Description

Incremental compression storage method for continuous slice images based on three-dimensional model
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to a method for incremental compression storage of continuous slice images based on a three-dimensional model.
Background
DLP (digital Light processing) is called as 'digital Light projection' technology, based on DLP printing method and SLA photocuring forming method, liquid photosensitive resin is used as raw material, the difference is that DLP adopts digital projector as Light source, and projected image can be solidified and formed on one surface at one time. The generation of slice images from three-dimensional models is one of the key techniques for rapid prototyping by area exposure machines.
The DLP technology photocuring process is divided into the following steps. 1. Generating a three-dimensional solid model by using a CAD technology; 2. slicing the model by using computer software; 3. irradiating the surface of the photosensitive resin by using the generated two-dimensional slice image through a projection device to cure a layer of resin in the surface irradiation area; 4. after one layer is processed, a two-dimensional section of the printed piece is generated, then the printing platform moves for a layer thickness distance, another layer of liquid photosensitive resin is filled on the layer to be cured, then the second layer of liquid photosensitive resin is irradiated, the second layer of liquid photosensitive resin is firmly bonded on the last layer of liquid photosensitive resin, and the three-dimensional model is generated by repeating the steps.
In the conventional method, an image generated by a three-dimensional model is directly stored. Due to the limited light intensity of the surface exposure, the slice layer thickness is generally small, a three-dimensional model is few hundreds of layers, and more than ten thousands of layers, each layer needs to store a two-dimensional slice image, and the two-dimensional slice images are used for irradiating photosensitive resin during printing. The large number of images causes great waste of storage space, and in the occasion of needing network transmission, if the slice images are downloaded remotely, the network transmission speed is seriously affected.
Image compression techniques have achieved great performance during the past decades of research. Several more important compression technologies include the advanced technologies such as the JPEG compression technology, the JEPG2000 compression technology, the wavelet transform image compression technology, and the fractal image compression, which are still the focus of the academic topic so far. However, the following problems also exist:
1) lack of uniform evaluation criteria and advanced knowledge;
2) the calculation amount of an extraction system is large;
3) the wavelet change image compression coding algorithm and the like have the problem of low working efficiency;
4) the contradiction between the image precision and the processing speed;
5) the problem of adaptation to special situations;
in addition, in the aspect of binary file compression technology, popular lossless compression algorithms include huffman coding, hash coding, LZW compression algorithm, arithmetic compression method, run-length algorithm and the like, and whether compression is performed by a probability statistics method or compression is performed according to compressed data characteristics, compression is performed by one byte, and the compression efficiency and the application range are limited to a certain degree. For example, for some compressed data, the possibility of further compression is lacking.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method for incrementally compressing and storing continuous slice images based on a three-dimensional model.
The invention is realized by adopting the following technical scheme:
a method for incrementally compressing and storing continuous slice images based on a three-dimensional model comprises the following steps:
establishing an original image storage space, wherein the image storage space always stores a previous original image of a three-dimensional model slice image to be processed;
generating a blank binary file in the original image storage space, and filling the binary file in an incremental manner subsequently;
step three, storing a first image on an original image storage space as a reference standard of a subsequent image, and storing related necessary information of the image;
step four, for the subsequent images, performing incremental processing with the previous image, directly performing exclusive-or operation on the two images to obtain a difference image, and after the processing is finished, updating the storage space of the original image by using the difference image for reference of the next image;
step five, as for the generated difference image, because the difference image is an incremental image, a large number of repeated pixels exist in the difference image, a sparse matrix compression storage method is adopted for compression, but because one pixel of a coefficient matrix needs to be stored by using a plurality of bytes, a method of storing a repeated pixel count value by using a byte size space is used for storage; for the difference image, since the value of the first pixel is already known, counting the same pixels starting from the first pixel, and if a pixel value change is encountered, saving the number of repeated pixels; due to the use of byte storage, only no more than 256 duplicate pixel values can be stored; the flag 0xFF is used here to process more than 253 duplicates, and the stored byte formula generated by the process is as follows:
if the content of the generated byte is f (x), and x is the count value, then
Figure BDA0001911619530000031
After the compression is carried out by adopting the method, one byte can store 253 pixel values at most, but for a larger image, a large number of repeated 0xFD and 0xFF can still be generated, so that the special value is subjected to secondary counting compression, the byte value 0xFE is used for storing the repeated times of 0xFD and 0xFF, and the last 0xFF is not counted;
if the content of the generated secondary compressed byte is F (x), and x is the count value, then
Figure BDA0001911619530000032
After secondary compression is adopted, 253 pixel values are stored at the maximum in one byte, and the original compressed value is kept for the condition that the repeated value after secondary compression is still larger than 253;
step six, counting byte contents generated after secondary compression, storing the total number of bytes in the binary file by using 4 bytes, filling the content of the binary file with the compressed byte contents, repeating the steps four to six for the next image, generating an independent binary compressed file, wherein the format of the finally generated binary file is as follows:
Figure BDA0001911619530000041
in a further improvement of the present invention, in step three, the necessary information related to the image includes:
1) filling the binary file header with the two-dimensional scale of the image;
2) the value of the first pixel of the fill image is shown in the following table:
width of Height Pixel value
2 bytes 2 bytes 1 byte
3) Compressing and storing the image, firstly normalizing the binary image to change all 255 into 1, then processing 1 and 0 according to binary system, and processing each 8 bytes into 1 byte, as shown in the following table:
Figure BDA0001911619530000042
the further improvement of the present invention is that in the fourth step, if the current image is c (x), the previous image in the storage space of the original image is p (x), and the obtained difference image g (x) is:
g(x)=c(x)^p(x)。
the invention has the following beneficial technical effects:
the existing image compression technology is based on a single independent image, and does not consider the connection between a plurality of continuous images, but the invention fully utilizes the characteristic that slice images between adjacent layers are basically similar or identical in the three-dimensional model slicing process, only stores difference information for the adjacent images, and forms a recursion relation between the layers. For a three-dimensional model, the slice images are not directly stored in a hard disk, but are coded and compressed and stored as coded files, and the coded files are decoded when the images are acquired to directly generate the images needing projection, so that the actual images are not required to be stored in the whole process. And further compressing the encoded binary file, performing count compression on repeated pixel points by utilizing the characteristic that a large number of repeated pixels exist in the incremental image of the continuous slice image, and performing secondary count compression on the compressed file. Finally, a small-volume image compression file suitable for hard disk storage is generated.
In summary, the present invention has several advantages:
1. the slice image compression method has the advantages that due to the fact that the continuity of slice images is considered, the compression rate is higher than that of a traditional single image compression algorithm.
2. And for adjacent images, the exclusive-or operation is adopted, the operation speed is high, and the generation algorithm is simple.
3. The binary repetition count method is more advantageous in terms of actual storage capacity than the coefficient matrix storage method.
4. The generated volume is minimum for a three-dimensional model with the same upper and lower cross-sectional shapes.
Drawings
FIG. 1 is a flow chart of a method for incrementally compressing and storing a continuous slice image based on a three-dimensional model according to the present invention.
Fig. 2 is a schematic diagram of an STL three-dimensional model employed in an embodiment of the present invention.
Fig. 3 is a schematic diagram of a first slice image in an embodiment of the invention.
Fig. 4 is a schematic diagram of a second slice image in an embodiment of the invention.
FIG. 5 is a schematic diagram of a portion of a compressed content according to an embodiment of the present invention.
FIG. 6 is a diagram illustrating a portion of the content after the secondary compression according to an embodiment of the present invention.
Detailed Description
The invention is further described below with reference to the following figures and examples.
As shown in FIG. 1, the method for incrementally compressing and storing continuous slice images based on a three-dimensional model provided by the invention comprises the following steps:
establishing an original image storage space, wherein the image storage space always stores a previous original image of a three-dimensional model slice image to be processed;
and step two, generating a blank binary file on the storage space of the original image, and filling the binary file in an incremental manner subsequently.
Step three, firstly, storing a first image on an original image storage space as a reference standard of a subsequent image, and storing related necessary information of the image; the necessary information about the image includes:
1) filling the binary file header with the two-dimensional scale of the image;
2) the value of the first pixel of the fill image is shown in the following table:
width of Height Pixel value
2 bytes 2 bytes 1 byte
3) Compressing and storing the image, firstly normalizing the binary image to change all 255 into 1, then processing 1 and 0 according to binary system, and processing each 8 bytes into 1 byte, as shown in the following table:
Figure BDA0001911619530000061
step four, for the subsequent images, performing incremental processing with the previous image, directly performing exclusive-or operation on the two images to obtain a difference image, and after the processing is finished, updating the storage space of the original image by using the difference image for reference of the next image; if the current image is c (x), and the previous image in the original image storage space is p (x), the difference image g (x) is obtained as:
g(x)=c(x)^p(x)。
step five, as for the generated difference image, because the difference image is an incremental image, a large number of repeated pixels exist in the difference image, a sparse matrix compression storage method is adopted for compression, but because one pixel of a coefficient matrix needs to be stored by using a plurality of bytes, a method of storing a repeated pixel count value by using a byte size space is used for storage; for the difference image, since the value of the first pixel is already known, counting the same pixels starting from the first pixel, and if a pixel value change is encountered, saving the number of repeated pixels; due to the use of byte storage, only no more than 256 duplicate pixel values can be stored; the flag 0xFF is used here to process more than 253 duplicates, and the stored byte formula generated by the process is as follows:
if the content of the generated byte is f (x), and x is the count value, then
Figure BDA0001911619530000062
After the compression is carried out by adopting the method, one byte can store 253 pixel values at most, but for a larger image, a large number of repeated 0xFD and 0xFF can still be generated, so that the special value is subjected to secondary counting compression, the byte value 0xFE is used for storing the repeated times of 0xFD and 0xFF, and the last 0xFF is not counted;
if the content of the generated secondary compressed byte is F (x), and x is the count value, then
Figure BDA0001911619530000071
After secondary compression is adopted, 253 pixel values are stored at the maximum in one byte, and the original compressed value is kept for the condition that the repeated value after secondary compression is still larger than 253;
step six, counting byte contents generated after secondary compression, storing the total number of bytes in the binary file by using 4 bytes, filling the content of the binary file with the compressed byte contents, repeating the steps four to six for the next image, generating an independent binary compressed file, wherein the format of the finally generated binary file is as follows:
Figure BDA0001911619530000072
examples
The invention is used for an actual DLP printer system, the system adopts a mobile phone as a client, and a server is deployed in a remote place. A user uses a mobile phone as a projection source of the DLP printer, and images are generated and used for printing at the mobile phone end. The three-dimensional model is located at a remote server side.
At the server side, the STL three-dimensional model uploaded by the user, as shown in fig. 2 to 4, is compressed and encoded after being uploaded to the server, and bin files are generated according to the steps of the invention and stored in the server, as shown in fig. 5 and 6.
And at the mobile phone client, a user downloads the bin file into the mobile phone through networking, and when printing, the bin file is decompressed according to the decompression process and an actual image is generated by using an image coding algorithm for displaying and printing.

Claims (3)

1. A method for incrementally compressing and storing continuous slice images based on a three-dimensional model is characterized by comprising the following steps:
establishing an original image storage space, wherein the image storage space always stores a previous original image of a three-dimensional model slice image to be processed;
generating a blank binary file in the original image storage space, and filling the binary file in an incremental manner subsequently;
step three, storing a first image on an original image storage space as a reference standard of a subsequent image, and storing related necessary information of the image;
step four, for the subsequent images, performing incremental processing with the previous image, directly performing exclusive-or operation on the two images to obtain a difference image, and after the processing is finished, updating the storage space of the original image by using the difference image for reference of the next image;
step five, as for the generated difference image, because the difference image is an incremental image, a large number of repeated pixels exist in the difference image, a sparse matrix compression storage method is adopted for compression, but because one pixel of a coefficient matrix needs to be stored by using a plurality of bytes, a method of storing a repeated pixel count value by using a byte size space is used for storage; for the difference image, since the value of the first pixel is already known, counting the same pixels starting from the first pixel, and if a pixel value change is encountered, saving the number of repeated pixels; due to the use of byte storage, only no more than 256 duplicate pixel values can be stored; the flag 0xFF is used here to process more than 253 duplicates, and the stored byte formula generated by the process is as follows:
if the content of the generated byte is f (x), and x is the count value, then
Figure FDA0002273648840000011
After the compression is carried out by adopting the method, one byte can store 253 pixel values at most, but for a larger image, a large number of repeated 0xFD and 0xFF can still be generated, so that the special value is subjected to secondary counting compression, the byte value 0xFE is used for storing the repeated times of 0xFD and 0xFF, and the last 0xFF is not counted;
if the content of the generated secondary compressed byte is F (x), and x is the count value, then
Figure FDA0002273648840000021
After secondary compression is adopted, 253 pixel values are stored at the maximum in one byte, and the original compressed value is kept for the condition that the repeated value after secondary compression is still larger than 253;
step six, counting byte contents generated after secondary compression, storing the total number of bytes in the binary file by using 4 bytes, filling the content of the binary file with the compressed byte contents, repeating the steps four to six for the next image, generating an independent binary compressed file, wherein the format of the finally generated binary file is as follows:
Figure FDA0002273648840000022
2. the method for incrementally compressing and storing the continuous slice images based on the three-dimensional model as recited in claim 1, wherein in step three, the necessary information related to the images comprises:
1) filling the binary file header with the two-dimensional scale of the image;
2) the value of the first pixel of the fill image is shown in the following table:
width of Height Pixel value 2 bytes 2 bytes 1 byte
3) Compressing and storing the image, firstly normalizing the binary image to change all 255 into 1, then processing 1 and 0 according to binary system, and processing each 8 bytes into 1 byte, as shown in the following table:
Figure FDA0002273648840000023
3. the method according to claim 1, wherein in the fourth step, if the current image is c (x), and the previous image in the original image storage space is p (x), the difference image g (x) is obtained as:
g(x)=c(x)^p(x)。
CN201811554989.5A 2018-12-18 2018-12-18 Incremental compression storage method for continuous slice images based on three-dimensional model Active CN109774152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811554989.5A CN109774152B (en) 2018-12-18 2018-12-18 Incremental compression storage method for continuous slice images based on three-dimensional model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811554989.5A CN109774152B (en) 2018-12-18 2018-12-18 Incremental compression storage method for continuous slice images based on three-dimensional model

Publications (2)

Publication Number Publication Date
CN109774152A CN109774152A (en) 2019-05-21
CN109774152B true CN109774152B (en) 2020-03-17

Family

ID=66498048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811554989.5A Active CN109774152B (en) 2018-12-18 2018-12-18 Incremental compression storage method for continuous slice images based on three-dimensional model

Country Status (1)

Country Link
CN (1) CN109774152B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112073736B (en) * 2020-08-04 2022-06-21 深圳市创必得科技有限公司 Encoding method, decoding method and device of 3D model file and 3D printer
CN113704208B (en) * 2021-10-27 2022-02-08 浙江闪铸三维科技有限公司 Compression method of 3D printing file
CN116226131B (en) * 2023-03-07 2024-03-19 易智瑞信息技术有限公司 Multi-temporal three-dimensional slice data storage method and device under multi-tree structure

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106476280A (en) * 2015-08-25 2017-03-08 三星Sds株式会社 The cross-sectional image Transmission system of three dimensional object, method and the dispensing device executing this
CN107230247A (en) * 2017-03-13 2017-10-03 淄博润承知识产权代理有限公司 A kind of synthetic image imaging system and its three-dimensional image reconstruction algorithm
CN108933944A (en) * 2018-06-08 2018-12-04 玖芯半导体有限公司 The method for compressing image that a kind of pair of image data is handled

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9669585B2 (en) * 2014-02-11 2017-06-06 Adobe Systems Incorporated Method and apparatus for embedding a 2-dimensional image in a 3-dimensional model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106476280A (en) * 2015-08-25 2017-03-08 三星Sds株式会社 The cross-sectional image Transmission system of three dimensional object, method and the dispensing device executing this
CN107230247A (en) * 2017-03-13 2017-10-03 淄博润承知识产权代理有限公司 A kind of synthetic image imaging system and its three-dimensional image reconstruction algorithm
CN108933944A (en) * 2018-06-08 2018-12-04 玖芯半导体有限公司 The method for compressing image that a kind of pair of image data is handled

Also Published As

Publication number Publication date
CN109774152A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
CN109774152B (en) Incremental compression storage method for continuous slice images based on three-dimensional model
CN111699695B (en) Method, apparatus and storage medium for decoding encoded data sets
Johnston et al. Improved lossy image compression with priming and spatially adaptive bit rates for recurrent networks
US11632560B2 (en) Methods and apparatuses for encoding and decoding a bytestream
Nguyen et al. Learning-based lossless compression of 3d point cloud geometry
US5412741A (en) Apparatus and method for compressing information
CN104704825B (en) The lossless compression of segmented image data
US8483500B2 (en) Run length coding with context model for image compression using sparse dictionaries
US20140161195A1 (en) Video generator - use of database for video, image, graphics and audio
US8005306B2 (en) Decoding apparatus, inverse quantization method, and computer readable medium
TWI534760B (en) Terminable spatial tree-based position coding and decoding
JP3790728B2 (en) Image encoding apparatus, image decoding apparatus and methods thereof
NirmalRaj SPIHT: a set partitioning in hierarchical trees algorithm for image compression
CN102014283A (en) First-order difference prefix notation coding method for lossless compression of image data
Rahman et al. Histogram alternation based digital image compression using base-2 coding
CN1201562C (en) Lossless image compression with tree coding
WO2024037244A1 (en) Method and apparatus for decoding point cloud data, method and apparatus for encoding point cloud data, and storage medium and device
EP4111417A1 (en) Generating quantization tables for image compression
CN115102934B (en) Decoding method, encoding device, decoding equipment and storage medium for point cloud data
Rao et al. Evaluation of lossless compression techniques
Sandhu et al. Matlab Based Image Compression Using Various Algorithms
Ma et al. An incremental compression storage algorithm for slicing 3D model of DLP Printer
CN111431538B (en) Data compression method, system and storage medium of embedded system
Chen et al. An improvement of embedded zerotree wavelet coding based on compressed sensing
Nithya et al. Survey On Image Compression Algorithms And Their Efficiencies Under Different Types Of Files

Legal Events

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