Image processing apparatus, image processing method, and program
By dividing images and resetting correction parameters when errors exceed thresholds, the system improves data transfer efficiency and maintains real-time performance in image processing systems with shared memory configurations.
Patent Information
- Application Number
- JP2023191808
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-11-09
- Publication Date
- 2025-05-21
AI Technical Summary
Existing image processing systems face inefficiencies in data transfer due to accumulated errors in lattice point coordinates during skew correction, especially when multiple configurations share memory, leading to unpredictable completion times and potential loss of real-time performance.
The system performs skew correction on divided images, using a first control with correction parameters based on output image width and skew angle, and resets these parameters when pixel position errors exceed a threshold, ensuring efficient data transfer by maintaining a defined data transfer unit.
This approach enhances data transfer efficiency while keeping accumulated errors within allowable limits, preserving real-time performance and stability in the image processing system.
Smart Images

Figure 2025079236000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to image processing technology. [Background technology]
[0002] There is known an image processing device that obtains a level image by performing skew correction on an image scanned with a skewed document by a scanner device. The image processing device calculates the grid point coordinates of an image that should be free of skew based on the skew angle of the document, and generates pixel values corresponding to each of the calculated grid point coordinates from the pixel values of the input image by interpolation processing, thereby generating a level image with skew correction. In addition, a technology called DDA (Digital Differential Analyzer) can generate grid point coordinates one after another by sequentially adding the tilt component calculated from the skew angle to the coordinates that are the starting point. While DDA is simple and suitable for high-speed processing, the rounding error of the tilt component calculated from the skew angle accumulates in the grid point coordinates, so the error becomes larger the more the grid point coordinates are generated repeatedly.
[0003] An image processing device that performs skew correction sequentially stores scanned images in a memory, reads out image areas that correspond to the skew angle from the scanned images stored in the memory, and performs interpolation processing. The image areas used for the interpolation processing are determined according to lattice point coordinates calculated based on the skew angle, so data transfer when reading out the image areas requires detailed control. On the other hand, when transferring data via a large-capacity memory, data transfer efficiency can be improved by setting the data transfer unit to a relatively large unit. For this reason, the unit of data transfer needs to be determined taking into consideration the balance between controllability and data transfer efficiency. In response to this, Patent Document 1 discloses a technique for enabling efficient data transfer, which calculates the number of divisions of a scanned image based on the number of lines and the skew angle of a multi-line memory, and makes variable the burst length when reading out the scanned image from the memory for each divided image and transferring it to the line memory. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2017-122971 A Summary of the Invention [Problem to be solved by the invention]
[0005] However, the technology disclosed in Patent Document 1 is a technology that improves the efficiency of data transfer by using an ideal skew angle, and cannot improve the efficiency of data transfer when the accumulated error in the lattice point coordinates exceeds a tolerable amount. Furthermore, the technology described in Patent Document 1 can increase data transfer efficiency by making the burst length of data transfer variable in a system in which the memory that holds the scanned image and the configuration that performs the skew correction process correspond one-to-one. However, in a system in which the configuration that performs the skew correction and other configurations share memory, if various burst lengths are mixed, it becomes difficult to predict the timing at which the data transfer will be completed, and there is a concern that the real-time nature of the entire system will be lost.
[0006] SUMMARY OF THE PRESENT DISCLOSURE An object of the present invention is to improve the data transfer efficiency of the entire system while suppressing the accumulated error due to skew correction within an allowable range. [Means for solving the problem]
[0007] The image processing device of the present invention has a correction means for performing skew correction for each divided image obtained by dividing an image to be corrected into a plurality of parts, and a control means for controlling the skew correction by the correction means, and the control by the control means includes a first control for controlling the correction means to perform skew correction of the divided image using a correction parameter based on an output image width in the image to be corrected and a skew angle of the image to be corrected, and a second control for resetting the correction parameter for the next divided image to be skew corrected by the correction means and controlling the correction means to perform skew correction of the next divided image using the reset correction parameter when a cumulative error in pixel position due to the skew correction using the first control exceeds a predetermined threshold value. Effect of the Invention
[0008] According to the present invention, it is possible to increase the data transfer efficiency of the entire system while suppressing the accumulated error due to skew correction within an allowable amount. [Brief description of the drawings]
[0009] [Figure 1] FIG. 2 is a diagram illustrating an example of a hardware configuration of a system according to an embodiment. [Diagram 2] 4 is a diagram illustrating an example of a functional configuration of a correction processing unit. [Diagram 3] 11 is a flowchart of a skew correction process according to the embodiment. [Figure 4] FIG. 11 is an explanatory diagram of calculation of a skew correction parameter. [Diagram 5] FIG. 11 is an explanatory diagram of an interpolation process. [Figure 6] FIG. 13 is an explanatory diagram of a divided image. [Figure 7] 6 is a flowchart of control of a skew correction process according to the first embodiment. [Figure 8] FIG. 2 is a sequence diagram according to the first embodiment. [Figure 9] FIG. 13 is an explanatory diagram of a divided image starting point search. [Figure 10] 6A to 6C are diagrams illustrating a result of skew correction in the first embodiment. [Figure 11] 10 is a flowchart of control according to a second embodiment. [Figure 12] FIG. 13 is a diagram showing an error amount for each gradient component. [Figure 13] 13 is a flowchart of control of a skew correction process according to the third embodiment. [Figure 14] FIG. 11 is a sequence diagram according to the third embodiment. [Figure 15] 13A to 13C are diagrams illustrating a result of skew correction in the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, embodiments of the present invention will be described with reference to the drawings. The following embodiments do not limit the present invention, and not all of the combinations of features described in the present embodiments are necessarily essential to the solution of the present invention. The configuration of the embodiments may be appropriately modified or changed depending on the specifications of the device to which the present invention is applied and various conditions (conditions of use, environment of use, etc.). In addition, the present invention may be configured by appropriately combining parts of the embodiments described below. In the following embodiments, redundant descriptions of the same or similar configurations and processing steps will be omitted.
[0011] <First embodiment> 1 is a diagram showing an example of the hardware configuration of an image processing system as an application example of an image processing device according to this embodiment. The image processing system of this embodiment includes a CPU 100, a RAM 101, a ROM 102, a correction processing unit 103, a scanning unit 104, an I / F unit 105, and a bus 106.
[0012] CPU 100 controls the entire image processing system, and controls the scanning of documents and reading of scanned image data in scanning unit 104, as well as skew correction processing in correction processing unit 103, which will be described later. In the following explanation, image data handled within the image processing system will be simply referred to as images, unless otherwise required. The RAM 101 is used as a storage area for temporarily storing scanned images obtained by the scanning unit 104 reading an original document, and as a storage area required for skew correction processing in the correction processing unit 103, which will be described later. A control program according to the present embodiment and the like are stored in advance in the ROM 102. At startup, the CPU 100 reads out and executes the program from the ROM 102, thereby controlling the scanning (reading process) of an original by the scanning unit 104 and the skew correction process by the correction processing unit 103.
[0013] The scanning unit 104 is a reading device that reads an original document using an optical sensor to generate a scanned image. There are various scanning methods, such as a flatbed method and a feed method, and the scanning unit 104 of this embodiment may be of either method. Here, whether the scanning method is the flatbed method or the feed method, the original document may be in a state where it is skewed with respect to an ideal angle, and the scanning unit 104 is equipped with a known mechanism for detecting the skew angle when scanning the original document. The scanned image by the scanning unit 104 is temporarily stored in the RAM 101, and information on the skew angle detected by the scanning unit 104 is held in the RAM 101 in a form that can be used by the CPU 100 or the correction processing unit 103. The scanning unit 104 may be an external reading device.
[0014] The I / F unit 105 communicates with an external system. For example, the I / F unit 105 transmits to the external system a scanned image read by the scanning unit 104 and an image after the correction processing unit 103 performs skew correction processing on the scanned image. For example, the I / F unit 105 receives images scanned by an external scanner device (not shown) and images sent from other image generating devices or imaging devices. For example, the I / F unit 105 also receives programs and various data sent from external information processing devices or servers. The bus 106 connects the above-mentioned components and the correction processing unit 103 .
[0015] The correction processing unit 103 performs skew correction processing on the scan image scanned by the scanning unit 104 and stored in the RAM 101 based on the information on the skew angle. The correction processing unit 103 according to the first embodiment performs skew correction processing based on the skew angle on the scan image scanned with the document tilted, as described later, to generate an image after skew correction. The correction processing unit 103 can also perform skew correction processing on a scan image obtained by an external scanner device (not shown). The image to be subjected to the skew correction processing in the correction processing unit 103 according to this embodiment is not limited to a scan image, and may be, for example, a skew image generated or acquired by another image generating device or an imaging device. In this embodiment, the image to be subjected to the skew correction processing is called a correction target image.
[0016] 2 is a diagram showing an example of the functional configuration of the correction processing unit 103 according to this embodiment. The correction processing unit 103 of this embodiment has the following functional units: a control unit 200, a reading unit 201, a memory control unit 202, a memory 203, an interpolation unit 204, and a writing unit 205. In the correction processing unit 103 of this embodiment, the read unit 201, the memory control unit 202, the memory 203, the interpolation unit 204, and the write unit 205 function as a configuration for performing skew correction for each divided image obtained by dividing the correction target image into a plurality of images. Also, the control unit 200 controls the read unit 201, the memory control unit 202, the memory 203, the interpolation unit 204, and the write unit 205 under the control of the CPU 100 in FIG. 1. That is, in this embodiment, the control of the skew correction is performed by the CPU 100 and the control unit 200. Also, in this embodiment, the control of the skew correction by the CPU 100 and the control unit 200 includes a first control and a second control. The first control is a control for performing skew correction of the divided images using a correction parameter calculated from the output image width in the correction target image and the skew angle of the correction target image. The second control is a control in which, when the accumulated error of pixel positions due to the skew correction in the first control exceeds a predetermined threshold, the correction parameters for the next divided image to be skew corrected are reset, and the skew correction is performed on the next divided image and thereafter using the reset correction parameters. The detailed configuration and operation of each functional unit that realizes the above-mentioned skew correction and control in the correction processing unit 103 according to this embodiment will be described below.
[0017] The control unit 200 holds a group of registers accessible from the CPU 100, and controls the skew correction process in the correction processing unit 103 based on the information set in the group of registers. The group of registers held by the control unit 200 includes a skew correction start register, an output start point coordinate register, a lattice point tilt component register, and a correction target image start address register. The information in the output start point coordinate register, the lattice point tilt component register, and the correction target image start address register is used as a skew correction parameter. The control unit 200 controls the skew correction process based on the information specified in the group of registers, and notifies the CPU 100 of an interrupt signal when the skew correction process is completed. The control of the skew correction by the CPU 100 and the control unit 200 and the operation of each functional unit will be described in detail later.
[0018] Under the instruction of the control unit 200, the read unit 201 reads out the correction target image from the RAM 101 in units of a predetermined data amount, and sends it to the memory control unit 202. The predetermined data amount unit and the processing and operation by the read unit 201 will be described in detail later. Under the instruction of the control unit 200, the memory control unit 202 holds the image data read by the reading unit 201 in a predetermined data amount unit in the memory 203, and also acquires a pixel group required for interpolating pixel values of output grid point coordinates, which will be described later, from the memory 203. The details of the processing and operation by the memory control unit 202 will be described later. The memory 203 is an internal memory having a storage area large enough to temporarily hold the image to be corrected.
[0019] The interpolation unit 204 generates and outputs pixel values of output grid point coordinates (described later) by interpolating using pixel values of a pixel group in the vicinity of the output grid point coordinates under instructions from the control unit 200. The details of the interpolation process by the interpolation unit 204 will be described later. The writing unit 205 writes pixel values of output grid point coordinates, which will be described later, into the RAM 101 for each predetermined data transfer unit under the instruction of the control unit 200. The processing and operation of the writing unit 205 will be described in detail later.
[0020] 3 is a flowchart showing the flow of the skew correction process in the correction processing unit 103. In the subsequent flowcharts and sequence diagrams described later, the symbol S represents a processing step (process). First, in S300, the control unit 200 calculates output grid point coordinates based on skew correction parameters set in a register group by the CPU 100 as described later.
[0021] The calculation process of the output grid point coordinates in the control unit 200 will be described with reference to Fig. 4. In Fig. 4(a) and Fig. 4(b), the white circles in the figures represent input grid point coordinates corresponding to each pixel position of the input image, which is the image to be corrected, and the black circles represent output grid point coordinates corresponding to each pixel position of the output image after skew correction, that is, the pixel position that should be. Fig. 4(b) is a diagram showing an enlarged portion of Fig. 4(a). Note that the actual pixels constituting the image to be corrected have a predetermined size in the vertical and horizontal directions, unlike points such as grid points, so the grid point coordinates described in this embodiment are assumed to be coordinates corresponding to, for example, the center position of a pixel.
[0022] The control unit 200 also has information of an output start point coordinate register as one of the skew correction parameters set by the CPU 100 as described later. The output start point coordinate register is a register that holds coordinate information representing the upper left pixel position in the output image after skew correction of the correction target image. The output start point pixel position P(0,0) shown in FIG. 4(a) represents the upper left pixel position in the output image after skew correction, and the coordinates of the output start point pixel position P(0,0) are (x0,y0). The control unit 200 sequentially calculates the output grid point coordinates by sequentially adding the value of the tilt component according to the skew angle from the coordinates (x0,y0) of the output start point pixel position P(0,0).
[0023] The tilt component is stored in the inter-lattice point tilt component register as one of the skew correction parameters, and has an x'-direction component Sx and a y'-direction component Sy in the x'y' coordinate system of the image after the skew correction. Furthermore, the x'-direction component Sx is composed of a displacement with respect to the xy coordinate system of the input image, which is the image to be corrected, an x-coordinate component Sxx, and a y-coordinate component Sxy. Similarly, the y'-direction component Sy is composed of a displacement with respect to the xy coordinate system of the input image, an x-coordinate component Syx, and a y-coordinate component Syy. When the output grid point coordinates are calculated sequentially, as shown in FIG. 4(b), the output grid point coordinates in the x' direction are generated by adding the x'-direction component Sx to the previously calculated output grid point coordinates. Similarly, the output grid point coordinates in the y' direction are generated by adding the y'-direction component Sy to the previously calculated output grid point coordinates. Details of the calculation process using the values of the inter-lattice point gradient component register will be described later, but since errors occur in the calculated values themselves, when the output lattice point coordinates are calculated sequentially, these errors are added sequentially, and the deviation from the ideal skew angle that does not include errors becomes greater.
[0024] Next, in S301, the control unit 200 calculates an address for reading out from the correction target image held in the RAM 101 an image area required for calculating a pixel value at a position corresponding to the output grid point coordinates calculated in S300.
[0025] In this embodiment, the image area read from the correction target image is at least an area including a group of pixels that can calculate pixel values corresponding to the output grid point coordinates calculated in S300 by the interpolation process by the interpolation unit 204. In this embodiment, the interpolation unit 204 uses, for example, bilinear interpolation as an example of the interpolation process. Bilinear interpolation is a method of interpolating a pixel value corresponding to an interpolation target point using pixel values of four pixels surrounding the interpolation target point. In this embodiment, the output grid point coordinates correspond to the interpolation target point in the bilinear interpolation. Therefore, the interpolation unit 204 performs a process of interpolating a pixel value corresponding to the output grid point coordinates using pixel values of four pixels in the vicinity of the output grid point coordinates.
[0026] FIG. 5 is a diagram used to explain the process of interpolating pixel values of output grid point coordinates (points to be interpolated) using bilinear interpolation. The interpolation unit 204 specifies the position of the output grid point coordinates 500 by the ratios n and m when the distances between the four adjacent pixels 501 to 504 around the output grid point coordinates 500 are each set to 1.0. Furthermore, the interpolation unit 204 obtains an interpolation value E at a point 505 between a pixel 501 having a pixel value A and a pixel 502 having a pixel value B by calculating A(1-n)×Bn. Similarly, the interpolation unit 204 obtains an interpolation value F at a point 506 between a pixel 503 having a pixel value C and a pixel 504 having a pixel value D by calculating C(1-n)×Dn. Then, the interpolation unit 204 obtains a pixel value (interpolation value) G corresponding to the output grid point coordinates 500 by calculating E(1-m)×Fm. In this way, in bilinear interpolation, the pixel values of the four neighboring pixels 501-504 are required to interpolate the pixel value G corresponding to the output grid point coordinates 500. Therefore, the control unit 200 calculates an address capable of designating an image area including at least the four neighboring pixels 501-504 surrounding the output grid point coordinates 500 as an address for reading out the image area from the RAM 101.
[0027] In addition, in the image processing system as shown in FIG. 1, the data transfer unit is often defined in advance. This is to prevent the response time from the common memory from becoming difficult to predict when each of the multiple components connected in the image processing system accesses the common memory (RAM 101 in the case of the image processing system in FIG. 1) by individual transfer units. If the response time from the common memory falls outside the expected range, the real-time performance of the entire system cannot be maintained, and the image processing system may become unstable. Alternatively, a buffer or the like must be provided separately to prevent this. For this reason, the control unit 200 calculates an address for reading the image area from the RAM 101 that includes the pixel group required for the above-mentioned interpolation processing and enables reading in data amount units that can maintain the real-time performance of the entire image processing system. In the case of this embodiment, in order to maintain the real-time performance of the entire image processing system, data transfer is performed in units of divided images obtained by dividing the correction target image 600 into multiple parts, as shown by the dashed lines in FIG. 6(a).
[0028] That is, in S301, the control unit 200 calculates an address for reading out a divided image in which the position of the output grid point coordinates in the image 601 after skew correction exists from the correction target image 600 held in the RAM 101. At this time, the control unit 200 specifies the start address of the upper left corner of the divided image, and further specifies the width of the divided image (defined as the divided image width SIW) and the height of the divided image (defined as the divided image height SIH). In addition, when dividing the correction target image 600 into a plurality of parts, an overlapping area OA is provided between adjacent divided images that overlap each other. The overlapping area OA is provided to obtain pixel values of four pixel groups required when interpolating pixel values of the output grid point coordinates. Furthermore, at least one of the divided image width SIW and the divided image height SIH including the overlapping area OA is set to be a data transfer unit, which is a predetermined data amount unit, or an integer multiple of the data transfer unit. This makes it possible to always maintain the data transfer unit specified in the image processing system in the data transfer, and enables efficient data transfer in the image processing system as a whole.
[0029] When dividing the correction target image 600 into a plurality of parts, the image division may be performed by shifting the boundaries of the divided images in advance based on the skew angle so as not to read out image data unnecessary for skew correction, as shown in Fig. 6(b). Even when shifting the boundaries of the divided images as in Fig. 6(a), efficient data transfer is possible by setting at least one of the divided image width SIW and the divided image height SIH including the overlap area OA as the data transfer unit or an integer multiple of the data transfer unit.
[0030] In S301, the data read address calculated by the control unit 200 as described above is sent to the reading unit 201. In S302, the reading unit 201 reads out the divided images from the image to be corrected in the RAM 101 based on the data read address, and sends them to the memory control unit 202. The memory control unit 202 stores the divided images read out from the RAM 101 in the memory 203. Note that since the divided images read out from the RAM 101 are held in the memory 203, there is no need to read them out again from the RAM 101 thereafter. Also, for example, if the read addresses overlap, reading the data from the RAM 101 may be omitted.
[0031] Next, in S303, the interpolation unit 204 reads out the divided image from the memory 203 via the memory control unit 202, and obtains a pixel group necessary for the interpolation process from the divided image. Next, in S304, the interpolation unit 204 calculates pixel values corresponding to the output grid point coordinates by the interpolation process using the bilinear interpolation described above.
[0032] Next, in S305, the control unit 200 calculates a data write address for the RAM 101. The data write address is an address for sequentially writing the image data after the skew correction in the divided image to the RAM 101. If the image data after the skew correction does not satisfy the data transfer unit or an integer multiple of the data transfer unit, the control unit 200 may align the data transfer unit, for example, by adding dummy data to the width of the image data after the skew correction. In that case, the control unit 200 may process so that the area to which the dummy data has been added is overwritten with adjacent image data so that the image data after the skew correction is formed on the RAM 101 at the time when the skew correction is completed.
[0033] Next, in S306, the writing unit 205 writes the skew-corrected image data of the divided image into the RAM 101 based on the data writing address calculated by the control unit 200 in S305. That is, in the correction processing unit 103 according to this embodiment, the divided image read out in S302 is subjected to interpolation processing in S303 and S304, and a divided image after skew correction is formed by processing up to data writing in S305.
[0034] Next, in S307, the control unit 200 determines whether the skew correction process is completed for all divided images of the correction target image, and if the process is not completed, the control unit 200 returns to S300 to continue the process. On the other hand, if the process is completed, the control unit 200 advances the process to S308. In S308, the control unit 200 issues an interrupt to the CPU 100 and completes the skew correction process.
[0035] Hereinafter, a control process of the CPU 100 for the correction processing unit 103 that performs the above-mentioned skew correction process will be described, in which the accumulated error in the output grid point coordinates is suppressed within an allowable range (within a predetermined error threshold) while improving data transfer efficiency. Fig. 7 is a flowchart of the control process by the CPU 100. Fig. 8 is a sequence diagram of the process in the CPU 100 and the correction processing unit 103.
[0036] In S700, the CPU 100 sets the rotation center for the correction target image. Here, the correction target image is assumed to be an image scanned in a state rotated around a certain point when the document is scanned by the scanning unit 104. In this case, the position of the rotation center of the document when scanned is assumed, and a skew correction process is performed in which a deformation process is performed on the scanned image (correction target image) according to the assumed position. That is, the deformation process for skew correction differs depending on the assumed position of the rotation center of the document when scanned. In this embodiment, for the sake of simplicity, the process of the flowchart in FIG. 7 will be described assuming that the document is scanned in a state rotated around the upper left corner of the document as the rotation center. Note that the process of the flowchart in FIG. 7 is applicable even if a position other than the upper left corner of the document is the rotation center.
[0037] Next, in S701, the CPU 100 determines the output image width of the image to be corrected. If the document is not skewed, the output image width may be the distance from the leftmost pixel to the rightmost pixel of the scanned image. On the other hand, if the document is skewed, the output image width may be narrower than the width of the scanned image. However, since the skew angle when scanning the document is generally about several degrees, the width of the scanned image may be determined as the output image width. That is, as in the case where the document is not skewed, the output image width may be the distance from the leftmost pixel to the rightmost pixel of the scanned image. Also, for example, if the paper size of the document is a commonly used paper size such as A4 or B4, the output image width may be determined according to the paper size.
[0038] Next, in S702, CPU 100 sets the skew angle. In this embodiment, since the skew angle is detected by scanning unit 104, CPU 100 adopts the value detected by scanning unit 104 as the value of the skew angle. Note that, when the image to be corrected is an skew image acquired by an image generating device or an imaging device other than a scanned image, the skew angle acquired by the image generating device or the imaging device is used.
[0039] The above-mentioned processes from S700 to S702 are processes for initial setting of the correction processing unit 103, and are executed only once before the skew correction processing is performed later by the correction processing unit 103. The processes from S700 to S702 correspond to the initial setting processing of S800 in the sequence diagram of FIG.
[0040] In this embodiment, the parameter setting process from S703 to S707 is executed after the correction processing unit 103 is started for the first time and after the correction processing unit 103 is started next time. In FIG. 8, S801 corresponds to the parameter setting process at the first startup of the correction processing unit 103, S802 corresponds to the first startup of the correction processing unit 103, S803 corresponds to the parameter setting process at the next startup of the correction processing unit 103, and S804 corresponds to the next startup of the correction processing unit 103. As described above, S810 in FIG. 8 corresponds to the skew correction process in the area CA1 at the first startup of the correction processing unit 103, and S811 corresponds to the skew correction process in the area CA2 at the next startup of the correction processing unit 103. Note that FIG. 8 illustrates the process up to the next startup, but if the accumulated error further exceeds the error threshold value after the startup of S804, the same parameter setting and the like as at the next startup are performed even after the startup of S804, and the correction processing unit 103 is restarted.
[0041] In S703 of the parameter setting process, CPU 100 searches for the start point of the divided image to be skew corrected from among the divided images before skew correction by correction processing unit 103. In the case of this embodiment, the candidate for the divided image start point is a pixel position at a predetermined image edge in each divided image including overlap area OA shown in Fig. 6 (the position of the upper left pixel in this embodiment). When correction processing unit 103 is initially started, all divided images are before skew correction, so CPU 100 sets the upper left pixel of the divided image including the rotation center set in S700 as the divided image start point.
[0042] On the other hand, as described above, errors in the output grid point coordinates are accumulated in the skew correction process by the correction processor 103. For this reason, the next time the correction processor 103 is started, the CPU 100 changes the divided image start point so that the accumulated error in the output grid point coordinates does not exceed a predetermined error threshold indicating a preset tolerance.
[0043] 9A is a diagram showing area CA1, which is the output range by skew correction after the first startup of the correction processor 103, and area CA2, which is the skew correction range after the next startup of the correction processor 103. Area CA1 is a range that includes the divided image starting point at the upper left pixel of the skew-corrected image, up to the divided image where the accumulated error of the output grid point coordinates exceeds a predetermined error threshold.
[0044] 9(a) also shows an accumulated error threshold line CET that connects points where the accumulated error for each pixel position exceeds a predetermined error threshold. If a pixel that exceeds this accumulated error threshold line CET exists in the divided image, the CPU 100 searches for a start point of the divided image at the next startup of the correction processing unit 103, and sets the top left pixel of the divided image that continues in the direction in which the accumulated error increases as the new start point of the divided image.
[0045] FIG. 9(b) is a diagram showing how errors in output grid point coordinates accumulate at each pixel position. For example, assume that the accumulated error e(3,0) at pixel position P(3,0) is equal to or less than a predetermined error threshold, but the accumulated error e(4,0) at pixel position P(4,0) exceeds the predetermined error threshold. In this case, it is assumed that an accumulated error threshold line CET exists between pixel positions P(3,0) and P(4,0). For this reason, CPU100 sequentially searches each pixel in the x-axis direction from pixel position P(4,0) and determines pixel position P(5,0) that straddles the divided image boundary as the divided image start point of the next adjacent divided image. The area consisting of each divided image including the divided image start point searched by CPU100 in this way is area CA2 in FIG. 9(a).
[0046] Next, in S704, the CPU 100 calculates the skew correction parameters. The skew correction parameters include the output start point coordinates and the tilt component. Therefore, the CPU 100 calculates the output start point coordinates and the tilt component. Hereinafter, the calculation process of the output start point coordinates and the tilt component by the CPU 100 will be described.
[0047] When the correction processing unit 103 is started for the first time, the CPU 100 sets the output start point coordinates (x, y) to x=x0, y=y0. CPU 100 also calculates the tilt component based on the output image width and the skew angle. The output image width at the first startup of correction processing unit 103 is the distance from the left edge pixel position (first image edge position) of the correction target image to the opposite right edge pixel position (second image edge position) as described in S701. CPU 100 then calculates the tilt component based on the output image width and the skew angle.
[0048] Here, when the output image width is L and the skew angle is θ, the tilt component dx in the x-axis direction and the tilt component dy in the y-axis direction can be calculated by the following formula (1).
[0049] dx=Lcosθ / L=cosθ dy=Lsinθ / L=sinθ Equation (1)
[0050] Equation (1) is an arithmetic expression that calculates the difference value per pixel by dividing the x-axis coordinate and y-axis coordinate by L, which corresponds to the number of pixels, when the output image width L is inclined by the skew angle θ. Therefore, the next output grid point coordinate can be generated sequentially by adding the inclination component calculated by equation (1) to the previous output grid point coordinate. However, in reality, a rounding error occurs depending on how many decimal places are handled. If the rounding error in the x-axis direction is εx and the rounding error in the y-axis direction is εy, the inclination component dx' including the rounding error εx in the x-axis direction and the inclination component dy' including the rounding error εy in the y-axis direction can be calculated by the following equation (2).
[0051] dx´=dx+εx=cosθ+εx dy´=dy+εy=sinθ+εy Equation (2)
[0052] In this way, since the output grid point coordinates are calculated in order using the gradient components dx', dy' which include rounding errors, position errors accumulate in the output grid point coordinates.
[0053] Therefore, the next time the correction processing unit 103 is started, the CPU 100 calculates the skew correction parameter so as to cancel the accumulated error of the output grid point coordinates. In the case of this embodiment, the same value as that at the first start of the correction processing unit 103 is used for the skew component, and a method of correcting the output start point coordinates to cancel the accumulated error of the output grid point coordinates will be described. First, since the values calculated at the initial startup of the correction processing unit 103 are used as they are, the gradient components dx', dy' are expressed by the following formula (3). dx´=cosθ+εx dy´=sinθ+εy Equation (3)
[0054] In addition, the output start point coordinates at the next startup are calculated excluding the number of pixels that have been output (i.e., that have been corrected for skew) after the first startup. If the number of pixels that have been output is N, the output start point (x, y) is expressed by the following formula (4).
[0055] x = (Lcosθ-dx × N) y=(Lsinθ-dy×N) Equation (4)
[0056] This formula (4) is a formula for subtracting the pixel width that has already been output from the output image width L for each coordinate component.
[0057] In addition, the number N of grid points that have been output when the correction processing unit 103 is next started is determined by the number of divided images and the amount of overlap of the divided images, and therefore, when the coordinate values (x1, y1) of the starting point of the divided images are applied, it is expressed by the following equation (5).
[0058] x = (Lcosθ-x1) y=(Lsinθ-y1) Equation (5)
[0059] That is, the output start point the next time the correction processing unit 103 is started is the distance from the divided image start point to the right edge pixel position (second image edge position). Also, the coordinate value (x1, y1) of the divided image start point actually includes rounding error as described above, so it does not strictly match dx×N, dy×N, but it is the output start point coordinate that cancels the accumulated error at the first start of the correction processing unit 103.
[0060] Fig. 10 shows an image after skew correction when only the output start position is changed without changing the inclination component. According to Fig. 10, skew correction is achieved with an almost ideal skew angle compared to the case where the skew correction parameters are not changed.
[0061] Returning to the flowchart of FIG. In the next step S705, the CPU 100 calculates the accumulated error. The accumulated error can be calculated by comparing the slope components dx', dy' calculated in step S704 added to each output grid point coordinate with the ideal slope components dx, dy added to each output grid point coordinate. If the number of generated output grid point coordinates is N (the number of pixels already output, N, as described above), the component ex of the accumulated error in the x-axis coordinate and the component ey in the y-axis coordinate can be calculated by the following formula (6).
[0062] ex = (dx´-dx) × N = εx × N ey = (dy´-dy) × N = εy × N Equation (6)
[0063] Since the magnitude of the accumulated error can be calculated using the geometric mean, the accumulated error e can be calculated using the following equation (7).
[0064] e=√(ex×ex+ey×ey) Equation (7)
[0065] Next, in S706, the CPU 100 calculates the processing size. The processing size is the area from the start point of the divided image to the divided image including the pixel whose accumulated error exceeds a predetermined error threshold. The area CA1 in FIG. 9(a) is the processing size when the correction processing unit 103 is started for the first time, and the area CA2 is the processing size when the correction processing unit 103 is started next time. There is no change in the skew correction parameter in the area CA1, the skew correction parameter is reset when switching between the area CA1 and the area CA2, and there is no change in the skew correction parameter in the area CA2. Then, in these areas CA1 and CA2, the correction processing unit 103 performs the skew correction. As a result, in the correction processing unit 103, in the areas CA1 and CA2, the skew correction is possible such that the accumulated error of the output grid point coordinates does not exceed a predetermined error threshold.
[0066] Next, in S707, the CPU 100 performs settings required for the skew correction process, including the skew correction parameters calculated as described above, on the correction processing unit 103. Next, in S708, the CPU 100 determines whether the correction processing unit 103 is being started for the first time. If it is the first startup, the CPU 100 advances the process to S710 and controls to start the correction processing unit 103. On the other hand, if it is not the first startup, the CPU 100 advances the process to S709 and waits for an interrupt from the correction processing unit 103. That is, the CPU 100 controls the correction processing unit 103 to start the skew correction processing in the area CA2 the next time the correction processing unit 103 is started, after waiting for the completion of the skew correction processing in the area CA1 the first time the correction processing unit 103 is started. S810 in Fig. 8 corresponds to the skew correction processing in the area CA1 the first time the correction processing unit 103 is started, and S811 corresponds to the skew correction processing in the area CA2 the next time the correction processing unit 103 is started.
[0067] After the process of S710, the CPU 100 advances the process to S711 and determines whether the process is completed for the entire region of the correction target image. If the process is not completed, the CPU 100 returns the process to S703, and resets the skew correction parameters if the accumulated error exceeds a predetermined error threshold. On the other hand, if the process is completed, the CPU 100 waits for an interrupt from the correction processing unit 103 in S712, as in the above-mentioned S709, and ends the process of the flowchart in FIG. 7 after confirming the completion of the skew correction.
[0068] As described above, in this embodiment, when the accumulated error of the output grid point coordinates exceeds the allowable amount (predetermined error threshold), the divided image start point is searched for, and the skew correction process by the correction processing unit 103 is restarted from the searched divided image start point. In this way, according to this embodiment, when the accumulated error exceeds the allowable amount, the skew correction parameter is reset and the skew correction process is restarted by repeating the control, so that the accumulated error accumulated in the skew correction process does not exceed the error threshold. Also, in this embodiment, the reference position for calculating the skew correction parameter to be reset is set to the divided image start point near the position where the accumulated error of the output grid point coordinates exceeds the error threshold, so that efficient data transfer by the data transfer unit defined in the entire image processing system can be maintained. That is, in this embodiment, since it is easy to maintain the data transfer unit defined in the image processing system, it can contribute to improving the transfer efficiency of the entire image processing system.
[0069] <Second embodiment> Next, as a second embodiment, an example will be described in which, only when the skew angle is a predetermined angle, skew correction parameters are reset in response to switching between the areas CA1 and CA2 described above, and skew correction is restarted by the correction processing unit 103. The configuration of the image processing system and the correction processing unit 103 in the second embodiment are the same as those in Figures 1 and 2 described above, and therefore illustration and description thereof will be omitted.
[0070] Fig. 11 is a flowchart of control processing of the correction processing unit 103 by the CPU 100 in the second embodiment. In the flowchart of Fig. 11, the same processing steps as in Fig. 7 are given the same reference numerals as in Fig. 7, and their description will be omitted. In the second embodiment, as in the first embodiment, skew correction is performed based on the accumulated error in the output grid point coordinates of the skew correction, but the amount of the accumulated error differs depending on the skew angle.
[0071] FIG. 12(a) is a diagram showing the skew angle for each unit angle, the tilt component for each unit angle, and the error amount for each tilt component for each unit angle. In FIG. 12(a), 0.1° is used as the unit angle. In addition, FIG. 12(b) is a diagram showing the relationship between the skew angle for each unit angle and the error amount as a graph. In FIG. 12(a), the tilt component in the ideal state is calculated to the 10th decimal place, and the actual tilt component is calculated by rounding off to the second decimal place. From FIG. 12(a) and FIG. 12(b), it can be seen that the error amount is small at a skew angle of around 0.6°, except for a skew angle of 0° (no skew). In other words, it can be seen that the error amount is large at skew angles other than 0° (no skew) and around 0.6°. Furthermore, in the accumulated error due to skew correction, angles that tend to become smaller depending on the skew angle appear randomly, and the amount of error becomes large at other skew angles.
[0072] For this reason, in the second embodiment, the amount of error for each skew angle is calculated in advance as shown in FIG. 12. In the second embodiment, after the initial setting process from S701 to S702, the CPU 100 proceeds to the process of S1101. When proceeding to S1101, the CPU 100 judges whether the skew angle is a specific angle, that is, whether the skew angle is an angle at which the amount of error becomes large as described above. If the skew angle is a specific angle at which the amount of error becomes large, the CPU 100 proceeds to the process from S703 onwards. The process from S703 onwards is the same as that from S703 onwards in FIG. 7 described above. On the other hand, if the skew angle is not a specific angle, that is, if the skew angle is an angle at which the amount of error tends to become small, the CPU 100 proceeds to the process from S1102 onwards. Note that the specific skew angle in the judgment process in S1101 may be a skew angle range (specific angle range) having a certain width.
[0073] The process of S1102 is the same as S704, the process of S1103 is the same as S707, the process of S1104 is the same as S710, and the process of S1105 is the same as S709. In other words, if the skew angle is an angle that tends to reduce the amount of error, there is no need to reset the skew correction parameter, and therefore the processes of searching for the divided image start point in S703, calculating the accumulated error in S705, and calculating the processing size in S706 are not required. Therefore, if the skew angle is an angle that tends to reduce the amount of error, the CPU 100 performs the skew correction parameter calculation process in S1102, the parameter setting process in S1103, starting the correction processing unit 103 in S1104, and further the process of waiting for an interrupt from the correction processing unit 103 in S1105. This makes it possible to reduce the overhead involved in controlling the correction processing unit 103.
[0074] <Third embodiment> Next, as a third embodiment, an example will be described in which skew correction is performed on the entire region of the correction target image using one skew correction parameter, and then a partial region of the skew correction result is overwritten with the result of skew correction using a skew correction parameter that cancels the accumulated error. The configuration of the system and the configuration of the correction processing unit 103 in the third embodiment are the same as those in Figures 1 and 2 described above, so illustration and description thereof will be omitted.
[0075] Fig. 13 is a flowchart of control processing of the correction processing unit 103 by the CPU 100 of the third embodiment. Fig. 14 is a sequence diagram of processing in the CPU 100 and the correction processing unit 103 of the third embodiment. In Fig. 13 and Fig. 14, the same processing steps as Fig. 7 and Fig. 8 are given the same reference numerals and their description will be omitted.
[0076] In the case of the third embodiment, as shown in FIG. 15, when the correction processing unit 103 is started for the first time, the entire area of the correction target image is set as the area CA1, and the correction processing unit 103 performs the skew correction on the entire area without changing the skew correction parameters. In FIG. 15, the correction target image 600, the area CA1 and the area CA2, the threshold line CET of the accumulated error, and the image 601 after the skew correction are shown in the same manner as the example of FIG. 9(a) described above. In the case of the third embodiment, the skew correction is performed on the entire area of the correction target image 600 at the time of the first start without changing the skew correction parameters, so that the accumulated error of the output grid point coordinates gradually increases in the image 601 after the skew correction. For this reason, it is expected that the accuracy of the skew correction decreases the farther away from the center of rotation.
[0077] Therefore, in the third embodiment, when the correction processing unit 103 is started next time, the skew correction parameters are reset for the area CA2 including the divided image in which the accumulated error exceeds the threshold line CET, and skew correction is performed. That is, the skew correction result at the next start-up will have a smaller accumulated error in the area CA2. Therefore, in the third embodiment, the skew correction result for the area CA2 at the next start-up is used to overwrite the area in which the accumulated error was large at the first start-up. This makes it possible to finally obtain a skew correction result in which the accumulated error is within the allowable amount.
[0078] In the third embodiment, after the skew angle setting process in S702, CPU 100 calculates a skew correction parameter in S1301, and sets the parameter in the next step S1302. Note that the skew correction parameter calculation process in S1301 is the same as S704, and the parameter setting process in S1302 is the same as S707. Then, after the process of S1302, CPU 100 starts up correction processing unit 103 in S1303. The start-up process of correction processing unit 103 in S1303 is the same as S710. The parameter setting process from S1301 to S1303 corresponds to S1401 in FIG. 14.
[0079] In the third embodiment, after the process of S1303, the CPU 100 calculates the accumulated error due to the skew correction at the first startup in S705, and calculates the processing size in the next S706. Furthermore, the CPU 100 searches for the divided image start point in S704, calculates the skew correction parameters in the next S704, and resets the parameters in the next S707. After that, the CPU 100 waits for an interrupt from the correction processing unit 103 in S709, and starts the correction processing unit 103 if there is an interrupt in S710. After S710, the processes of S711 and S712 are performed as described above.
[0080] In the case of the third embodiment, since there is no need to determine a processing area such as searching for a starting point of a divided image in the parameter setting process at the initial startup from S1301 to S1303, the number of processing steps is less than in the above-mentioned embodiments. When control by CPU 100 takes a lot of time, it is necessary to shorten the control time as much as possible, but according to the third embodiment, an image in which skew correction has been applied to the entire correction target image can be obtained in a short time, and a skew-corrected image with gradually reduced error can be obtained.
[0081] <Other embodiments> In the configuration of FIG. 1 described above, an example has been given in which the correction processing unit 103 is provided as an independent component, but the CPU 100 may include the function of the correction processing unit 103 . The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) for implementing one or more of the functions. The above-mentioned embodiments are merely examples of the implementation of the present invention, and the technical scope of the present invention should not be interpreted as being limited by these. In other words, the present invention can be implemented in various forms without departing from its technical concept or main features.
[0082] The disclosure of this embodiment includes the following configuration, method, and program. (Configuration 1) a correction means for performing skew correction for each divided image obtained by dividing the correction target image into a plurality of images; a control unit for controlling the skew correction by the correction unit; having The control by the control means is a first control for controlling the correction means to perform skew correction of the divided images using a correction parameter based on an output image width in the correction target image and a skew angle of the correction target image; a second control for resetting a correction parameter for a next divided image to be skew-corrected by the correction means when an accumulated error of pixel position due to the skew correction using the first control exceeds a predetermined threshold value, and controlling the correction means to perform the skew correction of the next divided image using the reset correction parameter; 13. An image processing device comprising: (Configuration 2) 2. The image processing apparatus according to claim 1, wherein the control means, in the second control, resets the correction parameters in a direction to cancel an accumulated error in the pixel positions. (Configuration 3) The image processing device according to configuration 1 or 2, characterized in that, in the second control, the control means resets the correction parameters based on the image width obtained by subtracting pixels that have been skew-corrected by the first control from the output image width and the skew angle. (Configuration 4) The image processing device according to any one of configurations 1 to 3, characterized in that the correction parameters include at least a start point coordinate in an output image after skew correction of the correction target image, and a tilt component based on the output image width and the skew angle. (Configuration 5) 5. The image processing device according to configuration 4, wherein the control means does not change the inclination component in the resetting of the correction parameters during the second control. (Configuration 6) The image processing device according to any one of configurations 1 to 5, characterized in that the control means calculates a position where a cumulative error of a pixel position due to the skew correction using the first control exceeds the predetermined threshold value based on the skew angle. (Configuration 7) The image processing device according to configuration 6, wherein the control means searches for a divided image in the vicinity of the position where the cumulative error of the pixel position exceeds the predetermined threshold, and applies the second control to each divided image after the searched divided image. (Configuration 8) The image processing device described in any one of configurations 1 to 7, characterized in that when a cumulative error in pixel position due to the skew correction using the second control exceeds a predetermined threshold, the control means further resets correction parameters for the next divided image to be skew corrected by the correction means, and controls the correction means to perform skew correction on the next divided image using the reset correction parameters. (Configuration 9) a correction means for performing skew correction for each divided image obtained by dividing the correction target image into a plurality of images; a control unit for controlling the skew correction by the correction unit; having The control by the control means is a first control for controlling the correction means to perform skew correction on all of the divided images by using a correction parameter based on an output image width in the correction target image and a skew angle of the correction target image; a second control for controlling the correction means to perform skew correction of a part of the divided images by using a correction parameter reset by modifying the correction parameter used in the first control; Including, The image processing device according to claim 1, wherein the correction means overwrites a result of the skew correction performed under the first control with a result of the skew correction performed under the second control. (Configuration 10) The image processing device according to configuration 9, characterized in that the control means applies the second control to a divided image corresponding to an area in which an accumulated error in pixel position due to the skew correction using the first control exceeds a predetermined threshold value as the part of the divided image. (Configuration 11) 11. The image processing apparatus according to claim 10, wherein the control means, in the second control, resets the correction parameters in a direction to cancel an accumulated error in the pixel positions. (Configuration 12) 12. The image processing device according to any one of configurations 1 to 11, wherein the control means performs the second control only when the skew angle is a predetermined angle. (Configuration 13) 13. The image processing device according to any one of configurations 1 to 12, wherein at least one of an image width and an image height of the divided images is an integer multiple of a predetermined data transfer unit. (Configuration 14) 14. The image processing device according to any one of configurations 1 to 13, wherein adjacent divided images include overlapping areas. (Configuration 15) The image processing device according to any one of configurations 1 to 14, wherein the control means holds the correction parameters used in the first control, and when the accumulated error exceeds a predetermined threshold, modifies the held correction parameters to set them as the reset correction parameters. (Method 1) a correction step of performing skew correction for each divided image obtained by dividing the correction target image into a plurality of divided images; a control step of controlling the skew correction by the correction step; having The control by the control step includes: a first control for controlling the correction step so as to perform skew correction on the divided images using a correction parameter based on an output image width in the correction target image and a skew angle of the correction target image; a second control for controlling the correction step so as to reset a correction parameter for a next divided image to be skew-corrected in the correction step when an accumulated error of pixel position due to the skew correction using the first control exceeds a predetermined threshold value, and to perform the skew correction of the next divided image using the reset correction parameter; 13. An image processing method comprising: (Method 2) a correction step of performing skew correction for each divided image obtained by dividing the correction target image into a plurality of divided images; a control step of controlling the skew correction by the correction step; having The control by the control step includes: a first control for controlling the correction means to perform skew correction on all of the divided images by using a correction parameter based on an output image width in the correction target image and a skew angle of the correction target image; a second control for controlling the correction means to perform skew correction of a part of the divided images by using a correction parameter reset by modifying the correction parameter used in the first control; Including, The image processing method according to claim 1, wherein, in the correction, a result of the skew correction performed by the first control is overwritten by a result of the skew correction performed by the second control. (Program 1) A program for causing a computer to function as the image processing device according to any one of configurations 1 to 15. [Explanation of symbols]
[0083] 100: CPU, 101: RAM, 102: ROM, 103: correction processing unit, 104: scanning unit, 105: I / F unit, 106: bus, 200: control unit, 201: reading unit, 202: memory control unit, 203: memory, 204: interpolation unit, 205: writing unit
Claims
1. a correction means for performing skew correction for each divided image obtained by dividing the correction target image into a plurality of images; a control unit for controlling the skew correction by the correction unit; having The control by the control means is a first control for controlling the correction means to perform skew correction of the divided images using a correction parameter based on an output image width of the correction target image and a skew angle of the correction target image; a second control for resetting a correction parameter for a next divided image to be skew-corrected by the correction means when an accumulated error of pixel position due to the skew correction using the first control exceeds a predetermined threshold value, and controlling the correction means to perform the skew correction of the next divided image using the reset correction parameter; 13. An image processing device comprising:
2. 2. The image processing apparatus according to claim 1, wherein said control means, in said second control, resets said correction parameters in a direction to cancel out an accumulated error in said pixel positions.
3. The image processing device according to claim 1, characterized in that, in the second control, the control means resets the correction parameters based on the image width obtained by excluding pixels that have been skew-corrected by the first control from the output image width and the skew angle.
4. The image processing device according to claim 1 , wherein the correction parameters include at least a start point coordinate in an output image after skew correction of the correction target image, and a skew component based on the output image width and the skew angle.
5. 5. The image processing apparatus according to claim 4, wherein said control means does not change said tilt component in said resetting of said correction parameters during said second control.
6. 2 . The image processing device according to claim 1 , wherein the control means calculates a position where an accumulated error of pixel position caused by the skew correction using the first control exceeds the predetermined threshold value based on the skew angle.
7. The image processing device according to claim 6, characterized in that the control means searches for a divided image in the vicinity of the position where the cumulative error of the pixel position exceeds the predetermined threshold, and applies the second control to each divided image after the searched divided image.
8. The image processing device described in claim 1, characterized in that when the cumulative error of pixel position due to the skew correction using the second control exceeds a predetermined threshold, the control means further resets correction parameters for the next divided image to be skew corrected by the correction means, and controls the correction means to perform skew correction of the next divided image using the reset correction parameters.
9. a correction means for performing skew correction for each divided image obtained by dividing the correction target image into a plurality of images; a control unit for controlling the skew correction by the correction unit; having The control by the control means is a first control for controlling the correction means to perform skew correction on all of the divided images by using a correction parameter based on an output image width of the image to be corrected and a skew angle of the image to be corrected; a second control for controlling the correction means to perform skew correction of a part of the divided images by using a correction parameter reset by modifying the correction parameter used in the first control; Including, The image processing apparatus according to claim 1, wherein the correction means overwrites the result of the skew correction performed under the first control with the result of the skew correction performed under the second control.
10. The image processing device according to claim 9, characterized in that the control means applies the second control to a divided image corresponding to an area in which a cumulative error in pixel position due to the skew correction using the first control exceeds a predetermined threshold value as the part of the divided image.
11. 11. The image processing apparatus according to claim 10, wherein said control means, in said second control, resets said correction parameters in a direction to cancel out an accumulated error in said pixel positions.
12. 2. The image processing apparatus according to claim 1, wherein the control means performs the second control only when the skew angle is a predetermined angle.
13. 2. The image processing apparatus according to claim 1, wherein at least one of an image width and an image height of the divided images is an integer multiple of a predetermined data transfer unit.
14. The image processing apparatus according to claim 1 , wherein adjacent divided images include an overlapping area.
15. 15. The image processing device according to claim 1, wherein the control means holds the correction parameters used in the first control, and when the accumulated error exceeds a predetermined threshold, modifies the held correction parameters to set the reset correction parameters.
16. a correction step of performing skew correction for each divided image obtained by dividing the correction target image into a plurality of divided images; a control step of controlling the skew correction by the correction step; having The control by the control step includes: a first control for controlling the correction step so as to perform skew correction on the divided images by using a correction parameter based on an output image width in the correction target image and a skew angle of the correction target image; a second control for controlling the correction step so as to reset a correction parameter for a next divided image to be skew-corrected in the correction step when an accumulated error of pixel position due to the skew correction using the first control exceeds a predetermined threshold value, and to perform the skew correction of the next divided image using the reset correction parameter; 13. An image processing method comprising:
17. a correction step of performing skew correction for each divided image obtained by dividing the correction target image into a plurality of divided images; a control step of controlling the skew correction by the correction step; having The control by the control step includes: a first control for controlling the correction means to perform skew correction on all of the divided images by using a correction parameter based on an output image width of the image to be corrected and a skew angle of the image to be corrected; a second control for controlling the correction means to perform skew correction of a part of the divided images by using a correction parameter reset by modifying the correction parameter used in the first control; Including, The image processing method according to claim 1, wherein, in the correction, a result of the skew correction performed by the first control is overwritten by a result of the skew correction performed by the second control.
18. Computer, a correction means for performing skew correction for each divided image obtained by dividing the correction target image into a plurality of images; a control unit for controlling the skew correction by the correction unit; having The control by the control means is a first control for controlling the correction means to perform skew correction of the divided images using a correction parameter based on an output image width of the correction target image and a skew angle of the correction target image; a second control for resetting a correction parameter for a next divided image to be skew-corrected by the correction means when an accumulated error of pixel position due to the skew correction using the first control exceeds a predetermined threshold value, and controlling the correction means to perform the skew correction of the next divided image using the reset correction parameter; A program that causes the image processing device to function as an image processing device.
19. Computer, a correction means for performing skew correction for each divided image obtained by dividing the correction target image into a plurality of images; a control unit for controlling the skew correction by the correction unit; having The control by the control means is a first control for controlling the correction means to perform skew correction on all of the divided images by using a correction parameter based on an output image width of the image to be corrected and a skew angle of the image to be corrected; a second control for controlling the correction means to perform skew correction of a part of the divided images by using a correction parameter reset by modifying the correction parameter used in the first control; Including, The correction means is a program that functions as an image processing device that overwrites the result of the skew correction performed under the first control with the result of the skew correction performed under the second control.
Citation Information
Patent Citations
Image processing apparatus, image forming apparatus, image processing method, and program
JP2017122971A