Image reading device

JP7920625B2Active Publication Date: 2026-09-15BROTHER KOGYO KK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2022090679
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-06-24
Filing Date
2022-06-03
Publication Date
2026-09-15
Estimated Expiration
2042-06-03

AI Technical Summary

Benefits of technology

【0008】 本発明によれば、原稿を読取ることで得られた画像データに対して画像処理を適正に行うことができる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007920625000001
    Figure 0007920625000001
  • Figure 0007920625000002
    Figure 0007920625000002
  • Figure 0007920625000003
    Figure 0007920625000003
Patent Text Reader

Abstract

To provide an image processing device capable of properly performing image processing even when edge pixels cannot be detected from image data.SOLUTION: A controller 11 of an image reading device detects edge pixels from image data read by a reading sensor. The controller 11 determines whether there is a discontinuity in the arrangement of the detected edge pixels in a predetermined direction, and executes dilation processing to increase the edge pixels in a specific range near the edge pixels detected in the image data. The controller 11 performs predetermined processing on the image data using the edge pixels detected from the image data after the dilation processing.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[[Technical Field]]

[0001] The present invention relates to a technology for reading a document as image data. [[Background Art]]

[0002] Patent Document 1 describes an image reading apparatus that reads a document as image data and detects edge pixels corresponding to the contour of the document from the image data. The image reading apparatus performs predetermined image processing on the image data using the detected edge pixels. [[Prior Art Documents]] [[Patent Documents]]

[0003] [[Patent Document 1]] Japanese Unexamined Patent Publication No. 2019-80152 [[Summary of the Invention]] [[Problems to be Solved by the Invention]]

[0004] There are cases where edge pixels obtained by reading the contour of a document are difficult to detect. For example, depending on how the document is set on a document platen or the edge pixel detection method used in the image reading apparatus, edge pixels obtained by reading the contour of the document may become difficult to detect. In such cases, since the edge pixels detected in the image data do not correspond to the contour of the document, there is a concern that image processing on the image data may not be performed appropriately.

[0005] The present invention has been made in view of the above problem, and an object of the present invention is to provide an image processing apparatus capable of appropriately performing image processing even when edge pixels cannot be detected from image data. [[Means for Solving the Problems]]

[0006] To solve the above problems, the present invention relates to an image reading device comprising a document table, a reading sensor that reads a document set on the document table in the main scanning direction, a transport mechanism that moves the document or the reading sensor relative to a sub-scanning direction perpendicular to the main scanning direction, and a controller. The controller of the image reading device performs edge detection processing to detect edge pixels from image data obtained by reading with a reading sensor. Edge pixels are pixels obtained by reading the contour of the document. The controller performs interruption determination processing to determine whether there is an interruption in the arrangement of the detected edge pixels in a predetermined direction. If it is determined that the edge pixels are interrupted, it performs dilation processing to increase the number of edge pixels in a specific range near the detected edge pixels in the image data. If it is determined that the edge pixels are interrupted, it performs image processing to perform predetermined processing on the image data using the edge pixels detected from the image data after dilation processing.

[0007] In the above configuration, the system determines whether there are any breaks in the arrangement of edge pixels in a predetermined direction, which are obtained by reading the outline of the original document, among the pixels that make up the image data. If it is determined that there are breaks in the edge pixels, an expansion process is performed on the image data to increase the number of edge pixels in a specific range near the detected edge pixels. Using the edge pixels detected from the expanded image data, a predetermined process is performed on the image data. This ensures that even if some of the edge pixels indicating the outline of the original document are broken and edge pixels cannot be detected, the image data can be properly processed. [Effects of the Invention]

[0008] According to the present invention, image processing can be properly performed on image data obtained by reading a document. [Brief explanation of the drawing]

[0009] [Figure 1] Configuration diagram of the image reading device. [Figure 2] Diagram of the document tray configuration. [Figure 3] A flowchart explaining the process of reading the outline of a document. [Figure 4] A diagram explaining image data. [Figure 5] A diagram explaining image data. [Figure 6] A flowchart illustrating the process in S11 of Figure 3. [Figure 7] A flowchart illustrating the process in S12 of Figure 3. [Figure 8] A diagram illustrating the candidate point groups. [Figure 9] A diagram illustrating the scope of the expansion process. [Figure 10] A flowchart illustrating the process in S14 of Figure 3. [Figure 11] A diagram illustrating the expansion process. [Figure 12] A diagram illustrating image data after dilation processing. [Figure 13] A diagram illustrating the calculation of an approximate straight line. [Modes for carrying out the invention]

[0010] (First Embodiment) The image reading device according to this embodiment will be described with reference to the drawings. The image reading device 10 shown in Figure 1 is a flatbed scanner. As shown in Figures 1 and 2, the image reading device 10 includes a controller 11, an image sensor 12 which is an example of a reading sensor, an AD converter 13, a binarization unit 14, a detection unit 18, a transport mechanism 19, a motor control unit 15, a user IF 16, a communication IF 17, and a document tray 30. IF is an abbreviation for interface.

[0011] Figure 2 is a diagram showing the configuration of the document platen 30 as viewed from below the image reading apparatus 10 (the depth side of the drawing sheet of Figure 2). The document platen 30 includes a transparent platen glass 301 and a frame 302. The platen glass 301 is a flat plate-shaped body made of a transparent material. The frame 302 is disposed around the platen glass 301, and supports the platen glass 301. The document platen 30 is provided with a butting position 31 that is a specific position for aligning the document M. As shown in Figure 2, it shows a state where the document M is set on the surface of the platen glass 301 (the depth side of the drawing sheet of Figure 2) while being inclined relative to the sub-scanning direction Y passing through the butting position 31.

[0012] Below the document platen 30 (the front side of the drawing sheet of Figure 2), the image sensor 12 is mainly configured of a light source and a reading unit, and is disposed with the reading unit facing upward. In the present embodiment, the image sensor 12 is a Contact Image Sensor. The image sensor 12 is not limited to a contact image sensor, and may also be a CCD image sensor (Charge-Coupled Device Image Sensor). As one reading operation, the image sensor 12 irradiates light from the light source toward the document M placed on the platen glass 301, the reading unit receives the reflected light reflected by the document M, and performs an operation of serially outputting a group of image data corresponding to the amount of received light as an analog signal. A group of analog signals serially output for each reading operation corresponds to data representing a read image for one line. The image sensor 12 is an elongated sensor, and is disposed in a state where the extending direction of the reading unit is aligned with one side of the platen glass 301. Hereinafter, the extending direction of the reading unit in the image sensor 12 is referred to as "main scanning direction X", and the direction orthogonal to the main scanning direction X is referred to as "sub-scanning direction Y".

