Reading device and multifunctional printer

JP2025029447APending Publication Date: 2025-03-06BROTHER KOGYO KK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023134110
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-08-21
Publication Date
2025-03-06

Smart Images

  • Figure 2025029447000001_ABST
    Figure 2025029447000001_ABST
Patent Text Reader

Abstract

To provide a reading device and a multifunctional printer that can correctly decode a bar code displayed on a display.SOLUTION: All pixels of a read image are sequentially set to target pixels. When the pixel value of the target pixel is equal to or more than a black and white determination threshold B (S204: YES), the pixel value of the target pixel is changed to the pixel value of a white pixel (S205). When the pixel value of the target pixel is not equal to or more than the black and white determination threshold B (S204: NO), pixels in a number of pixels A continuous to the other of a sub-scanning direction with the target pixel as a starting point, are analyzed, and it is determined whether pixels with a pixel value equal to or more than a black and white determination threshold B are present in the pixels in a number of pixels A (S207). When the pixels with a pixel value equal to or more than the black and white determination threshold B are present (S207: YES), the pixel value of the target pixel is changed to the pixel value of the white pixel (S208). When the pixels with a pixel value equal to or more than the black and white determination threshold B are not present (S207: NO), the pixel value of the target pixel is changed to the pixel value of a black pixel (S209).SELECTED DRAWING: Figure 6B
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a reading device and a multifunction peripheral. [Background technology]

[0002] Conventionally, there is known a multifunction peripheral that includes a reading unit, a printing unit, a communication unit, etc. In the multifunction peripheral, for example, a job of reading an image by the reading unit, a job of printing the image on paper by the printing unit, a job of transmitting the image to the outside by the communication unit, etc. are performed.

[0003] A multifunction printer having a function for decoding barcodes (one-dimensional barcodes, two-dimensional codes) has been proposed (see, for example, Patent Document 1). In this multifunction printer, when a barcode is displayed on the screen (display) of a mobile terminal such as a smartphone or tablet and the user causes the screen to be read by a reading unit, the barcode is decoded and job-related settings are made based on the contents obtained by the decoding. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2019-149685 A Summary of the Invention [Problem to be solved by the invention]

[0005] The brightness of a mobile device's screen is adjusted by controlling the pulse width modulation (PWM) of the backlight. On the other hand, when reading a mobile device's screen, for example, a reading device extending in the main scanning direction is moved at a constant speed in the sub-scanning direction while repeatedly reading one line at a time. Therefore, if the screen brightness is set low, stripes (images of lines read while the backlight is off) appear in the image obtained by reading the screen. If the stripes overlap with the barcode, the barcode may not be decoded correctly.

[0006] An object of the present invention is to provide a reading device and a multifunction device that can correctly decode a barcode shown on a display. [Means for solving the problem]

[0007] In order to achieve the above-mentioned object, a reading device according to one aspect of the present invention has a reading device that reads one line in the main scanning direction of an object to be read and a moving mechanism that moves the reading device at a constant speed in a sub-scanning direction perpendicular to the main scanning direction, and is equipped with a reading unit that reads the object to be read by the reading operation of the reading device and the moving operation of the reading device by the moving mechanism, and a control unit, and the control unit causes the reading unit to read the object to be read, and if the image read by the reading unit contains stripes, detects the stripes and removes the detected stripes from the image read by the reading unit.

[0008] According to this configuration, the object to be read is read by the reading unit, and stripes included in the image read by the reading unit are detected. Then, if stripes are detected, the stripes are removed from the image of the object read by the reading unit. As a result, when a display (mobile terminal screen) on which a barcode is displayed is read by the reading unit, even if stripes appear in the image read by the reading unit because the screen brightness is set low, the stripes are removed from the image read by the reading unit, so the barcode can be correctly decoded (analyzed). If stripes are not included in the image read by the reading unit and no stripes are detected, naturally, no process of removing the stripes from the image read by the reading unit is performed.

