Image inspection device and image inspection program

The image inspection apparatus optimizes the alignment process by dividing images into regions and setting movement directions based on characteristics, reducing inspection time and improving accuracy.

JP7613071B2Active Publication Date: 2025-01-15FUJIFILM BUSINESS INNOVATION CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2020198468
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2025-01-15
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

Existing image inspection methods require time-consuming trial and error to detect the optimal alignment between a read image and a reference image due to misalignment issues, leading to inefficient inspection processes.

Method used

An image inspection apparatus and program that divide read and reference images into regions, set movement directions based on image characteristics, and move regions accordingly to inspect deviations without trial and error, optimizing the inspection process.

Benefits of technology

This approach significantly reduces inspection time and improves accuracy by setting region movement directions based on image characteristics, enhancing the efficiency and precision of image alignment inspections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007613071000001
    Figure 0007613071000001
  • Figure 0007613071000002
    Figure 0007613071000002
  • Figure 0007613071000003
    Figure 0007613071000003
Patent Text Reader

Abstract

To shorten the time required to inspect the deviation between a scanned image and a reference image.SOLUTION: An image inspection device 10 divides a scanned image 2 and a reference image 4 into scanned image blocks 200 and reference image blocks 400, respectively, sets a movement direction for each of the reference image blocks 400 according to features of block images of the reference image blocks 400, moves the reference image blocks 400 in the set movement directions with respect to the corresponding scanned image blocks 200, and thereby inspects deviation between the scanned image 2 and the reference image 4.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image inspection device and an image inspection program. [Background technology]

[0002] Patent Document 1 discloses an image inspection device that performs inspection by comparing a read image obtained by reading an image formed on paper by an image forming device with an original reference image, in which the image is divided into a plurality of blocks, a first alignment is performed in a plurality of areas on the periphery of the image, and based on the result, the amount of positional shift of each block of the read image is calculated, and the blocks of the read image shifted according to the amount of shift are further shifted slightly with respect to the blocks of the reference image to align them, and the image inspection device is equipped with an inspection comparison means for comparing and matching, in which the inspection comparison means selects a predetermined block in the image, performs a second alignment by recalculating the amount of positional shift of the selected block, and corrects the amount of positional shift of each block of the read image based on the result. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2013-186562 A Summary of the Invention [Problem to be solved by the invention]

[0004] A read image obtained by reading an image formed on paper by an image forming device using an optical device such as a scanner may be misaligned with respect to a reference image that is the input image to the image forming device and is the basis of the read image, for example, due to a misalignment of the paper.

[0005] Conventionally, when checking whether there is any misalignment between a read image and a reference image, the read image and the reference image are divided into a plurality of regions, and for each region, the region of the reference image is moved in all directions to detect the position where the image contained in the corresponding region of the read image and the image contained in the region of the reference image most closely match, and the misalignment between the read image and the reference image is calculated from the amount of movement of the reference image.

[0006] However, with such an inspection method, it is necessary to move the area of ​​the reference image by trial and error to find the position where the image contained in the area of ​​the corresponding read image and the image contained in the area of ​​the reference image overlap most, so it takes time to complete the inspection.

[0007] The present invention aims to provide an image inspection device and an image inspection program that can reduce the time required for inspection, compared to a case in which the misalignment between a read image and a reference image, which are the subject of image inspection, is inspected by moving an area into which the read image and the reference image are divided without setting the direction of movement of the area. [Means for solving the problem]

[0008] An image inspection device according to a first embodiment includes a processor that divides a scanned image obtained by scanning a printed image and a reference image showing the original shape of the printed image into a number of regions of the same shape, sets a direction of movement for each of the divided regions of the reference image according to the characteristics of the reference image within the region, and moves, for each corresponding region of the scanned image and the reference image, the region of the reference image in the movement direction set for the region, thereby inspecting for misalignment between the scanned image and the reference image.

[0009] The image inspection device of the second aspect is the image inspection device of the first aspect, wherein the processor sets a direction of movement of each divided area of ​​the reference image depending on the orientation of the contour line of the reference image within the area.

[0010] An image inspection device according to a third aspect is an image inspection device according to the second aspect, in which, when all contour lines of the reference image within a region are oriented in one direction, the processor sets the movement direction of the region to a direction that intersects with the one direction.

[0011] An image inspection device according to a fourth aspect is an image inspection device according to the second or third aspect, in which the processor sets the direction of movement of the area so as not to correspond to any direction if the reference image within the area does not contain a contour line, and does not use the area of ​​the reference image that does not contain a contour line when inspecting the misalignment between the scanned image and the reference image.

[0012] An image inspection device according to a fifth aspect is an image inspection device according to any one of the first to fourth aspects, in which the processor expands an area of ​​the reference image to a predetermined size and divides the reference image into multiple areas so that the range of the expanded area overlaps with other areas of the reference image.

[0013] An image inspection device according to a sixth aspect is an image inspection device according to the fifth aspect, wherein the processor sets the amount of expansion of the divided area of ​​the reference image using historical information that records the tendency of misalignment between the scanned image and the reference image.