[0013] Hereinafter, when the document M is set on the document platen 30, of the two long sides of the document M, the long side closer to the abutting position 31 is referred to as the left side, and the long side farther from the abutting position 31 is referred to as the right side. Further, when the document M is set on the document platen 30, of the two short sides of the document M, the short side closer to the abutting position 31 is referred to as the upper side, and the short side farther from the abutting position 31 is referred to as the lower side.

[0014] The conveyance mechanism 19 includes a motor 20, an endless belt 21, and a pair of pulleys 22. The pair of pulleys 22 are arranged on the document platen 30 side by side at a predetermined interval in the sub-scanning direction Y. Of the pair of pulleys 22, one pulley 22 is a pulley rotatable by the motor 20. The endless belt 21 is wound around the pair of pulleys 22. The endless belt 21 is coupled to the image sensor 12 via a member not shown in the figures. In the conveyance mechanism 19, the endless belt 21 rotates in accordance with the rotation direction of the pulleys 22, thereby causing the image sensor 12 to reciprocate in the sub-scanning direction Y.

[0015] The motor control unit 15 performs feedback control on the rotation of the motor 20 included in the conveyance mechanism 19 in accordance with a command from the controller 11, based on the rotational position and speed information input from the detection unit 18. The detection unit 18 includes, for example, an encoder attached to the rotating shaft of the motor 20, and a signal processing circuit that converts an input signal from the encoder into the rotational position and speed information of the motor 20.

[0016] The user IF 16 is an interface interposed between a user and the controller 11, and specifically includes a liquid crystal display and a touch panel on the liquid crystal display. The communication IF 17 is an interface that communicably connects an external device such as a PC and the image reading apparatus 10. The communication IF 17 includes, for example, a LAN interface and a USB interface.

[0017] The controller 11 is connected to the image sensor 12, the AD converter 13, the binarization unit 14, the motor control unit 15, the user IF 16, and the communication IF 17. The controller 11 includes a CPU, ROM, and RAM (not shown). The CPU 31 executes processing according to the program stored in the ROM. The RAM may consist of flash memory or EEPROM.

[0018] When the controller 11 receives a command from an external device via the communication IF 17 or a read command via the user IF 16, it starts the document reading process for the document M. During the reading process, the controller 11 commands the motor control unit 15 to perform motor control to transport the image sensor 12 in the sub-scanning direction Y at a constant speed corresponding to the reading resolution. The controller 11 also causes the image sensor 12 to perform a reading operation at regular time intervals corresponding to the reading resolution.

[0019] The AD converter 13 converts the analog data read by the image sensor 12 with each reading operation from analog to digital to generate digital image data. The controller 11 stores the modified image data input from the AD converter 13 in RAM. The controller 11 performs image processing such as gamma correction on the image data stored in RAM. As a result, image data for a predetermined number of lines is accumulated in the RAM of the controller 11 in accordance with the repetition of the reading operation, and eventually, image data including the entire original document M is stored.

[0020] Furthermore, the image data output from the AD converter 13 is also input to the binarization unit 14. The binarization unit 14 binarizes the image data for each line and outputs the binarized image data to the controller 11. The binarized image data is data in which the grayscale value of each pixel is represented as binary ("0" or "1"). Hereinafter, the binarized image data is assigned the code "D1", and the image data stored in the RAM of the controller 11 without being binarized is assigned the code "D2" to distinguish between the two data. The image data D1 binarized by the AD converter 13 is output to the controller 11. The controller 11 stores the image data D1 in RAM, so that the RAM stores the binarized image data D1 including the entire original M.

[0021] Next, the processes that the controller 11 performs to detect the size and tilt of the document M, along with the document reading process, will be explained using Figure 3. The controller 11 is the main component of the processes shown in Figure 3.

[0022] In step 10 (hereinafter, steps will also be simply referred to as "S"), the search range for detecting edge pixels from the image data D1 stored in RAM is set. Figure 4 shows the binarized image data D1 obtained by reading the entire platen glass 301 with the image sensor 12 stored in RAM. In the image data D1, the origin Q1 is the pixel corresponding to the abutment position 31 of the document glass 30. The document area Dm is the region of the image data D1 that is composed of pixels obtained by reading the document M set on the document glass 30. Figure 5 mainly shows the pixels obtained by reading the right side of the document M in particular from the image data D1. Note that in Figures 4 and 5, the image data D1 is shown when the corner of the document M is offset from the abutment position 31 of the document glass 30 and the document M is set at an angle.

[0023] As shown in Figure 4, the search range is the binarized image data D1 of the scanned image from the scanning start position of the document glass 30 to a position several centimeters (e.g., 3 cm) in the sub-scanning direction Y, as scanned by the image sensor 12. The image data D1 corresponding to the scanning start position passes through the origin Q1 and corresponds to a position parallel to the main scanning direction X. In this embodiment, edge pixels are not detected in the entire range of the image data D1, but rather in the search range, which is a predetermined area from the origin Q1 in the sub-scanning direction Y. Specifically, the upper limit of the search range in the sub-scanning direction Y is set as Ymax.

[0024] In S11, right edge detection processing is performed on the search area set in S10. Right edge detection processing is the process of detecting edge pixels obtained by reading the right edge of the document M within the document area Dm contained in the image data D1. Hereinafter, edge pixels obtained by reading the side edge of the document M will also be referred to as side edge pixels, and specifically, side edge pixels obtained by reading the right edge of the document M will also be referred to as right edge pixels. The process that controller 11 performs in S11 is an example of edge detection processing.

[0025] Figure 6 is a flowchart showing the process in S11 in detail. In S20, the sub-scan direction inspection position Ye is set to "0". The sub-scan direction inspection position Ye is the coordinate in the sub-scan direction Y among the coordinates that specify the pixel to be inspected for edge pixels. In S21, the main scan direction inspection position Xe is set to "Xmax" and the variable C is initialized to "0". The main scan direction inspection position Xe is the coordinate in the main scan direction X among the coordinates that specify the pixel to be inspected for edge pixels. "Xmax" is the pixel in the image data D1 that is furthest from the origin Q1 in the main scan direction X. In this embodiment, in order to detect the right-hand edge pixel in the document area Dm, the initial value of the main scan direction inspection position Xe is set to "Xmax", which is the rightmost pixel in the image data D1. The variable C will be described later.

[0026] In S22, it is determined whether the sub-scan direction inspection position Ye is greater than Ymax, that is, whether the sub-scan direction inspection position Ye is outside the search range. If the result of S22 is negative, the process proceeds to S23. In S23, it is determined whether the pixels to be inspected, identified by the main scan direction inspection position Xe and the sub-scan direction inspection position Ye, are edge pixels. Specifically, if the grayscale value of the pixels to be inspected is "1", it is determined to be an edge pixel; if the grayscale value is "0", it is not determined to be an edge pixel.