[0009] A multifunction peripheral according to another aspect of the present invention has a reading device that reads one line in the main scanning direction of an object to be read and a moving mechanism that moves the reading device at a constant speed in a sub-scanning direction perpendicular to the main scanning direction, and is equipped with a reading unit that reads the object to be read through the reading operation of the reading device and the moving operation of the reading device by the moving mechanism, a printing unit that prints an image on a medium, a communication unit that communicates with an external device, and a control unit, and the control unit causes the reading unit to read the object to be read, and if the image read by the reading unit contains a striped pattern, detects the striped pattern and deletes the detected striped pattern from the image read by the reading unit, and if the image read by the reading unit contains a barcode, detects the barcode and decodes the detected barcode.

[0010] This multifunction device can achieve the same effects as the above-mentioned reading device. Effect of the Invention

[0011] According to the present invention, the barcode displayed on the display can be correctly decoded. [Brief description of the drawings]

[0012] [Figure 1] 1 is a perspective view of a multifunction peripheral according to an embodiment of the present invention; [Diagram 2] FIG. 2 is a cross-sectional view illustrating the configuration of a reading unit provided in the multifunction peripheral. [Diagram 3] FIG. 2 is a cross-sectional view illustrating the configuration of a printing unit provided in the multifunction peripheral. [Figure 4] FIG. 2 is a block diagram showing an electrical configuration of the multifunction peripheral; [Diagram 5] 10 is a flowchart showing the flow of a process executed in response to an instruction to decode a barcode. [Figure 6A] 1 is a flowchart (part 1) showing the flow of a stripe pattern removal process. [Figure 6B] 13 is a second flowchart showing the flow of the stripe pattern removal process. [Figure 7]10 is a diagram illustrating an image read by a reading section when the object to be read is a paper sheet bearing a barcode; FIG. [Figure 8] 10 is a diagram illustrating an image read by a reading section when the object to be read is a display surface of a mobile terminal displaying a barcode; FIG. [Figure 9] FIG. 2 is a diagram illustrating a pixel of interest and pixels to be analyzed. [Figure 10] 13 is a flowchart showing a flow of processing performed when the stripe pattern removal processing is executed again. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

[0014] <Multifunction device> The multi-function peripheral (MFP) 1 shown in FIG. 1 has multiple image processing functions. The image processing functions include, for example, a reading function and a printing function. The reading function is a function of optically reading an object to be read and generating image data of the object to be read. The printing function is a function of printing an image related to the image data on a sheet such as printing paper. The multi-function peripheral 1 includes a reading unit 2 that reads the object to be read, and a printing unit 3 that prints an image related to the image data on a sheet-like medium such as printing paper P (see FIG. 3).

[0015] An operation panel 4 is provided on the front of the multifunction device 1. The operation panel 4 includes a touch panel 5 (an example of a display unit). The touch panel 5 is rectangular and elongated in the left-right direction, and is configured, for example, by layering a pressure-sensitive or capacitance-type transparent film switch on a liquid crystal display. The touch panel 5 displays various information such as keys operated for various settings and the contents set by the key operations. In addition to the touch panel 5, the operation panel 4 may include physical keys such as a numeric keypad operated for various settings.

[0016] For ease of explanation, the direction toward you when facing the front of the multifunction device 1 is the front of the multifunction device 1, and the direction away from you is the rear of the multifunction device 1. In addition, when the multifunction device 1 is placed on a horizontal surface, the up-down and left-right directions of the multifunction device 1 are defined as facing the front of the multifunction device 1. In Figures 1, 2, and 3, the front, rear, top, bottom, left, and right directions of the multifunction device 1 are indicated by arrows.

[0017] <Reading section> 1 and 2, the reading unit 2 includes a housing 11 and a cover 12 that opens and closes the top surface of the housing 11. The cover 12 swings about a rotation axis extending in the left-right direction to open and close between a state in which the front end is raised relative to the top surface of the housing 11 to expose the top surface of the housing 11 and a state in which the cover 12 is lowered relative to the top surface of the housing 11 to cover the top surface of the housing 11.

[0018] A rectangular opening 13 is formed in the upper surface of the housing 11. The opening 13 is closed from below by a transparent plate 14. The transparent plate 14 is made of a transparent plate such as a transparent glass plate or a resin plate.

