A printing and dyeing method, computer device and mobile terminal based on artificial intelligence technology
Through the printing and dyeing method based on artificial intelligence technology, the images are automatically processed and stylized, which solves the problems of poor image printing and dyeing effects and difficult to meet the stylized needs in the prior art, and achieves efficient and excellent quality printing and dyeing effects.
Patent Information
- Application Number
- CN202011284969.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-17
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2040-11-17
AI Technical Summary
The prior art is difficult to directly print and dye images onto physical media, and cannot meet the needs of image stylization, resulting in poor printing and dyeing effects and high cost.
The printing and dyeing method based on artificial intelligence technology is adopted, and the image is automatically processed and stylized through image processing algorithms and artificial intelligence technology to generate images that meet the printing and dyeing parameters requirements, and then printed and dyed them onto the physical medium through the printing and dyeing terminal.
It realizes efficient and excellent quality printing and dyeing of images on physical media, meets the needs of image stylization, reduces the cost of manual editing, and ensures the consistency of printing and dyeing effects.
Smart Images

Figure CN112419441B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of printing and dyeing, and in particular relates to a printing and dyeing method based on artificial intelligence technology and a computer device and a mobile terminal for executing the printing and dyeing method Background Art
[0002] People want to print photos or images onto clothes or other physical media, but existing printing equipment often cannot print such images directly onto physical media due to accuracy and dye issues, or printing fails due to the loss of image features when the images or photos are complexly printed. The existing method of using filters to process images before printing also has similar defects, resulting in printing failures or poor results.
[0003] At the same time, due to the reality and complex lines of the photo itself or the noise on the picture, the pattern effect after direct printing on the physical medium is also unsatisfactory. In addition, in addition to the poor artistic effect when printing photos directly on physical media such as clothes, water cups, mobile phone cases, etc., there are often needs for image stylization, such as cartoonization, oil painting and other aesthetic style requirements. The existing method of modifying the image by the operator using Photoshop and other image modification software not only consumes a lot of manpower and time, but also has uneven quality, and requires professional designers to participate in painting or processing. The problems of high cost, high difficulty and uncontrollable effect are very significant. Summary of the invention
[0004] The embodiments of the present application provide a printing and dyeing method, a computer device and a mobile terminal based on artificial intelligence technology, so as to at least solve the problem that the effect of printing and dyeing images on physical media is poor and cannot meet the stylization requirements.
[0005] In a first aspect, the present application provides a printing and dyeing method based on artificial intelligence technology, comprising:
[0006] An image receiving step, receiving and storing a first image;
[0007] An image processing step of automatically processing the first image to make it meet the preset printing and dyeing parameter requirements to obtain a second image;
[0008] The image printing step outputs the second image to a printing terminal, and prints the second image onto a physical medium through the printing terminal.
[0009] Preferably, the image processing step further includes: directly processing the first image using an image processing algorithm, and automatically editing the colors and lines of the first image to obtain the second image while retaining the subject features of the first image.
[0010] Preferably, the image processing step also includes: performing stylized processing on the first image by directly calling an existing commercial artificial intelligence open platform API interface to obtain the second image that meets pre-set printing and dyeing parameter requirements, wherein the stylized processing includes but is not limited to cartoonization and oil painting.
[0011] Preferably, the image processing step further includes directly performing stylized processing on the first image through an image style transfer program of an artificial intelligence neural network, wherein the stylized processing includes but is not limited to cartoonization and oil painting.
[0012] Preferably, the image printing step further includes: transmitting the second image to a printing terminal; the step of transmitting to the printing terminal includes at least one method of retaining information through email, APP and web page.
[0013] Preferably, the image printing step further comprises: first printing the second image on a printing and dyeing adhesive paper, and then heating and pressing the second image on the physical medium through a printing and dyeing device.
[0014] Preferably, the image printing step further comprises: using an inkjet printing device to directly spray the first image onto the physical medium.
[0015] Preferably, the image receiving step further includes: a customized image receiving step for receiving a customized and personalized first image through a client.
[0016] In a second aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements a printing and dyeing method based on artificial intelligence technology as described in the first aspect above.
[0017] In a third aspect, an embodiment of the present application provides a mobile terminal comprising a memory, a processor, and an application stored in the memory and executable on the processor; when the application is executed by the processor, the printing and dyeing method based on artificial intelligence technology as described in the first aspect above can be implemented.
[0018] Compared with the related art, the printing and dyeing method based on artificial intelligence technology provided in the embodiment of the present application utilizes image processing algorithm technology and artificial intelligence technology to automatically simplify or change the original image lines, and uses a fast and efficient method to ensure quality consistency to modify the image to meet the needs of printing and dyeing images on physical media; in addition, the present invention can reprocess the image for printing and dyeing, and make it meet other aesthetic standards, such as: cartoonization and oil painting, while greatly saving manual photo editing.
[0019] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 It is a flow chart of printing and dyeing methods based on artificial intelligence technology;
[0022] Figure 2 It is a flow chart of an embodiment of the printing and dyeing method based on artificial intelligence technology of the present invention;
[0023] Figure 3 is a framework diagram of a computer device according to an embodiment of the present application;
[0024] In the above picture:
[0025] 20. Bus; 21. Processor; 22. Memory; 23. Communication interface. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0027] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0028] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0029] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a kind of", "the" and the like involved in this application do not indicate a quantitative limitation and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices.
[0030] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings:
[0031] Figure 1 For a flow chart of the printing and dyeing method based on artificial intelligence technology of the present invention, please refer to Figure 1 The printing and dyeing method based on artificial intelligence technology of the present invention comprises the following steps:
[0032] S101: Receive and store a first image. Optionally, step S101 further includes: a customized image receiving step, for receiving a customized personalized first image through a client. The first image can be a photo or picture taken by a user client to meet the user's personalized customization requirements.
[0033] S102: Automatically process the first image to make it meet preset printing and dyeing parameter requirements, and obtain a second image.
[0034] Optionally, the step S102 further includes directly processing the first image using an image processing algorithm, and automatically editing the colors and lines of the first image to obtain the second image while retaining the subject features of the first image.
[0035] Optionally, the step S102 may also perform stylization processing on the first image to obtain the second image that meets the preset printing and dyeing parameter requirements, wherein the stylization processing includes but is not limited to cartoonization and oil painting.
[0036] Optionally, the step S102 may first perform stylization processing on the first image, and then use an image processing algorithm to directly process the first image, and automatically edit the color and lines of the first image while retaining the subject characteristics of the first image to obtain the second image that meets the pre-set printing and dyeing parameter requirements; wherein the stylization processing includes but is not limited to cartoonization and oil painting.
[0037] In some of the embodiments, the stylization processing can directly call the existing commercial artificial intelligence open platform API interface; wherein the existing commercial artificial intelligence open platform API interface includes the Baidu artificial intelligence open platform API interface;
[0038] Actively change the image to make it suitable for printing before printing and dyeing. The core method is to write code based on algorithms such as bilateral filtering and median filtering to remove image noise and ensure the clarity of graphic edges. The example processes image information by referencing the OpenCV graphics processing library to reduce the noise of the image, and sets parameters such as the number of sampling and filtering according to printing and dyeing requirements to ensure the printing and dyeing quality after image processing; it can also be used to change the internal color gradient, make it closer to the same color, reduce color gradient, and strengthen contour lines, so that the quality effect after printing and dyeing is better.
[0039] In the embodiment of the present invention, artificial intelligence related technology software written in programming code can be used to analyze and change the image, and the image color, pixel position, and line can be fully changed while retaining the image characteristics, as follows:
[0040] Call the OpenCV graphics processing library, use the bilateral filtering method and the median filtering method to reduce the noise of the image; OpenCV provides a function to convolve the kernel with the image, and blur the image by convolving the image with the low-pass filter kernel, which is helpful to eliminate image noise. OpenCV mainly provides four types of blurring technology. The embodiment of the present invention uses median filtering and bilateral filtering. Median filtering is mainly used to ensure the important problem of image quality during printing and dyeing, such as salt and pepper noise; bilateral filtering is mainly used to remove noise while keeping the edges clear and sharp. The above method is implemented by using artificial intelligence related technology software made of programming code to analyze and change the image. While retaining the characteristics of the image, it can achieve a comprehensive change in image color, pixel position, and lines. Artificial intelligence programs can be written in a variety of computer languages, such as C++, JAVA, and PYTHON.
[0041] Median filtering replaces the value of a point in the image data with the median of the values of all points in the area of that point, thereby effectively removing large-area noise points that have a significant impact on the printing and dyeing effect.
[0042] Bilateral filtering uses a weighted average method while considering the Euclidean distance. For example, ordinary Gaussian low-pass filtering only considers the influence of position on the central pixel and the radiation difference in the pixel range domain, such as the similarity between the pixel in the convolution kernel and the central pixel, color intensity, depth distance, etc., and uses the weighted average of the brightness values of the surrounding pixels to represent the intensity of a certain pixel. In the edge area of the image, the pixel range domain weight becomes larger to strengthen and maintain the contour information of the image.
[0043] The embodiment of the present invention uses Python to write a program, and the calling functions are cv2.medianBlur() and cv2.bilateralFilter(), and the filtering parameters are set at the same time to ensure the image printing and dyeing quality.
[0044] For image stylization, you can call Baidu's AI commercial API interface or directly use an AI program based on the neural network image style transfer program to stylize the image; you can also use the AI algorithm to improve detail sharpness, and quickly and efficiently improve the resolution and enhance the detail when the resolution is lower than the requirement. Finally, images that meet the printing and dyeing requirements can be generated in a short time and with greatly reduced labor costs, and quickly transmitted to the relevant systems of the printing and dyeing company, realizing a fast, efficient, low-cost and flexible processing process.
[0045] To meet the needs of artistic aesthetics, when images need to be stylized, the Baidu AI Open Platform API interface is called to stylize the images. The main reason for using the Baidu interface is that the interface provided by Baidu has begun commercial applications, with fast speed, high stability, and no need to build a server. The Baidu Image Stylization API interface has the following features: using adversarial generative network technology and neural network image style transfer technology, combined with face detection, hair segmentation, portrait segmentation and other technologies, it can tailor a thousand different two-dimensional anime images for users, and support the generation of two-dimensional anime portraits through parameter settings.
[0046] In all embodiments of this process, stylization processing can also be directly implemented on the first image through an image style transfer program of an artificial intelligence neural network. For example, using a Python third-party library, Google's "Style Transfer" open source program of the 'TensorFlow' artificial intelligence toolkit. This program uses deep learning to transfer styles between images. The same functions and results as when calling the above API interface can be achieved.
[0047] The artificial intelligence technology is used to make the stylized image suitable for printing and dyeing. The bilateral smoothing filter is used again to set relevant parameters to ensure that the image is suitable for printing and dyeing. If the stylized image meets the printing and dyeing requirements, it is directly printed and dyed.
[0048] S103: Outputting the second image to a printing terminal, and printing the second image on a physical medium through the printing terminal.
[0049] Optionally, the step S103 also includes transmitting the second image to a printing and dyeing terminal; wherein the step of transmitting to the printing and dyeing terminal includes at least one method of retaining information through email, APP and web page.
[0050] Optionally, the step S103 includes first printing the second image on a printing and dyeing adhesive paper, and then heating and pressing the second image on the physical medium through a printing and dyeing device.
[0051] Optionally, the step S103 includes using an inkjet printing device to directly print the first image on the physical medium.
[0052] When the embodiment of the present invention adopts the email method for sending, an executable program of the mail sender that can transmit picture information and input address information is executed in the WINDOS system to realize mail transmission. The program is written in python and calls the smtplib, MIMEText and Header libraries, which can realize automatic batch sending of mails. The system automatically matches the order pictures and the corresponding printing and dyeing media, and sends the address bar information entered by the customer at the same time, realizing a one-click flexible manufacturing process from shooting creation to printing and dyeing manufacturing.
[0053] When the embodiment of the present invention is executed in the app mode, QPython 3L is used to directly convert the pictures taken by the mobile phone into new pictures corresponding to the requirements, and a dedicated APP for printers such as HP or Epson is installed to print the thermal transfer stickers of the required pictures on sublimation transfer paper, and then perform thermal transfer printing and dyeing. The process from the mobile terminal that can take pictures with the mobile phone to the flexible printing and dyeing manufacturing is realized.
[0054] To prevent the images from sticking to each other on the physical medium, lay the printed and dyed physical medium flat or stack it on a flat plate to dry in the shade.
[0055] Figure 2 FIG. 1 is a flow chart of an embodiment of a printing and dyeing method based on artificial intelligence technology of the present invention, as shown in FIG. Figure 2 As shown, the printing and dyeing method provided in the present application includes the following steps:
[0056] S200, the system receives and reads the original image data, establishes a data set, and records the data set in a cache medium;
[0057] S201, transfer the data set to the algorithm program, call the OpenCV image processing library, use bilateral filtering and median filtering to remove image noise. Set the parameter sampling number to 2 and the bilateral filtering number to 7;
[0058] S203, determining whether image stylization processing is required;
[0059] If image stylization is required, use an artificial intelligence image processing program to process the image, use the Baidu artificial intelligence commercial API interface, and the interface call method is POST; or use a neural network-based image style transfer program and perform data set training to transform new images. The new image retains the characteristics of the original image based on the pre-set parameters, and automatically changes the original image pixels, intensity, and color, etc., to make it more suitable for printing and dyeing or change it to the required image style that meets the printing and dyeing conditions.
[0060] If the printing and dyeing requirements are still not met after stylization processing, bilateral filtering and median filtering are performed again; if the requirements are met, the image is transmitted to a server via email or APP.
[0061] S204, receiving a new image from the server and sending the new image data information to the printing device.
[0062] S205, the printing and dyeing equipment receives the new image, places the printed medium, determines the printing and dyeing position, and performs the printing and dyeing operation.
[0063] S206, finally performing drying and cooling operations.
[0064] It should be noted that the steps shown in the above process or the flowchart of the attached figure can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here. In this embodiment, the server is not a necessary device, and the printing and dyeing device can also directly receive a processed image transmitted by the system to perform the printing and dyeing operation.
[0065] In addition, combined Figure 1 The printing and dyeing method based on artificial intelligence technology described in the embodiment of the present application can be implemented by an electronic device. Figure 3 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present application.
[0066] The computer device may include a processor 21 and a memory 22 storing computer program instructions.
[0067] Specifically, the processor 21 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0068] Among them, the memory 22 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 22 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 22 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 22 may be inside or outside the data processing device. In a specific embodiment, the memory 22 is a non-volatile memory. In a specific embodiment, the memory 22 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable ProgrammableRead-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable ProgrammableRead-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0069] The memory 22 may be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 21 .
[0070] The processor 21 implements any one of the printing and dyeing methods based on artificial intelligence technology in the above embodiments by reading and executing computer program instructions stored in the memory 22 .
[0071] In some embodiments, the computer device may further include a communication interface 23 and a bus 20. Figure 2 As shown, the processor 21, the memory 22, and the communication interface 23 are connected via a bus 20 and communicate with each other.
[0072] The communication port 23 can realize data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.
[0073] The bus 20 includes hardware, software or both, and couples the components of the electronic device to each other. The bus 20 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 20 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 20 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0074] The computer device can execute a printing and dyeing method based on artificial intelligence technology in an embodiment of the present application.
[0075] In addition, in combination with a printing and dyeing method based on artificial intelligence technology in the above embodiment, the embodiment of the present application can provide a mobile terminal for implementation. The mobile terminal includes a memory, a processor, and an application stored in the memory and executable on the processor, and when the application is executed by the processor, any one of the printing and dyeing methods based on artificial intelligence technology in the above embodiment can be implemented.
[0076] Optionally, the application runs the Python program through QPython 3L to implement the step of calling the existing commercial artificial intelligence open platform API interface in the above embodiment.
[0077] Optionally, the application also includes a corresponding application for a printer to print a thermal transfer sticker of the required image on the sublimation transfer paper, and then perform thermal transfer printing.
[0078] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0079] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A printing and dyeing method based on artificial intelligence technology, characterized in that: include: An image receiving step, receiving and storing a first image; an image processing step, automatically processing the first image to make it meet the preset printing and dyeing parameter requirements, obtaining an intermediate image, and determining whether image stylization is required. If so, stylizing the intermediate image to obtain a second image; if not, using the intermediate image as the second image; an image printing step, outputting the second image to a printing terminal, and printing the second image onto a physical medium through the printing terminal; Among them, the image printing and dyeing step also includes: using a bilateral smoothing filter on the second image obtained by stylization processing, setting parameters, ensuring that the image is suitable for printing and dyeing, if the second image obtained by stylization processing meets the printing and dyeing requirements, then directly printing and dyeing; if the second image obtained by stylization processing does not meet the printing and dyeing requirements, then filtering the second image and returning to the image processing step, when printing and dyeing, first print the second image on a printing and dyeing adhesive paper, and then heat and press it on the physical medium through a printing and dyeing device.
2. The printing and dyeing method based on artificial intelligence technology according to claim 1, characterized in that: The image processing step also includes: directly processing the first image using an image processing algorithm, and automatically editing the color and lines of the first image to obtain the intermediate image while retaining the subject features of the first image.
3. The printing and dyeing method based on artificial intelligence technology according to claim 1 or 2, characterized in that: The image processing step also includes: stylizing the intermediate image by directly calling an existing commercial artificial intelligence open platform API interface to obtain the second image that meets the preset printing and dyeing parameter requirements, wherein the stylization processing includes cartoonization and oil painting.
4. The printing and dyeing method based on artificial intelligence technology according to claim 1 or 2, characterized in that: The image processing step also includes directly performing stylized processing on the intermediate image through an image style transfer program of an artificial intelligence neural network, wherein the stylized processing includes cartoonization and oil painting.
5. The printing and dyeing method based on artificial intelligence technology according to claim 1, characterized in that: The step of outputting the second image to a printing and dyeing terminal includes at least one method of storing information via email, APP, and web page.
6. The printing and dyeing method based on artificial intelligence technology according to claim 1, characterized in that: The image receiving step further includes: a customized image receiving step for receiving a customized and personalized first image through a client.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the printing and dyeing method based on artificial intelligence technology as described in any one of claims 1 to 6 is implemented.
8. A mobile terminal comprising a memory, a processor, and an application stored in the memory and executable on the processor, characterized in that: When the application is executed by the processor, the printing and dyeing method based on artificial intelligence technology as described in any one of claims 1 to 6 can be implemented.
Citation Information
Patent Citations
Stick figure generation method based on face photo
CN107945244A