[0027] If S23 is rejected, the process proceeds to S24. In S24, the main scan direction inspection position Xe is subtracted by 1, thereby changing the pixel to be inspected to a pixel one pixel negative in the main scan direction X from the current pixel. In S25, it is determined whether the current main scan direction inspection position Xe is less than 0, that is, whether the main scan direction inspection position Xe is outside the search range. If S25 is rejected, the process proceeds to S22.

[0028] If S25 is rejected, the process proceeds to S22. If S22 is rejected, the process proceeds to S23, where it is determined whether the new target pixel is an edge pixel. If no edge pixels are detected in S23 for the pixels at the current sub-scanning direction inspection position Ye, the target pixels are shifted to the negative side by one pixel in the main scanning direction X (S24), and a determination is made (S23) as to whether the new target pixel is an edge pixel. If the main scanning direction inspection position Xe becomes 0 or less for the pixels at the current sub-scanning direction inspection position Ye, S25 is affirmed, and the process proceeds to S26.

[0029] In S26, the inspected pixel is changed by setting the main scan direction inspection position Xe to "Xmax" and the sub-scan direction inspection position Ye to "Ye+8". That is, the inspected pixel is changed from the pixel on the current sub-scan direction inspection position Ye to a pixel that is 8 pixels positive in the sub-scan direction Y. In the example in Figure 5, if the current sub-scan direction inspection position Ye is a pixel with "Y=0", the changed sub-scan direction inspection position Ye will be a pixel with "Y=8". After S26 is completed, the process proceeds to S22.

[0030] If S22 is rejected and the process proceeds to S23, it is determined whether the pixel on the modified sub-scan direction inspection position Ye is an edge pixel (S23-26). If S23 determines that the target pixel is an edge pixel, the process proceeds to S27. In S27, the current main scan direction inspection position Xe is set as X0 and the current sub-scan direction inspection position Ye is set as Y0 in the coordinates that specify the pixel of interest (X0,Y0). The sub-scan direction extension position Y1 is also set to "Y0+8". The pixel of interest (X0,Y0) is the pixel specified as a reference when determining whether the pixel determined to be an edge pixel in S23 has continuity on the image data D1. Specifically, by executing the processes in S27-S33 described later, it is determined whether the pixel of interest (X0,Y0) and other pixels that are continuously arranged at predetermined intervals (every 8 pixels in this embodiment) in the sub-scan direction Y relative to this pixel of interest (X0,Y0) form a candidate point group Gn. In the example in Figure 5, the pixel of interest (X0,Y0)=(k,0) marked with a "○" at the sub-scan direction inspection position Ye=0 is shown to be an edge pixel. By detecting the edge pixel on the right side in units of candidate point cloud Gn, which is a collection of multiple edge pixels, it becomes less likely to mistakenly detect dust or other debris as the contour of the original document M compared to detecting edge pixels on a single pixel basis.

[0031] In S28, for the pixels (X0-1, Y1), (X0, Y1), and (X0+1, Y1) surrounding the pixel of interest (X0, Y0), it is determined whether or not there are edge pixels that constitute the candidate point group Gn, according to a predetermined priority order. In this embodiment, in order to detect edge pixels on the right edge of the document area Dm, the presence or absence of edge pixels is determined in the priority order of pixels (X0+1, Y1), (X0, Y1), and (X0-1, Y1). For example, if the pixel (X0+1, Y) is determined to be an edge pixel, edge pixel detection is not performed for the remaining pixels. In the example in Figure 5, for the pixel of interest (X0, Y0) with coordinates (k, 0), the surrounding pixels (k+1, 8) marked with "〇" are determined to be edge pixels. Note that surrounding pixels that were not determined to be edge pixels are marked with "0" to indicate that they are not edge pixels. If S28 is judged positively, the process proceeds to S29, where the pixel of interest (X0, Y0) is determined to be a continuous edge pixel.

[0032] For example, if the controller 11 finds that edge pixels exist in the surrounding pixels (X0+1, Y1) in S28, it assumes that there are edge pixels arranged from the pixel of interest (X0, Y0) to the surrounding pixels (X0+1, Y1), and in S29, it determines that the pixel of interest (X0, Y0) is a continuous edge pixel.

[0033] In S30, the coordinates of the current pixel of interest (X0,Y0) are changed to the coordinates of the edge pixel detected in S28 according to the priority order. In the example in Figure 5, the pixel (k+1,8) is determined to be an edge pixel, so the coordinates of the current pixel of interest (X0,Y0) are changed to (k+1,8).

[0034] In S31, 1 is added to variable C. Variable C is a variable that indicates the number of edge pixels included in the candidate point group. In this embodiment, the candidate point group consists of 8 edge pixels, so variable C can take values ​​from 0 to 8. In S32, it is determined whether variable C is 8 or not. That is, it is determined whether all the edge pixels constituting one candidate point group have been detected or not.

[0035] If S32 is rejected, the process proceeds to S33, where the sub-scan direction extension position Y1 is changed to a pixel that is 8 pixels in the positive direction from the current sub-scan direction inspection position Ye (i.e., Y0) of the pixel of interest. After the processing in S33 is completed, the process proceeds to S28, where it is determined whether the pixels surrounding the pixel of interest (X0,Y0) are edge pixels according to the priority order. By performing this process, edge pixels that make up the candidate point cloud are detected every 8 pixels in the sub-scan direction Y, with the pixel of interest (X0,Y0) as the reference.

[0036] On the other hand, if S28 is rejected, the process proceeds to S24, where the main scan direction inspection position Xe, which specifies the position of the pixel to be inspected in the main scan direction X, is changed to the negative side by one pixel. In this case, the pixel of interest (X0,Y0) specified in S27 is not judged as a continuous edge pixel, so a judgment is made as to whether or not the new pixel to be inspected is an edge pixel. If it is judged to be an edge pixel (YES in S23), this edge pixel is designated as the new pixel of interest, and the detection of edge pixels that make up the candidate point group is performed. In the example in Figure 5, none of the pixels (k+1,32), (k+2,32), and (k+3,32) shown by the dashed lines, which are the pixels surrounding the pixel of interest (k+2,24), are edge pixels, so S28 is rejected.