[0019] With the cover 12 in the open position, the object to be read is placed on the transparent plate 14 with the surface of the object to be read facing downward. At this time, the object to be read is placed at a specified position on the transparent plate 14. That is, the object to be read is placed with one corner aligned with the left rear corner where the rear edge 15 and the left edge 16 of the opening 13 intersect, and with two edges aligned with the rear edge 15 and the left edge 16 of the opening 13. After that, the cover 12 is closed, and the object to be read is covered from above by the cover 12. A pressing member 17 made of a sheet-like white resin is elastically supported on the inner surface of the cover 12. The pressing member 17 is formed in a substantially rectangular shape smaller than the opening 13. When the cover 12 is closed, the pressing member 17 does not ride on the peripheral portion of the opening 13 of the housing 11, but is placed in the opening 13 with a gap between each edge of the opening 13, and presses the object to be read against the transparent plate 14.

[0020] As shown in FIG. 2, a reading device 18 and a moving mechanism 19 are provided below the transparent plate 14.

[0021] The reading device 18 is in the form of a CIS (Contact Image Sensor) unit, and includes a light source 21, a rod lens array 22, and an image sensor 23. The light source 21 includes three LEDs (Light Emitting Diodes) of red (R), green (G), and blue (B). The rod lens array 22 includes a number of rod lenses aligned in the main scanning direction. The rod lenses are equal-magnification gradient index lenses. The image sensor 23 is a linear image sensor in which a plurality of light receiving elements are arranged at equal pitches in the main scanning direction. Each light receiving element includes, for example, a color filter and a photodiode of red (R), green (G), and blue (B), and outputs an electrical signal (voltage) according to the intensity of each RGB color component contained in the received light.

[0022] The movement mechanism 19 is a mechanism for moving the reading device 18 in a sub-scanning direction perpendicular to the main scanning direction. The sub-scanning direction coincides with the left-right direction of the multifunction device 1. The movement mechanism 19 includes a CIS carriage 24 that carries the reading device 18, and a scanner motor 25 that generates a driving force for moving the CIS carriage 24 back and forth in the left-right direction.

[0023] The reading unit 2 is not limited to a configuration that employs a CIS method, which is a life-size optical method, as a reading method, but may employ a reduced optical method, that is, a CCD (Charge Coupled Devices) method.

[0024] <Print section> As shown in FIG. 1, the printing unit 3 includes a housing 31. A rectangular opening 32 is formed in the front of the housing 31. A plate-shaped discharge tray 33 extending in the front-rear and left-right directions is provided inside the housing 31 so as to divide the space behind the opening 32 into upper and lower two. A paper feed tray 34 is disposed in the space below the discharge tray 33 so as to be insertable and removable through the opening 32. The paper feed tray 34 is formed in a box shape with an open top. Print paper P is stored in the paper feed tray 34 in a stacked state. The space above the discharge tray 33 is used as a space into which the print paper P is discharged.

[0025] 3, a transport path 41 along which the print paper P is transported is provided within the housing 31. The transport path 41 includes a curved path 42 having a substantially semicircular arc shape that bulges rearward from the rear end of the paper feed tray 34 and curves upward, and a straight path 43 that extends linearly forward from the curved path 42.

[0026] Further, within the housing 31, a paper feed roller 44, a first conveyor roller 45, a second conveyor roller 46, a third conveyor roller 47, and a paper discharge roller 48 are provided.

[0027] A roller support plate (not shown) is disposed behind the paper discharge tray 33. One end of the roller support plate is rotatably supported by the frame of the housing 31 via a swing shaft extending in the left-right direction, and extends rearward from the swing shaft. The paper feed roller 44 is supported at the tip of the roller support plate so as to be rotatable about a rotation axis extending in the left-right direction. As a result, the roller support plate is lifted by the rear end of the paper feed tray 34 while the paper feed tray 34 is being inserted into the space below the paper discharge tray 33. Thereafter, when the rear end of the paper feed tray 34 passes rearward over the roller support plate, the tip of the roller support plate lowers, and the circumferential surface of the paper feed roller 44 comes into contact with the topmost print paper P in the paper feed tray 34.