[0014] An image inspection device according to a seventh aspect is an image inspection device according to any one of the first to sixth aspects, wherein the processor changes the size of each area in the reference image depending on the complexity of the reference image corresponding to the position of the area.

[0015] An image inspection device according to an eighth aspect is an image inspection device according to the seventh aspect, wherein the processor sets the complexity of the reference image corresponding to the position of the area based on the number of contour lines of the reference image corresponding to the position of the area.

[0016] An image inspection device according to a ninth aspect is an image inspection device according to any one of the first to eighth aspects, wherein the processor performs at least one of enlarging, reducing, and rotating on the read image before dividing the read image and the reference image into a plurality of regions so that the degree of match between the reference image and the read image after processing is higher than the degree of match between the reference image and the read image before processing.

[0017] The image inspection program of the tenth aspect is a program for causing a computer to execute a process of dividing a read image obtained by reading a printed image and a reference image showing the original shape of the printed image into multiple regions of the same shape, setting a direction of movement for each of the divided regions of the reference image according to the characteristics of the reference image within the region, and moving the region of the reference image in the movement direction set for each corresponding region of the read image and the reference image, thereby inspecting for misalignment between the read image and the reference image. Effect of the Invention

[0018] The first and tenth aspects have the advantage that the time required for inspection can be reduced compared to a case in which the misalignment between the read image and the reference image, which are the object of image inspection, is inspected by moving the area without setting the direction of movement of the area for each divided area of ​​the read image and the reference image.

[0019] According to the second aspect, there is an effect that the movement direction can be set for each region based on the characteristics of the image included in the region of the reference image.

[0020] According to the third aspect, there is an advantage that the direction of movement of the region can be set based on the orientation of the contour line of the image included in the region of the reference image.

[0021] According to the fourth aspect, it is possible to reduce the time required for inspection and improve the inspection accuracy, compared to calculating the deviation between the corresponding areas of the read image and all areas of the reference image.

[0022] According to the fifth aspect, there is an effect that it is possible to improve the inspection accuracy compared to a case where the area of ​​the reference image is fixed to a predetermined size and the deviation of the read image is inspected.

[0023] According to the sixth aspect, there is an effect that it is possible to improve the inspection accuracy, compared to a case where the expansion amount in each region of the reference image is set to the same value.

[0024] According to the seventh aspect, there is an effect that it is possible to improve the inspection accuracy, compared to a case where each region of the reference image is divided into regions of the same size.

[0025] According to the eighth aspect, there is an effect that the size of the area can be set according to the position of the reference image based on the contents of the reference image.

[0026] According to the ninth aspect, there is an effect that it is possible to improve the inspection accuracy, compared to a case where the size of the read image is not processed before dividing the read image and the reference image. [Brief description of the drawings]

[0027] [Figure 1] FIG. 2 is a diagram illustrating an example of a functional configuration of an image inspection device. [Diagram 2] FIG. 4 is a diagram showing an example of a read image. [Diagram 3] FIG. 4 is a diagram showing an example of a reference image. [Figure 4] 11A and 11B are diagrams illustrating an example of a divided scanned image and a reference image. [Diagram 5] FIG. 13 is a diagram showing an example of a moving direction of a reference image block. [Figure 6] FIG. 2 is a diagram showing an example of the configuration of a main part of an electrical system of the image inspection device; [Figure 7] 11 is a flowchart showing an example of the flow of an inspection process. [Figure 8] FIG. 13 is a diagram showing an example of division of a scanned image and a reference image; [Figure 9] FIG. 13 is a diagram showing an example of classifying reference image blocks into categories. [Figure 10] FIG. 13 is a diagram illustrating an example of extending a reference image block. [Figure 11] FIG. 13 is a diagram showing an example in which a reference image is divided into reference image blocks of different sizes. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0028] Hereinafter, the present embodiment will be described with reference to the drawings. Note that the same components and processes are given the same reference numerals throughout the drawings, and duplicated explanations will be omitted.

[0029] FIG. 1 is a diagram showing an example of the functional configuration of an image inspection device 10 according to this embodiment. The image inspection device 10 compares the deviation between a read image 2 and a reference image 4, and inspects whether the deviation of the read image 2 from the reference image 4 is within an allowable range. The read image 2 is a printed image printed on paper by an image forming device (not shown), i.e., an image obtained by reading a printed matter with an optical device such as a scanner, and FIG. 2 shows an example of the read image 2. The reference image 4 is an original image of the printed image printed by an image forming device (not shown), i.e., an image showing the original shape of the read image 2. FIG. 3 shows an example of the reference image 4 for the read image 2 shown in FIG. 2.

[0030] The position of each pixel in the scanned image 2 and the reference image 4 is represented by a two-dimensional coordinate system consisting of an X-axis and a Y-axis with the upper left vertex of each image as the origin. The Y-axis is an axis along the vertical direction of the scanned image 2 and the reference image 4, and the X-axis is an axis along the horizontal direction of the scanned image 2 and the reference image 4. Therefore, the vertical direction of the scanned image 2 and the reference image 4 will be referred to as the "Y-axis direction", and the horizontal direction of the scanned image 2 and the reference image 4 will be referred to as the "X-axis direction".