[0037] The process then proceeds to S32. If variable C is 8, S32 is affirmed, and the process proceeds to S34. In S34, the coordinates of each edge pixel for variables C=1 to C=8 are stored in RAM as pixels that constitute the candidate point group. The controller 11 names the first candidate point group G stored in RAM as G1, and each time a candidate point group is stored in RAM in S34, it is stored in RAM as G2, G3, ..., GN-1, GN in order. The "n" in candidate point group Gn is the identifier of the candidate point group and is an integer between 1 and N.

[0038] In the example in Figure 5, the controller 11 determines that three pixels, (k,0), (k+1,8), and (k+2,16), are continuous edge pixels. The controller 11 does not determine that pixel (k+2,24) is a continuous edge pixel. Therefore, in the example in Figure 5, the controller 11 determines that the first to third pixels every eight pixels in the sub-scan direction are continuous edge pixels, but does not determine that the fourth pixel, (k+2,24), is a continuous edge pixel, and therefore does not store it in RAM as an edge pixel that constitutes the candidate point cloud in S34.

[0039] If the controller 11 is able to repeat the process from S28 to S32 eight times, that is, if it has determined eight consecutive edge pixels to be continuous (S32: YES), it stores the coordinates of each edge pixel from variable C=1 to C=8 in RAM as pixels that make up the candidate point cloud.

[0040] Figure 8 shows the candidate point group Gn in the binarized image data D1 of the right edge of the original document M. The candidate point groups GN-4, GN-3, GN-1, and GN in Figure 8 indicate that edge pixels are arranged along the right edge of the original document M, and the detection of edge pixels on the right edge of the original document M is interrupted at the location of the dashed line.

[0041] The square black dots shown in Figure 8 represent edge pixels that were determined to be continuous edge pixels in S29. The candidate point group Gn consists of eight continuous edge pixels, corresponding to the coordinates of each edge pixel for variables C=1 to C=8. The square black dots in the candidate point group Gn indicate that edge pixels exist continuously between them.

[0042] The controller 11 actually detects candidate point group GN-2, which is a straight edge pixel located inside the right-hand side of the original document M, without detecting candidate point group Gn within the dashed-dotted frame in Figure 8. The dashed-dotted frame in Figure 8 shows the case where the controller 11 was unable to determine a continuous edge pixel eight times in a row, as in the case of Figure 5, and therefore did not store it in RAM as an edge pixel constituting a candidate point group in S34.

[0043] In S35, it is determined whether the sub-scan direction inspection position Ye is greater than or equal to the upper limit Ymax. If the result of S35 is negative, the process proceeds to S36, where the sub-scan direction inspection position Ye is changed to the positive side by 64 pixels in the sub-scan direction Y in order to change the pixels to be inspected. On the other hand, if the sub-scan direction inspection position Ye is greater than the upper limit Ymax, the sub-scan direction inspection position Ye is outside the search range, so the result of S35 is positive, and the process in Figure 6 is terminated. In this case, the process proceeds to S12 in Figure 3.

[0044] In S12, a right edge determination process is performed on the right edge pixel detected in S11. The right edge determination process mainly determines whether the right edge pixel detected in S11 is interrupted in the sub-scan direction Y. The process executed by the controller 11 in S12 is an example of the interruption determination process. Figure 7 shows the right edge determination process in S12 in detail.

[0045] In S40, a candidate point group G1...GN, which is a bundle of edge pixels stored in RAM, is read out to serve as a reference for determining the break in the right-hand edge pixels. As shown in Figure 8, after the execution of S11, the RAM stores the coordinates of edge pixels, each consisting of 8 pixels that make up the candidate point group Gn. In S40, the candidate point group GN, which contains the edge pixel with the largest coordinate in the sub-scan direction Y, is read out from the candidate point groups G1...GN stored in RAM (in the example in Figure 8, candidate point groups GN-4, GN-3, GN-2, GN-1, GN), and is used as the reference candidate point group Gn. Note that the value of n in S40 is N.

[0046] In S41, the controller 11 determines whether or not the next candidate point group Gn-1 exists for the candidate point group Gn that was used as a reference in S40. In the example in Figure 8, the next candidate point group is the candidate point group GN-1 that is adjacent to the candidate point group GN in the sub-scanning direction Y. If the determination in S41 is positive, the process proceeds to S42.

[0047] In S42, it is determined whether the X-coordinate difference between the reference candidate point group Gn and the next candidate point group Gn-1 determined in S41 is greater than or equal to the threshold α. The "X-coordinate difference" is a value that indicates the difference in X-coordinates between the edge pixel with the smallest coordinate in the sub-scanning direction Y among the reference candidate point group Gn and the edge pixel with the largest coordinate in the sub-scanning direction Y among the next candidate point group Gn-1. In other words, in S42, it is determined whether the right-side edge pixels obtained by reading the right-side edge of the original document M are broken or not.

[0048] If S42 is rejected, the process proceeds to S43. In S43, the controller 11 changes the reference candidate point group Gn to candidate point group Gn-1, which is one position negative in the sub-scan direction Y. In the example in Figure 8, if the current reference candidate point group Gn is candidate point group GN, then candidate point group GN-1 becomes the reference candidate point group Gn. After completing the process in S43, the process proceeds to S41. Then, the processes in S41 and S42 are executed on the newly set reference candidate point group Gn.

[0049] In S42, if the X-coordinate difference between candidate point group Gn and the next candidate point group Gn-1 is greater than or equal to the threshold α, the process proceeds to S44. In the example in Figure 8, the X-coordinate difference between the reference candidate point group GN-1 and the next candidate point group GN-2 is greater than or equal to the threshold α. In S44, the controller 11 removes candidate point groups G1, G2, ...Gn-1, which are located in the negative direction Y of the sub-scanning direction compared to the current candidate point group Gn, from the candidate point group G1, G2, ...GN. In the example in Figure 8, the controller 11 removes candidate point groups G1, G2, ...GN-2 from the candidate point group G1, G2, ...GN.

[0050] In S45, it is determined whether or not the expansion process has already been performed on the candidate point group Gn, Gn+1, ..., GN, which is currently stored in RAM in S43. The determination of whether or not the expansion process in S43 has been performed is made using the value of the first determination flag, which will be described later in S47. If the determination in S45 is negative, the process proceeds to S46.

[0051] In S46, it is determined whether the total number of continuous edge pixels included in the candidate point clouds Gn, Gn+1, .....GN is greater than or equal to the first decision number β. In the example in Figure 8, the controller 11 determines whether the total number of continuous edge pixels included in the candidate point clouds GN, GN-1 is greater than or equal to the first decision number β. The first decision number β is determined from the number of continuous edge pixels that are expected to improve the accuracy of the approximate straight line when calculating the approximate straight line of the right-side edge pixels of the original document M using the edge pixels. If the determination in S46 is negative, the process proceeds to S47. In S47, the first decision flag is set to a value indicating that dilation processing is necessary. The first decision flag is a flag that indicates whether or not dilation processing is necessary, and its value is erased when dilation processing is performed in S14, which will be described later.