[0028] The first conveyor rollers 45 are a pair of a drive roller 51 and a driven roller 52. The drive roller 51 and the driven roller 52 are each provided rotatably about a rotation axis extending in the left-right direction, and their peripheral surfaces abut against each other with the rear end of the straight path 43 sandwiched therebetween.

[0029] The second conveyor roller 46 is spaced forward from the first conveyor roller 45. The second conveyor roller 46 is made up of a pair of a drive roller 53 and a driven roller 54. The drive roller 53 and the driven roller 54 are each provided rotatably about a rotation axis extending in the left-right direction, and their peripheral surfaces abut against each other with the straight path 43 in between.

[0030] The third conveyor roller 47 is spaced forward from the second conveyor roller 46. The third conveyor roller 47 is made up of a pair of a drive roller 55 and a driven roller 56. The drive roller 55 and the driven roller 56 are each provided rotatably about a rotation axis extending in the left-right direction, and their peripheral surfaces abut against each other with the straight path 43 interposed therebetween.

[0031] The discharge roller 48 is spaced forward from the third conveyor roller 47. The discharge roller 48 is made up of a pair of a drive roller 57 and a driven roller 58. The drive roller 57 and the driven roller 58 are each provided rotatably about a rotation axis that extends in the left-right direction, and their peripheral surfaces abut against each other with the front end of the straight path 43 in between.

[0032] A transmission path for the driving force of a transport motor (not shown) is connected to the paper feed roller 44 and the drive rollers 51, 53, 55, and 57. With the circumferential surface of the paper feed roller 44 in contact with the topmost print sheet P in the paper feed tray 34, the paper feed roller 44 rotates, thereby sending the topmost print sheet P to the curved path 42 of the transport path 41. When the leading edge of the print sheet P comes into contact with at least one of the circumferential surfaces of the drive roller 51 or the driven roller 52 of the first transport roller 45, the leading edge of the print sheet P is pulled in between the drive roller 51 and the driven roller 52. The print sheet P then receives a transport force from the drive roller 51 and passes between the drive roller 51 and the driven roller 52. Similar to when the printing paper P passes through the first transport rollers 45, it passes between the drive roller 53 and driven roller 54 of the second transport rollers 46, between the drive roller 55 and driven roller 56 of the third transport rollers 47, and between the drive roller 57 and driven roller 58 of the paper discharge rollers 48, in that order. Then, after passing between the drive roller 57 and driven roller 58 of the paper discharge rollers 48, the printing paper P is discharged into the space above the paper discharge tray 33 and received by the paper discharge tray 33.

[0033] A print head 61 (an example of a printing unit) configured to print images by, for example, an inkjet system is provided above the transport path 41 between the first transport roller 45 and the second transport roller 46. A plurality of nozzles are arranged on the underside of the print head 61. When the print head 61 faces the print paper P and ink is ejected from the nozzles of the print head 61, droplets of ink land on the print paper P.

[0034] The print head 61 may be a line head whose position is fixed, or a serial head that moves back and forth in the main scanning direction that coincides with the left-right direction of the multifunction device 1.

[0035] The printing unit 3 is not limited to a configuration that employs an inkjet printing method, and may be a configuration that employs an electrophotographic method or a configuration that employs a thermal method.

[0036] <Electrical configuration> 4, the multifunction device 1 includes an ASIC (Application Specific Integrated Circuit) 71. The ASIC 71 includes a CPU (Central Processing Unit) 72 and a memory 73. The memory 73 includes a non-volatile memory such as a flash memory or an E2PROM, on which data can be rewritten, and a volatile memory such as a DRAM (Dynamic Random Access Memory).

[0037] The ASIC 71 is connected to a bus 74 for data communication. The operation panel 4, the reading device 18 and the moving mechanism 19 of the reading unit 2, and the print head 61 and the transport mechanism 75 of the printing unit 3 are connected to the bus 74. The transport mechanism 75 includes a transport motor which is a drive source for rotating the paper feed roller 44, the first transport roller 45, the second transport roller 46, the third transport roller 47, and the paper discharge roller 48.