[0031] If the deviation of the scanned image 2 from the reference image 4 is not within the allowable range, the printed matter corresponding to the scanned image 2 is deemed defective, and measures are taken such as not shipping the printed matter.

[0032] Therefore, the image inspection device 10 receives the scanned image 2 as an input and outputs an inspection result including whether or not the deviation of the scanned image 2 from the reference image 4 falls within an allowable range.

[0033] Such an image inspection device 10 includes functional units, namely, an input unit 11, a division unit 12, a movement direction setting unit 13, an inspection unit 14, and an output unit 15, as well as a data storage DB 16 for storing the reference image 4.

[0034] The input unit 11 receives a scanned image 2 to be inspected, and notifies the division unit 12 of the received scanned image 2 .

[0035] When the division unit 12 receives the scanned image 2 from the input unit 11, it acquires the reference image 4, which is an original image of the scanned image 2, from the data storage DB 16. Then, the division unit 12 divides the scanned image 2 and the reference image 4 into a plurality of regions. Hereinafter, each of the divided regions is referred to as a "block."

[0036] Figure 4 shows an example of a read image 2 and a reference image 4 divided into blocks by the division unit 12, where Figure 4(A) shows an example of a reference image 4 divided into blocks, and Figure 4(B) shows an example of a read image 2 divided into blocks.

[0037] Although there are no restrictions on the shape or size of the blocks divided by the division unit 12, as an example, the scanned image 2 and the reference image 4 are described here as being divided into a grid along the X-axis direction and the Y-axis direction, respectively. Each of the blocks divided into a grid is rectangular in shape and has the same size. The blocks are divided into predetermined sizes.

[0038] Each block in the reference image 4 will be referred to as a "reference image block 400," and each block in the scanned image 2 will be referred to as a "scanned image block 200." When the scanned image 2 and the reference image 4 are superimposed, the scanned image block 200 and the reference image block 400 that are in the same position will be referred to as the "scanned image block 200 corresponding to the reference image block 400."

[0039] After dividing the scanned image 2 and the reference image 4 into a plurality of blocks, the dividing unit 12 notifies the movement direction setting unit 13 that the division has been completed.

[0040] When the movement direction setting unit 13 receives a notification from the division unit 12 that the division into blocks has been completed, it sets the movement direction of the reference image block 400 for each reference image block 400 depending on the characteristics of the image within the reference image block 400, i.e., the block image of the reference image block 400.

[0041] The movement direction setting unit 13 does not set the movement direction of the reference image block 400 so that the reference image block 400 can move in any direction of 360 degrees as viewed from the center of the reference image block 400, but sets a specific direction in which the reference image block 400 may move as the movement direction of the reference image block 400. In other words, the movement direction of the reference image block 400 is restricted.

[0042] Fig. 5 is a diagram showing an example of movement directions set for the reference image block 400. In the example shown in Fig. 5, movement directions are set along the X-axis direction and the Y-axis direction for the reference image block 400. In this case, the reference image block 400 can move in the directions along the X-axis direction and the Y-axis direction, but cannot move in a direction that forms an angle of 45 degrees with the X-axis direction, for example.

[0043] After setting the movement direction for each of the reference image blocks 400 divided from the reference image 4, the movement direction setting unit 13 notifies the inspection unit 14 of the end of the movement direction setting.

[0044] When the inspection unit 14 receives a signal indicating the end of movement direction setting from the movement direction setting unit 13, the inspection unit 14 overlaps the reference image block 400 and the read image block 200 so that, for each reference image block 400, a vertex of the reference image block 400 coincides with a vertex of the read image block 200 corresponding to the reference image block 400. The position where the reference image block 400 and the read image block 200 are overlapped so that at least one vertex of the reference image block 400 coincides is referred to as the "reference position."

[0045] From this state, the inspection unit 14 moves the reference image block 400 in the movement direction set by the movement direction setting unit 13, and detects the position where the block image of the reference image block 400 and the block image of the read image block 200 overlap most (hereinafter referred to as the "matching position").

[0046] The inspection unit 14 expresses the amount of movement of the reference image block 400 from the reference position to the matching position in terms of the number of pixels, and, for example, when the average amount of movement in each reference image block 400 is equal to or greater than a predetermined reference threshold, determines that there is a misalignment between the scanned image 2 and the reference image 4 and sets the inspection result to "fail." On the other hand, when the average amount of movement in each reference image block 400 is less than the predetermined reference threshold, the inspection unit 14 determines that there is no misalignment between the scanned image 2 and the reference image 4 and sets the inspection result to "pass." The inspection unit 14 notifies the output unit 15 of the inspection result for the scanned image 2.

[0047] When the output unit 15 receives the inspection results from the inspection unit 14, it outputs the received inspection results. This identifies whether the printout corresponding to the scanned image 2 is a good product or a defective product. "Output" according to this embodiment refers to making the inspection results recognizable, and includes a form in which the inspection results are displayed, a form in which the inspection results are printed on a recording medium such as paper, a form in which the inspection results are notified by voice, a form in which the inspection results are stored in a storage device, and a form in which the inspection results are transmitted to a device other than the image inspection device 10 (hereinafter referred to as an "external device") via a communication line (not shown).