[0052] In S48, the dilation range to be dilated on the image data D1 is set. Specifically, the dilation range is set to the range from "Xstar" to "Xend" in the main scanning direction X within the search range. As shown in Figure 9, "Xstar" is a pixel that is moved a predetermined number of pixels in the main scanning direction X from the reference coordinate Xs, which is the edge pixel with the largest position in the main scanning direction X among the edge pixels included in the candidate point group Gn, Gn+1, ...GN in S43. For example, "Xstar" is a pixel that is moved 32 pixels in the negative direction from the reference coordinate Xs. "Xend" is a pixel that is moved a predetermined number of pixels in the main scanning direction X from the reference coordinate Xs. For example, "Xend" is a pixel that is moved 16 pixels in the positive direction from the reference coordinate Xs.

[0053] On the other hand, if S46 is judged positively, the process proceeds to S49. In S49, the second judgment flag is set to a value indicating that the right-hand edge pixels in the document area Dm have been properly detected. The value of the second judgment flag is cleared when the process shown in Figure 3 is completed. If the total number of continuous edge pixels included in the set of candidate point clouds Gn, Gn+1, .....GN is equal to or greater than the first judgment number β, it is possible to calculate an approximate straight line with a predetermined accuracy using these edge pixels. Therefore, in such cases, the dilation process is not performed. After the process in S48 or S49 is completed, the process proceeds to S13 in Figure 3. The process when S45 is judged positively will be described later.

[0054] In S13 of Figure 3, it is determined whether or not dilation processing is required for the edge pixels, according to the value of the first determination flag set in S12. If the value of the first determination flag indicates that "dilation processing is required", S13 is affirmed and the process proceeds to S14. On the other hand, if S46 of Figure 7 is affirmed and the first determination flag does not indicate that "dilation processing is required", the process proceeds to S15.

[0055] In S14, dilation is performed. Dilation is a process to increase the number of edge pixels around the edge pixels detected in the image data D1. Figure 10 is a flowchart illustrating the detailed process in S14. In S60, the position in the main scanning direction X is specified as "Xstar" and the position in the sub-scanning direction Y is specified as "0" as the starting point for dilation in the image data D1.

[0056] In S61, it is determined whether the pixel at the coordinates specified in S60 is an edge pixel. If the result of S61 is negative, the process proceeds to S62. In S62, it is determined whether there are edge pixels around the specified pixel (X,Y) that was determined not to be an edge pixel in S61. Figure 11 shows the specific range for determining whether there are edge pixels around the specified pixel (Xa,Yb). Specifically, as shown in Figure 11, it is determined whether the 8 neighboring pixels and either of the 2 pixels on the positive and negative sides of the sub-scan direction Y are edge pixels, using the specified pixel (Xa,Yb) as the reference. For a specified pixel (Xa, Yb), it is determined whether the eight neighboring pixels (Xa+1, Yb), (Xa-1, Yb), (Xa, Yb+1), (Xa+1, Yb+1), (Xa-1, Yb+1), (Xa, Yb-1), (Xa+1, Yb-1), (Xa-1, Yb-1), and the pixels two pixels to the positive and negative sides of the sub-scan direction Y (Xa, Yb+2) and (Xa, Yb-2) are edge pixels or not. In other words, in S61, edge pixels arranged before and after the specified pixel (X, Y) in the sub-scan direction Y are more easily detected than edge pixels arranged before and after the main scan direction X.

[0057] If S62 is judged positively, the process proceeds to S63, where the specified pixel (X,Y) is changed to an edge pixel (i.e., its grayscale value is 1). At this time, as shown in Figure 11, among the specified pixels (Xa,Yb), pixels that have edge pixels arranged before and after them in the sub-scan direction Y are more likely to be changed to edge pixels. As a result, edge pixels are more likely to be arranged consecutively in the sub-scan direction Y than in the main scan direction X. After S63 is completed, the process proceeds to S64. Also, if the specified pixel (X,Y) is an edge pixel and S61 is judged positively, or if the surrounding pixels are not edge pixels and S62 is judged negatively, the process proceeds to S64.

[0058] Figure 12 shows each pixel in the image data D1 shown in Figure 5 after the dilation process in S14 has been performed. In Figure 12, as in Figure 5, for ease of explanation, pixels in which the controller 11 determines whether or not they are continuous edge pixels (S28) during the right edge detection process (S11) are marked with a "○".

[0059] In S64, controller 11 determines whether the coordinates of the specified pixel in the main scan direction X are "Xend". That is, controller 11 determines whether the specified pixel (X,Y) is outside the dilated range. If the result of S64 is negative, the process proceeds to S66, where the coordinates of the specified pixel in the main scan direction X are changed to the positive side by one pixel. After completing the process in S66, the process proceeds to S61. In S61, it is determined whether the newly specified pixel is an edge pixel.

[0060] In S64, if the coordinate of the specified pixel in the main scan direction X is "Xend", the process proceeds to S65 to determine whether the coordinate of the specified pixel in the sub-scan direction Y is "Ymax". If the result of S65 is negative, the process proceeds to S67, where the coordinate of the specified pixel in the sub-scan direction Y is changed to the positive side by one pixel in the sub-scan direction Y. The coordinate of the specified pixel in the main scan direction X is changed to "Xstar". Then, the process proceeds to S61, where the processes from S61 to S63 are performed on the modified specified pixel (X,Y).

[0061] As a result of the above process, the pixels surrounding the right-side edge pixels are changed to edge pixels (pixels with a grayscale value of 1), eliminating the breaks in edge pixels in the image data D1 obtained by reading the right side. In the example shown in Figure 5, the pixels (k+1,32), (k+2,32), and (k+3,32) indicated by dashed lines were not identified as edge pixels, but in the example shown in Figure 12, where the dilation process has been performed, the pixels (k+1,32), (k+2,32), and (k+3,32) indicated by dashed lines have been changed to edge pixels. Also in Figure 12, the neighboring pixel (k+4,32) of the pixel (k+3,32) indicated by the dashed line has also been changed to an edge pixel. In S65, when the position of the specified pixel in the sub-scan direction Y reaches Ymax, the process in Figure 10 is terminated, and the process proceeds to S11 in Figure 3.

[0062] In S11, the right edge detection process is performed again, and then the process proceeds to S12. In the detailed processing of S12 shown in Figure 7, for each candidate point group Gn, the difference in X coordinates between candidate point group Gn and the next candidate point group Gn-1 is determined to determine whether or not the right-side edge pixels are broken. In the subsequent S45, if it is determined from the value of the first determination flag that the dilation process has already been performed, the process proceeds to S50.