[0038] The CPU 72 (an example of a control unit) of the ASIC 71 executes a program stored in the nonvolatile memory of the memory 73 for a reading process that realizes the reading function, and controls the operation of each part of the reading unit 2. The CPU 72 also executes a program stored in the nonvolatile memory of the memory 73 for a printing process that realizes the printing function, and controls the operation of each part of the printing unit 3. When executing these programs, the volatile memory of the memory 73 is used by the CPU 72 as a work area.

[0039] When reading an object to be read, the object is placed at a specified position on the transparent plate 14, and then, for example, the operation panel 4 (touch panel 5) is operated to instruct the start of reading. When the start of reading is instructed, the reading process is started.

[0040] In the reading process, first, the reading device 18 is moved to a reading start position. The reading start position is set, for example, to the leftmost position in the maximum reading range of the reading device 18. Then, the reading device 18 is moved from the reading start position in the sub-scanning direction at a constant speed.

[0041] Meanwhile, in the reading device 18, light from the light source 21 is reflected by the object to be read on the transparent plate 14, and the reflected light passes through the rod lens array 22 and enters the image sensor 23. When the light enters the image sensor 23, photoelectric conversion is performed in each light receiving element of the image sensor 23, and each light receiving element outputs a voltage (electrical signal) according to the amount of light received.

[0042] The ASIC 71 includes an A / D conversion circuit. The A / D conversion circuit has, for example, a resolution of 8 bits (0 to 255), and converts the voltage (electrical signal) output from the image sensor 23 for each color of RGB into a pixel value (image data) that is a digital value. For example, voltages below a lower limit reference voltage (lower limit value) are uniformly converted to a pixel value of "0", voltages above an upper limit reference voltage (upper limit value) are uniformly converted to a pixel value of "255", and voltages in the range from the lower limit value to the upper limit value are converted to a pixel value according to the magnitude of the voltage. The voltages output from each light receiving element are converted into pixel values, whereby the reading device 18 achieves reading of one line of the object to be read in the main scanning direction.

[0043] While the reading device 18 is moved at a constant speed in the sub-scanning direction, the reading device 18 repeatedly reads one line of the object to be read, thereby reading the entire object to be read and generating image data of the object to be read.

[0044] When printing an image based on image data onto print paper P, an instruction to start printing is given from a terminal such as a PC (Personal Computer) communicably connected to the multifunction device 1 via a network such as a LAN (Local Area Network). When an instruction to start printing is given, the printing process is started.

[0045] In the printing process, the print paper P is transported along the transport path 41 by the paper feed roller 44, the first transport roller 45, the second transport roller 46, the third transport roller 47, and the paper discharge roller 48. Then, when the print paper P faces the print head 61, ink is selectively ejected from the nozzles of the print head 61, causing the ink to land on the sheet, and an image made up of dots formed by the ink droplets is printed on the print paper P.

[0046] <Striped pattern removal process> The multifunction device 1 has a function for decoding barcodes (one-dimensional barcodes and two-dimensional codes). By operating the operation panel 4, the multifunction device 1 can be instructed to decode a barcode displayed on an object to be read. When the instruction to decode a barcode is given, the CPU 72 of the ASIC 71 starts a reading process as shown in Fig. 5 (S1). When the object to be read is read in the reading process, a stripe pattern removal process is executed to remove stripes from an image related to the image data of the object to be read generated in the reading process (hereinafter referred to as a "read image") (S2). Then, after the stripe pattern removal process is completed, a decoding process is executed to decode the barcode (S3).

[0047] The flow of the stripe pattern removal process is shown in Figures 6A and 6B. When the object to be read is a piece of paper on which a barcode is displayed, the barcode is clearly displayed in the read image, and at least nothing is displayed in the marginal area around the periphery of the image, as shown in Figure 7. On the other hand, when the object to be read is a display (screen) of a mobile terminal on which a barcode is displayed, the read image shows the barcode as well as stripes extending in the main scanning direction across the entire image, as shown in Figure 8.

[0048] The main scanning direction in the read image corresponds to the main scanning direction in which the reading device 18 extends (the main scanning direction when reading the read object), and the sub-scanning direction in the read image corresponds to the sub-scanning direction in which the reading device 18 moves.

