Image processing apparatus, image processing method, computer program product, and computer readable storage medium
By obtaining and analyzing the color information in the image, determining the foreground and background color of the QR code, the problem of bad fusion between the QR code and the image is solved, and the clarity and readability of the QR code and the aesthetics of the image are improved.
Patent Information
- Application Number
- CN202411438907.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-16
- Filing Date
- 2024-10-15
- Publication Date
- 2025-04-18
AI Technical Summary
When the prior art prints the QR code in part of the image, it is easy to cause the QR code to be poorly integrated with the image, affecting the aesthetics and artistic nature, and at the same time, it may reduce the readability of the QR code.
By obtaining the color information of the QR code area and its surrounding area on the image, the colors of the foreground and background of the QR code are determined based on these color information, so that the QR code is drawn on the image, so that it blends well with the image and remains clear and readable.
It realizes a good integration of QR codes and images, enhances the aesthetics and artistic nature of the images, and ensures the clarity and readability of the QR codes.
Smart Images

Figure CN119850784A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an image processing device, an image processing method, a computer program product and a computer-readable storage medium. Background Art
[0002] In recent years, the digitization of photographs has made progress, and information such as the shooting date, the model name of the shooting device, and the GPS data of the shooting location can be recorded together with the shooting data. In addition, even a home printer can easily print a QR code (a geometric pattern, such as a QR code (registered trademark) or a barcode, etc.) (which includes the shooting data and time, the address of the homepage and the shooting location) together with the shot image. In the case of printing the QR code together with the shot image, for example, the shot image can be reduced to a smaller size and the QR code can be printed on the outside of the shot image, or the QR code can be printed on a partial area of the shot image so that both the shot image and the QR code are printed within the printable area. In the case of using a printer with a small printable area (for example, a printer with a printable area of about 2 to 3 inches on one side), the latter method (printing the QR code on a partial area of the shot image) is more frequently used.
[0003] QR codes are typically created using two colors (such as white and black) with a large brightness difference to facilitate readability. In the case of methods that print a QR code on a portion of a captured image, the portion of the image is typically left blank, and the black code information is composited with the blank area. Therefore, if a QR code is printed on a portion of the captured image, the code appears clearly, creating a sense of incongruity or potentially detracting from the aesthetic and artistic quality of the captured image.
[0004] Japanese Patent Application Laid-Open No. 2008-33625 discloses a method for inserting a barcode into an image region that satisfies predetermined conditions. Japanese Patent Application Laid-Open No. 2015-127891 discloses a method for adjusting the transmittance of a portion of a QR code region so that the background color is visible, while adjusting the color of the remaining region to a color similar to the background color.
[0005] However, with the method disclosed in Japanese Patent Application Laid-Open No. 2008-33625, the barcode is placed at a position significantly different from the user's intended position, which creates a sense of incongruity. For example, many users prefer to have the QR code placed at the edge of an image, but the QR code may be placed in the center of the image.
[0006] In the case of the method disclosed in Japanese Patent Application Laid-Open No. 2015-127891, if the grayscale level difference in the image area in the background of the two-dimensional code is large and the density of the grayscale level difference is high, the contrast ratio of the two-dimensional code becomes low and the readability of the two-dimensional code is reduced. The contrast ratio of a two-dimensional code is the contrast ratio between the foreground and background of the two-dimensional code. In the case of the method disclosed in Japanese Patent Application Laid-Open No. 2015-127891, the contrast ratio is the contrast ratio between the area with adjusted transmittance and the area with unadjusted transmittance. Summary of the Invention
[0007] The present invention provides a technique for obtaining a two-dimensional code that can be clearly read and well integrated with an image.
[0008] According to the present invention, the image processing device includes: an acquisition unit, which is configured to acquire color information of at least one of an area on an image where a two-dimensional code is to be arranged and a surrounding area of the area; and a drawing unit, which is configured to draw the two-dimensional code on the image, wherein the drawing unit determines the respective colors of the foreground and background of the two-dimensional code based on the color information.
[0009] Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1A and Figure 1B This is the appearance of the printer;
[0011] Figure 1C is an external view of a portable terminal;
[0012] Figure 2 is a block diagram of the printing system;
[0013] Figure 3 It is an expanded view of the ink ribbon;
[0014] Figure 4A It is a cross-sectional view of the printer;
[0015] Figure 4B It is a cross-sectional view of the printer;
[0016] Figure 4C It is a cross-sectional view of the printer;
[0017] Figure 4D It is a cross-sectional view of the printer;
[0018] Figure 4E It is a cross-sectional view of the printer;
[0019] Figure 5 It is a flow chart of printing operation;
[0020] Figure 6 is a flowchart of a print application operation according to Example 1;
[0021] Figure 7A is a diagram indicating the original image;
[0022] Figure 7B is a diagram indicating an arrangement area of a two-dimensional code;
[0023] Figure 7C is a diagram indicating a composite image;
[0024] Figure 8A and Figure 8B is a diagram indicating a QR code;
[0025] Figure 9A is a diagram indicating the original image;
[0026] Figure 9B is a diagram indicating an arrangement area of a two-dimensional code;
[0027] Figure 9C is a diagram indicating a composite image;
[0028] 10A to 10F is a diagram indicating an operation process for determining a layout area and color of a two-dimensional code;
[0029] Figure 11 is a flowchart of a print application operation according to Example 2;
[0030] Figure 12 is a flowchart of a print application operation according to Example 3;
[0031] Figure 13 is a flowchart of a print application operation according to Embodiment 4; and
[0032] Figure 14 is a diagram indicating a composite image and an overcoat layer. DETAILED DESCRIPTION
[0033] Example 1
[0034] Embodiment 1 of the present invention will be described in detail with reference to the accompanying drawings. In the following description, "printing" refers to the entire series of processes and operations from printing an image based on a print instruction from the user to ejecting the paper. "Image printing" refers to the processes and operations for forming an image on recording paper, for example, by thermally transferring a transfer material (ink, overcoat) applied to an ink sheet onto the recording paper.
[0035] Figure 1A and Figure 1B FIG. 1 is an external view of the printer 100 according to the first embodiment. Figure 1C FIG. 4 is an external view of the portable terminal 400 according to the first embodiment. Figure 1A is a perspective view as viewed from the top side of the printer 100, and Figure 1B This is a perspective view of the printer 100 as viewed from the bottom.
[0036] like Figure 1A As shown, the printer 100 is covered by a main body upper shell 101-1 and a main body lower shell 101-2 as a top exterior and a bottom exterior. On one side (one end side) of the printer 100, a paper discharge port 101-3 (opening) is created as a space between the main body upper shell 101-1 and the main body lower shell 101-2. During printing, the recording paper 113 temporarily protrudes to the outside of the printer 100 through the paper discharge port 101-3, or the recording paper 113 after the image is printed is discharged through the paper discharge port 101-3. Figure 1A and Figure 1B , the recording paper 113 is not illustrated. The indication unit 102 includes an LED, and the lighting or flashing of multiple colors of the LED is indicated by a window portion on the surface. Through this lighting and flashing, the power status of the printer 100 and such status information related to printing operations and errors can be indicated. The power switch 103 is an operation button arranged adjacent to the indication unit 102. By pressing the power switch 103, the power of the printer 100 can be switched ON / OFF. On the other side of the printer 100, an openable box cover 101-4 is arranged, and a box mounting portion 110-1 (opening portion) is arranged on the frame 110 inside the box cover 101-4. The ink ribbon cartridge 300 can be installed inside the box mounting portion 110-1 in the direction of arrow 304. In the ink ribbon cartridge 300, an ink ribbon 114 coated with sublimation ink is stored. The USB connector 104, which serves as an external interface, is arranged on the same surface as the mounting surface of the ink ribbon cartridge 300. A tray cover 101-5 is arranged on the bottom surface of the printer 100. When the tray cover 101-5 is opened, recording paper 113 for image printing can be stored in the printer 100.
[0037] Figure 2 1 is a block diagram of a printing system according to Embodiment 1. The portable terminal 400 and the printer 100 wirelessly communicate and control each other. Basically, the portable terminal 400 sends image data to be printed and a print instruction, and the printer 100 prints the photo according to the received data and instruction.
[0038] First, the internal structure of printer 100 will be described. CPU 201 performs system control and arithmetic processing for printer 100. Flash ROM 202 stores programs for controlling the system of printer 100. CPU 201 reads programs from flash ROM 202 and controls each component based on the read programs. SDRAM 203 temporarily stores image data. SDRAM 203 is used for operational data processing. The component consisting of CPU 201, flash ROM 202, and SDRAM 203 is called main control unit 204, which mainly handles various controls of printer 100. The functions and processes of printer 100, which will be described later, are implemented by CPU 201 reading programs stored in flash ROM 202 and executing them.
[0039] The image processing unit 205 performs image processing on image data transmitted from the portable terminal 400. The image processing unit 205 performs various image processing (such as decompression processing of compressed image data, resizing processing according to the paper to be used, and image correction processing), and generates print data for image printing based on the image data generated after image processing. The processing of the image processing unit 205 can be performed by the main control unit 204 instead of the image processing unit 205, or can be performed by both the image processing unit 205 and the main control unit 204.
[0040] The thermal head control unit 206 converts the print data generated by the image processing unit 205 into an electric signal, and outputs the electric signal to the thermal head 207. The thermal head 207 converts the electric signal into thermal energy, and transfers the dye of the ink ribbon to paper.
[0041] The head temperature sensor 208 measures the temperature of the thermal head 207. The ambient temperature sensor 209 measures the ambient temperature inside the printer 100. The head position sensor 210 detects positions such as the pressing position and the retracted position of the head. The paper detection sensor 211 detects the position of the paper. The ink ribbon detection sensor 212 detects information related to the ink ribbon. The mark detection sensor 213 detects marks provided on the ink ribbon.
[0042] The motor driver unit 214 controls the motors. The head position drive motor 215 drives the head to a pressurized position for image printing or a retracted position for changing the ink ribbon cassette or conveying paper. The paper conveying motor 216 conveys paper. The main control unit 204 sends commands to the motor driver unit 214 based on sensor information from the aforementioned sensors and pre-programmed information, controlling the driving of the head position drive motor 215 and the paper conveying motor 216.
[0043] The wireless communication unit 217 controls wireless communication with the portable terminal 400. The operation unit 218 receives operation instruction information from the power switch 103 and the like arranged on the surface of the main body upper housing 101-1. The USB control unit 219 judges information from external devices connected to the USB connector 104 (external interface) and performs communication control, power transmission control, and transmission control of various data (such as operation information and image data). By connecting an external power adapter or the like to the USB connector 104 using a USB cable, power can be received from the outside.
[0044] The display control unit 220 controls the output of the indication unit 102 , such as lighting and blinking of the LED, etc. The battery control unit 221 includes a charging circuit that controls charging of the battery 222 . The battery remaining capacity detection unit 223 detects the remaining capacity of the battery 222 .
[0045] Next, a description will be given of the structure inside the portable terminal 400. Here, it is assumed that the portable terminal 400 is a smartphone, but it may be another device such as a digital camera, a digital game machine, and a notebook PC if the device includes a wireless communication function.
[0046] The CPU 401 performs system control and arithmetic processing for the portable terminal 400. The flash ROM 402 stores a program for controlling the system. The flash ROM 402 is a non-volatile storage medium that stores control programs for the portable terminal 400 and various data (such as photos and electronic documents). The SDRAM 403 is used as a temporary storage area for the main memory and work area of the CPU 401. The part composed of the CPU 401, the flash ROM 402 and the SDRAM 403 is called the main control unit 404, which mainly handles the various controls of the portable terminal 400. In Example 1, it is assumed that one CPU 401 executes the various processing steps of the flowchart mentioned later, but other modes can be used. For example, multiple CPUs can collaboratively execute the various processing steps of the flowchart mentioned later. A hard circuit such as an ASIC can be used to execute a part of the flowchart mentioned later.
[0047] The CPU 401 reads a program from the flash ROM 402 and controls each component based on the read program. For example, the CPU 401 reads a program from the basic software (OS) and controls the operation of the portable terminal 400. The portable terminal can install various applications including a printing application, and the CPU 401 can also read the programs of the installed applications and thereby control the operation of the portable terminal 400. The OS controls the operation of the portable terminal 400 based on instructions received from each application and operation instructions input by the user via the operation panel 405. The printing application is an application for providing a printing function to the user. The printing application instructs the OS to generate a print job, and, for example, transmit the generated print job. In addition to the printing application, various applications have been installed in the portable terminal 400, but descriptions related to other applications are omitted here.
[0048] The operation panel 405 includes a touch panel function for detecting a user's touch operation and displays various screens. By performing a touch operation on the operation panel 405, the user can input a desired instruction to the portable terminal 400. The portable terminal 400 includes hardware keys (not shown), and the user can also use the hardware keys to input an operation instruction to the portable terminal 400.
[0049] Camera 406 captures images in response to a user's photography instruction. Images captured by camera 406 are stored in a predetermined area of flash ROM 402. Microphone 407 inputs sound, and speaker 408 outputs sound. Microphone 407 and speaker 408 are primarily used when the user is making a telephone call with another portable terminal or a landline phone. Wireless communication unit 409 controls wireless communication with printer 100.
[0050] Now refer to Figure 3 The structure of the ink ribbon 114 will be described. Figure 3: is an expanded view of the ink ribbon 114. In the case of full-color printing, it is common to use an ink ribbon with yellow (Y), magenta (M) and cyan (C) colors coated side by side on the surface as the ink ribbon 114, and to superimpose and print each color on the image printing medium, thereby forming a full-color image. Then, a colorless and transparent outer coating (OC) surface is formed. A black band-shaped mark 114-1 is formed between each color and the OC surface to detect the starting position of each surface. There are two marks 114-1Y for indicating the starting position of the yellow (Y) surface (a mark 114-1Y for distinguishing between the yellow (Y) surface and the other surfaces). There is a mark 114-1M for indicating the starting position of the magenta (M) surface, a mark 114-1C for indicating the starting position of the cyan (C) surface, and a mark 114-1OC for indicating the starting position of the OC surface. It is assumed that the ink ribbon 114 here is a sublimation ink ribbon. A high-heat-resistant film such as a polyethylene terephthalate film having a thickness of approximately 2 to 10 microns is used as a substrate. On this film, a sublimation ink prepared by mixing various dyes, adhesives, plasticizers, and binders is applied to a thickness of 0.2 to 5 μm, thereby forming a dye-coated surface of each color of yellow (Y), magenta (M), and cyan (C). In addition, on this film, a styrene medium, a styrene resin, a styrene copolymer, and an adhesive are applied to a thickness of approximately 0.5 to 5 μm, thereby forming a colorless and transparent outer coating surface. On the opposite side of the surface coated with ink, a lubricating material (which reduces the frictional resistance with the sliding portion to stabilize the movement of the ink ribbon) and a polishing agent for polishing and cleaning the surface of the thermal head are applied.
[0051] Now refer to Figures 4A to 4E as well as Figure 5 The printing operation of the printer 100 will be described. Figures 4A to 4E is a cross-sectional view indicating the operation of the printer 100, and Figure 5 is a flowchart of the printing operation of the printer 100 . Figure 4A Indicates the image printing standby state, Figure 4B Indicates the paper feeding status, Figure 4C Indicates the status during image printing operation, Figure 4D Indicates the status after image printing is finished and before paper is ejected, and Figure 4E Indicates the status after paper is ejected.
[0052] When the user sets the ink ribbon cassette 300 in the printer 100, loads the recording paper 113 in the paper storage unit 117, and presses the power switch 103, the printer 100 enters a standby state. The printer 100 includes a platen roller 115 and a thermal head 207. The thermal head 207 is rotatably supported by a thermal head rotation shaft 119 and is arranged at a position as far as possible from the platen roller 115 so that the ink ribbon cassette 300 does not interfere with the thermal head 207 when the ink ribbon cassette 300 is inserted or removed.
[0053] When image data to be printed is designated and printing is instructed on the portable terminal 400, the printer 100 receives the print instruction information via the wireless communication unit 217. The printer 100 then starts a printing operation. This operation is achieved by the CPU 201 of the printer 100 expanding the program stored in the flash ROM 202 on the SDRAM 203 and executing the program.
[0054] In step S501, the CPU 201 controls the driving of the head position driving motor 215 using a driving force (not shown). Then, the support portion of the thermal head 207 rotates counterclockwise around the thermal head rotation axis 119 in the figure, and as shown in FIG. Figure 4B As indicated, the thermal head 207 moves to Figure 4A The standby position indicated in Figure 4C The intermediate position between the image printing position indicated in (the position where the nip is generated with the platen roller 115).
[0055] When the movement of the thermal head 207 is completed, the CPU 201 starts the paper feeding operation in S502. When the paper feeding operation starts, the pressure plate 120 included in the printer 100 is urged toward the paper feeding roller 121 by a force urging member (not shown), and the recording paper 113 loaded in the paper storage unit 117 is pushed toward the paper feeding roller 121. Figure 4A At the standby position indicated in , the paper feed roller 121 retreats to a position away from the recording paper 113. Figure 4B In the middle position indicated in FIG, the paper feed roller 121 is pushed by a driving force (not shown) until it contacts the recording paper 113. Here, the paper feed roller 121 rotates counterclockwise as shown in the figure by the transmission of the driving force of the paper transport motor 216 (not shown), and transports the recording paper 113 in pressure contact to the image printing and recording section composed of the thermal head 207 and the platen roller 115. The recording paper 113 contacts the separating bank 122 created in the printer 100, and only one sheet of recording paper 113 (the sheet at the top) is transported.
[0056] Then, the conveyed recording paper 113 is detected by the paper detection sensor 211, and it is confirmed whether a paper feeding operation failure has occurred. If there is no paper feeding operation failure, the recording paper 113 conveyed by the paper feed roller 121 is rotated clockwise in the illustration by the rotatably supported switching plate 123 pushed upward, and advances in the left direction in the illustration. Then, the recording paper 113 enters the roller gap between the conveying roller 124 and the conveying driven roller 125. On the conveying roller 124, a plurality of tiny protrusions are formed that pierce the back side of the recording paper 113, thereby making it possible to accurately convey the recording paper 113. The conveying roller 124 is driven by a paper conveying motor 216 (not shown). The paper conveying motor 216 is a stepping motor and can accurately control the feed amount.
[0057] After the recording paper 113 is conveyed to the nip between the conveying roller 124 and the conveying driven roller 125, the paper feed roller 121 is moved by a driving force (not shown) to the position where the recording paper 113 is conveyed. Figure 4A . This is to prevent other sheets of paper in the paper storage unit 117 from being erroneously conveyed by the paper feed roller 121. Then, the recording paper 113 is continuously conveyed by the conveying roller 124 and the conveying driven roller 125, and the rear end of the recording paper 113 passes through the paper detection sensor 211. After the recording paper 113 is conveyed a predetermined amount and leaves the front end of the switching plate 123, the conveying stops. Then, in step S503, the CPU 201 conveys the recording paper 113 in the reverse direction and causes the recording paper 113 to Figure 4C Here, during feeding, the rear end of the recording paper 113 passes the upper side of the switching plate 123, passes the lower side of the paper feed roller 121, and is conveyed into the space between the guide wall 127 (which separates and holds the lower portion of the battery 222) and the paper storage unit wall 128.
[0058] When the paper feeding operation ends and the recording paper 113 stops at the image printing start position, in step S504 , the CPU 201 performs a leading end detection operation of the ink ribbon 114 .
[0059] The operation of the ink ribbon 114 in the leading direction will now be described. Figure 4C , and the ink ribbon 114 stored in the ink ribbon cassette 300 is wound up when the ink ribbon 114 is at the position indicated in the figure and the conveyance to the image printing start position is completed. In other words, the front end of the winding shaft 301 arranged inside the ink ribbon cassette 300 is engaged with the engaging unit included in the printer 100 and rotated counterclockwise in the figure by a driving force (not shown), thereby winding up the ink ribbon 114 wound around the supply shaft 302 around the winding shaft 301. Figure 3As shown, a mark is arranged at the beginning position of each color of the ink ribbon 114. Two marks are arranged at the beginning of yellow (Y), and one mark is arranged at the beginning of magenta (M), cyan (C), and overcoat (OC). The printer 100 includes a mark detection sensor 213, which is a reflective optical sensor. When a mark arranged on the ink ribbon 114 is detected (the reflected light is interrupted by the mark), the conveyance of the ink ribbon is stopped and the beginning of the ink ribbon is detected.
[0060] In S505, the CPU 201 determines whether the mark is correctly detected. In the case of yellow (Y) start detection, it is determined whether two marks are detected within a predetermined time, and in the case of magenta (M), cyan (C), and overcoat (OC) start detection, it is determined whether one mark is detected within a predetermined time. The process proceeds to step S508 if the mark is correctly detected (a predetermined number of marks are detected within a predetermined time), or proceeds to step S506 if the mark is not correctly detected.
[0061] In S506, the CPU 201 causes the indication unit 102 to blink, which indicates an abnormality (error) of the ink ribbon cassette 300. In S507, the CPU 201 notifies the portable terminal 400 via the wireless communication unit 217 of the abnormality generated in the ink ribbon.
[0062] When the start detection is completed, in S508, the CPU 201 rotates the unit holding the thermal head 207 counterclockwise in the figure around the thermal head rotation axis 119. As a result, the thermal head 207 moves to the image printing position where the ink ribbon 114 and the recording paper 113 are held between the thermal head 207 and the platen roller 115.
[0063] When the thermal head 207 moves to the image printing position, the CPU 201 determines the type of image printing in S509. Then, the CPU 201 detects the beginning of yellow (Y), magenta (M), or cyan (C), and the process proceeds to S510 if printing is to be performed for that color, or to S513 if printing is not to be performed for that color.
[0064] In S510, the CPU 201 prints the image of the color in which the beginning is detected. Figure 4DAs shown, the recording paper 113 and the ink ribbon 114 are pressurized and held between the thermal head 207 and the platen roller 115, and are conveyed toward the paper discharge port 101-3 in this state while being heated by the thermal head 207. Thus, the ink applied to the ink ribbon 114 is transferred to the recording paper 113, thereby performing image printing. The ink ribbon conveying mechanism included in the printer 100 is equipped with a torque limiter mechanism (not shown) that slides when a predetermined torque or greater load is applied, and conveys the ink ribbon 114 and the recording paper 113 at the same speed during the image printing operation. When the image is printed by heating the thermal head 207, the ink ribbon 114 and the recording paper 113 are conveyed while maintaining a contact state within a predetermined distance, and are then conveyed in a direction in which they separate from each other. In other words, the recording paper 113 is conveyed in the left direction in the diagram by the conveying roller 124, and the ink ribbon 114 is conveyed toward the guide shaft 303 arranged inside the ink ribbon cassette 300 while sliding on the separation plate 129 integrated with the thermal head 207. The ink ribbon 114 is attached to the recording paper 113 by heating by the thermal head 207, but is separated from the recording paper 113 when being conveyed to the position of the separation plate 129.
[0065] When it is detected that the printing of the image of the leading color is completed, in S511, the CPU 201 rotates the unit holding the thermal head 207 by a driving force (not shown) and retracts the unit from the recording paper 113 to the side of the recording paper 113. Figure 4B Then, in S512, the CPU 201 conveys the recording paper 113 in the reverse direction and causes the recording paper 113 to move to the middle position indicated in FIG. Figure 4C The image stops at the printing start position indicated in .
[0066] When the image printing of yellow (Y), magenta (M) and cyan (C) is completed, in S513, CPU 201 performs image printing of outer coating (OC). As described above, ink dye is transferred in the image printing of yellow (Y), magenta (M) and cyan (C). In the outer coating process (image printing of outer coating), the above-mentioned resin is melted and transferred to form an outer coating. By transferring the outer coating, a uniform gloss can be applied to the entire surface of the recording paper 113. In addition, by changing the transfer amount of the coating resin used to form the outer coating through the thermal head 207, information can also be recorded on the outer coating. Specifically, by controlling the output (calorific value) of the thermal head 207 to partially supply higher energy than usual, the surface of the protective layer of the coating resin can be roughened and a low gloss area can be formed. In addition, by partially changing the gloss of the surface of the recording paper 113, the impression (texture) of the printed object can be changed. The difference in gloss (surface treatment) can also be used to record information.
[0067] When the image printing of the overcoat layer is completed, in S514, the CPU 201 rotates the unit holding the thermal head 207 by a driving force (not shown) and retracts the unit from the recording paper 113 to the side of the recording paper 113. Figure 4E . Then, in S515, CPU 201 further causes recording paper 113 to be conveyed from paper discharge port 101-3 in the discharge direction. When the trailing end of the paper leaves conveying roller 124, paper discharge is complete. Upon completion of paper discharge, printer 100 terminates the printing operation. Thus, the ink and resin are superimposed and transferred in the order of yellow, magenta, cyan, and overcoat, completing the image printing operation.
[0068] Now refer to Figures 6 to 10F To illustrate the operations and methods used to create, synthesize and print color QR codes. Figure 6 This is a flowchart of the print application operation for creating and synthesizing a color QR code. When a user instructs portable terminal 400 to start (execute) the print application, portable terminal 400 begins the print application operation. This operation is achieved by CPU 401 of portable terminal 400 expanding the print program (print application program) stored in flash ROM 402 onto SDRAM 403 and executing the program.
[0069] In step S601 , the CPU 401 selects an image designated by the user from among images recorded in the flash ROM 402 , and determines the image as an image to be printed (original image). 7A to 7C It is a diagram indicating a process of synthesizing a two-dimensional code such as a QR code and a barcode with an original image. Figure 7A Indicates the original image, Figure 7B Indicates the layout area of the QR code, Figure 7C Indicates the image after synthesizing the two-dimensional code. Assume that the Figure 7A The original image 701 in .
[0070] In S602, the CPU 401 obtains the information selected or input by the user and determines the information as supplementary information to be synthesized with the original image. The supplementary information includes link information, such as a URL indicating the storage location of data related to the original image (e.g., still image data, moving image data, and audio data stored in a server). If the original image is a captured image, the supplementary information may include GPS location information indicating the location where the captured image was captured. The supplementary information is information related to numbers and text.
[0071] In S603, the CPU 401 encodes (converts) the supplementary information into a two-dimensional code (image). Figure 8A and Figure 8B It is a diagram indicating the created QR code. Figure 8A Indicates the encoded QR code, and Figure 8B Indicates a two-dimensional code (color two-dimensional code) for which color setting mentioned later has been performed. Figure 8A The two-dimensional code 803 indicated in FIG is composed of data unit 803a as the foreground and basic unit 803b as the background. The color of data unit 803a is black, and its pixel value (RGB value (R value, G value, B value)) is (0, 0, 0). The color of basic unit 803b is white, and its pixel value (RGB value) is (255, 255, 255). A two-dimensional code encoded like this is composed of units of two colors (white and black).
[0072] In S604, the CPU 401 determines (sets) the area designated by the user as the area for arranging the two-dimensional code (arrangement area). For example, the CPU 401 displays the user interface screen including the original image 701 on the operation panel 405. The user designates a portion of the original image 701 as the arrangement area for the two-dimensional code through a user operation such as a touch operation on the operation panel 405 (user interface screen). Here, it is assumed that the designated area Figure 7B The position 701b indicated in the figure is selected, and the area 701a at the position 701b is designated as the layout area of the QR code. The user can confirm the designated area on the user interface screen and determine the layout area of the QR code. The user can specify an arbitrary position or specify a position by selecting one of a plurality of predetermined positions.
[0073] In S605, CPU 401 obtains the color information of the layout area of the two-dimensional code. For example, according to the original image, CPU 401 obtains (extracts) a color information indicating the color of a pixel, a plurality of color information indicating the colors of a plurality of pixels, a color information indicating the color of a pixel block, or a plurality of color information indicating the colors of a plurality of color blocks in the layout area 701a of the two-dimensional code. A pixel block is made up of a plurality of pixels. In order to identify the representative color in the layout area 701a, it is preferred to obtain color information taking into account a plurality of pixels. All pixels in the layout area 701a can be considered, or only a portion of pixels can be considered. By reducing the number of pixels to be considered, the processing load can be reduced, or the processing time can be shortened. Here, it is assumed that the color information indicating the RGB value is obtained.
[0074] In S606, CPU 401 determines the color of the basic unit (background) of the two-dimensional code based on the acquired (extracted) color information. For example, it is assumed that a plurality of color information corresponding to a plurality of parts of the layout area of the two-dimensional code are acquired. In this case, the average color of the colors of the plurality of parts can be determined as the color of the basic unit. In addition, the color of the part with the highest brightness or lightness in the plurality of parts can be determined as the color of the basic unit. The method for determining the color of the basic unit is not limited thereto, and the color specified by any algorithm for specifying the representative color in the layout area of the two-dimensional code can be determined as the color of the basic unit.
[0075] Both brightness and lightness indicate the degree of brightness, but brightness is a value that takes into account the difference in brightness produced by colors, and lightness is a value when chromaticity is zero. For the value of brightness, the Y value determined by the following Expression 1 can be used. For the value of lightness, the maximum value of the R value, the G value, and the B value can be used.
[0076] Y value = 0.2126 × R value + 0.7152 × G value + 0.0722 × B value Expression 1
[0077] In S607, CPU 401 determines the color of the data unit (foreground) of the two-dimensional code based on the acquired (extracted) color information. The color of the basic unit (background) whose brightness or lightness changes can be determined as the color of the data unit. For example, it is assumed that multiple color information corresponding to multiple parts of the layout area of the two-dimensional code is acquired. In this case, the color generated by reducing the brightness or lightness relative to the average color of the multiple parts without changing the hue can be determined as the color of the data unit. The color of the part with the lowest brightness or lightness among the multiple parts can be determined as the color of the data unit.
[0078] It is necessary to determine (set) the colors of the basic unit and the data unit to achieve a contrast ratio (the contrast ratio between the basic unit and the data unit) with which the two-dimensional code can be clearly read. Therefore, in Example 1, the processing steps S608 and S609 mentioned later are performed, thereby determining the respective colors of the basic unit and the data unit, respectively, so that the difference between the value of the brightness (or brightness) of the basic unit and the value of the brightness (or brightness) of the data unit becomes a threshold value or greater. The inventors have obtained the following knowledge through experiments: if the difference between the value of the brightness (or brightness) of the basic unit and the value of the brightness (or brightness) of the data unit is 50 or greater (256-bit value) regardless of the hue, the two-dimensional code can be clearly read. Therefore, in Example 1, a 256-bit value is used for the value of the brightness (or brightness), and 50 is used as the threshold value of the difference between the value of the brightness (or brightness) of the basic unit and the value of the brightness (or brightness) of the data unit.
[0079] In step S608, the CPU 401 determines whether the difference between the value of the luminance (or brightness) corresponding to the color of the basic unit determined in S606 and the value of the luminance (or brightness) corresponding to the color of the data unit determined in S607 is 50 or more. The process proceeds to S610 if the difference is 50 or more, or proceeds to S609 if the difference is not 50 or more.
[0080] In S609, the CPU 401 adjusts the color of at least one of the basic cell and the data cell based on the color corresponding to the color information (the color determined in S606 and S607) so that the difference between the value of the brightness (or lightness) of the basic cell and the value of the brightness (or lightness) of the data cell becomes 50 or more. Only the color of the basic cell may be adjusted, only the color of the data cell may be adjusted, or both the colors of the basic cell and the data cell may be adjusted.
[0081] Figure 8B The data unit 804a and the basic unit 804b of the two-dimensional code 804 indicated in have the colors determined in S606 to S609. The pixel value (RGB value (R value, G value, B value)) of the data unit 804a is (128, 108, 40), and the pixel value (RGB value) of the basic unit 804b is (190, 160, 58). The pixel value (190, 160, 58) of the basic unit 804b is the same as the average pixel value of the entire arrangement area 701a of the two-dimensional code. The pixel value (128, 108, 40) of the data unit 804a is a pixel value generated by reducing the Y value relative to the pixel value (190, 160, 58) of the basic unit 804b without changing the hue. The Y value calculated from the pixel values (128, 108, 40) of data unit 804a is 107.3424, and the Y value calculated from the pixel values (190, 160, 58) of basic unit 804b is 159.0136. The difference between these Y values is 51.6712 (≥50), so the two-dimensional code 804 can be clearly read.
[0082] In S610, the CPU 401 synthesizes (draws) the two-dimensional code of the color determined in S606 to S609 on the original image. This completes the image data for instructing the printer 100 to print. Figure 7CIn the composite image 702 shown, a two-dimensional code 804 (color two-dimensional code) is synthesized at the lower right corner of the original image 701 (the layout area 501a of the two-dimensional code). The color of the basic unit 804b of the two-dimensional code 804 is the same as the average color of the entire layout area 701a of the two-dimensional code, and is close to the color of the original image 701 (layout area 701a). The hue of the data unit 804a of the two-dimensional code 804 is the same as the hue of the basic unit 804b, and is close to the hue of the original image 701 (layout area 701a). Therefore, in the composite image 702, the two-dimensional code 804 is well integrated without a sense of violation. In addition, the difference between the Y value of the data unit 804a and the Y value of the basic unit 804b is 50 or greater, so the two-dimensional code 804 can be clearly read. In this way, the printing application operation for creating and synthesizing the color two-dimensional code is completed. CPU 401 can display the composite image on the operation panel 405.
[0083] An example in the case of using different images will now be described. Figure 9A Indicates the original image, Figure 9B Indicates the layout area of the QR code, and Figure 9C Indicates the image after the QR code is synthesized. Figure 7B The Y value of the arrangement area 701a in the original image 905 is high, so by using the average color of the entire arrangement area 701a as the color of the basic unit of the two-dimensional code, a two-dimensional code that can be read clearly can be obtained. However, the Y value of the arrangement area 905a of the two-dimensional code set at the position 905b in the original image 905 is low. Figure 9B As indicated in , the pixel values (RGB values (R value, G value, B value)) of the arrangement area 905a are uniform (69, 41, 18), and the Y value calculated from the pixel values (69, 41, 18) is 45.2922 (which is very low (dark)). In this case, if Figure 6 If the average color of the entire arrangement area 905a is determined as the color of the basic cell in S606 and a color darker than the basic cell is determined as the color of the data cell in S607, the difference between the Y value of the data cell and the Y value of the basic cell becomes less than 50. This means that a clearly readable two-dimensional code cannot be obtained.
[0084] In this case, at least one of the colors of the basic unit and the data unit is adjusted in S609. For example, a color generated by increasing the Y value by 50 or more relative to the average color of the entire arrangement area 905a without changing the hue is re-determined as the color of the basic unit. Then, a color generated by decreasing the Y value by 50 or more relative to the re-determined color of the basic unit without changing the hue is re-determined as the color of the data unit. Figure 9CIn the composite image 906 shown, a two-dimensional code (color two-dimensional code) is synthesized at the lower right corner of the original image 905 (the layout area 905a of the two-dimensional code). The color of the basic unit 906b of the two-dimensional code is brighter than the color of the area 906c (peripheral area) around the layout area 905a of the two-dimensional code, but the hue of the basic unit 906b is the same as the hue of the peripheral area 906c. In addition, the hue of the data unit 906a of the two-dimensional code is also the same as the hue of the peripheral area 906c. Therefore, in the composite image 906, the two-dimensional code is slightly brighter than the peripheral area 906c, but it blends well without any sense of disobedience. In addition, the difference between the Y value of the data unit 906a and the Y value of the basic unit 906b is 50 or more, so the two-dimensional code 804 can be clearly read.
[0085] The method for setting and adjusting the color of the basic unit and the color of the data unit is not limited to the above method. For example, in the case where the Y value corresponding to the average value of the layout area of the two-dimensional code is less than 50, the average value can be determined as the color of the data unit, and the color generated by increasing the Y value by 50 or more relative to the color of the data unit without changing the hue can be determined as the color of the basic unit. In addition, it is possible to select whether the average color is determined as the color of the basic unit or the color of the data unit based on the Y value corresponding to the average color of the layout area of the two-dimensional code. For example, in the case where the Y value corresponding to the average color of the layout area of the two-dimensional code is less than 50, the average color can be determined as the color of the data unit, and in the case where the Y value corresponding to the average color of the layout area of the two-dimensional code is 50 or more, the average color can be determined as the color of the basic unit.
[0086] Now refer to 10A to 10F A method for a user to designate a layout area of a two-dimensional code and confirm a composite image (an image generated after the two-dimensional code is composited (drawn)) will be described. 10A to 10F It is a diagram indicating an operation procedure for determining the arrangement area and color of a two-dimensional code.
[0087] Figure 10A Indicates the state before the user specifies the layout area of the QR code. Figure 10A In the example, the original image 1001 arranged on the operation panel 405 is displayed, and a black and white two-dimensional code 1002 encoding the supplementary information selected or input by the user is displayed outside the original image 1001. The user touches the two-dimensional code 1002 with a finger 1003 and moves the touch position by dragging, thereby moving the two-dimensional code 1002. Figure 10A , four candidates 1001a, 1001b, 1001c, and 1001d for the arrangement area of the two-dimensional code can be identified.
[0088] Figure 10B Indicates the state after the user drags the QR code 1002 to the position of the candidate 1001a (the lower right corner of the original image 1001). When the QR code 1002 moves to the position of the candidate 1001a, the QR code 1002 flashes. This allows the user to easily recognize that the QR code can be placed at the current position (the position of the candidate 1001a).
[0089] Figure 10C This indicates the state after the user drags QR code 1002 from the position of candidate 1001a (the lower right corner of original image 1001) to the position of candidate 1001b (the lower left corner of original image 1001). As QR code 1002 moves away from the position of candidate 1001a, the flashing of QR code 1002 stops. Then, as QR code 1002 moves to the position of candidate 1001b, QR code 1002 flashes. This allows the user to easily recognize that, for example, the QR code can be placed at the current position (the position of candidate 1001b).
[0090] Figure 10D Indicates the state after the user ends the touch (drag operation) at the position of candidate 1001b (the lower left corner of the original image 1001). When the drag operation ends at the position of candidate 1001b, the flashing of the QR code 1002 stops, and candidate 1001b is determined as the layout area of the QR code. Then, a color QR code 1004 having a color determined (set) by the first algorithm is generated, and the currently displayed QR code is changed from QR code 1002 to the color QR code 1004. When the layout position of the QR code is determined like this, the composite image is displayed and the user can confirm the composite image. Figure 10D In this state, a synthesized image corresponding to the first algorithm is displayed, and the user can confirm the synthesized image corresponding to the first algorithm. In the first algorithm, it is assumed that the average color of the layout area of the QR code is determined as the color of the basic unit of the QR code, and the color generated by reducing the Y value by 50 or more relative to the average color without changing the hue is determined as the color of the data unit of the QR code. The first algorithm is suitable for use when the hue of the layout area of the QR code is roughly uniform.
[0091] Figure 10E Instructions on Figure 10D1004 is double-clicked (quickly touched twice). When the color two-dimensional code 1004 is double-clicked, a color two-dimensional code 1006 having a color determined (set) by the second algorithm is generated, and the currently displayed two-dimensional code is changed from the color two-dimensional code 1004 to the color two-dimensional code 1006. In the second algorithm, it is assumed that the color with the highest Y value in the layout area of the two-dimensional code is determined as the color of the basic unit of the two-dimensional code, and the color with the lowest Y value in the layout area is determined as the color of the data unit of the two-dimensional code. The second algorithm is suitable for use in the case where there are two main colors in the layout area of the two-dimensional code, and the difference in brightness or lightness between the two colors is large.
[0092] Figure 10F Instructions on Figure 10E . When color QR code 1006 is double-clicked, color QR code 1008 having the color determined (set) by the third algorithm is generated, and the currently displayed QR code changes from color QR code 1006 to color QR code 1008. In the third algorithm, for each of the multiple parts of the layout area of the QR code, the colors of the basic units and data units of the QR code are determined based on the color information corresponding to the part. The third algorithm is suitable for use in situations where the colors of multiple parts in the layout area of the QR code are significantly different.
[0093] For example, in the third algorithm, the layout area of the two-dimensional code is divided into the upper half area (upper area) and the lower half area (lower area) of the layout area. Then, the average color of the lower area is determined as the color of the basic unit in the lower area, and the color generated by reducing the Y value by 50 or more relative to the average value without changing the hue is determined as the color of the data unit in the lower area. In the same way, the average color of the upper area is determined as the color of the basic unit in the upper area, and the color generated by reducing the Y value by 50 or more relative to the average value without changing the hue is determined as the color of the data unit in the upper area. Even if the combination of the color of the basic unit and the color of the data unit is different between multiple areas, if the contrast ratio between the basic unit and the data unit in each area is high enough, the two-dimensional code can be clearly read.
[0094] In this way, an algorithm for determining the colors of the basic units and data units of a QR code based on color information can be selected from multiple algorithms. This allows for the acquisition of a composite image that displays a more suitable QR code (e.g., a composite image with a more integrated QR code). Furthermore, multiple composite images of QR codes drawn using multiple algorithms can be displayed for comparison. Users can then easily select a composite image that best suits their preferences.
[0095] The number of algorithms can be more or less than three. Instead of the user selecting an algorithm, the algorithm can be automatically determined based on the original image, etc. This determination can use a computing unit derived through machine learning. Instead of switching between multiple composite images drawn using different algorithms, multiple composite images can be displayed side by side.
[0096] As described above, according to Example 1, color information related to the area where the QR code is located in the original image is obtained, and the colors of the foreground and background of the QR code are determined based on this color information. This allows for a QR code that can be clearly read and integrated with the image to be obtained.
[0097] In the above example, the two-dimensional code is generated and synthesized by the portable terminal 400, but this processing can be performed by the printer 100. The image processing device to which the present invention is applied can be a printer, or a device separate from the printer. The colors of the foreground and background of the two-dimensional code can be reversed. One of the colors of the foreground and background of the two-dimensional code can be determined based on the other color of the foreground and background, or can be determined based on the other color.
[0098] Example 2
[0099] Now refer to Figure 11 Hereinafter, description of the same aspects as those of the embodiment 1 (for example, the same structure and processing as those of the embodiment 1) will be basically omitted. Figure 11 Flowchart of the printing application operation according to Embodiment 2. Here, S1101 to S1104 are the same as those in Embodiment 1 ( Figure 6 ) are the same as S601 to S604, and S1106 to S1110 are the same as those in Example 1 ( Figure 6 ) are the same as S606 to S610. In Example 1 ( Figure 6 ), CPU 401 obtains color information of the area where the QR code is laid out. Meanwhile, CPU 401 obtains color information of the area surrounding the area where the QR code is laid out (the peripheral area) in S1105. By using the color information thus obtained, a color QR code having a color that blends well with the color of the peripheral area can be obtained, and a composite image that does not look out of place can be obtained.
[0100] Example 3
[0101] Now refer to Figure 12 Hereinafter, description of the same aspects as those of the embodiment 1 (for example, the same structure and processing as those of the embodiment 1) will be basically omitted. Figure 12 Flowchart of the printing application operation according to Embodiment 3. Here, S1201 to S1204 are the same as those in Embodiment 1 ( Figure 6) are the same as S601 to S604, and S1206 to S1210 are the same as those in Example 1 ( Figure 6 ) are the same as S606 to S610. In Example 1 ( Figure 6 ) in S605, the CPU 401 acquires the color information of the arrangement area of the two-dimensional code. Figure 11 ), CPU 401 obtains color information of the area surrounding the layout area of the QR code (the peripheral area). Meanwhile, CPU 401 obtains color information of an area synthesized by combining the layout area of the QR code with its peripheral area in S1205. By using the color information thus obtained, a color QR code having a color that blends well with the color of the peripheral area and matches the color of the layout area can be obtained, and a smooth composite image can be obtained.
[0102] As described in Examples 1 to 3, the area where color information is acquired can be changed as needed. By appropriately setting the area where color information is acquired, a composite image that better suits the user's preferences can be obtained. The area where color information is acquired can be a predetermined fixed area or a user-specified area. Furthermore, the area where color information is acquired can be automatically determined based on the original image, etc. This determination can be performed using a computational unit derived through machine learning.
[0103] Example 4
[0104] Now refer to Figure 13 and Figure 14 The fourth embodiment of the present invention will be described below. In the fourth embodiment, the color of the two-dimensional code is determined by the method of the first embodiment, and the parameters of the coating process (overcoat process) performed during printing are determined. Hereinafter, the description of the same aspects as the first embodiment (for example, the same structure and process as the first embodiment) will be basically omitted. The color of the two-dimensional code can be determined by the method of the second embodiment, or can be determined by the method of the third embodiment.
[0105] Figure 13 4 is a flowchart of the print application operation according to the embodiment 4. Here, S1301 to S1310 are the same as those in the embodiment 1 ( Figure 6 ) are the same as S601 to S610.
[0106] In S1311, CPU 401 generates parameters for overcoat processing performed on the layout area of the two-dimensional code (OC data of the two-dimensional code). Here, OC data is generated in which the transfer grayscale value of the data unit of the two-dimensional code is a low gloss value, and the transfer grayscale value of the basic unit of the two-dimensional code is a high gloss value. The low-gloss transfer grayscale value is a value at which high energy is supplied to the thermal head during the overcoat process, and is a large value. In the low-gloss portion when a large transfer grayscale value is used, the surface becomes rough and optical scattering is thereby generated. The high-gloss transfer grayscale value is a value at which low energy is supplied to the thermal head during the overcoat process, and is a small value. In the high-gloss portion when a small transfer grayscale value is used, the melted and transferred protective layer becomes almost transparent.
[0107] At S1312, CPU 401 combines the OC data of the QR code with the OC data of the entire image. The OC data of the entire image is, for example, OC data generated based on the original image. The data of the QR code layout area included in the OC data of the entire image is overwritten by the OC data of the QR code. This generates the OC data such that the data units of the printed QR code have a low gloss and the basic units of the QR code have a high gloss.
[0108] Figure 14 14 is a diagram indicating an example of a composite image and an outer coating (OC) according to Example 4. A color two-dimensional code 1401 has been synthesized (drawn) on the composite image 1400. It is assumed here that the composite image 1400 is generated by the same method as in Example 1. In the OC 1402, a high-gloss transfer grayscale value (a small transfer grayscale value) is set for the area 1403 outside the color two-dimensional code 1401. A high-gloss transfer grayscale value (a small transfer grayscale value) is set for the basic unit 1404 of the color two-dimensional code 1401. A low-gloss transfer grayscale value (a large transfer grayscale value) is set for the data unit 1405 of the color two-dimensional code 1401.
[0109] Without overcoating, the color two-dimensional code 1401 may merge with the composite image 1400 and become blurred, and the user may not be able to recognize the color two-dimensional code 1401. In Example 4, due to optical scattering on the protective layer (rough surface) of the OC 1402, part of the data unit 1405 is clearly visible, so the user can more easily recognize the color two-dimensional code 1401. The OC 1402 is transparent, so the visibility of the composite image 1400 is not greatly reduced by the OC 1402.
[0110] Note that the various types of control described above may be processes that are executed by a single piece of hardware (e.g., a processor or circuit) or not. The entire device may be controlled by sharing the processing among multiple pieces of hardware (e.g., multiple processors, multiple circuits, or a combination of one or more processors and one or more circuits).
[0111] In addition, the above-mentioned processor is a processor in a broad sense, and includes general-purpose processors and special-purpose processors. Examples of general-purpose processors include central processing units (CPUs), microprocessing units (MPUs), digital signal processors (DSPs), etc. Examples of special-purpose processors include graphics processing units (GPUs), application-specific integrated circuits (ASICs), programmable logic devices (PLDs), etc. Examples of PLDs include field programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), etc.
[0112] The above-described embodiments (including modifications) are merely examples. Any structure obtained by appropriately modifying or changing some structures of the embodiments within the scope of the subject matter of the present invention is also included in the present invention. The present invention also includes other structures obtained by appropriately combining the various features of the embodiments.
[0113] According to the present invention, a two-dimensional code that can be clearly read and well integrated with an image can be obtained.
[0114] Other embodiments
[0115] The embodiments of the present invention can also be implemented by the following method, that is, providing software (program) that performs the functions of the above-mentioned embodiments to a system or device through a network or various storage media, and the computer or central processing unit (CPU) or microprocessing unit (MPU) of the system or device reads and executes the program.
[0116] While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
Claims
1. An image processing device, comprising: an acquisition unit configured to acquire color information of at least one of a region on the image where the two-dimensional code is to be arranged and a peripheral region of the region; as well as a drawing unit, configured to draw the two-dimensional code on the image, The drawing unit determines the colors of the foreground and background of the two-dimensional code based on the color information.
2. The image processing apparatus according to claim 1, wherein: The acquisition unit acquires color information of a region where the two-dimensional code is to be arranged.
3. The image processing apparatus according to claim 1, wherein: The acquisition unit acquires color information of a peripheral area of an area where the two-dimensional code is to be arranged.
4. The image processing apparatus according to claim 1, wherein: The acquisition unit acquires color information of an area where the area where the two-dimensional code is to be arranged is synthesized with a peripheral area of the area.
5. The image processing apparatus according to any one of claims 1 to 4, wherein: The drawing unit determines respective colors of a foreground and a background of the two-dimensional code so that a difference between a value of brightness or lightness of the foreground and a value of brightness or lightness of the background becomes a threshold value or more.
6. The image processing apparatus according to claim 5, wherein: The drawing unit adjusts at least one of the colors of the foreground and background of the two-dimensional code relative to the color corresponding to the color information so that the difference between the brightness or lightness value of the foreground and the brightness or lightness value of the background becomes the threshold or greater.
7. The image processing apparatus according to claim 5, wherein: The threshold corresponds to 50 using a 256-bit value.
8. The image processing apparatus according to any one of claims 1 to 4, wherein: The drawing unit is capable of switching between a plurality of algorithms for determining the color of each of the foreground and the background of the two-dimensional code based on the color information. 9 . The image processing apparatus according to claim 1 , further comprising a control unit configured to perform control to display the image on which the two-dimensional code is drawn.
10. The image processing apparatus according to claim 9, further comprising a setting unit configured to set the area where the two-dimensional code is to be arranged according to a user operation, in, In a case where the area where the two-dimensional code is to be arranged is set, the control unit controls to display an image on which the two-dimensional code is drawn.
11. The image processing apparatus according to claim 9, wherein: The drawing unit is capable of switching between a plurality of algorithms for determining the respective colors of the foreground and background of the two-dimensional code based on the color information, and The control unit controls to display a plurality of images in which the two-dimensional codes are drawn using the plurality of algorithms, respectively, so that the plurality of images can be compared.
12. The image processing apparatus according to any one of claims 1 to 4, wherein: The acquisition unit acquires a plurality of color information respectively corresponding to a plurality of parts of the image, and The drawing unit: Based on the plurality of color information, determining an average color of the plurality of parts as a color of one of a foreground and a background of the two-dimensional code, and A color whose brightness or lightness is changed relative to the brightness or lightness of the color of the one of the foreground and the background is determined as the color of the other of the foreground and the background.
13. The image processing apparatus according to any one of claims 1 to 4, wherein: The acquisition unit acquires a plurality of color information respectively corresponding to a plurality of parts of the image, and The drawing unit: Based on the plurality of color information, the color of the portion with the highest or lowest brightness or lightness among the plurality of portions is determined as the color of one of the foreground and the background of the two-dimensional code, and A color whose brightness or lightness is changed relative to the brightness or lightness of the color of the one of the foreground and the background is determined as the color of the other of the foreground and the background.
14. The image processing apparatus according to any one of claims 1 to 4, wherein: The acquisition unit acquires a plurality of color information respectively corresponding to a plurality of parts of the area where the two-dimensional code is to be arranged, and For each of the plurality of parts, the drawing unit determines the respective colors of the foreground and the background of the two-dimensional code based on color information corresponding to the part.
15. The image processing device according to any one of claims 1 to 4, further comprising: A determination unit is configured to determine parameters of a coating process to be performed during printing to print an image in which a foreground of the two-dimensional code has low gloss and a background of the two-dimensional code has high gloss.
16. An image processing method, comprising: An acquisition step for acquiring color information of at least one of a region on the image where the two-dimensional code is to be arranged and a surrounding region of the region; as well as A drawing step for drawing the two-dimensional code on the image, Wherein, in the drawing step, the respective colors of the foreground and background of the two-dimensional code are determined based on the color information. 17 . A computer program product comprising a program for causing a computer to execute each step of the image processing method according to claim 16 . 18 . A computer-readable storage medium storing a program for causing a computer to execute each step of the image processing method according to claim 16 .
Citation Information
Patent Citations
Method and device for embedding bar code in color image, and computer program
JP2008033625A
Article management system, article management method, and article managed by system or method
JP2015127891A