[0063] In S50, it is determined whether the total number of continuous edge pixels included in the set of candidate point groups Gn, Gn+1, ..., GN stored in RAM is equal to or greater than the second decision number γ. In this embodiment, the second decision number γ is a decision number that has a different value from the first decision number β used in S46. Specifically, the second decision number γ is a fixed value regardless of the number of edge pixels included in the set of candidate point groups Gn, Gn+1, ..., GN stored in RAM.

[0064] If S50 is judged positively, the process proceeds to S49, and the second judgment flag is set to a value indicating that the edge pixel was properly detected. On the other hand, if S50 is judged negatively, the process proceeds to S51, and the second judgment flag is set to a value indicating that the edge pixel was not properly detected. Then, the process proceeds to S13 in Figure 3.

[0065] In S13, it is determined whether or not dilation processing is necessary. Specifically, if the first determination flag does not indicate that "dilation processing is necessary," S13 is rejected and the process proceeds to S15. In S15, it is determined whether or not edge pixels have been properly detected. Specifically, if the second determination flag indicates that "edge pixels have been properly detected," S15 is affirmed and the process proceeds to S16.

[0066] In S16, the coordinates of the right-side edge pixels included in the detected candidate point set Gn, Gn+1, .....GN are used to calculate the approximate straight line of the right-side edge in the document area Dm. Specifically, the approximate straight line representing the right-side edge L1 in the document area Dm is calculated by linearly approximating the coordinates of the right-side edge pixels included in the candidate point set Gn, Gn+1, .....GN stored in RAM. For example, the approximate straight line of the right-side edge L1 is calculated as "Y=AX+B".

[0067] In S17, the approximate straight line of the lower edge L2 of the document area Dm, which is composed of lower edge pixels, is calculated using the approximate straight line of the right side calculated in S16. The lower edge pixels are edge pixels obtained by reading the upper edge of the document M. In Figure 13, the slope of the normal of the approximate straight line representing the right side L1 of the document area Dm can be calculated as "-1 / A". Also, the intersection point P2 of the approximate straight line representing the right side L1 and the line segment passing through the origin Q1 and parallel to the main scanning direction X can be calculated as "-b / a". In this embodiment, by estimating that the intersection point P2 is a pixel obtained by reading the non-reference angle, which is one of the four angles in the document area Dm, the approximate straight line of the lower edge L2 that is perpendicular to the approximate straight line representing the right side L1 and passes through the intersection point P2 is calculated as "Y=-(1 / A)X-(B / A 2 It can be calculated as ")".

[0068] In S18, the approximate line of the left side L3, which is composed of left-side edge pixels in the document area Dm, is calculated using the approximate line calculated in S16 and S17. In the example in Figure 13, the intersection point P1 of the bottom side L2 and the line segment passing through the origin Q1 and parallel to the sub-scanning direction Y can be calculated as "-B / A". In this embodiment, by estimating the intersection point P2 as a pixel obtained by reading the reference angle, which is one of the four angles in the document area Dm, the approximate line of the right side L2, which is parallel to the approximate line representing the right side L1 and passes through intersection point P1, is calculated as "Y=AX-(B / A 2The reference angle is the angle of the document M set on the document glass 30 that is located near the abutment position 31. The non-reference angle is the angle of the document M located on the opposite side of the reference angle in the main scanning direction X.

[0069] In S19, the document size, which indicates the size of the original document M, and the slope of the original document M are calculated using the approximate lines calculated in S16, S17, and S18. Specifically, the document size is determined by using the distance from intersection point P1 to intersection point P2 as the length dimension of the shorter side in the original document area Dm. In addition, the slope of the original document M is calculated based on the slope A of the approximate line on the right side L1.

[0070] On the other hand, if S15 is rejected, the process proceeds to S20. In S20, the document size is set to "maximum size" and the tilt amount of the document M is set to "0°". This is done so that, when the document size is unknown, the document size is set to the maximum size that can be set by the image reader 10, so that the document M is recorded on the sheet or the like as much as possible. The processes that the controller 11 performs in S16 to S20 are an example of image processing.

[0071] When S19 or S20 is completed, the process shown in Figure 3 is terminated. Furthermore, if the controller 11 has completed reading the document M to its trailing edge, it terminates the repeated reading operation of the image sensor 12 and the transport operation of the image sensor 12 by the transport mechanism 19.

[0072] Subsequently, the controller 11 performs tilt correction on the image data D2 stored in RAM to adjust the tilt of the document area Dm. In tilt correction, the controller 11 corrects the tilt of the document area Dm included in the image data D2 using the tilt amount calculated in S19 or S20 in Figure 3. In other words, the tilt correction performed by the controller 11 is an example of image processing.

[0073] Furthermore, if the automatic scaling function is set to "ON", the controller 11 extracts the document area Dm from the image data D2 stored in RAM and changes the size of the extracted document area Dm to match the specified sheet size. In this process, the controller 11 calculates the intersection points of each approximate line, including points P1 and P2, from the approximate line of the right side L1, the approximate line of the left side L3, and the approximate line of the bottom side L2 of the document area Dm, which were calculated in S16 to S18 of Figure 3. Then, using the calculated intersection points and the position information of each side L1, L2, and L3 of the document area Dm, the controller 11 extracts the document area Dm from the image data D2. Then, it scales the size of the extracted document area Dm according to the specified sheet size. In other words, the scaling process of the document area Dm performed by the controller 11 is an example of image processing.

[0074] The embodiment described above can achieve the following effects. The controller 11 of the image reading device 10 detects edge pixels from the image data D1 obtained by reading by the image sensor 12. The controller 11 determines whether there is a break in the arrangement of the detected edge pixels in a predetermined direction, and if it is determined that there is a break in the edge pixels, it performs an expansion process to increase the number of edge pixels in a specific range of the image data near the detected edge pixels. The controller 11 then performs a predetermined process on the image data D1 using the edge pixels detected from the image data D1 after the expansion process. This allows for proper image processing of the image data D1 even if some of the edge pixels indicating the contour of the original document M cannot be detected.