[0049] In the stripe pattern removal process, the CPU 72 sets, for example, one line extending along one edge of the scanned image in the main scanning direction over the entire length of the scanned image in the sub-scanning direction as an analysis pixel number determination region 81 in a margin region outside the region (barcode region) in which a barcode is displayed in the scanned image as shown in Fig. 6A. Then, the CPU 72 analyzes the analysis pixel number determination region 81 in the sub-scanning direction to obtain the longest number A of consecutive black pixels in the analysis pixel number determination region 81 (S201). Specifically, the CPU 72 compares the pixel value of each pixel in the analysis pixel number determination region 81 with a preset black / white determination threshold B to obtain the longest number A of consecutive pixels having a pixel value less than the black / white determination threshold B in the sub-scanning direction.

[0050] Next, the CPU 72 determines whether the number A is 0 (zero) or not (S202).

[0051] The number A is determined to be 0 when there are no black pixels in the analysis pixel number determination area 81, and when there are no stripes in the scanned image, as shown in Fig. 7. In this case, there is no need to remove the stripes from the scanned image. Therefore, when the CPU 72 determines that the number A is 0 (S202: YES), it ends the stripe pattern removal process.

[0052] If the CPU 72 determines that the number A is not 0, it sets the pixel of interest as the starting pixel, which is a pixel located at one end in the main scanning direction and one end in the sub-scanning direction of the read image, as shown in Fig. 6B (S203).Then, the CPU 72 determines whether the pixel value of the pixel of interest is equal to or greater than the black-and-white determination threshold value B (S204).

[0053] When the CPU 72 determines that the pixel value of the pixel of interest is equal to or greater than the black / white determination threshold B (S204: YES), it changes the pixel value of the pixel of interest to the pixel value of a white pixel (for example, 255) (S205).

[0054] On the other hand, if the CPU 72 determines that the pixel value of the pixel of interest is less than the black-and-white determination threshold B and is not equal to or greater than the black-and-white determination threshold B (S204: NO), it analyzes a number of pixels A that are continuous with the pixel of interest in the other direction in the sub-scanning direction, starting from the pixel of interest, as shown in Fig. 9. Then, the CPU 72 compares the pixel value of each pixel to be analyzed with the black-and-white determination threshold B to determine whether or not any pixel has a pixel value equal to or greater than the black-and-white determination threshold B among the number of pixels A to be analyzed (S207).

[0055] Then, if the CPU 72 determines that there is a pixel with a pixel value equal to or greater than the black / white determination threshold B among the pixels of the pixel count A being analyzed (S207: YES), that is, if the pixel value of the pixel of interest is less than the black / white determination threshold B and the pixel values ​​of all pixels of the pixel count A that are continuous with the pixel of interest in the other direction in the sub-scanning direction are not less than the black / white determination threshold B, it changes the pixel value of the pixel of interest to the pixel value of a white pixel (S208).

[0056] If the CPU 72 determines that there is no pixel having a pixel value equal to or greater than the black / white determination threshold B among the pixels of the pixel count A being analyzed (S207: NO), that is, if the pixel value of the pixel of interest is less than the black / white determination threshold B and the pixel values ​​of all pixels of the pixel count A that are continuous with the pixel of interest in the other direction in the sub-scanning direction are less than the black / white determination threshold B, it changes the pixel value of the pixel of interest to the pixel value of a black pixel (e.g., 0) (S209).

[0057] Thereafter, the CPU 72 determines whether or not the pixel of interest is a terminal pixel located at the other end in the main scanning direction and the other end in the sub-scanning direction of the read image (S210).

[0058] When the CPU 72 determines that the pixel of interest is not the end pixel (S210: NO), it sets the new pixel of interest to a pixel (next pixel) adjacent to the current pixel of interest on the other side in the main scanning direction (S211). If there is no pixel adjacent to the current pixel of interest on the other side in the main scanning direction, a pixel located at one end in the main scanning direction of a line adjacent to the line of the current pixel of interest on the other side in the sub-scanning direction is set as the pixel of interest.