[0048] The data storage DB 16 stores the reference images 4. "DB" is an abbreviation for database, and provides a function for managing the reference images 4, such as storing the reference images 4, retrieving the reference images 4, and deleting the reference images 4.

[0049] Such an image inspection apparatus 10 is configured using a computer 20, for example.

[0050] FIG. 6 is a diagram showing an example of the configuration of the main parts of an electrical system of the image inspection device 10 when the image inspection device 10 is configured using a computer 20. As shown in FIG.

[0051] The computer 20 includes a CPU (Central Processing Unit) 21, which is an example of a processor that handles the processing of each functional unit of the image inspection device 10 shown in Fig. 1, a ROM (Read Only Memory) 22 that stores an image inspection program, a RAM (Random Access Memory) 23 used as a temporary work area for the CPU 21, a non-volatile memory 24, and an input / output interface (I / O) 25. The CPU 21, the ROM 22, the RAM 23, the non-volatile memory 24, and the I / O 25 are each connected via a bus 26.

[0052] The nonvolatile memory 24 is an example of a storage device that maintains stored information even if the power supplied to the nonvolatile memory 24 is cut off, and is, for example, a semiconductor memory or a hard disk. The nonvolatile memory 24 does not necessarily need to be built into the computer 20, and may be a storage device that is detachable from the computer 20, such as a memory card. The data storage DB 16 is constructed in the nonvolatile memory 24.

[0053] To the I / O 25, for example, a communication unit 27, an input unit 28, and an output unit 29 are connected.

[0054] The communication unit 27 is connected to a communication line (not shown) and has a communication protocol for communicating with an external device connected to the connection line (not shown). The communication line (not shown) includes known communication lines such as the Internet and a LAN (Local Area Network). The communication line (not shown) may be wired or wireless.

[0055] The input unit 28 is a device that receives instructions from a user and notifies the CPU 21, and may be, for example, a button, a touch panel, a keyboard, a pointing device, or a mouse. The image inspection device 10 may receive instructions from the user by voice, in which case a microphone is used as the input unit 28.

[0056] The output unit 29 is a device that outputs information processed by the CPU 21, and includes, for example, display devices such as an LCD display, an organic EL (Electro Luminescence) display, and a projector that projects images onto a screen, a speaker, an image forming unit that forms characters and figures on a recording medium, and a storage device that stores information.

[0057] 6 connected to the I / O 25, it is sufficient if only the units required depending on the situation are connected to the I / O 25. For example, when the image inspection device 10 operates offline, the communication unit 27 is not necessarily required.

[0058] Next, the operation of the image inspection device 10 will be described in detail.

[0059] 7 is a flowchart showing an example of the flow of inspection processing executed by the CPU 21 when the image inspection device 10 receives the read image 2. An image inspection program that defines the inspection processing is stored in advance, for example, in the ROM 22 of the image inspection device 10. The CPU 21 of the image inspection device 10 reads the image inspection program stored in the ROM 22 and executes the inspection processing.

[0060] In step S10, the CPU 21 acquires the reference image 4 corresponding to the received scanned image 2 from the non-volatile memory 24. Specifically, the CPU 21 may acquire the reference image 4 corresponding to the scanned image 2 from the non-volatile memory 24 by referring to the image ID added to the scanned image 2.

[0061] It should be noted that the CPU 21 may obtain the reference image 4 from an external device via a communication line (not shown) instead of obtaining the reference image 4 from the non-volatile memory 24.

[0062] In step S20, the CPU 21 divides the read image 2 and the reference image 4 acquired in step S10 into a read image block 200 and a reference image block 400, respectively, as shown in FIG.

[0063] Fig. 8 is a diagram showing an example of division of the scanned image 2 and the reference image 4. Fig. 8(A) is an example of division of the reference image 4 shown in Fig. 3, and Fig. 8(B) is an example of division of the scanned image 2 shown in Fig. 2. In the example of Fig. 8, each of the reference image blocks 400 and scanned image blocks 200 is divided into a grid shape of a predetermined size so as not to overlap with the adjacent reference image blocks 400 and scanned image blocks 200, respectively.

[0064] In step S30, the CPU 21 selects one reference image block 400 that has not yet been selected from the multiple reference image blocks 400 divided in step S20. For ease of explanation, the selected reference image block 400 will be referred to as the "selected reference image block 400."

[0065] In step S40, the CPU 21 extracts edge information of the block image from the selection reference image block 400. An "edge" is a set of pixels located on a boundary where the color information of pixels represented by pixel values ​​changes between adjacent pixels by more than a predetermined threshold, and is also called a "contour line." At least one of hue, saturation, and brightness is used as the color information of a pixel. Therefore, in addition to lines, color and brightness boundaries are also extracted as edges.

