Image processing device and image processing program
The image processing device addresses barcode quality issues by comparing and adjusting the size and ratio of placement areas for adjacent barcodes, preventing excessive reduction and maintaining quality.
Patent Information
- Application Number
- JP2020210684
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-12-18
- Publication Date
- 2024-09-18
- Estimated Expiration
- 2040-12-18
AI Technical Summary
Existing barcode printing technologies result in quality deterioration when adjacent barcodes overlap or have insufficient quiet zones during reduction, particularly affecting smaller barcodes.
An image processing device that compares and adjusts the size of adjacent barcodes, setting the placement areas to ensure the smaller barcode's placement area is wider than the larger one, and adjusts the ratio of blank areas to match the barcode sizes, preventing excessive reduction and quality deterioration.
The device suppresses the quality deterioration of smaller barcodes by ensuring their placement areas are adequately wide, maintaining barcode quality during reduction.
Smart Images

Figure 0007552337000008 
Figure 0007552337000002 
Figure 0007552337000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates to techniques for processing image data representing barcodes. [Background technology]
[0002] Patent Document 1 describes an apparatus that prints, on a print medium, a plurality of barcodes that are configured by arranging a plurality of bars and a plurality of spaces alternately along a preset arrangement direction.
[0003] If two barcodes are adjacent and the placement areas of the adjacent barcodes overlap, problems may arise after reduction, such as the adjacent barcodes overlapping or the quiet zones of each barcode being insufficient.
[0004] For this reason, conventionally, the placement areas of adjacent barcodes are set by dividing the blank area formed between the adjacent barcodes at the center. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Japanese Patent Application Publication No. 5-298465 Summary of the Invention [Problem to be solved by the invention]
[0006] If the placement area of the barcode is set so as to divide the blank area in the center, the quality of the barcode after reduction may be degraded. The present disclosure aims to suppress degradation of barcode quality due to shrinkage. [Means for solving the problem]
[0007] One aspect of the present disclosure is an image processing device comprising a printing unit configured to print an image on a printing medium and a control unit configured to control the printing unit, wherein the control unit is configured to perform a comparison process and a large and small area setting process.
[0008] The comparison process compares the size of a target barcode with that of an adjacent barcode based on image data including a plurality of barcodes represented by a plurality of bars alternately arranged along a preset arrangement direction and a plurality of spaces arranged between two adjacent bars. The target barcode is one of the plurality of barcodes. The adjacent barcode is one of the plurality of barcodes that is adjacent to the target barcode along the arrangement direction.
[0009] The large and small area setting process sets the small barcode placement area and the large barcode placement area so that the length along the arrangement direction of the target blank area included in the small barcode placement area is longer than the length along the arrangement direction of the target blank area included in the large barcode placement area.
[0010] A target blank area is a blank area located between a target barcode and an adjacent barcode. A small barcode is a barcode determined to be small in a comparison process. A large barcode is a barcode determined to be large in a comparison process. A small barcode placement area is an area set up to include a small barcode and a blank area around the small barcode in order to place the small barcode. A large barcode placement area is an area set up to include a large barcode and a blank area around the large barcode in order to place the large barcode.
[0011] The image processing device of the present disclosure configured in this manner can make the barcode arrangement area that is more susceptible to quality degradation due to reduction (i.e., the small barcode arrangement area) as wide as possible. This allows the image processing device of the present disclosure to suppress the degree of reduction of the barcode that is more susceptible to quality degradation due to reduction (i.e., the small barcode), and suppress the quality degradation of the barcode due to reduction.
[0012] Another aspect of the present disclosure is an image processing device including a printing unit and a control unit, the control unit being configured to execute a ratio calculation process and a ratio area setting process. The ratio calculation process calculates a barcode ratio, which is the ratio between the size of a target barcode and the size of an adjacent barcode, based on image data including a plurality of barcodes.
[0013] The ratio area setting process sets the target barcode placement area and the adjacent barcode placement area so that the ratio between the length along the arrangement direction of the target blank area included in the target barcode placement area and the length along the arrangement direction of the target blank area included in the adjacent barcode placement area matches the barcode ratio.
[0014] The target barcode placement area is an area that is set to include the target barcode and a blank area around the target barcode in order to place the target barcode. The adjacent barcode placement area is an area that is set to include the adjacent barcode and a blank area around the adjacent barcode in order to place the adjacent barcode.
[0015] The image processing device of the present disclosure thus configured sets, for each of adjacent barcodes, a barcode arrangement area according to the size of the barcode. Therefore, the image processing device of the present disclosure can prevent the occurrence of a situation in which the degree of reduction of the smaller barcode becomes greater than the degree of reduction of the larger barcode. As a result, the image processing device of the present disclosure can prevent the degree of reduction of the smaller barcode from becoming greater, and can prevent deterioration of the barcode quality due to reduction.
[0016] Yet another aspect of the present disclosure is an image processing program configured in an image processing device having a printing unit and a control unit to cause the control unit to execute a comparison process and a large and small area setting process.
[0017] A computer controlled by the image processing program of the present disclosure can constitute a part of the image processing device of one aspect of the present disclosure, and can obtain the same effects as the image processing device of one aspect of the present disclosure.
[0018] Yet another aspect of the present disclosure is an image processing program configured in an image processing device having a printing unit and a control unit to cause the control unit to execute a ratio calculation process and a ratio area setting process.
[0019] A computer controlled by the image processing program of the present disclosure can constitute part of an image processing device of another aspect of the present disclosure, and can obtain the same effects as the image processing device of the other aspect of the present disclosure. [Brief description of the drawings]
[0020] [Figure 1] FIG. 2 is a block diagram showing the configuration of a printer. [Diagram 2] FIG. 2 is a diagram showing the structure of a barcode. [Diagram 3] FIG. 13 is a diagram showing a shipping label. [Figure 4] 13 is a flowchart showing a shipping label reduction process. [Diagram 5] 5 is a flowchart showing a resizing process according to the first embodiment. [Figure 6]5A to 5C are diagrams illustrating a method for setting a barcode placement area in the first embodiment. [Figure 7] 13 is a flowchart showing a resizing process according to the second embodiment. [Figure 8] 13A to 13C are diagrams illustrating a method for setting a barcode arrangement area in the second embodiment. [Figure 9] 13A and 13B are diagrams illustrating a method for setting a barcode placement area when the area cannot be divided based on a ratio. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0021] [First embodiment] A first embodiment of the present disclosure will be described below with reference to the drawings. (1-1) Printer 1 Configuration The printer 1 of this embodiment is a label printer that prints images on labels, and includes a control unit 11, a display unit 12, an input unit 13, a communication unit 14, and a printing unit 15, as shown in FIG.
[0022] The control unit 11 includes a CPU 21 and a memory 22. The CPU 21 executes programs stored in the memory 22, thereby implementing various functions of the printer 1. Note that the various functions implemented by the control unit 11 are not limited to being implemented by executing programs, and may be implemented partially or entirely using one or more pieces of hardware. The memory 22 includes a semiconductor memory (e.g., ROM, RAM, and flash memory) that is a non-transient tangible recording medium, and stores programs and data.
[0023] The display unit 12 includes a display device (not shown) and displays various images on the display device. The input unit 13 includes switches arranged around the periphery of the display screen of the display unit 12. The input unit 13 outputs input operation information for identifying an input operation performed by a user via the switch.
[0024] The communication unit 14 performs data communication by wired communication using a LAN, wireless communication using a LAN, wired communication using a USB, or short-range wireless communication in accordance with the Bluetooth standard. LAN is an abbreviation for Local Area Network. USB is an abbreviation for Universal Serial Bus. Bluetooth is a registered trademark.
[0025] Printing unit 15 has a thermal printing mechanism and can print images on thermal roll paper of a predetermined width (e.g., 4 inches). Note that printing unit 15 may be configured to be capable of printing on cut paper, or may be configured to be capable of printing using a well-known recording method other than the thermal method (e.g., inkjet method).
[0026] (1-2) Barcode structure The barcode used in this embodiment is a barcode created according to the specifications defined by Code128, one of the barcode standards. The barcode is configured by arranging, from the left, a start character STC, 1st, 2nd, 3rd, 4th, and 5th data characters DC1, DC2, DC3, DC4, and DC5, a symbol check character SC, and a stop character SPC along the barcode arrangement direction BD, for example, as shown in Fig. 2. A quiet zone QZ1 is added to the left end of the barcode, and a quiet zone QZ2 is added to the right end of the barcode.
[0027] The start character STC, the first to fifth data characters DC1 to DC5, and the symbol check character SC are composed of three bars and three spaces arranged alternately. The stop character SPC is composed of four bars and three spaces arranged alternately. A bar is a module with low reflectivity. A space is a module with high reflectivity. A module is a single bar or space. A symbol character is a representation of numbers, letters, and symbols using bars and spaces, etc.
[0028] In Code128, there are four widths of bars and spaces: 1 module width, 2 module width, 3 module width, and 4 module width. 1 module width is the narrowest width of the bars and spaces that make up the barcode. 2 module width is twice as wide as 1 module width. 3 module width is three times as wide as 1 module width. 4 module width is four times as wide as 1 module width.
[0029] The symbol character is represented by alternating three bars and three spaces. Note that the widths of the three bars and three spaces are set so that the total width of the three bars and three spaces is 11 modules wide.
[0030] Quiet zones QZ1 and QZ2 are blank spaces with a width of either 10 times the minimum module width or 2.54 mm, whichever is larger. The minimum module width is 0.191 mm.
[0031] The start character STC is a character placed immediately before the data characters and indicates the beginning of the data. The start character STC is set to one of three code sets, "CODE A," "CODE B," or "CODE C," which indicates the character set used in the barcode.
[0032] The first to fifth data characters DC1 to DC5 are symbol characters that represent data. The symbol check character SC contains data for checking whether the bar code data is correct.
[0033] The stop character SPC is a character that is placed immediately after the symbol check character SC and indicates the end of the data. The stop character SPC is represented by alternating four bars and three spaces. Note that the width of the four bars and three spaces in the stop character SPC is set so that the total width of the four bars and three spaces is 13 modules wide.
[0034] (1-3) Processing Executed on Printer 1 The printer 1 executes a shipping label reduction process in order to reduce and print the shipping label.
[0035] The shipping label is affixed to a delivery box containing a product when the delivery box is delivered to a sales agent. The shipping label is a sheet of a specified size (e.g., A4 size) on which certain information necessary for delivery to the sales agent is written. The seller can obtain the shipping label data file by downloading it from the sales agent's website, etc. The seller creates a shipping label by printing the shipping label data file on printer 1, and affixes the created shipping label to the delivery box.
[0036] The width of the print medium used in the printer 1 is, for example, 4 inches, so when printing a data file for an A4-sized shipping label, for example, the shipping label must be reduced in size so that it fits on the print medium. The A4 size is 11.69 inches by 8.27 inches.
[0037] As shown in Fig. 3, the shipping label includes a rectangular first barcode arrangement area R1 in which the first barcode BC1 is arranged, a rectangular second barcode arrangement area R2 in which the second barcode BC2 is arranged, and an information writing area R3 in which letters and numbers indicating the delivery destination of the delivery box are written. In other words, the information writing area R3 is the area excluding the first barcode arrangement area R1 and the second barcode arrangement area R2 from the entire area constituting the shipping label. The first barcode BC1 is arranged approximately in the center of the first barcode arrangement area R1. The second barcode BC2 is arranged approximately in the center of the second barcode arrangement area R2.
[0038] Next, there will be described the procedure of the shipping label reduction process executed by the CPU 21 of the printer 1. The shipping label reduction process is a process that is started after an input operation for printing a data file of a shipping label is performed on the input unit 13.
[0039] When the shipping label reduction process is executed, the CPU 21 first searches for an area in the image data of an input image where a barcode can be placed, as shown in Fig. 4. The input image is an image of a shipping label represented by a data file specified as a print target in the input operation that caused the shipping label reduction process to be started.
[0040] The barcode placement area is a rectangular area set for each barcode included in the shipping label, and the widest area that does not contain black binary data other than the corresponding barcode is set. For example, the area R11 shown by the dashed line in Figure 3 is the barcode placement area for the first barcode BC1, and the area R12 shown by the dashed line in Figure 3 is the barcode placement area for the second barcode BC2.
[0041] Next, the CPU 21 executes a resizing process in S20 to resize the barcode arrangement area and set a barcode arrangement area, as shown in Fig. 4. Specifically, the CPU 21 sets a barcode arrangement area corresponding to each of the one or more barcode arrangement areas set in S10 so that the barcode arrangement area is included in the barcode arrangement area and so that barcodes arranged in adjacent barcode arrangement areas do not overlap each other. The first barcode arrangement area R1 in Fig. 3 is a barcode arrangement area corresponding to the barcode arrangement area R11, and the second barcode arrangement area R2 in Fig. 3 is a barcode arrangement area corresponding to the barcode arrangement area R12. The detailed procedure of the resizing process will be described later.
[0042] Next, in S30, CPU 21 calculates the reduction ratio of the shipping label based on the width of the shipping label and the width of the print medium so that the shipping label fits on the print medium, as shown in Fig. 4. For example, if the width of the shipping label is Ws and the width of the print medium is Wm, CPU 21 calculates the reduction ratio as (Wm / Ws). The width of the shipping label is, for example, the horizontal length of the shipping label shown in Fig. 3.
[0043] Then, in S40, CPU 21 determines whether or not reduction is necessary based on the reduction ratio calculated in S30. Specifically, CPU 21 determines that reduction is necessary when the reduction ratio calculated in S30 is less than 100%, and determines that reduction is not necessary when the reduction ratio is 100% or more.
[0044] If reduction is not required, the CPU 21 sets the input image as the output image in S50, and ends the shipping label reduction process. On the other hand, if reduction is necessary, CPU 21 separates the barcode from the background in the input image in S60. The background is the part of the input image other than the barcode.
[0045] Then, in S70, the CPU 21 determines whether or not there is a barcode (hereinafter, an unprocessed barcode) that has not been subjected to the processes in S80 to S120 described later, among the barcodes separated in S60.
[0046] Here, if there is no unprocessed barcode, the CPU 21 proceeds to S130. On the other hand, if there is an unprocessed barcode, the CPU 21 selects one unprocessed barcode in S80.
[0047] Then, in S90, CPU 21 determines whether the area of the barcode selected in S80 is larger than the corresponding reduced barcode arrangement area. Specifically, CPU 21 first generates a reduced barcode arrangement area by reducing the barcode arrangement area corresponding to the barcode selected in S80 by the reduction ratio calculated in S30. CPU 21 then determines whether the area of the barcode selected in S80 is larger than the reduced barcode arrangement area thus generated.
[0048] Here, if the barcode area is larger than the reduced barcode arrangement area, CPU 21 reduces the barcode selected in S80 in S100. Specifically, CPU 21 calculates the maximum reduction size at which the reduced barcode area is equal to or smaller than the reduced barcode arrangement area by reducing the minimum module width in the barcode selected in S80 before reduction in pixel units, and reduces the barcode to the calculated reduction size.
[0049] For example, if the minimum module width in the barcode before reduction is 5 pixels, the reduction size candidate values are 4 pixels, 3 pixels, 2 pixels, and 1 pixel. For example, when the reduction size candidate value is 4 pixels, the reduction ratio is 80% (i.e., 4 / 5=0.8), and when the reduction size candidate value is 3 pixels, the reduction ratio is 60% (i.e., 3 / 5=0.6).
[0050] However, the lower limit of the reduced size candidate values differs depending on the output resolution of the printer 1. For example, the lower limit of the reduced size candidate values is 3 pixels when the output resolution is 300 dpi, and is 2 pixels when the output resolution is 200 dpi.
[0051] Then, CPU 21 reduces the barcode by reconstructing the barcode using the calculated reduced size as the minimum module width in the barcode. Furthermore, in S130, the CPU 21 adjusts the position of the barcode reduced in S100 within the reduced barcode arrangement area so that the arrangement of the barcode reduced in S100 does not look different before and after reduction, and then proceeds to S70.
[0052] Also, in S90, if the barcode area is not larger than the reduced barcode placement area, in S120, the CPU 21 adjusts the position of the barcode selected in S80 within the reduced barcode placement area so that the placement of the barcode selected in S80 does not look different before and after reduction, and then proceeds to S70.
[0053] Then, when the process proceeds to S130, the CPU 21 reduces the background image showing the background separated in S60 at the reduction ratio calculated in S30 to generate a reduced background image. Furthermore, in S140, the CPU 21 executes a merge process for merging the barcode separated in S60 with the reduced background image generated in S130.
[0054] Specifically, in the merge process, the CPU 21 first determines whether each barcode separated in S60 has been reduced. If the barcode has been reduced, the CPU 21 places the reduced barcode in the corresponding reduced barcode arrangement area in the reduced background image at the position adjusted in S110. On the other hand, if the barcode has not been reduced, the CPU 21 places the barcode separated in S60 as is in the corresponding reduced barcode arrangement area in the reduced background image at the position adjusted in S120. Then, when the arrangement of all barcodes in the reduced background image is completed, the CPU 21 sets the reduced background image in which all barcodes are arranged as the output image, and ends the merge process.
[0055] When the merging process is completed, the CPU 21 ends the shipping label reduction process. Next, the procedure of the resizing process executed in S20 will be described. When the resizing process is executed, as shown in FIG. 5, first, in S210, the CPU 21 determines whether or not there is any barcode included in the input image that has not been selected in the process of S220 described later (hereinafter, referred to as an unprocessed barcode).
[0056] If there are no unprocessed barcodes, the CPU 21 ends the resizing process. On the other hand, if there are unprocessed barcodes, the CPU 21 selects one unprocessed barcode in S220.
[0057] Then, in S230, the CPU 21 determines whether or not there is a barcode (hereinafter, adjacent barcode) adjacent to the barcode selected in S220 (hereinafter, target barcode) along the barcode arrangement direction BD.
[0058] Here, if there is no adjacent barcode, the CPU 21 proceeds to S210. On the other hand, if there is an adjacent barcode, the CPU 21 determines in S240 whether or not there is a blank area arranged between the target barcode and the adjacent barcode that has not been subjected to the processes of S250 to S280 described later (hereinafter, unprocessed blank area).
[0059] Here, if there is no unprocessed blank area, the CPU 21 proceeds to S210. On the other hand, if there is an unprocessed blank area, the CPU 21 selects one unprocessed blank area in S250.
[0060] Then, in S260, CPU21 calculates the minimum module width within a barcode of a barcode (hereinafter, the first judgment target barcode) located at one end along the barcode arrangement direction BD in the blank area selected in S250, and the minimum module width within a barcode of a barcode (hereinafter, the second judgment target barcode) located at the other end along the barcode arrangement direction BD in the blank area selected in S250.
[0061] Furthermore, in S270, CPU21 identifies the barcode having the smaller minimum module width among the first and second judgment target barcodes. Hereinafter, among the first and second judgment target barcodes, the barcode having the smaller minimum module width among the first and second judgment target barcodes will be referred to as the small barcode, and the barcode having the larger minimum module width among the first and second judgment target barcodes will be referred to as the large barcode. CPU21 determines the size of the quiet zones QZ1 and QZ2 based on the size of the minimum module width among the barcodes.
[0062] Then, at S280, CPU21 sets the small barcode placement area and the large barcode placement area so that the length along the barcode arrangement direction BD of the blank area included in the barcode placement area of the small barcode (hereinafter referred to as the small barcode placement area) is longer than the length along the barcode arrangement direction BD of the blank area included in the barcode placement area of the large barcode (hereinafter referred to as the large barcode placement area), and proceeds to S240.
[0063] Specifically, for example, as shown in FIG. 6, the small barcode placement area SR1 of the small barcode SBC and the large barcode placement area BR1 of the large barcode BBC are set so that they border each other at the ends of the large barcode BBC that are not in contact with the large barcode BBC in the quiet zone BQZ of the large barcode BBC.
[0064] The small barcode placement area SR1 includes a quiet zone SQZ of the small barcode SBC, and the large barcode placement area BR1 includes a quiet zone BQZ of the large barcode BBC. The length SL1 along the barcode arrangement direction BD of the blank area included in the small barcode placement area SR1 is longer than the length BL1 along the barcode arrangement direction BD of the blank area included in the large barcode placement area BR1.
[0065] (1-4) Effects The printer 1 thus configured includes a printing unit 15 and a control unit 11. The printing unit 15 prints an image on a print medium. The control unit 11 controls the printing unit 15.
[0066] The control unit 11 then compares the size of the target barcode with that of the adjacent barcodes based on image data including multiple barcodes represented by multiple bars arranged alternately along the barcode arrangement direction BD and multiple spaces arranged between two adjacent bars.
[0067] The control unit 11 also sets the small barcode placement area and the large barcode placement area so that the length along the barcode arrangement direction BD of the blank area included in the small barcode placement area is longer than the length along the barcode arrangement direction BD of the target blank area included in the large barcode placement area.
[0068] The printer 1 configured in this way can make the barcode arrangement area where quality degradation due to shrinkage is greater (i.e., the small barcode arrangement area) as large as possible. This allows the printer 1 to suppress the degree of shrinkage of the barcode where quality degradation due to shrinkage is greater (i.e., the small barcode), and suppress the deterioration of barcode quality due to shrinkage.
[0069] In the embodiment described above, the printer 1 corresponds to an image processing device, S260 and S270 correspond to the comparison process, S280 corresponds to the large and small area setting process, and the barcode arrangement direction BD corresponds to the arrangement direction.
[0070] [Second embodiment] A second embodiment of the present disclosure will be described below with reference to the drawings. In the second embodiment, only the parts different from the first embodiment will be described. The same reference numerals will be used to designate the same configurations.
[0071] (2-1)Resizing The printer 1 of the second embodiment differs from the first embodiment in that the resizing process has been changed. Next, the procedure of the resizing process in the second embodiment will be described.
[0072] As shown in FIG. 7, the resizing process of the second embodiment differs from that of the first embodiment in that the processes of S270 and S280 are omitted and that the processes of S410 to S440 are added. That is, when the process of S260 ends, the CPU 21 calculates the ratio between the smallest module width in the barcode of the first judgment target barcode and the smallest module width in the barcode of the second judgment target barcode (hereinafter, the minimum module width ratio) in S410. If the smallest module width in the barcode of the small barcode SBC is 1 and the smallest module width in the barcode of the large barcode BBC is k, then the minimum module width ratio is k.
[0073] Then, in S420, the CPU 21 judges whether division based on the minimum module width ratio is possible. Specifically, as shown in FIG. 8, the CPU 21 calculates the length of the blank area along the barcode arrangement direction BD (hereinafter, blank area length L BA ) divided by (1+k) is the width W of the quiet zone SQZ of the small barcode SBC. SQZ If this is the case, it is determined that division based on the minimum module width ratio is possible. Note that Fig. 8 shows the barcode arrangement area when k=2.
[0074] Here, if division based on the minimum module width ratio is possible, CPU21 sets the barcode placement area based on the minimum module width ratio in S430 as shown in Fig. 7, and proceeds to S240. Specifically, CPU21 sets the small barcode placement area and the large barcode placement area so that the ratio between the length along the barcode arrangement direction BD of the blank area included in the small barcode placement area and the length along the barcode arrangement direction BD of the blank area included in the large barcode placement area matches the minimum module width ratio.
[0075] For example, as shown in FIG. 8, the CPU 21 determines whether the length of the blank area included in the small barcode arrangement area SR21 along the barcode arrangement direction BD is L BA / (1+k), and the length of the blank area included in the large barcode placement area BR21 along the barcode arrangement direction BD is k×L BA The small barcode placement area SR21 and the large barcode placement area BR21 are set so that / (1+k).
[0076] On the other hand, if division based on the minimum module width ratio is not possible, CPU21 sets the barcode placement area based on the quiet zone width in S440 as shown in Fig. 7, and proceeds to S240. Specifically, CPU21 sets the small barcode placement area and the large barcode placement area so that the small barcode placement area includes the quiet zone SQZ of the small barcode SBC, and the large barcode placement area includes the quiet zone BQZ of the large barcode BBC.
[0077] 9, the small barcode arrangement area SR31 includes the quiet zone SQZ of the small barcode SBC, and the large barcode arrangement area BR31 includes the quiet zone BQZ of the large barcode BBC. The small barcode arrangement area SR31 and the large barcode arrangement area BR31 are set so that the small barcode arrangement area SR31 of the small barcode SBC and the large barcode arrangement area BR31 of the large barcode BBC are in contact with each other at the ends of the quiet zone SQZ of the small barcode SBC that are not in contact with the small barcode SBC.
[0078] In addition, in S440, the CPU 21 may set the large barcode arrangement area BR41 so as to include the quiet zone SQZ of the small barcode SBC, as shown by the small barcode arrangement area SR41 and the large barcode arrangement area BR41 in FIG.
[0079] (2-2) Effects The printer 1 configured in this manner includes a printing unit 15 and a control unit 11. Then, the control unit 11 calculates the ratio between the minimum module width in the barcode of the target barcode and the minimum module width in the barcode of the adjacent barcode (hereinafter, minimum module width ratio) based on the image data including a plurality of barcodes.
[0080] Furthermore, the control unit 11 sets the target barcode placement area and the adjacent barcode placement area so that the ratio between the length of the blank area included in the target barcode placement area along the barcode arrangement direction BD and the length of the blank area included in the adjacent barcode placement area along the barcode arrangement direction BD matches the minimum module width ratio. The target barcode placement area is an area that is set to include the target barcode and the blank area around the target barcode in order to place the target barcode. The adjacent barcode placement area is an area that is set to include the adjacent barcode and the blank area around the adjacent barcode in order to place the adjacent barcode.
[0081] In this way, the printer 1 sets barcode placement areas for adjacent barcodes according to the sizes of the barcodes. This allows the printer 1 to prevent the smaller barcode from being reduced more than the larger barcode, thereby preventing the smaller barcode from being reduced too much, and thus preventing degradation of the barcode quality due to reduction.
[0082] The control unit 11 also determines whether it is possible to set the target barcode placement area and the adjacent barcode placement area so that the ratio between the length along the barcode arrangement direction BD of the blank area included in the target barcode placement area and the length along the barcode arrangement direction BD of the blank area included in the adjacent barcode placement area matches the minimum module width ratio.
[0083] If the control unit 11 determines that it is not possible to set the target barcode placement area and the adjacent barcode placement area to match the minimum module width ratio, it sets the target barcode placement area and the adjacent barcode placement area so that the target barcode placement area includes the quiet zone of the target barcode and the adjacent barcode placement area includes the quiet zone of the adjacent barcode.
[0084] This allows the printer 1 to set the barcode placement area even in cases where it is not possible to set the barcode placement area in accordance with the minimum module width ratio. In the embodiment described above, S410 corresponds to the ratio calculation process, S430 corresponds to the ratio area setting process, and the minimum module width ratio corresponds to the barcode ratio.
[0085] Moreover, S420 corresponds to the possibility determination process, and S440 corresponds to the impossible-time region setting process. Although one embodiment of the present disclosure has been described above, the present disclosure is not limited to the above embodiment and can be implemented in various modified forms.
[0086] [Variation 1] For example, in the above embodiment, the small barcode arrangement area SR1 and the large barcode arrangement area BR1 are set so that they are in contact with each other at the edge of the quiet zone BQZ. However, when the CPU 21 determines in S280 that the width W of the quiet zone SQZ of the small barcode SBC is smaller than the width W of the quiet zone SQZ of the small barcode SBC, as shown in the small barcode arrangement area SR11 and the large barcode arrangement area BR11 in FIG. SQZ The small barcode placement area SR11 may be set so as to overlap with the large barcode placement area BR11 along the barcode arrangement direction BD with the following length: This allows the printer 1 to further widen the barcode placement area that is more susceptible to quality degradation due to reduction, thereby further suppressing degradation of barcode quality due to reduction.
[0087] [Variation 2] In the first embodiment, the size of the target barcode is compared with that of the adjacent barcode based on the minimum module width in the barcode. However, the size of the barcode may be compared without using the minimum module width in the barcode. For example, the size of the barcode may be compared based on the length of the barcode along the barcode array direction BD. [Variation 3] In the above embodiment, a barcode created according to the specifications defined by Code128 is used, but a barcode created according to specifications defined by other barcode standards may be used, such as GS1-128, ITF, CODE39, CODABAR (NW-7), CODE93, UPC, JAN, EAN, etc.
[0088] In the above embodiments, multiple functions of one component may be realized by multiple components, or one function of one component may be realized by multiple components. Also, multiple functions of multiple components may be realized by one component, or one function realized by multiple components may be realized by one component. Also, part of the configuration of the above embodiments may be omitted. Also, at least part of the configuration of the above embodiments may be added to or substituted for the configuration of another of the above embodiments.
[0089] In addition to the printer 1 described above, the present disclosure can also be realized in various forms, such as a system that includes the printer 1 as a component, a program for causing a computer to function as the printer 1, a non-transient physical recording medium such as a semiconductor memory on which this program is recorded, and an image processing method. [Explanation of symbols]
[0090] 1... printer, 11... control unit, 15... printing unit
Claims
1. a printing section configured to print an image on a print medium; A control unit configured to control the printing unit; An image processing device comprising: The control unit is a comparison process for comparing the size of one of the plurality of barcodes as a target barcode and another barcode adjacent to the target barcode along the arrangement direction as an adjacent barcode, based on image data including a plurality of barcodes represented by a plurality of bars alternately arranged along a preset arrangement direction and a plurality of spaces arranged between two adjacent bars, the target barcode and the adjacent barcode being compared; a large and small area setting process for setting a blank area between the target barcode and the adjacent barcode as a target blank area, a barcode determined to be small in the comparison process as a small barcode, a barcode determined to be large in the comparison process as a large barcode, an area set to include the small barcode and the blank area around the small barcode in order to place the small barcode as a small barcode placement area, and an area set to include the large barcode and the blank area around the large barcode in order to place the large barcode as a large barcode placement area, and setting the small barcode placement area and the large barcode placement area so that the length along the arrangement direction of the target blank area included in the small barcode placement area is longer than the length along the arrangement direction of the target blank area included in the large barcode placement area; 13. An image processing device configured to:
2. 2. The image processing device according to claim 1, The large and small area setting process is an image processing device that sets the small barcode placement area so that it overlaps with the large barcode placement area along the arrangement direction with a length less than or equal to the small quiet zone width, which is the length along the arrangement direction of the quiet zone added to the small barcode.
3. a printing section configured to print an image on a print medium; A control unit configured to control the printing unit; An image processing device comprising: The control unit is a ratio calculation process for calculating a barcode ratio, which is a ratio between a size of the target barcode and a size of the adjacent barcode, by setting one of the barcodes as a target barcode and setting one of the barcodes adjacent to the target barcode in the arrangement direction as an adjacent barcode, based on image data including a plurality of barcodes represented by a plurality of bars alternately arranged along a preset arrangement direction and a plurality of spaces arranged between two adjacent bars; a ratio area setting process for setting the target barcode placement area and the adjacent barcode such that a ratio between a length along the arrangement direction of the target blank area included in the target barcode placement area and a length along the arrangement direction of the target blank area included in the adjacent barcode placement area matches the barcode ratio, the target barcode placement area being a blank area located between the target barcode and the adjacent barcode, the target barcode placement area being a blank area that is set to include the target barcode and the blank area around the target barcode in order to place the target barcode, and the adjacent barcode placement area being a blank area that is set to include the adjacent barcode and the blank area around the adjacent barcode in order to place the adjacent barcode, and the target barcode placement area and the adjacent barcode placement area are set such that a ratio between a length along the arrangement direction of the target blank area included in the target barcode placement area and a length along the arrangement direction of the target blank area included in the adjacent barcode placement area matches the barcode ratio; 13. An image processing device configured to:
4. 4. The image processing device according to claim 3, The control unit is a feasibility determination process for determining whether it is possible to set the target barcode placement area and the adjacent barcode placement area so that the ratio of the length along the arrangement direction of the target blank area included in the target barcode placement area to the length along the arrangement direction of the target blank area included in the adjacent barcode placement area matches the barcode ratio; an impossible-time area setting process for setting the target barcode placement area and the adjacent barcode placement area so that the target barcode placement area includes a quiet zone of the target barcode and the adjacent barcode placement area includes a quiet zone of the adjacent barcode when the possibility determination process determines that it is not possible to set the target barcode placement area and the adjacent barcode placement area so that they match the barcode ratio; 13. An image processing device configured to:
5. a printing section configured to print an image on a print medium; A control unit configured to control the printing unit; In an image processing apparatus comprising: The control unit, a comparison process for comparing the size of one of the plurality of barcodes as a target barcode and another barcode adjacent to the target barcode along the arrangement direction as an adjacent barcode, based on image data including a plurality of barcodes represented by a plurality of bars alternately arranged along a preset arrangement direction and a plurality of spaces arranged between two adjacent bars, the target barcode and the adjacent barcode being compared; a large and small area setting process for setting a blank area between the target barcode and the adjacent barcode as a target blank area, a barcode determined to be small in the comparison process as a small barcode, a barcode determined to be large in the comparison process as a large barcode, an area set to include the small barcode and the blank area around the small barcode in order to place the small barcode as a small barcode placement area, and an area set to include the large barcode and the blank area around the large barcode in order to place the large barcode as a large barcode placement area, and setting the small barcode placement area and the large barcode placement area so that the length along the arrangement direction of the target blank area included in the small barcode placement area is longer than the length along the arrangement direction of the target blank area included in the large barcode placement area; An image processing program configured to cause the image processing program to execute
6. a printing section configured to print an image on a print medium; A control unit configured to control the printing unit; In an image processing apparatus comprising: The control unit, a ratio calculation process for calculating a barcode ratio, which is a ratio between a size of the target barcode and a size of the adjacent barcode, by setting one of the barcodes as a target barcode and setting one of the barcodes adjacent to the target barcode in the arrangement direction as an adjacent barcode, based on image data including a plurality of barcodes represented by a plurality of bars alternately arranged along a preset arrangement direction and a plurality of spaces arranged between two adjacent bars; a ratio area setting process for setting the target barcode placement area and the adjacent barcode such that a ratio between a length along the arrangement direction of the target blank area included in the target barcode placement area and a length along the arrangement direction of the target blank area included in the adjacent barcode placement area matches the barcode ratio, the target barcode placement area being a blank area located between the target barcode and the adjacent barcode, the target barcode placement area being a blank area that is set to include the target barcode and the blank area around the target barcode in order to place the target barcode, and the adjacent barcode placement area being a blank area that is set to include the adjacent barcode and the blank area around the adjacent barcode in order to place the adjacent barcode, and the target barcode placement area and the adjacent barcode placement area are set such that a ratio between a length along the arrangement direction of the target blank area included in the target barcode placement area and a length along the arrangement direction of the target blank area included in the adjacent barcode placement area matches the barcode ratio; An image processing program configured to cause the image processing program to execute
Citation Information
Patent Citations
Tape printer
JP1993298465A
Bar code image generator and program
JP2004295523A
Printer and printing method
JP2007268775A
Image processing device and image processing program
JP2019180046A
Image processing device and image processing program
JP2019180047A