[0059] The CPU 72 determines whether or not the pixel value of the new pixel of interest is equal to or greater than the black / white determination threshold value B (S204), and executes the above-mentioned S205 to S211.

[0060] In this manner, the above-mentioned steps S204 to S211 are repeated, so that all pixels of the read image are successively set as the pixel of interest. When the CPU 72 determines that the pixel of interest is the end pixel (S210: YES), the stripe pattern removal process ends.

[0061] <Action and effect> As described above, the stripe removal process searches for an area where a pixel of interest and a pixel having a pixel value less than the black / white determination threshold B are contiguous with a pixel count of A or less, and when such an area is detected, the pixel value of the pixel of interest is changed to the pixel value of a white pixel, thereby removing the stripe from the scanned image.

[0062] When the pixel of interest is present on a striped pattern, and pixels starting from the pixel of interest and continuing in the other direction in the sub-scanning direction by a number A are analyzed, and a pixel having a pixel value less than the black-and-white determination threshold B among the pixels to be analyzed is present on the striped pattern, the number of pixels continuing in the other direction in the sub-scanning direction by pixels having a pixel value less than the black-and-white determination threshold B is equal to or less than the number A. Therefore, an area in which the pixel of interest and pixels having a pixel value less than the black-and-white determination threshold B are continuing in the sub-scanning direction by a number of pixels A or less is an area on a striped pattern, and an area in which the pixel of interest and pixels having a pixel value less than the black-and-white determination threshold B are continuing in the sub-scanning direction by a number of pixels A+1 or more is an area that straddles a striped pattern and other patterns (characters, lines, etc.) or an area on a pattern other than a striped pattern. When an area in which the pixel of interest and pixels having a pixel value less than the black-and-white determination threshold B are continuing in the sub-scanning direction by a number of pixels A or less, that is, an area consisting of pixels that only constitute a striped pattern, is detected, the pixel value of the pixel of interest is changed to the pixel value of a white pixel, and the striped pattern is deleted from the read image.

[0063] By carrying out the stripe pattern removal process, when the screen of a portable terminal displaying a barcode is read by a reading unit, even if stripes appear in the image read by the reading unit due to a low screen brightness setting, the stripes are removed from the read image, so that the barcode can be correctly decoded (analyzed).

[0064] <Modification> Although one embodiment of the present invention has been described above, the present invention can be embodied in other forms.

[0065] For example, in the stripe pattern removal process shown in FIG. 6B, if the CPU 72 determines that the pixel value of the pixel of interest is equal to or greater than the black / white determination threshold B (S204: YES), the pixel value of the pixel of interest is changed to the pixel value of a white pixel. However, the pixel value of the pixel of interest may be maintained as it is without being changed to the pixel value of a white pixel.

[0066] Similarly, when the CPU 72 determines that there is no pixel with a pixel value equal to or greater than the black / white determination threshold B among the pixels in the pixel count A (S207: NO), it changes the pixel value of the pixel of interest to the pixel value of a black pixel, but the pixel value of the pixel of interest may be maintained as it is without being changed to the pixel value of a black pixel.

[0067] If decoding of a barcode included in a scanned image from which stripes have been removed fails, the stripe removal process may be re-executed, and after the stripe removal process is re-executed, decoding of the barcode included in the scanned image may be retried.

[0068] 10, after performing the stripe pattern removal process, the CPU 72 of the ASIC 71 decodes the barcode included in the read image. Then, the CPU 72 determines whether the barcode has been successfully decoded (S31).

[0069] When the CPU 72 determines that the decoding has been successful (S31: YES), it does not execute the stripe pattern removal process again.

[0070] If the CPU 72 determines that the decoding is not successful (S31: NO), that is, if the CPU 72 determines that the decoding has failed, it determines whether or not the number of decoding attempts (retry attempts) is less than a predetermined number (S32). If the CPU 72 determines that the number of attempts is less than the predetermined number (S32: YES), it re-executes the striped pattern removal process shown in Figures 6A and 6B (S33).