[0066] For example, in FIG. 8A, when reference image block 400A is selected as the selected reference image block 400, edges along the X-axis direction are extracted from reference image block 400A. When reference image block 400B is selected as the selected reference image block 400, edges are not extracted because all block images of reference image block 400B are filled with the same density. When reference image block 400C is selected as the selected reference image block 400, edges represented by curves and straight lines are extracted from reference image block 400C. When reference image block 400D is selected as the selected reference image block 400, edges along the Y-axis direction are extracted from reference image block 400D.

[0067] In step S50, the CPU 21 identifies the edge direction of the block image in the selection reference image block 400 based on the edge information extracted in step S40, and classifies the selection reference image block 400 into a category according to the edge direction.

[0068] 9 is a diagram showing an example of classifying the reference image blocks 400 into categories according to the edge directions. In this embodiment, the reference image blocks 400 are classified into four categories according to the edge directions.

[0069] Specifically, CPU 21 classifies reference image blocks 400 into four categories: a category with no edges (referred to as "category 0"), a category in which the edge direction consists of an X-axis component and a Y-axis component (referred to as "category 1"), a category in which the edge direction consists of only a Y-axis component (referred to as "category 2"), and a category in which the edge direction consists of only an X-axis component (referred to as "category 3").

[0070] Since no edge is extracted from the reference image block 400B, the CPU 21 classifies the reference image block 400B into category 0.

[0071] Edges represented by curved lines and straight lines are extracted from the reference image block 400 C. The curved lines include both Y-axis direction components and X-axis direction components, so the CPU 21 classifies the reference image block 400 C into category 1.

[0072] Since an edge along the Y-axis direction is extracted from the reference image block 400D, the CPU 21 classifies the reference image block 400D into category 2.

[0073] Since an edge along the X-axis direction is extracted from the reference image block 400A, the CPU 21 classifies the reference image block 400A into category 3.

[0074] In step S60, the CPU 21 determines whether or not there is an unselected reference image block 400 that has not yet been selected in step S30 among the reference image blocks 400 divided from the reference image 4. If there is an unselected reference image block 400, the process proceeds to step S30, and one of the unselected reference image blocks 400 is selected. By repeatedly executing the processes of steps S30 to S60 until it is determined in the determination process of step S60 that there is no unselected reference image block 400, the CPU 21 classifies all of the reference image blocks 400 divided from the reference image 4 into categories.

[0075] If it is determined in the determination process of step S60 that there is no unselected reference image block 400, the process proceeds to step S70.

[0076] In step S70, the CPU 21 sets a movement direction of the reference image block 400 for each category classified according to the edge direction.

[0077] For example, the reference image block 400 included in category 3 only contains edges along the X-axis direction, so even if the reference image block 400 is moved in the X-axis direction, it is difficult to detect the matching position between the reference image block 400 and the read image block 200 corresponding to it.

[0078] Therefore, a direction intersecting the edge direction, specifically, a direction perpendicular to the edge direction, may be set as the movement direction of the reference image block 400. That is, the CPU 21 sets the movement direction of each reference image block 400 included in category 3 to the Y-axis direction.

[0079] For the same reason, since the reference image blocks 400 included in category 2 only contain edges along the Y-axis direction, the CPU 21 sets the movement direction of each reference image block 400 included in category 2 to the X-axis direction perpendicular to the Y-axis.

[0080] Since the reference image blocks 400 included in category 1 include edges along the X-axis and Y-axis directions, the CPU 21 sets the movement directions of each reference image block 400 included in category 1 to the X-axis and Y-axis directions.

[0081] In the case of a reference image block 400 that does not include an edge, such as the reference image block 400 included in category 0, there is no information that serves as a landmark for detecting a matching position in the first place. Therefore, it is difficult to detect a matching position no matter in which direction the reference image block 400 is moved. Therefore, the CPU 21 does not set any direction as a moving direction for each reference image block 400 included in category 0.

[0082] That is, the movement direction set for the reference image block 400 is restricted to the movement direction that is the easiest to detect the matching position among all the movement directions.

[0083] In step S80, the CPU 21 selects one of the reference image blocks 400 classified into categories.

[0084] In step S90, the CPU 21 determines whether or not the selection reference image block 400 includes no edges, i.e., whether or not the selection reference image block 400 is a reference image block 400 classified into category 0. If the selection reference image block 400 includes edges, the process proceeds to step S100.

[0085] In step S100, the CPU 21 moves the selection reference image block 400 in the movement direction set in the selection reference image block 400, detects a matching position with the read image block 200 corresponding to the selection reference image block 400, and calculates the deviation between the selection reference image block 400 and the read image block 200 from the amount of movement of the selection reference image block 400. A known method such as pattern recognition may be used to detect the matching position.

[0086] For example, when the selection reference image block 400 is classified into category 1, the CPU 21 moves the selection reference image block 400 in the X-axis direction and the Y-axis direction, and calculates the deviation from the corresponding read image block 200.

[0087] When the selection reference image block 400 is classified into category 2, the CPU 21 moves the selection reference image block 400 in the X-axis direction and calculates the deviation from the corresponding read-out image block 200.

[0088] If the selection reference image block 400 is classified into category 3, the CPU 21 moves the selection reference image block 400 in the Y-axis direction and calculates the deviation from the corresponding read-out image block 200.

