CN116330661A - Processing method and printing system for slice data for 3D printing - Google Patents

Processing method and printing system for slice data for 3D printing Download PDF

Info

Publication number
CN116330661A
CN116330661A CN202111582230.XA CN202111582230A CN116330661A CN 116330661 A CN116330661 A CN 116330661A CN 202111582230 A CN202111582230 A CN 202111582230A CN 116330661 A CN116330661 A CN 116330661A
Authority
CN
China
Prior art keywords
data
slice data
slice
section
gray
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.)
Pending
Application number
CN202111582230.XA
Other languages
Chinese (zh)
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.)
Shenzhen Anycubic Technology Co Ltd
Original Assignee
Shenzhen Anycubic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Anycubic Technology Co Ltd filed Critical Shenzhen Anycubic Technology Co Ltd
Priority to CN202111582230.XA priority Critical patent/CN116330661A/en
Publication of CN116330661A publication Critical patent/CN116330661A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B29WORKING OF PLASTICS; WORKING OF SUBSTANCES IN A PLASTIC STATE IN GENERAL
    • B29CSHAPING OR JOINING OF PLASTICS; SHAPING OF MATERIAL IN A PLASTIC STATE, NOT OTHERWISE PROVIDED FOR; AFTER-TREATMENT OF THE SHAPED PRODUCTS, e.g. REPAIRING
    • B29C64/00Additive manufacturing, i.e. manufacturing of three-dimensional [3D] objects by additive deposition, additive agglomeration or additive layering, e.g. by 3D printing, stereolithography or selective laser sintering
    • B29C64/30Auxiliary operations or equipment
    • B29C64/386Data acquisition or data processing for additive manufacturing
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B33ADDITIVE MANUFACTURING TECHNOLOGY
    • B33YADDITIVE MANUFACTURING, i.e. MANUFACTURING OF THREE-DIMENSIONAL [3-D] OBJECTS BY ADDITIVE DEPOSITION, ADDITIVE AGGLOMERATION OR ADDITIVE LAYERING, e.g. BY 3-D PRINTING, STEREOLITHOGRAPHY OR SELECTIVE LASER SINTERING
    • B33Y50/00Data acquisition or data processing for additive manufacturing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P10/00Technologies related to metal processing
    • Y02P10/25Process efficiency