[0071] In the re-executed stripe removal process, at least one of the number A and the black and white determination threshold B is changed from the previously executed stripe removal process. This causes the re-executed stripe removal process to remove stripes from the read image in a manner different from that of the previously executed stripe removal process. As a result, after the re-execution of the stripe removal process, the decoding of the barcode included in the read image is retried, thereby increasing the possibility of successfully decoding the barcode.

[0072] When the number of decoding attempts reaches a predetermined number (S32: NO), the stripe pattern removal process is not executed any more.

[0073] In addition, various design modifications can be made to the above-described configuration within the scope of the claims. [Explanation of symbols]

[0074] 1: Multifunction device 2: Reading section 3: Printing department 18: Reading device 19: Movement mechanism 72: CPU (control unit) 81: Area for determining the number of analysis pixels A: Number of pixels (predetermined number) B: Black and white determination threshold

Claims

1. a reading unit including a reading device for reading one line in a main scanning direction of an object to be read and a moving mechanism for moving the reading device at a constant speed in a sub-scanning direction perpendicular to the main scanning direction, and reading the object to be read by a reading operation of the reading device and a moving operation of the reading device by the moving mechanism; A control unit, The control unit is Having the reading unit read the object to be read, A reading device that, when a striped pattern is included in the image read by the reading unit, detects the striped pattern and deletes the detected striped pattern from the image read by the reading unit.

2. 2. The reading device according to claim 1, The control unit is A reading device that detects an area in the image read by the reading unit where pixels having pixel values ​​less than a black / white determination threshold are continuous in the sub-scanning direction by a predetermined number or less, and deletes the detected area from the image read by the reading unit.

3. 3. The reading device according to claim 2, The control unit is All pixels read by the reading unit are sequentially set as pixels of interest; The pixel value of the pixel of interest is compared with the black / white determination threshold value, If the pixel value of the pixel of interest is equal to or greater than the black / white determination threshold, the pixel value of the pixel of interest is determined as a pixel value of a white pixel; a reading device which, when the pixel value of the target pixel is less than the black / white determination threshold, determines whether or not a pixel having a pixel value greater than or equal to the black / white determination threshold exists among a predetermined number of pixels consecutive from the target pixel in one of the sub-scanning directions, and if a pixel having a pixel value greater than or equal to the black / white determination threshold exists among the predetermined number of pixels, sets the pixel value of the target pixel to the pixel value of a white pixel, and if no pixel having a pixel value greater than or equal to the black / white determination threshold exists among the predetermined number of pixels, sets the pixel value of the target pixel to the pixel value of a black pixel.

4. 4. The reading device according to claim 3, The control unit is a reading device which compares each pixel value of a margin area in an image read by the reading unit with the black-and-white determination threshold, obtains the longest consecutive number of pixels in the margin area in the sub-scanning direction that have a pixel value less than the black-and-white determination threshold, and sets the obtained number to the predetermined number.

5. The reading device according to any one of claims 2 to 4, The control unit is A reading device that, when a barcode is included in the image read by the reading unit, detects the barcode and decodes the detected barcode.

6. 6. The reading device according to claim 5, The control unit is If decoding of the barcode fails, the reading device changes at least one of the black-and-white determination threshold or the specified number, and after the change, re-detects an area in the image read by the reading unit where pixels having pixel values ​​less than the black-and-white determination threshold are continuous in the sub-scanning direction for a specified number or less, and deletes the detected area from the image read by the reading unit.

7. a reading unit including a reading device for reading one line in a main scanning direction of an object to be read and a moving mechanism for moving the reading device at a constant speed in a sub-scanning direction perpendicular to the main scanning direction, and reading the object to be read by a reading operation of the reading device and a moving operation of the reading device by the moving mechanism; A printing unit that prints an image on a medium; A communication unit that communicates with an external device; A control unit, The control unit is Having the reading unit read the object to be read, When the image read by the reading unit includes a striped pattern, the striped pattern is detected, and the detected striped pattern is deleted from the image read by the reading unit; When a barcode is included in the image read by the reading unit, the multifunction device detects the barcode and decodes the detected barcode.

Citation Information

Patent Citations

  • Image forming apparatus and image reading program

    JP2019149685A