[0075] The controller 11 of the image reading device 10 searches the image data D1 obtained by reading from the image sensor 12 in the main scanning direction X to detect edge pixels that are arranged in the sub-scanning direction Y. The controller 11 performs an expansion process to increase the number of edge pixels in a specific range of the image data D1 near the detected edge pixels. In the expansion process performed by the controller 11, the number of edge pixels increased in the sub-scanning direction Y is made greater than the number of edge pixels increased in the main scanning direction for the specific range. As a result, when a break in edge pixels is detected, the number of edge pixels in the specific range is increased so that the number of edge pixels increased in the sub-scanning direction Y is greater than the number of edge pixels increased in the main scanning direction X. As a result, the increase in edge pixels in the main scanning direction X is more limited than the increase in edge pixels in the sub-scanning direction Y. This prevents noise and edge pixels that have read the document contour from becoming linked, which would reduce detection accuracy, while allowing for a broad expansion in the sub-scanning direction Y without any breaks.

[0076] A document M is placed on the document glass 30, and the document is positioned so that the reference angle of the document is at a specific position on the document glass 30, which is the abutment position 31. The controller 11 detects edge pixels obtained by reading the side edge of the document M that extends in the sub-scanning direction Y from the non-reference angle, and processes the image data based on the position of the side edge pixels with the origin Q1 being a specific position on the image data. This makes it possible to perform image processing properly by reducing the effect of edge pixel breaks when performing image processing using edge pixels obtained by reading the side edge of the document M.

[0077] The controller 11 detects in units of candidate point clouds Gn, which are collections of multiple edge pixels. The controller 11 determines whether an edge pixel is interrupted based on whether the number of edge pixels in the candidate point group Gn, which are arranged adjacently in the sub-scanning direction Y at intervals shorter than the threshold α in the main scanning direction X, is less than or equal to a predetermined determination number. When detecting edge pixels in units of the candidate point group Gn, which is a collection of multiple edge pixels, it becomes less likely to mistakenly detect dust and other debris as the contour of the original document M compared to detecting edge pixels on a single pixel basis, but it also makes it easier for edge pixels to be interrupted. Even in such cases, the effect of interrupted edge pixels can be minimized, and image processing can be performed appropriately on the image data.

[0078] After the dilation process is performed, the controller 11 re-detects the candidate point group Gn using the edge pixels re-detected from the image data, and determines again whether there are any breaks in the edge pixels based on whether the number of edge pixels included in the candidate point group that is arranged adjacently in the sub-scanning direction Y with an interval shorter than the threshold α in the main scanning direction X is less than or equal to the second determination number γ. In this way, the presence or absence of breaks in the edge pixels can be determined even after the dilation process is performed.

[0079] Before performing the dilation process, the controller 11 determines whether there are any breaks in the edge pixels based on whether the number of edge pixels in the detected candidate point cloud Gn is equal to or greater than the first decision number β. After performing the dilation process, the controller 11 determines whether there are any breaks in the edge pixels based on whether the number of edge pixels in the detected candidate point cloud Gn is equal to or greater than the second decision number γ. The second decision number γ is different from the first decision number β. As a result, the decision number used to determine edge pixel breaks is different before and after performing the dilation process, allowing for a proper determination of whether or not there are breaks.

[0080] The controller 11 calculates an approximate straight line along the side of the original document M based on the position of the side edge pixels relative to the origin Q1 on the image data, and performs tilt correction processing on the image data based on the calculated approximate straight line. This allows for proper correction of the tilt of the image data when tilt correction is performed using edge pixels.

[0081] The controller 11 performs a process to determine the original size of the image data based on the position of the side edge pixels relative to the origin Q1 on the image data. This allows for accurate determination of the original size even when using edge pixels to determine the original size.

[0082] (Other embodiments) The technology disclosed in this embodiment is not limited to the embodiments described above, and can be modified in various forms without departing from its essence, for example, the following modifications are also possible. In the above embodiment, the controller 11 calculates an approximate straight line for the right side and uses this approximate straight line to calculate the approximate straight lines for the left side and the bottom side. Alternatively, in S17 of Figure 3, the controller 11 may detect the bottom edge pixels from the image data D1 and use the detected bottom edge pixels to calculate the approximate straight line for the bottom side in the document area Dm. Alternatively, in S18, the controller 11 may detect the left edge pixels of the image data D1 and use the detected left edge pixels to calculate the approximate straight line for the left side in the document area Dm.

[0083] In the above embodiment, the presence or absence of edge pixel breaks was determined twice, before and after the dilation process. Alternatively, it is not necessary to determine the presence or absence of edge pixel breaks after the dilation process. In this case, if the controller 11 determines in S45 of Figure 7 that the dilation process has been completed, it proceeds directly to S49. After that, it makes a positive determination in S15 of Figure 3 and executes the processes in S16 to S19. In this case, the processes in S20 of Figure 3 and S50 and S51 of Figure 7 may be omitted.

[0084] In the above embodiment, the presence or absence of a break in edge pixels was determined based on a candidate point group consisting of eight edge pixels arranged in the sub-scanning direction Y every eight pixels. The number of edge pixels constituting the candidate point group and the spacing of the edge pixels in the sub-scanning direction Y are not limited to the numbers shown in the above embodiment and may be changed as appropriate. Alternatively, the presence or absence of a break in edge pixels may be determined on a unit basis of one adjacent edge pixel in the sub-scanning direction Y.

[0085] In the above embodiment, the edge pixels of the side were detected from the search range in the image data D1. Alternatively, the edge pixels of the side may be detected from the entire image data D1. In this case, the search range is not set in S10 of Figure 3.

[0086] In the above embodiment, the transport mechanism 19 changes the relative positional relationship between the image sensor 12 and the document M by reciprocating the image sensor 12 in the sub-scanning direction Y. Alternatively, the transport mechanism 19 may have an ADF (Auto Document Feeder), and the relative positional relationship between the image sensor 12 and the document M may be changed by the ADF. The ADF has a tray on which the document M is set and rollers that transport the document set in the tray. The document M transported from the tray by the rollers passes through a reading position facing the reading surface of the image sensor 12 provided inside the housing. The image sensor 12 reads the original document M passing through the reading position at predetermined intervals according to the set resolution, and outputs the read data to the AD converter 13.

[0087] In the embodiment described above, edge pixels on the right side of the document area Dm were detected in the image data D1 to determine if there was a break in the edge pixels. Alternatively, edge pixels on the left side or the bottom side of the document area Dm may be detected to determine if there was a break in the edge pixels. In this case, in S11 of Figure 3, right-side edge pixels or bottom-side edge pixels are detected within the search range. In S12, it is determined whether there is a break in the edge pixels detected in S11. [Explanation of Symbols]

[0088] 10…Image reading device, 11…Controller, 12…Image sensor, 19…Transport mechanism, 30…Document glass, X…Main scanning direction, Y…Sub-scanning direction

Claims