[0089] Specifically, when the selected reference image block 400 is the reference image block 400A in Figure 8 (A), the CPU 21 moves the reference image block 400A from the reference position in the Y-axis direction relative to the read image block 200A shown in Figure 8 (B), which is the read image block 200 corresponding to the reference image block 400A, and calculates the deviation from the read image block 200A.

[0090] When the selected reference image block 400 is the reference image block 400C in Figure 8 (A), the CPU 21 moves the reference image block 400C from the reference position in the X-axis direction and the Y-axis direction relative to the read image block 200C shown in Figure 8 (B), which is the read image block 200 corresponding to the reference image block 400C, and calculates the deviation from the read image block 200C.

[0091] When the selected reference image block 400 is the reference image block 400D in Figure 8 (A), the CPU 21 moves the reference image block 400D from the reference position in the X-axis direction relative to the read image block 200D shown in Figure 8 (B), which is the read image block 200 corresponding to the reference image block 400D, and calculates the deviation from the read image block 200D.

[0092] In step S110, the CPU 21 stores in the RAM 23 the deviation between the selection reference image block 400 and the read image block 200 corresponding to the selection reference image block 400, which was calculated in step S100.

[0093] On the other hand, if the judgment process of step S90 determines that the selection reference image block 400 does not contain an edge, calculating the deviation from the corresponding read image block 200 using the selection reference image block 400 becomes more difficult than calculating the deviation from the corresponding read image block 200 using a reference image block 400 that contains an edge.

[0094] Therefore, the CPU 21 proceeds to step S120 without executing the processes of steps S100 and S110.

[0095] When an attempt is made to calculate the deviation between a reference image block 400 that does not include edges and a scanned image block 200 that corresponds to the reference image block 400 using the reference image block 400, it becomes more difficult to detect the matching position than when the matching position is detected using a reference image block 400 that includes edges, because there is no information that can serve as a landmark for detecting the matching position in the reference image block 400. In this case, even if the matching position can be detected using some known method, the detection accuracy of the obtained matching position will be low.

[0096] Therefore, by not using the reference image block 400 that does not include edges in inspecting the misalignment between the reference image block 400 and the read image block 200, the inspection time can be shortened and the inspection accuracy can be improved.

[0097] In step S120, the CPU 21 determines whether or not there is an unselected reference image block 400 that has not yet been selected in step S80 among the categorized reference image blocks 400. If there is an unselected reference image block 400, the process proceeds to step S80, and one of the unselected reference image blocks 400 after categorization is selected. By repeatedly executing the processes of steps S80 to S120 until it is determined in the determination process of step S120 that there is no unselected reference image block 400, the deviation of each reference image block 400 from the corresponding scanned image block 200 is calculated.

[0098] On the other hand, if it is determined in the determination process of step S120 that there is no unselected reference image block 400, the process proceeds to step S130.

[0099] In step S130, the CPU 21 sets the inspection result to "pass" if the average value of the deviation between the reference image block 400 and the scanned image block 200 corresponding to the reference image block 400, which was stored in the RAM 23 for each reference image block 400 in step S110, is less than a reference threshold value, and sets the inspection result to "fail" if the average value of the deviation is equal to or greater than the reference threshold value. The CPU 21 then outputs the inspection result of the printed matter corresponding to the scanned image 2, and ends the inspection process shown in FIG. 7.

[0100] In this way, according to the image inspection device 10 of this embodiment, the movement direction of the reference image block 400 is set from the orientation of the edge included in the reference image block 400, the reference image block 400 is moved only in the set movement direction to detect the matching position, and the deviation from the read image block 200 corresponding to the reference image block 400 is calculated. Therefore, the time required for inspection is reduced compared to the case where the movement direction of the reference image block 400 is not set and the matching position is detected while moving the reference image block 400 in all directions.

[0101] In the inspection process described above, the reference image blocks 400 are classified into four categories according to the edge orientation, but there is no restriction on the number of categories to be classified. For example, the categories may be subdivided such that edges consisting only of components in a direction at an oblique angle of 45 degrees to the X-axis direction are classified into category 4. The movement direction of the reference image blocks 400 classified into category 4 may be set to a direction perpendicular to the edge orientation, similar to the reference image blocks 400 classified into other categories. Therefore, in this case, the CPU 21 moves the reference image block 400 in a diagonal direction at an angle of 45 degrees to the X-axis, and detects the matching position with the read image block 200 corresponding to the reference image block 400.

[0102] Furthermore, the CPU 21 may not classify the reference image block 400 into a category, but may set a direction perpendicular to the orientation of the edge contained in the reference image block 400 as the movement direction of the reference image block 400, and correspond the set movement direction to the reference image block 400.

[0103] In the inspection process described above, the reference image block 400B in Fig. 8(A) does not include an edge, so the deviation between the reference image block 400B and the read image block 200B is not calculated. However, if there is a deviation in the read image 2, the read image block 200B may include an edge, as shown in Fig. 8(B).