Landscapes

  • Chemical & Material Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Materials Engineering (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • Mechanical Engineering (AREA)
  • Optics & Photonics (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

The invention discloses a slice data processing method and a printing system for 3D printing, which mainly aims to reduce the coding data quantity of slice data so as to shorten the transmission time of the coding data. The method comprises the following steps: acquiring slice data to be processed; extracting data characteristics of the slice data; processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data; and generating processed slice data based on the coding type and the intermediate data. The invention is suitable for the coding of slice data.

Description

Processing method and printing system for slice data for 3D printing
Technical Field
The invention relates to the technical field of information, in particular to a processing method and a printing system for slice data for 3D printing.
Background
As the requirements of 3D printing photo-curing models on the fineness of models are higher and higher, the 3D printer screen needs to support 4k/6k/8k aliquoting rate, and as the screen resolution is improved, the data to be displayed on the 3D printer screen is larger and larger, so how to effectively encode slice data to support the high resolution requirement of the photo-curing screen is a problem to be solved.
At present, slice data is generally encoded by a program encoding mode, so that the encoded data is transmitted to a decoding end of a 3D printer for decoding. However, since the photo-curing screen of the 3D printer is mostly a monochrome screen, the slice data to be encoded is complex, including both slice data with gray level and slice data without gray level, and the slice data without gray level is mostly, the encoding mode of the program is fixed, it takes at least two bytes when encoding the slice data without gray level, if there is a black-white condition of the slice data without gray level, more encoded data will be generated, and in addition, when there are more slice data with the same pixel value, the encoding mode of the program needs to use many bytes of encoded data to represent the slice data, thus it is known that the encoding mode of the program causes the encoded data volume to be too large, so that the transmission time of the slice data is prolonged, further the decoding time is increased, and the requirement of high resolution of the photo-curing screen cannot be satisfied.
Disclosure of Invention
The invention provides a slice data processing method and a printing system for 3D printing, which mainly aims at reducing the coding data quantity of slice data so as to shorten the transmission time of coding data.
According to a first aspect of the present invention, there is provided a processing method of slice data for 3D printing, comprising:
acquiring slice data to be processed;
extracting data characteristics of the slice data; processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data;
and generating processed slice data based on the coding type and the intermediate data.
According to a second aspect of the present invention, there is provided a printing system comprising: a slicing device and a printing device, wherein the slicing device comprises a slicing device and a printing device,
the slicing device is used for acquiring slicing data to be processed; extracting data characteristics of the slice data; processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data; generating processed slice data based on the encoding type and the intermediate data;
the printing device is used for printing according to the processed slice data.
According to a third aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring slice data to be processed;
extracting data characteristics of the slice data; processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data;
and generating processed slice data based on the coding type and the intermediate data.
According to a fourth aspect of the present invention there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of:
acquiring slice data to be processed;
extracting data characteristics of the slice data; processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data;
and generating processed slice data based on the coding type and the intermediate data.
Compared with a travel type coding mode, the processing method and the printing system for slice data for 3D printing can acquire slice data to be processed; extracting data characteristics of the slice data; meanwhile, processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data; and finally, generating processed slice data based on the coding type and the intermediate data. Therefore, the slice data can be classified according to the data characteristics by determining the data characteristics corresponding to the slice data, the coding type corresponding to the slice data is determined, and the slice data is coded by adopting a corresponding coding mode, so that the minimum byte number occupied by the whole coded slice data can be ensured, the coding data quantity is reduced, the transmission time of the coding data is shortened, the corresponding decoding time is further shortened, and the high-resolution requirement of a photo-curing screen can be met.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 shows a flowchart of an encoding method for processing slice data for 3D printing according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of encoding of slice data for 3D printing in gray scale according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of encoding of slice data for 3D printing with brightness provided by an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an encoding device for processing slice data for 3D printing according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another encoding apparatus for processing slice data for 3D printing according to an embodiment of the present invention;
fig. 6 shows a schematic physical structure of a computer device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
At present, the encoding mode of the program can cause the encoded data volume to be too large, so that the transmission time of slice data is prolonged, the decoding time is further increased, and the requirement of high resolution of the photo-curing screen can not be met.
In order to solve the above-mentioned problems, an embodiment of the present invention provides an encoding method for processing slice data for 3D printing, as shown in fig. 1, the method comprising:
101. and acquiring slice data to be processed.
The slice data to be processed is obtained by slicing by upper computer software. In order to overcome the defect of large coded data volume in the prior art, the embodiment of the invention classifies slice data according to the data characteristics corresponding to the slice data to be processed, determines the coding type corresponding to the slice data, and codes the slice data according to the coding type by adopting a corresponding coding mode, thereby ensuring that the coded slice data occupies the least byte data as a whole, reducing the coded data volume and shortening the transmission time of the coded data. The embodiment of the invention is mainly applied to an application scene for carrying out data coding on the slice images of the three-dimensional model provided for the printer for printing. The execution subject of the embodiment of the invention is a device or equipment capable of encoding slice data of a photo-curing printer.
For the embodiment of the invention, before the photo-curing printer executes the printing operation, the three-dimensional model is required to be input into the upper computer software for slicing, the slice data to be processed corresponding to the photo-curing printer is obtained, then the encoding operation is performed on the slice data to be processed, so that the encoded slice data is input into the decoding end for decoding, and the photo-curing printer executes the printing operation according to the decoding data. The encoding mode in the embodiment of the invention is mainly suitable for the encoding stage, and the slice data to be processed specifically comprises gray slice data and brightness slice data (non-gray slice data).
102. Extracting data characteristics of the slice data; and processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data.
The data types corresponding to the slice data include gray slice data and luminance slice data (non-gray slice data). For the embodiment of the invention, the existing travel type coding mode only adopts a fixed coding mode to code, and for complex slice data, if a large amount of brightness slice data exists or a large amount of black-white alternate slice data exists, the coding mode of the travel type can increase the coding data amount.
In order to determine the coding type corresponding to the slice data, the data characteristics corresponding to the slice data are required to be determined firstly, the data characteristics corresponding to the slice data of different types are different, and if the slice data are gray slice data, the first data characteristics corresponding to each section of gray slice data in the slice data are determined; and if the slice data are brightness slice data, determining a second data characteristic corresponding to each section of brightness slice data in the slice data. The first data feature comprises a pixel value and a length value corresponding to each section of gray slice data, the pixel value of the gray slice data is between 0 and 255, the second data feature comprises a pixel value and a length value corresponding to each section of brightness slice data, the pixel value of the brightness slice data is 0 or 255, and in addition, the pixel values in the same section of gray slice data or the same section of brightness slice data are the same.
Specifically, if the slice data to be processed is gray slice data, a pixel value corresponding to each piece of gray slice data and a length value corresponding to each piece of gray slice data are determined, for example, the slice data is 34,34,34,34,56,56,56,56,56,112,112,112, and since the pixel values of the slice data are all between 0 and 255, the slice data are gray slice data, the pixel value corresponding to the first piece of gray slice data is 34, the length value is 4, the pixel value corresponding to the second piece of gray slice data is 56, the length value is 5, the pixel value corresponding to the third piece of gray slice data is 112, and the length value is 3.
Further, if the slice data to be processed is luminance slice data, a pixel value corresponding to each piece of luminance slice data and a length value corresponding to each piece of luminance slice data are determined, for example, 0,0,0,0,255,255,255, and since the pixel values of the slice data are 0 and 255, the slice data are determined to be luminance slice data, and the pixel value corresponding to the first piece of luminance slice data is 0, the length value is 4, the pixel value corresponding to the second piece of luminance slice data is 255, and the length value is 3.
Further, if the slice data to be processed includes both the luminance slice data and the grayscale slice data, the pixel value corresponding to each piece of luminance slice data and the length value corresponding to each piece of luminance slice data, and the pixel value corresponding to each piece of grayscale slice data and the length value corresponding to each piece of grayscale slice data are determined, respectively, for example, the slice data is 0,0,0,0,56,56,56,56,56,255,255,255, since the first and third pieces of slice data are 0 and 255, the first and third pieces of slice data can be determined to be luminance slice data, since the second piece of slice data is between 0 and 255, the second piece of slice data can be determined to be grayscale slice data, further, the pixel value corresponding to the first piece of luminance slice data is 0, the length value is 4, the pixel value corresponding to the third piece of luminance slice data is 255, the length value is 3, the pixel value corresponding to the second piece of grayscale slice data is 56, and the length value is 5. Therefore, according to the mode, the first data characteristic corresponding to each piece of gray slice data and the second data characteristic corresponding to each piece of gray slice data in slice data can be determined, so that each piece of gray slice data and each piece of gray slice data are classified based on the first data characteristic and the second data characteristic, the coding type corresponding to each piece of gray slice data and the coding type corresponding to each piece of gray slice data are determined, and each piece of gray slice data are coded by adopting a corresponding brightness coding mode and a corresponding gray coding mode, so that the aim of reducing the coding quantity is achieved.
Further, in the process of encoding slice data, step 102 specifically includes: if the data characteristic is the first data characteristic, determining that the coding type corresponding to each section of gray slice data is a first coding type, and coding each section of gray slice data by using the first coding type to obtain intermediate data corresponding to each section of gray slice data; and if the data characteristic is the second data characteristic, determining the coding type corresponding to each section of brightness slice data as a second coding type, and coding each section of brightness slice data by utilizing the second coding type to obtain intermediate data corresponding to each section of brightness slice data.
When each section of gray slice data is encoded by using a first encoding type, the pixel value and the length value corresponding to each section of gray slice data are required to be encoded independently, so as to obtain intermediate data corresponding to each section of gray slice data, specifically, the pixel value corresponding to each section of gray slice data is encoded by using a first preset bit, so as to obtain the encoded pixel value corresponding to each section of gray slice data; encoding the length value corresponding to each section of gray slice data by using a second preset bit to obtain the encoded length value corresponding to each section of gray slice data; and determining the encoded pixel value and the encoded length value corresponding to each piece of gray slice data as intermediate data corresponding to each piece of gray slice data. The first coding type comprises 0110 coding type, 0000 coding type and 0001 coding type, and the first preset bit and the second preset bit corresponding to different coding types are different.
When coding the pixel value and the length value of each section of gray slice data, firstly judging whether the pixel value corresponding to any section of gray slice data is larger than a preset pixel value; if the pixel value corresponding to any section of gray slice data is larger than the preset pixel value, the pixel value corresponding to each section of gray slice data is respectively encoded by 8 bits, and then the length value corresponding to each section of gray slice data is respectively encoded by 8 bits to obtain intermediate data. The preset pixel value can be set according to the actual slice data complexity.
For example, if the preset pixel value is 16, and the pixel value corresponding to any one of the successive sections of gray slice data is greater than the preset pixel value 16, each of the successive sections of gray slice data is encoded by using an encoding mode of 0110 encoding type, specifically, one byte (8 bits) is used to represent the pixel value corresponding to each section of gray slice data, and one byte (8 bits) is used to represent the length value corresponding to each section of gray slice data, so as to obtain intermediate data.
Further, after the determining whether the pixel value corresponding to any one section of gray slice data is greater than the preset pixel value, the method further includes: if the pixel values corresponding to each section of gray slice data are smaller than or equal to the preset pixel values, judging whether the length values corresponding to the gray slice data of the continuous first preset section number are larger than or equal to the first preset length values or not; if yes, respectively encoding pixel values corresponding to each section of gray slice data by using 4 bits, and respectively encoding length values corresponding to each section of gray slice data by using 12 bits to obtain intermediate data; if not, the pixel value corresponding to each section of gray slice data is encoded by using 4 bits, and then the length value corresponding to each section of gray slice data is encoded by using 4 bits, so that intermediate data is obtained. The first preset number of segments and the first preset length value can be set according to the actual slicing data complexity.
For example, the number of the first preset segments is 3, the first preset length value is 16, the slice data includes 6 segments of continuous gray slice data, the length values corresponding to the 6 segments of gray slice data are 30,30,30,15,10,40 respectively, and since the pixel values corresponding to each segment of continuous gray slice data are smaller than or equal to the preset pixel value 16, it is further determined whether 3 segments of gray slice data with the continuous length values being greater than 16 exist in the gray slice data, and since the length values corresponding to the first three segments of continuous gray slice data are greater than 16, it is determined that each segment of continuous gray slice data is encoded in a 0000 encoding mode, specifically, the pixel values corresponding to each segment of gray slice data are represented by 4 bits, and the length values corresponding to each segment of gray slice data are represented by 12 bits.
In the immediately above example, if the length values corresponding to the 6 pieces of gradation sliced data are 30,15,30,15,10,40, respectively, since 3 pieces of gradation sliced data each having a length value greater than 16 are not present in the above-described gradation sliced data, it is determined that each piece of gradation sliced data is encoded in a 0001 encoding manner, specifically, the pixel value corresponding to each piece of gradation sliced data is represented by 4 bits, and the length value corresponding to each piece of gradation sliced data is represented by 4 bits.
Note that, in the embodiment of the present invention, the method for encoding the gray slice data is not limited to the encoding methods of the 0110, 0000 and 0001 encoding types, and may include other encoding types.
Further, when each section of luminance slice data pair is encoded by using the second encoding type, the pixel value and the length value corresponding to each section of luminance slice data need to be encoded separately to obtain intermediate data corresponding to each section of luminance slice data, specifically, the third preset bit is used to encode the pixel value corresponding to each section of luminance slice data to obtain the encoded pixel value corresponding to each section of luminance slice data; encoding the length value corresponding to each section of brightness slice data by using a fourth preset bit to obtain an encoded length value corresponding to each section of brightness slice data; and determining the encoded pixel value and the encoded length value corresponding to each section of brightness slice data as intermediate data corresponding to each section of brightness slice data. The second coding type comprises 0010 coding type, 0011 coding type, 0100 coding type and 0101 coding type, and the corresponding coding modes of different coding types are different.
When the pixel value and the length value of each section of brightness slice data are coded, firstly judging whether the length value corresponding to any section of brightness slice data is larger than a second preset length; and if the length value corresponding to any section of brightness slice data is larger than the second preset length value, respectively encoding the pixel value corresponding to each section of brightness slice data by using 1 bit, and respectively encoding the length value corresponding to each section of brightness slice data by using 23 bits to obtain intermediate data. The second preset length value can be set according to the actual slice data complexity.
For example, if the second preset length value is 384, if the length value corresponding to any one segment of luminance slice data that is continuous is greater than the second preset length 384, then a 0101 encoding mode is adopted to encode each segment of luminance slice data that is continuous, specifically, 1 bit is used to represent the pixel value corresponding to each segment of luminance slice data, and 23 bits are used to represent the length value corresponding to each segment of luminance slice data, so as to obtain intermediate data. If the slice data further includes grayscale slice data, each piece of grayscale slice data may be encoded by the above-described method for encoding grayscale slice data.
Further, after the determining whether the length value corresponding to any one section of brightness slice data is greater than the second preset length, the method further includes: if the length values corresponding to the brightness slice data of each section are smaller than the second preset length, determining whether the length values corresponding to the brightness slice data of the second preset section number which is continuous are smaller than or equal to a third preset length; if yes, the pixel value corresponding to each section of brightness slice data is encoded by using 1 bit, and then the length value corresponding to each section of brightness slice data is encoded by using 7 bits, so that intermediate data is obtained. The second preset number of segments and the third preset length value can be set according to the actual slicing data complexity.
For example, the second preset number of segments is 3, the third preset length value is 42, the slice data includes 6 segments of continuous luminance slice data, the length values corresponding to the 6 segments of luminance slice data are 30,30,30,45,45,45 respectively, and since the length value corresponding to each segment of continuous luminance slice data is smaller than the second preset length 384, it is further determined whether 3 segments of luminance slice data with the continuous length value smaller than or equal to 42 exist in the luminance slice data, and since the length values corresponding to the first three segments of continuous luminance slice data are smaller than 42, it is determined that the encoding mode of 0011 is adopted to encode each segment of continuous luminance slice data, specifically, 1 bit is used to represent the pixel value corresponding to each segment of luminance slice data, and 7 bits are used to represent the length value corresponding to each segment of luminance slice data.
Further, after the determining whether the length value corresponding to any one section of brightness slice data is greater than the second preset length, the method further includes: if the length values corresponding to the brightness slice data of each section are smaller than the second preset length value, judging whether the length values corresponding to the brightness slice data of the third preset section number which is continuous respectively are smaller than or equal to the fourth preset length; if yes, respectively encoding pixel values corresponding to each section of brightness slice data by using a first bit and a fifth bit, and respectively encoding length values corresponding to each section of brightness slice data by using a second bit to a fourth bit and a sixth bit to an eighth bit to obtain intermediate data; if not, the pixel value corresponding to each section of brightness slice data is encoded by using 1 bit, and then the length value corresponding to each section of brightness slice data is encoded by using 15 bits to obtain intermediate data. The third preset number of segments and the fourth preset length can be set according to the actual slicing data complexity.
For example, the third preset number of segments is 3, the fourth preset length is 2, the slice data includes 6 segments of luminance slice data that are consecutive, the length values corresponding to the 6 segments of luminance slice data are 30,30,30,1,1,1, and 3 segments of luminance slice data whose consecutive length values are all less than or equal to 2 exist in the luminance slice data, so that it is determined that the encoding mode of 0010 is adopted to encode each segment of luminance slice data, specifically, the first bit and the fifth bit are used to encode the pixel value corresponding to each segment of luminance slice data, and the second bit to the fourth bit and the sixth bit to the eighth bit are used to encode the length value corresponding to each segment of luminance slice data. If the luminance slice data does not satisfy any of the above cases, the 0100 encoding method may be used to encode each piece of luminance slice data, specifically, 1 bit may be used to encode the pixel value corresponding to each piece of luminance slice data, and 15 bits may be used to encode the length value corresponding to each piece of luminance slice data, so that the luminance slice data in the slice data may be encoded according to the above-provided encoding methods.
Note that, in the embodiment of the present invention, the encoding method for encoding the luminance slice data is not limited to the encoding methods of 0010, 0011, 0100 and 0101 encoding types, and may include other encoding types.
103. And generating processed slice data based on the coding type and the intermediate data.
For the embodiment of the present invention, after determining the coding type corresponding to each section of gray slice data or luminance slice data in slice data and coding the same in a corresponding manner, adjacent intermediate data belonging to the same coding type and the coding length corresponding to the intermediate data may be determined according to the coding type corresponding to each section of gray slice data or luminance slice data, and the processed slice data may be generated according to the coding type and the coding length, based on which step 104 specifically includes: determining the corresponding coding length of the intermediate data; the processed slice data is generated based on the encoding length, the encoding type, and the intermediate data.
As shown in fig. 2, the slice data includes 6 sections of continuous gray slice data, the coding types corresponding to the 6 sections of continuous gray slice data are 0110, the data 1-6 are intermediate data of which 6 sections are coded by the 0110 coding mode, the coding length is determined to be 6 because the intermediate data are 6 sections, based on the 6 sections of intermediate data, the coding type 0110 and the coding length 6, the coded data frames commonly corresponding to the 6 sections of gray slice data, namely, the processed slice data, the frame heads in the coded data frames respectively represent the coding types and the coding lengths corresponding to the intermediate data, after the coded data frames corresponding to the gray slice data are generated, the coded data frames can be sent to a decoding end for decoding, and the decoding end can decode the intermediate data according to the coding types and the coding lengths in the coded data frames, so that a photo-curing printer prints based on the decoded intermediate data.
Meanwhile, as shown in fig. 3, the slice data includes 5 consecutive luminance slice data, the encoding types corresponding to the 5 consecutive luminance slice data are 0101, the data 1-5 are intermediate data encoded by the 0101 encoding method, the encoded luminance slice data are 5 segments, so that the encoding length is determined to be 5, based on the 5 encoded luminance slice data, the encoding type 0101 and the encoding length 5, an encoded data frame corresponding to the 5 luminance slice data together, that is, the encoded slice data, is generated, and the frame header in the encoded data frame respectively represents the encoding type 0101 and the encoding length 5 corresponding to the intermediate data.
Compared with a travel type coding mode, the slice data processing method for 3D printing provided by the embodiment of the invention can acquire slice data to be processed; extracting data characteristics of the slice data; meanwhile, processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data; and finally, generating processed slice data based on the coding type and the intermediate data. Therefore, the slice data can be classified according to the data characteristics by determining the data characteristics corresponding to the slice data, the coding type corresponding to the slice data is determined, and the slice data is coded by adopting a corresponding coding mode, so that the minimum byte number occupied by the whole coded slice data can be ensured, the coding data quantity is reduced, the transmission time of the coding data is shortened, the corresponding decoding time is further shortened, and the high-resolution requirement of a photo-curing screen can be met.
Further, as a specific implementation of fig. 1, an embodiment of the present invention provides a processing apparatus for slice data for 3D printing, as shown in fig. 4, where the apparatus includes: an acquisition unit 31, a processing unit 32, and a generation unit 33.
The acquisition unit 31 may be configured to acquire slice data to be processed.
The processing unit 32 may be configured to extract data features of the slice data; and processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data.
The generating unit 33 may be configured to generate the processed slice data based on the encoding type and the intermediate data.
In a specific application scenario, the processing unit 32, as shown in fig. 5, includes: a first determination module 321 and a second determination module 322.
The first determining module 321 may be configured to determine a first data feature corresponding to each piece of gray slice data in the slice data if the slice data is gray slice data.
The second determining module 322 may be configured to determine a second data feature corresponding to each piece of luminance slice data in the slice data if the slice data is luminance slice data.
In a specific application scenario, the processing unit 32 further includes: a first coding module 323 and a second coding module 324.
The first coding module 323 may be configured to determine that a coding type corresponding to each piece of grayscale slice data is a first coding type if the data feature is the first data feature, and code each piece of grayscale slice data by using the first coding type to obtain intermediate data corresponding to each piece of grayscale slice data.
The second encoding module 324 may be configured to determine that the encoding type corresponding to each piece of luminance slice data is a second encoding type if the data feature is the second data feature, and encode each piece of luminance slice data by using the second encoding type to obtain intermediate data corresponding to each piece of luminance slice data.
Further, the first encoding module 323 may be specifically configured to encode the pixel value and the length value corresponding to each piece of gray slice data separately, so as to obtain intermediate data corresponding to each piece of gray slice data.
The second encoding module 324 may be specifically configured to encode the pixel value and the length value corresponding to each piece of luminance slice data separately, so as to obtain intermediate data corresponding to each piece of luminance slice data.
In a specific application scenario, the first encoding module 323 includes: a first encoding submodule and a first determining submodule.
The first coding sub-module may be configured to encode a pixel value corresponding to each piece of gray slice data by using a first preset bit, so as to obtain an encoded pixel value corresponding to each piece of gray slice data.
The first encoding submodule is further configured to encode a length value corresponding to each piece of gray slice data by using a second preset bit, so as to obtain an encoded length value corresponding to each piece of gray slice data.
The first determining submodule may be configured to determine the encoded pixel value and the encoded length value corresponding to each piece of gray slice data as intermediate data corresponding to each piece of gray slice data.
In a specific application scenario, the second encoding module 324 includes: a second encoding submodule and a second determining submodule.
The second encoding submodule may be configured to encode a pixel value corresponding to each section of luminance slice data by using a third preset bit to obtain an encoded pixel value corresponding to each section of luminance slice data.
The second encoding submodule is further configured to encode a length value corresponding to each piece of luminance slice data by using a fourth preset bit, so as to obtain an encoded length value corresponding to each piece of luminance slice data.
The second determining submodule may be configured to determine the encoded pixel value and the encoded length value corresponding to each piece of luminance slice data as intermediate data corresponding to each piece of luminance slice data.
In a specific application scenario, in order to generate the processed slice data, the generating unit 33 includes: a third determination module 331 and a generation module 332.
The third determining module 331 may be configured to determine a coding length corresponding to the intermediate data.
The generating module 332 may be configured to generate the processed slice data based on the encoding length, the encoding type, and the intermediate data.
It should be noted that, other corresponding descriptions of each functional module related to the processing device for slice data for 3D printing provided in the embodiment of the present invention may refer to corresponding descriptions of the method shown in fig. 1, which are not repeated herein.
Based on the above method as shown in fig. 1, correspondingly, the embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the following steps: acquiring slice data to be processed; extracting data characteristics of the slice data; processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data; and generating processed slice data based on the coding type and the intermediate data.
Based on the embodiment of the method shown in fig. 1 and the apparatus shown in fig. 4, the embodiment of the present invention further provides a physical structure diagram of a computer device, as shown in fig. 6, where the computer device includes: a processor 41, a memory 42, and a computer program stored on the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43, the processor 41 performing the following steps when said program is executed: acquiring slice data to be processed; extracting data characteristics of the slice data; processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data; and generating processed slice data based on the coding type and the intermediate data.
By the technical scheme, the slice data to be processed can be obtained; extracting data characteristics of the slice data; meanwhile, processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data; and finally, generating processed slice data based on the coding type and the intermediate data. Therefore, the slice data can be classified according to the data characteristics by determining the data characteristics corresponding to the slice data, the coding type corresponding to the slice data is determined, and the slice data is coded by adopting a corresponding coding mode, so that the minimum byte number occupied by the whole coded slice data can be ensured, the coding data quantity is reduced, the transmission time of the coding data is shortened, the corresponding decoding time is further shortened, and the high-resolution requirement of a photo-curing screen can be met.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A processing method of slice data for 3D printing, comprising:
acquiring slice data to be processed;
extracting data characteristics of the slice data; processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data;
and generating processed slice data based on the coding type and the intermediate data.
2. The method of claim 1, wherein the extracting the data features of the slice data comprises:
if the slice data are gray slice data, determining first data features corresponding to each section of gray slice data in the slice data;
and if the slice data are brightness slice data, determining a second data characteristic corresponding to each section of brightness slice data in the slice data.
3. The method according to claim 2, wherein the processing the slice data based on the data characteristics and the coding type to obtain intermediate data corresponding to the slice data comprises:
if the data characteristic is the first data characteristic, determining that the coding type corresponding to each section of gray slice data is a first coding type, and coding each section of gray slice data by using the first coding type to obtain intermediate data corresponding to each section of gray slice data;
and if the data characteristic is the second data characteristic, determining the coding type corresponding to each section of brightness slice data as a second coding type, and coding each section of brightness slice data by utilizing the second coding type to obtain intermediate data corresponding to each section of brightness slice data.
4. A method according to claim 3, wherein said encoding each piece of said grayscale slice data using said first encoding type to obtain intermediate data corresponding to each piece of said grayscale slice data comprises:
independently encoding pixel values and length values corresponding to each section of gray slice data to obtain intermediate data corresponding to each section of gray slice data;
and encoding each section of brightness slice data by using the second encoding type to obtain intermediate data corresponding to each section of brightness slice data, wherein the intermediate data comprises:
and independently encoding the pixel value and the length value corresponding to each section of brightness slice data to obtain the intermediate data corresponding to each section of brightness slice data.
5. The method according to claim 4, wherein the separately encoding the pixel value and the length value corresponding to each piece of gray slice data to obtain the intermediate data corresponding to each piece of gray slice data includes:
encoding the pixel value corresponding to each section of gray slice data by using a first preset bit to obtain the encoded pixel value corresponding to each section of gray slice data;
encoding the length value corresponding to each section of gray slice data by using a second preset bit to obtain the encoded length value corresponding to each section of gray slice data;
and determining the encoded pixel value and the encoded length value corresponding to each piece of gray slice data as intermediate data corresponding to each piece of gray slice data.
6. The method of claim 4, wherein the separately encoding the pixel value and the length value corresponding to each piece of luminance slice data to obtain the intermediate data corresponding to each piece of luminance slice data comprises:
encoding the pixel value corresponding to each section of brightness slice data by using a third preset bit to obtain the encoded pixel value corresponding to each section of brightness slice data;
encoding the length value corresponding to each section of brightness slice data by using a fourth preset bit to obtain an encoded length value corresponding to each section of brightness slice data;
and determining the encoded pixel value and the encoded length value corresponding to each section of brightness slice data as intermediate data corresponding to each section of brightness slice data.
7. The method of claim 1, wherein the generating processed slice data based on the encoding type and the intermediate data comprises:
determining the corresponding coding length of the intermediate data;
the processed slice data is generated based on the encoding length, the encoding type, and the intermediate data.
8. A printing system, comprising: a slicing device and a printing device, wherein the slicing device comprises a slicing device and a printing device,
the slicing device is used for acquiring slicing data to be processed; extracting data characteristics of the slice data; processing the slice data based on the data characteristics and the coding types to obtain intermediate data corresponding to the slice data; generating processed slice data based on the encoding type and the intermediate data;
the printing device is used for printing according to the processed slice data.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program when executed by the processor implements the steps of the method according to any one of claims 1 to 7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202111582230.XA 2021-12-22 2021-12-22 Processing method and printing system for slice data for 3D printing Pending CN116330661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111582230.XA CN116330661A (en) 2021-12-22 2021-12-22 Processing method and printing system for slice data for 3D printing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111582230.XA CN116330661A (en) 2021-12-22 2021-12-22 Processing method and printing system for slice data for 3D printing

Publications (1)

Publication Number Publication Date
CN116330661A true CN116330661A (en) 2023-06-27

Family

ID=86877564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111582230.XA Pending CN116330661A (en) 2021-12-22 2021-12-22 Processing method and printing system for slice data for 3D printing

Country Status (1)

Country Link
CN (1) CN116330661A (en)

Similar Documents

Publication Publication Date Title
CN109842803B (en) Image compression method and device
US7899262B2 (en) Data compression apparatus and data compressing program storage medium
CN111131828B (en) Image compression method and device, electronic equipment and storage medium
EP2652951B1 (en) Method and system for encoding display data
CN105027560A (en) Method of determining binary codewords for transform coefficients
WO2021031877A1 (en) Methods and apparatus for image coding and decoding, and chip
CN112118449B (en) Method and device for compressing and decompressing image
US20190297333A1 (en) Method and apparatus for image compression that employs multiple indexed color history buffers
CN108924557B (en) Image processing method, image processing device, electronic equipment and storage medium
KR102657172B1 (en) Method of entropy coding data samples
US6721456B1 (en) Color image data and control bit compression scheme with run length encoding
CN116330661A (en) Processing method and printing system for slice data for 3D printing
CN108668170B (en) Image information processing method and device, and storage medium
US20080025620A1 (en) Data compression apparatus and data compressing program storage medium
CN115941958A (en) Video coding method and device, electronic equipment and storage medium
CN109413445B (en) Video transmission method and device
CN112449186B (en) Encoding method, decoding method, corresponding devices, electronic equipment and storage medium
CN110545446A (en) desktop image encoding and decoding methods, related devices and storage medium
CN110855990B (en) Image encoding method, image decoding method, computer device, and image processing system
CN112449201B (en) Decoding method, encoding method, corresponding devices, electronic equipment and storage medium
CN110545435B (en) Table top pixel coding method, device and storage medium based on probability model
JP2005055825A (en) Image display device, image display method and image display program
JP2014143655A (en) Image encoder, image decoder and program
JP2003348355A (en) Image processing apparatus and control method therefor
CN112995745B (en) Image storage method and circuit system

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