1. Manuscript stand and, A reading sensor that reads the document placed on the document glass in the main scanning direction, A transport mechanism that moves the document or the reading sensor relative to the main scanning direction in a sub-scanning direction perpendicular to the main scanning direction, Equipped with a controller, The aforementioned controller, An edge detection process is performed to detect edge pixels from the image data obtained by reading with the aforementioned reading sensor, and the edge pixels are pixels obtained by reading the outline of the original document. The aforementioned controller, A break detection process that determines whether or not there is a break in the arrangement of the detected edge pixels in a predetermined direction, If it is determined that the edge pixels are interrupted, an expansion process is performed to increase the number of edge pixels in a specific range of the image data near the detected edge pixels, Image processing that performs predetermined processing on the image data using the edge pixels detected from the image data after the expansion process, An image reading device that performs the following.

2. Manuscript stand and, A reading sensor that reads the document placed on the document glass in the main scanning direction, A transport mechanism that moves the reading sensor or the document relative to the main scanning direction in a sub-scanning direction perpendicular to the main scanning direction, Equipped with a controller, The aforementioned controller, An edge detection process is performed by searching the image data obtained by reading with the aforementioned reading sensor in the main scanning direction to detect edge pixels that are arranged along the edges of the original document, and these edge pixels are pixels obtained by reading the contour of the original document. The aforementioned controller, Of the image data, an expansion process is performed to increase the number of edge pixels in a specific range near the detected edge pixels, and in the expansion process, the number of edge pixels increased in the sub-scanning direction is made greater than the number of edge pixels increased in the main scanning direction for the specific range. The aforementioned controller, An image reading device that performs image processing on the image data using the edge pixels detected from the image data after the expansion process.

3. A document tray and A reading sensor that reads the document placed on the document glass in the main scanning direction, A transport mechanism that moves the document or the reading sensor relative to the main scanning direction in a sub-scanning direction perpendicular to the main scanning direction, Equipped with a controller, The aforementioned controller, An edge detection process is performed to detect edge pixels from the image data obtained by reading with the aforementioned reading sensor, and the edge pixels are pixels obtained by reading the outline of the original document. The aforementioned controller, A break detection process that determines whether or not there is a break in the arrangement of the detected edge pixels in a predetermined direction, If it is determined that the edge pixels are interrupted, an expansion process is performed to increase the number of edge pixels in a specific range of the image data near the detected edge pixels, Image processing that performs predetermined processing on the image data using the edge pixels detected from the image data after the expansion process, Execute, In the edge detection process, the image data obtained by reading with the reading sensor is searched in the main scanning direction to detect the edge pixels that are arranged along the edges of the original document. In the expansion process, the number of edge pixels in the sub-scanning direction is increased to be greater than the number of edge pixels in the main scanning direction for the specific range near the detected edge pixels. Image reading device.

4. The document is placed on the document tray such that one of the four corners of the rectangular document is at a specific position on the document tray. The aforementioned controller, In the edge detection process, the edge pixels obtained by reading the side edge extending from the specific position in the original document toward the sub-scanning direction are detected. In the aforementioned image processing, the image data is processed based on the position of the side edge pixels. The side edge pixels are edge pixels obtained by reading the side edge of the original document from among the detected edge pixels. The image reading device according to claim 3.

5. The aforementioned controller, For the detected edge pixels, a region extending by a predetermined number of pixels in the main scanning direction is set as the specific range. The image reading device according to any one of claims 2 to 4, wherein the expansion process increases the number of edge pixels for the set specific range.

6. A document tray and A reading sensor that reads the document placed on the document glass in the main scanning direction, A transport mechanism that moves the document or the reading sensor relative to the main scanning direction in a sub-scanning direction perpendicular to the main scanning direction, Equipped with a controller, The aforementioned controller, An edge detection process is performed to detect edge pixels from the image data obtained by reading with the aforementioned reading sensor, and the edge pixels are pixels obtained by reading the outline of the original document. The aforementioned controller, A break detection process that determines whether or not there is a break in the arrangement of the detected edge pixels in a predetermined direction, If it is determined that the edge pixels are interrupted, an expansion process is performed to increase the number of edge pixels in a specific range of the image data near the detected edge pixels, Image processing that performs predetermined processing on the image data using the edge pixels detected from the image data after the expansion process, Execute, In the edge detection process described above, the edge pixels are detected in units of candidate point clouds, The candidate point group is a group consisting of multiple edge pixels arranged along the edges of the original document, The aforementioned controller, In the interruption determination process, it is determined whether the edge pixels are interrupted based on whether the total number of edge pixels in the set of candidate point groups that are arranged adjacently in the sub-scanning direction at intervals shorter than a predetermined number in the main scanning direction is less than or equal to a predetermined determination number. Image reading device.

7. The aforementioned controller, The specific range is defined as an area that includes the edge pixels included in the candidate point group, which are arranged adjacent to each other in the sub-scanning direction at intervals shorter than the predetermined pixel amount in the main scanning direction, and which extends by the predetermined pixel amount in the main scanning direction. In the expansion process, the edge pixels are increased for the set specific range. The image reading device according to claim 6.

8. The aforementioned controller, In the edge detection process, after the expansion process is performed, the candidate point cloud is re-detected using the edge pixels re-detected from the image data. In the interruption determination process, the presence or absence of an interruption in the edge pixels is determined again based on whether the total number of edge pixels included in the set of candidate point groups that are arranged adjacent to each other in the sub-scanning direction at intervals shorter than a predetermined number of pixels in the main scanning direction is less than or equal to the determination number. The image reading device according to claim 6 or 7.

9. The aforementioned controller, In the interruption determination process, before executing the expansion process, the presence or absence of interruptions in the edge pixels is determined based on whether the total number of edge pixels included in the set of candidate points detected by the edge detection process is equal to or greater than the first determination number. The first determination number is the determination number, The aforementioned controller, In the interruption determination process, after the expansion process is executed, the edge detection process is performed Based on whether the total number of edge pixels included in the re-detected set of candidate points is equal to or greater than the second determination number, the presence or absence of breaks in the edge pixels is determined. The second determination number is a determination number that is different from the first determination number. The image reading device according to claim 8.

10. The aforementioned controller, In the image processing described above, an approximate straight line of the side edge of the document is calculated based on the position of the side edge pixel relative to the origin of the document platen on the image data, and a tilt correction process is performed on the image data based on the calculated approximate straight line. The image reading device according to claim 4.

11. The aforementioned controller, In the image processing described above, the process of determining the size of the document in the image data is performed based on the position of the side edge pixels relative to the origin of the document platen on the image data. The image reading device according to claim 4.

Citation Information

Patent Citations

  • Image processing device, region detection method, and computer program

    JP2016178553A

  • Image reading device

    JP2019080152A