[0104] In step S20 of FIG. 7, the CPU 21 divided the reference image 4 so as not to overlap with adjacent reference image blocks 400. However, as shown in FIG. 10, if the reference image block 400B is expanded beyond a predetermined size, the expanded reference image block 400B (referred to as "reference image block 400BB") may include the edge of the block image, making it possible to calculate the deviation from the read image block 200B.

[0105] Therefore, in step S20 of FIG. 7, the CPU 21 may divide the reference image 4 into reference image blocks 400 that are expanded in size larger than a predetermined size according to the degree of deviation of the read image 2.

[0106] The CPU 21 determines whether to expand the size of the reference image block 400, and the amount of expansion of the reference image block 400 if it is determined to expand the size of the reference image block 400, using history information that records the tendency of deviation between the scanned image 2 and the reference image 4 so far. For example, if the average deviation between each scanned image 2 and the reference image 4 for multiple printed materials of the same type is 3 pixels, the CPU 21 divides the reference image 4 into reference image blocks 400 that are expanded by 3 pixels in both the X-axis and Y-axis directions from a predetermined size. Each expanded reference image block 400 overlaps with the adjacent reference image block 400 by the expanded range, i.e., by 3 pixels.

[0107] Furthermore, the CPU 21 may divide only a specific reference image block 400 into a size larger than a predetermined size. For example, a reference image block 400 that does not include an edge when divided into a predetermined size may be expanded to a size that includes any edge.

[0108] Furthermore, the CPU 21 may divide the reference image 4 into reference image blocks 400 that are smaller than a predetermined size. By reducing the reference image blocks 400 to a size smaller than a predetermined size, the amount of information contained in each reference image block 400 is smaller than when the reference image blocks 400 are divided into blocks of a predetermined size. This may make it easier to detect the matching position than when the matching position is detected with the reference image blocks 400 kept at the predetermined size.

[0109] Furthermore, in step S20 of FIG. 7, the CPU 21 may change the size of each reference image block 400 according to the complexity of the reference image 4 at the position of that reference image block 400, rather than dividing the reference image 4 into reference image blocks 400 of the same predetermined size.

[0110] For example, the more complex the location of the reference image 4, the more intricate the edges become, making it more difficult to detect the matching position between the read image block 200 and the reference image block 400. Therefore, in step S20 of FIG. 7, the CPU 21 makes it easier to detect the matching position between the read image block 200 and the reference image block 400 by reducing the size of the reference image block 400 including the more complex location of the reference image 4. The fact that it is easier to detect the matching position between the read image block 200 and the reference image block 400 leads to improved inspection accuracy for the misalignment between the read image 2 and the reference image 4.

[0111] Note that CPU 21 sets the complexity at each position of reference image 4, for example, by the number of edges at each position of reference image 4, but it may also be set by, for example, the variation in edge orientation, i.e., a variance value, instead of the number of edges at each position of reference image 4. Since a portion with greater variation in edge orientation is considered to be a more complex portion of reference image 4, CPU 21 divides reference image 4 so that the size of reference image block 400 including that portion is smaller than a predetermined size.

[0112] Fig. 11 is a diagram showing an example in which the reference image 4 shown in Fig. 3 is divided into reference image blocks 400 of different sizes according to the complexity of the reference image 4. As shown in Fig. 11, the reference image block 400 located at a position containing a greater number of edges is divided into smaller sizes.

[0113] 7, the CPU 21 directly divides the received scanned image 2 into scanned image blocks 200, but dividing the scanned image 2 and the reference image 4 after roughly aligning them so that they overlap as much as possible will result in a higher degree of match between the scanned image 2 and the reference image 4 than the degree of match between the scanned image 2 and the reference image 4 before alignment. This makes it easier to calculate the deviation between the reference image block 400 and the scanned image block 200 corresponding to the reference image block 400 in step S100.

[0114] Therefore, it is preferable that the CPU 21 performs an affine transformation on the read image 2 so that the read image 2 matches the reference image 4 as closely as possible, and then divides the read image 2 and the reference image 4 into read image blocks 200 and reference image blocks 400, respectively. Note that the affine transformation is a change that performs processing such as enlarging, reducing, and rotating the read image 2, and corrects the linear deviation between the read image 2 and the reference image 4.

[0115] Since the affine transformation corrects the linear shift between the read image 2 and the reference image 4, the shift obtained by detecting the matching position by moving the reference image block 400 relative to the corresponding read image block 200 for each reference image block 400 is a nonlinear shift between the read image 2 and the reference image 4.

[0116] Although one aspect of the image inspection device 10 has been described above using the embodiment, the disclosed form of the image inspection device 10 is merely an example, and the form of the image inspection device 10 is not limited to the scope described in the embodiment. Various modifications or improvements can be made to the embodiment without departing from the gist of the present disclosure, and forms with such modifications or improvements are also included in the technical scope of the disclosure. For example, the order of the inspection process shown in FIG. 7 may be changed without departing from the gist of the present disclosure.

[0117] In the above embodiment, the inspection process is implemented by software as an example. However, the process equivalent to the flowchart shown in Fig. 7 may be implemented by hardware. In this case, the process can be performed at a higher speed than when the inspection process is implemented by software.

[0118] In the above embodiment, the term "processor" refers to a processor in a broad sense, including a general-purpose processor (e.g., a CPU) and a dedicated processor (e.g., a GPU: Graphics Processing Unit, an ASIC: Application Specific Integrated Circuit, an FPGA: Field Programmable Gate Array, a programmable logic device, etc.).

[0119] In addition, the operations of the processor in the above embodiment may be performed not only by one processor but also by multiple processors located at physically separate locations working together. The order of the operations of the processor is not limited to the order described in the above embodiment and may be changed as appropriate.

[0120] In the above embodiment, an example in which the image inspection program is stored in the ROM 22 of the image inspection device 10 has been described, but the storage destination of the image inspection program is not limited to the ROM 22. The image inspection program of the present disclosure can also be provided in a form recorded in a storage medium readable by the computer 20. For example, the image inspection program may be provided in a form recorded in an optical disk such as a CD-ROM (Compact Disk Read Only Memory) or a DVD-ROM (Digital Versatile Disk Read Only Memory). The image inspection program may also be provided in a form recorded in a portable semiconductor memory such as a Universal Serial Bus (USB) memory or a memory card. The ROM 22, the non-volatile memory 24, the CD-ROM, the DVD-ROM, the USB, and the memory card are examples of non-transitory storage media.

[0121] Furthermore, the image inspection device 10 may download an image inspection program from an external device through the communication unit 27 and store the downloaded image inspection program, for example, in the non-volatile memory 24. In this case, the CPU 21 of the image inspection device 10 reads the image inspection program downloaded from the external device and executes the inspection process. [Explanation of symbols]

[0122] 2 ··· Read image, 4 ··· Reference image, 10 ··· Image inspection device, 11 ··· Input section, 12 ··· Dividing section, 13 ··· Movement direction setting section, 14 ··· Inspection section, 15 ··· Output section, 16 ··· Data storage DB, 20 ··· Computer, 21 ··· CPU, 22 ··· ROM, 23 ··· RAM, 24 ··· Non-volatile memory, 25 ··· I / O, 26 ··· Bus, 27 ··· Communication unit, 28 ··· Input unit, 29 ··· Output unit, 200 (200A, 200B, 200C, 200D) ··· Read image block, 400 (400A, 400B, 400C, 400D, 400BB) ··· Reference image block (selected reference image block)

Claims

1. A processor is provided. The processor, Dividing a read image obtained by reading a printed image and a reference image showing the original shape of the printed image into a plurality of regions of the same shape; setting a direction of movement of each of the divided regions of the reference image according to a direction of a contour line of the reference image within the region; For each corresponding area of ​​the read image and the reference image, the area of ​​the reference image is moved in a moving direction set for the area, and a deviation between the read image and the reference image is inspected. Image inspection equipment.

2. When all contour lines of the reference image in the region are oriented in one direction, the processor sets the movement direction of the region to a direction intersecting the one direction.

2. The image inspection apparatus according to claim 1.

3. The processor sets a movement direction of the region not to correspond to any direction when the reference image does not include a contour line within the region; When inspecting the deviation between the read image and the reference image, an area of ​​the reference image that does not include a contour line is not used.

3. The image inspection apparatus according to claim 1 or 2.

4. The processor expands an area of ​​the reference image to a size larger than a predetermined size, and divides the reference image into a plurality of areas such that a range of the expanded area overlaps with another area of ​​the reference image. The image inspection device according to any one of claims 1 to 3.

5. The processor sets an amount of expansion of the divided regions of the reference image using history information that records a tendency of deviation between the read image and the reference image.

5. The image inspection apparatus according to claim 4.

6. The processor varies a size of each region in the reference image according to a degree of complexity of the reference image corresponding to the position of the region. The image inspection device according to any one of claims 1 to 5.

7. The processor sets the complexity of the reference image corresponding to the position of the region according to the number of contours of the reference image corresponding to the position of the region.

7. The image inspection apparatus according to claim 6.

8. The processor performs at least one of enlarging, reducing, and rotating the read image before dividing the read image and the reference image into a plurality of regions so that a degree of matching between the reference image and the read image after processing becomes higher than a degree of matching between the reference image and the read image before processing. The image inspection device according to any one of claims 1 to 7.

9. On the computer, Dividing a read image obtained by reading a printed image and a reference image showing the original shape of the printed image into a plurality of regions of the same shape; setting a direction of movement of each of the divided regions of the reference image according to a direction of a contour line of the reference image within the region; For each corresponding area of ​​the read image and the reference image, the area of ​​the reference image is moved in a moving direction set for the area, and a process of inspecting the deviation between the read image and the reference image is executed. Image inspection program.

Citation Information

Patent Citations

  • Digital filter device

    JP1988079410A

  • Method and device for correcting deviation of position of image and image inspection device

    JP1993330024A

  • Image defect detecting apparatus and image forming apparatus

    JP2005208847A

  • Image detection apparatus and method

    JP2013186562A

  • Inspection device, image forming system, inspection method, and program

    JP2019100911A